Ignoring freeze(undef) if it has multiple uses in LowerAVXCONCAT_VECTORS causes the custom INSERT_SUBVECTOR for vector widening to be ignored.
For example in https://godbolt.org/z/7hacPe1KM extra vinsertf128 instructions are introduced.
This is necessary to lower mm512_cast*128 intel intrinsics as no-op intrinsics.
This line contains %s twice, which seems to cause the crash.
Would removing one of %s resolve the crash issue? On my machine removing one of those worked well; with two %s; it crashed.