[PATCH] D127073: [SLP] Treat undef as any other constant

Harald van Dijk via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 5 12:13:48 PDT 2022


hvdijk added inline comments.


================
Comment at: llvm/test/Transforms/SLPVectorizer/X86/diamond_broadcast_extra_shuffle.ll:121
+; CHECK-NEXT:    [[TMP0:%.*]] = insertelement <4 x i32> <i32 poison, i32 undef, i32 poison, i32 poison>, i32 [[LD]], i32 0
+; CHECK-NEXT:    [[SHUFFLE:%.*]] = shufflevector <4 x i32> [[TMP0]], <4 x i32> poison, <4 x i32> <i32 0, i32 0, i32 0, i32 1>
+; CHECK-NEXT:    [[SHUFFLE1:%.*]] = shufflevector <4 x i32> [[TMP0]], <4 x i32> poison, <4 x i32> <i32 0, i32 0, i32 1, i32 0>
----------------
nlopes wrote:
> this is also a regression.
> Before we were doing a broadcast of %ld and doing `mul %ld, %ld` in all 4 lanes, as the undefs were replaced with %ld.
Replacing undef with %ld is only valid if we can prove %ld is not poison, and we have no checks for that. It might be valid here, but it is not valid in general, is it?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127073/new/

https://reviews.llvm.org/D127073



More information about the llvm-commits mailing list