aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
diff options
context:
space:
mode:
authorManuel Brito <manuel.brito@tecnico.ulisboa.pt>2022-09-10 14:22:38 +0100
committerNuno Lopes <nuno.lopes@tecnico.ulisboa.pt>2022-09-10 14:28:01 +0100
commitb51c6130efac2afd183ad71b81c16c713c10a1b5 (patch)
tree31bac9c96436b6884a3b6ba8e676e18a6f677460 /llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
parentbc0725a43763ff241f807e1de45d1a548aec89b8 (diff)
downloadllvm-b51c6130efac2afd183ad71b81c16c713c10a1b5.zip
llvm-b51c6130efac2afd183ad71b81c16c713c10a1b5.tar.gz
llvm-b51c6130efac2afd183ad71b81c16c713c10a1b5.tar.bz2
Use PoisonValue instead of UndefValue when RAUWing unreachable code [NFC]
Replacing the following instances of UndefValue with PoisonValue, where the UndefValue is used as an arbitrary value: - llvm/lib/CodeGen/WinEHPrepare.cpp `demotePHIsOnFunclets`: RAUW arbitrary value for lingering uses of removed PHI nodes - llvm/lib/Transforms/Utils/BasicBlockUtils.cpp `FoldSingleEntryPHINodes`: Removes a self-referential single entry phi node. - llvm/lib/Transforms/Utils/CallGraphUpdater.cpp `finalize`: Remove all references to removed functions. - llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp `cleanup`: the result is not used then the inserted instructions are removed. - llvm/tools/bugpoint/CrashDebugger.cpp `TestInts`: the program is cloned and instructions are removed to narrow down source of crash. Differential Revision: https://reviews.llvm.org/D133640
Diffstat (limited to 'llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp b/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
index 95e6427..3e7e016 100644
--- a/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
+++ b/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
@@ -2666,7 +2666,7 @@ void SCEVExpanderCleaner::cleanup() {
#endif
assert(!I->getType()->isVoidTy() &&
"inserted instruction should have non-void types");
- I->replaceAllUsesWith(UndefValue::get(I->getType()));
+ I->replaceAllUsesWith(PoisonValue::get(I->getType()));
I->eraseFromParent();
}
}