Skip to content

Commit fa61dc3

Browse files
nikicAlexisPerry
authored andcommitted
[Reassociate] Use poison instead of undef for dummy operands (NFCI)
These will be replaced later.
1 parent 5cf874c commit fa61dc3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/Transforms/Scalar/Reassociate.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -687,9 +687,9 @@ void ReassociatePass::RewriteExprTree(BinaryOperator *I,
687687
// stupid, create a new node if there are none left.
688688
BinaryOperator *NewOp;
689689
if (NodesToRewrite.empty()) {
690-
Constant *Undef = UndefValue::get(I->getType());
691-
NewOp = BinaryOperator::Create(Instruction::BinaryOps(Opcode), Undef,
692-
Undef, "", I->getIterator());
690+
Constant *Poison = PoisonValue::get(I->getType());
691+
NewOp = BinaryOperator::Create(Instruction::BinaryOps(Opcode), Poison,
692+
Poison, "", I->getIterator());
693693
if (isa<FPMathOperator>(NewOp))
694694
NewOp->setFastMathFlags(I->getFastMathFlags());
695695
} else {

0 commit comments

Comments
 (0)