Skip to content

Commit 509af08

Browse files
committed
replace 2 placeholder uses of undef with poison [NFC]
1 parent 0b7e8c2 commit 509af08

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

llvm/lib/CodeGen/CodeGenPrepare.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3340,7 +3340,7 @@ class TypePromotionTransaction {
33403340
// Set a dummy one.
33413341
// We could use OperandSetter here, but that would imply an overhead
33423342
// that we are not willing to pay.
3343-
Inst->setOperand(It, UndefValue::get(Val->getType()));
3343+
Inst->setOperand(It, PoisonValue::get(Val->getType()));
33443344
}
33453345
}
33463346

llvm/lib/CodeGen/SjLjEHPrepare.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,11 +267,11 @@ void SjLjEHPrepareImpl::lowerIncomingArguments(Function &F) {
267267

268268
Type *Ty = AI.getType();
269269

270-
// Use 'select i8 true, %arg, undef' to simulate a 'no-op' instruction.
270+
// Use 'select i8 true, %arg, poison' to simulate a 'no-op' instruction.
271271
Value *TrueValue = ConstantInt::getTrue(F.getContext());
272-
Value *UndefValue = UndefValue::get(Ty);
272+
Value *PoisonValue = PoisonValue::get(Ty);
273273
Instruction *SI = SelectInst::Create(
274-
TrueValue, &AI, UndefValue, AI.getName() + ".tmp", AfterAllocaInsPt);
274+
TrueValue, &AI, PoisonValue, AI.getName() + ".tmp", AfterAllocaInsPt);
275275
AI.replaceAllUsesWith(SI);
276276

277277
// Reset the operand, because it was clobbered by the RAUW above.

0 commit comments

Comments
 (0)