[PATCH] D149592: [InstCombine] Fix bug in `FoldOpIntoSelect` where we would incorrectly fold `undef` as constant
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 1 11:20:30 PDT 2023
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:1044
+ Pred == (IsTrueArm ? ICmpInst::ICMP_EQ : ICmpInst::ICMP_NE) &&
+ isGuaranteedNotToBeUndefOrPoison(C, Q.AC, Q.CxtI, Q.DT,
+ /* Depth */ 0)) {
----------------
For constants, it's enough to just pass `C`, you can skip all the other arguments.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149592/new/
https://reviews.llvm.org/D149592
More information about the llvm-commits
mailing list