[llvm] [InstSimplify] Make sure the simplified value doesn't generate poison in threadBinOpOverSelect (PR #87075)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 29 10:43:56 PDT 2024
================
@@ -440,7 +440,8 @@ static Value *threadBinOpOverSelect(Instruction::BinaryOps Opcode, Value *LHS,
// Check that the simplified value has the form "X op Y" where "op" is the
// same as the original operation.
Instruction *Simplified = dyn_cast<Instruction>(FV ? FV : TV);
- if (Simplified && Simplified->getOpcode() == unsigned(Opcode)) {
+ if (Simplified && Simplified->getOpcode() == unsigned(Opcode) &&
+ !Simplified->hasPoisonGeneratingFlags()) {
----------------
goldsteinn wrote:
why is the fix to prohibit any poison flag and not to just drop the poison generating flag?
https://github.com/llvm/llvm-project/pull/87075
More information about the llvm-commits
mailing list