[llvm] [X86] matchUnaryShuffle - only prefer VZEXT_MOVL to VPMOVZX if it will fold away (PR #207031)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 2 10:53:38 PDT 2026


================
@@ -208,15 +208,13 @@ define <2 x i64> @extract0_i32_zext_insert1_i64_zero(<4 x i32> %x) {
 ;
 ; SSE41-LABEL: extract0_i32_zext_insert1_i64_zero:
 ; SSE41:       # %bb.0:
-; SSE41-NEXT:    pxor %xmm1, %xmm1
-; SSE41-NEXT:    pblendw {{.*#+}} xmm0 = xmm0[0,1],xmm1[2,3,4,5,6,7]
+; SSE41-NEXT:    pmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
----------------
RKSimon wrote:

the shuffle mask is undef there - as the pslldq below will discard the upper 64-bits of the xmm0

https://github.com/llvm/llvm-project/pull/207031


More information about the llvm-commits mailing list