aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/UnifyLoopExits.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2023-07-26 19:03:47 +0000
committerDimitry Andric <dim@FreeBSD.org>2023-07-26 19:04:23 +0000
commit7fa27ce4a07f19b07799a767fc29416f3b625afb (patch)
tree27825c83636c4de341eb09a74f49f5d38a15d165 /llvm/lib/Transforms/Utils/UnifyLoopExits.cpp
parente3b557809604d036af6e00c60f012c2025b59a5e (diff)
Diffstat (limited to 'llvm/lib/Transforms/Utils/UnifyLoopExits.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/UnifyLoopExits.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/UnifyLoopExits.cpp b/llvm/lib/Transforms/Utils/UnifyLoopExits.cpp
index 3be96ebc93a2..8c781f59ff5a 100644
--- a/llvm/lib/Transforms/Utils/UnifyLoopExits.cpp
+++ b/llvm/lib/Transforms/Utils/UnifyLoopExits.cpp
@@ -113,7 +113,7 @@ static void restoreSSA(const DominatorTree &DT, const Loop *L,
}
}
- for (auto II : ExternalUsers) {
+ for (const auto &II : ExternalUsers) {
// For each Def used outside the loop, create NewPhi in
// LoopExitBlock. NewPhi receives Def only along exiting blocks that
// dominate it, while the remaining values are undefined since those paths
@@ -130,7 +130,7 @@ static void restoreSSA(const DominatorTree &DT, const Loop *L,
NewPhi->addIncoming(Def, In);
} else {
LLVM_DEBUG(dbgs() << "not dominated\n");
- NewPhi->addIncoming(UndefValue::get(Def->getType()), In);
+ NewPhi->addIncoming(PoisonValue::get(Def->getType()), In);
}
}