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

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 1 20:56:58 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
----------------
phoebewang wrote:

Is this correct? Wedon't know `xmm0[1]` is zero here.

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


More information about the llvm-commits mailing list