diff options
author | Nuno Lopes <nuno.lopes@tecnico.ulisboa.pt> | 2022-07-23 21:50:11 +0100 |
---|---|---|
committer | Nuno Lopes <nuno.lopes@tecnico.ulisboa.pt> | 2022-07-23 21:50:11 +0100 |
commit | 9df0b254d24eca0987d9f88e998b4432f8608ff2 (patch) | |
tree | 259a82abacdecc595ac435c46d1391803b532053 /llvm/lib/Transforms/Utils/CloneFunction.cpp | |
parent | 2d2e2e7ea960c678416862f4b70215f0de16f39a (diff) | |
download | llvm-9df0b254d24eca0987d9f88e998b4432f8608ff2.zip llvm-9df0b254d24eca0987d9f88e998b4432f8608ff2.tar.gz llvm-9df0b254d24eca0987d9f88e998b4432f8608ff2.tar.bz2 |
[NFC] Switch a few uses of undef to poison as placeholders for unreachable code
Diffstat (limited to 'llvm/lib/Transforms/Utils/CloneFunction.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/CloneFunction.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp index e737a594..1d34821 100644 --- a/llvm/lib/Transforms/Utils/CloneFunction.cpp +++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp @@ -734,14 +734,14 @@ void llvm::CloneAndPruneIntoFromInst(Function *NewFunc, const Function *OldFunc, } // If the loops above have made these phi nodes have 0 or 1 operand, - // replace them with undef or the input value. We must do this for + // replace them with poison or the input value. We must do this for // correctness, because 0-operand phis are not valid. PN = cast<PHINode>(NewBB->begin()); if (PN->getNumIncomingValues() == 0) { BasicBlock::iterator I = NewBB->begin(); BasicBlock::const_iterator OldI = OldBB->begin(); while ((PN = dyn_cast<PHINode>(I++))) { - Value *NV = UndefValue::get(PN->getType()); + Value *NV = PoisonValue::get(PN->getType()); PN->replaceAllUsesWith(NV); assert(VMap[&*OldI] == PN && "VMap mismatch"); VMap[&*OldI] = NV; |