[PATCH] D155295: [InstCombine] Allow SimplifyDemandedVectorElts to look through freeze
Nuno Lopes via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 14 10:48:45 PDT 2023
nlopes added inline comments.
================
Comment at: llvm/test/Transforms/InstCombine/shufflevector_freezepoison.ll:17
; CHECK-LABEL: @shuffle_op1_freeze_poison(
-; CHECK-NEXT: [[B:%.*]] = freeze <2 x double> poison
-; CHECK-NEXT: [[SHUFFLE:%.*]] = shufflevector <2 x double> [[A:%.*]], <2 x double> [[B]], <4 x i32> <i32 0, i32 1, i32 2, i32 3>
+; CHECK-NEXT: [[SHUFFLE:%.*]] = shufflevector <2 x double> [[A:%.*]], <2 x double> undef, <4 x i32> <i32 0, i32 1, i32 poison, i32 poison>
; CHECK-NEXT: ret <4 x double> [[SHUFFLE]]
----------------
this transformation isn't correct.
It replaces <a[0], a[1], freeze poison, freeze poison>
with: <a[0], a[1], poison, poison>.
OOB or poison indexes in the mask yield a poison element.
Not sure if the bug is in this patch or if it was already there though. The code needs probably needs to separate undef from poison elements.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155295/new/
https://reviews.llvm.org/D155295
More information about the llvm-commits
mailing list