This patch makes the variants of mm*_cast* intel intrinsics that use shufflevector(freeze(poison), ..) emit efficient assembly.
(These intrinsics are planned to use shufflevector(freeze(poison), ..) after shufflevector's semantics update; relevant thread: D103874)
To do so, this patch
- Updates LowerAVXCONCAT_VECTORS in X86ISelLowering.cpp to recognize FREEZE(UNDEF) operand of CONCAT_VECTOR in addition to UNDEF
- Updates X86InstrVecCompiler.td to recognize insert_subvector of FREEZE(UNDEF) vector as its first operand.
Don't use SDTUnaryOp here. Use SDTypeProfile<1, 1, [SDTCisSameAs<0, 1>]>
SDTUnaryOp doesn't force the input and output to have the same type. I think that prevented VT from propagating through the freeze to the undef and that left the undef untyped causing the pattern to be dropped.