[PATCH] D152658: [InstCombine] Change SimplifyDemandedVectorElts to use PoisonElts instead of UndefElts
Nuno Lopes via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 11 15:08:07 PDT 2023
nlopes added inline comments.
================
Comment at: llvm/lib/Target/X86/X86InstCombineIntrinsic.cpp:3102-3105
case Intrinsic::x86_sse4a_extrqi:
case Intrinsic::x86_sse4a_insertq:
case Intrinsic::x86_sse4a_insertqi:
+ PoisonElts.setHighBits(VWidth / 2);
----------------
this change doesn't look correct. The bits are undefined, doesn't seem like you can use poison here.
================
Comment at: llvm/test/Transforms/InstCombine/vec_shuffle.ll:1301
; CHECK-LABEL: @fmul_splat_constant(
-; CHECK-NEXT: [[TMP1:%.*]] = fmul <2 x float> [[X:%.*]], <float 4.200000e+01, float poison>
-; CHECK-NEXT: [[R:%.*]] = shufflevector <2 x float> [[TMP1]], <2 x float> poison, <2 x i32> zeroinitializer
+ ; CHECK-NEXT: [[TMP1:%.*]] = shufflevector <2 x float> [[X:%.*]], <2 x float> undef, <2 x i32> zeroinitializer
+; CHECK-NEXT: [[R:%.*]] = fmul <2 x float> [[TMP1]], <float 4.200000e+01, float 4.200000e+01>
----------------
Why does it regress here (goes from poison to undef)?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152658/new/
https://reviews.llvm.org/D152658
More information about the llvm-commits
mailing list