aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/InlineFunction.cpp
diff options
context:
space:
mode:
authorNuno Lopes <nuno.lopes@tecnico.ulisboa.pt>2023-07-22 13:23:32 +0100
committerNuno Lopes <nuno.lopes@tecnico.ulisboa.pt>2023-07-22 13:23:40 +0100
commit3bc74bed64c614ec218068cc2184286cba4788b6 (patch)
treed6fa5dad0975738fa5c959bf57c98c53d505bf6a /llvm/lib/Transforms/Utils/InlineFunction.cpp
parent29d0b6043034d1fd70330cebed20b557a26a0b98 (diff)
downloadllvm-3bc74bed64c614ec218068cc2184286cba4788b6.zip
llvm-3bc74bed64c614ec218068cc2184286cba4788b6.tar.gz
llvm-3bc74bed64c614ec218068cc2184286cba4788b6.tar.bz2
[Inline] Use poison instead of undef as placeholder [NFC]
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/InlineFunction.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp
index 23144c06..f7b93fc8 100644
--- a/llvm/lib/Transforms/Utils/InlineFunction.cpp
+++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp
@@ -2657,7 +2657,7 @@ llvm::InlineResult llvm::InlineFunction(CallBase &CB, InlineFunctionInfo &IFI,
if (!CB.use_empty()) {
ReturnInst *R = Returns[0];
if (&CB == R->getReturnValue())
- CB.replaceAllUsesWith(UndefValue::get(CB.getType()));
+ CB.replaceAllUsesWith(PoisonValue::get(CB.getType()));
else
CB.replaceAllUsesWith(R->getReturnValue());
}
@@ -2769,7 +2769,7 @@ llvm::InlineResult llvm::InlineFunction(CallBase &CB, InlineFunctionInfo &IFI,
// using the return value of the call with the computed value.
if (!CB.use_empty()) {
if (&CB == Returns[0]->getReturnValue())
- CB.replaceAllUsesWith(UndefValue::get(CB.getType()));
+ CB.replaceAllUsesWith(PoisonValue::get(CB.getType()));
else
CB.replaceAllUsesWith(Returns[0]->getReturnValue());
}