[PATCH] D93994: [InstSimplify] Fold insertelement vec, poison, idx into vec
Juneyoung Lee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 4 17:21:35 PST 2021
aqjune marked an inline comment as done.
aqjune added inline comments.
================
Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:4402
+ if (isa<PoisonValue>(Val) ||
+ (Q.isUndefValue(Val) && isGuaranteedNotToBeUndefOrPoison(Vec)))
return Vec;
----------------
nikic wrote:
> You can also switch this to use `isGuaranteedNotToBePoison()` to be more precise.
Made D94053 to make the function distinguish constant vector with undef elements but not poison. :)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93994/new/
https://reviews.llvm.org/D93994
More information about the llvm-commits
mailing list