aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/UnifyLoopExits.cpp
diff options
context:
space:
mode:
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);
}
}