Skip to content

Commit 3bc74be

Browse files
committed
[Inline] Use poison instead of undef as placeholder [NFC]
1 parent 29d0b60 commit 3bc74be

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Transforms/Utils/InlineFunction.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2657,7 +2657,7 @@ llvm::InlineResult llvm::InlineFunction(CallBase &CB, InlineFunctionInfo &IFI,
26572657
if (!CB.use_empty()) {
26582658
ReturnInst *R = Returns[0];
26592659
if (&CB == R->getReturnValue())
2660-
CB.replaceAllUsesWith(UndefValue::get(CB.getType()));
2660+
CB.replaceAllUsesWith(PoisonValue::get(CB.getType()));
26612661
else
26622662
CB.replaceAllUsesWith(R->getReturnValue());
26632663
}
@@ -2769,7 +2769,7 @@ llvm::InlineResult llvm::InlineFunction(CallBase &CB, InlineFunctionInfo &IFI,
27692769
// using the return value of the call with the computed value.
27702770
if (!CB.use_empty()) {
27712771
if (&CB == Returns[0]->getReturnValue())
2772-
CB.replaceAllUsesWith(UndefValue::get(CB.getType()));
2772+
CB.replaceAllUsesWith(PoisonValue::get(CB.getType()));
27732773
else
27742774
CB.replaceAllUsesWith(Returns[0]->getReturnValue());
27752775
}

0 commit comments

Comments
 (0)