[llvm] 35eef9f - [Reassociate] Use poison instead of undef for dummy operands (NFCI)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 25 03:47:56 PDT 2024
Author: Nikita Popov
Date: 2024-06-25T12:44:11+02:00
New Revision: 35eef9f97f077a7cfa2beb9df857aa1713e4faa6
URL: https://github.com/llvm/llvm-project/commit/35eef9f97f077a7cfa2beb9df857aa1713e4faa6
DIFF: https://github.com/llvm/llvm-project/commit/35eef9f97f077a7cfa2beb9df857aa1713e4faa6.diff
LOG: [Reassociate] Use poison instead of undef for dummy operands (NFCI)
These will be replaced later.
Added:
Modified:
llvm/lib/Transforms/Scalar/Reassociate.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/Reassociate.cpp b/llvm/lib/Transforms/Scalar/Reassociate.cpp
index c84107d7ef2cb..3bdb687a2c3ef 100644
--- a/llvm/lib/Transforms/Scalar/Reassociate.cpp
+++ b/llvm/lib/Transforms/Scalar/Reassociate.cpp
@@ -687,9 +687,9 @@ void ReassociatePass::RewriteExprTree(BinaryOperator *I,
// stupid, create a new node if there are none left.
BinaryOperator *NewOp;
if (NodesToRewrite.empty()) {
- Constant *Undef = UndefValue::get(I->getType());
- NewOp = BinaryOperator::Create(Instruction::BinaryOps(Opcode), Undef,
- Undef, "", I->getIterator());
+ Constant *Poison = PoisonValue::get(I->getType());
+ NewOp = BinaryOperator::Create(Instruction::BinaryOps(Opcode), Poison,
+ Poison, "", I->getIterator());
if (isa<FPMathOperator>(NewOp))
NewOp->setFastMathFlags(I->getFastMathFlags());
} else {
More information about the llvm-commits
mailing list