[PATCH] D105392: [InstCombine] Add optimization to prevent poison from being propagated.
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 4 13:05:33 PDT 2021
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:3557
+ dyn_cast<Instruction>(NotGuaranteedNonPoisonOperand)) {
+ auto &U = *Op1->use_begin();
+ auto *FI = new FreezeInst(Op1, Op1->getName() + ".fr");
----------------
You should directly store the `Use *` rather than the `Value *` and then pass that to replaceUse(). Right now you're replacing some random use of the value.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105392/new/
https://reviews.llvm.org/D105392
More information about the llvm-commits
mailing list