summaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/LCSSA.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/Utils/LCSSA.cpp')
-rw-r--r--lib/Transforms/Utils/LCSSA.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Transforms/Utils/LCSSA.cpp b/lib/Transforms/Utils/LCSSA.cpp
index 5def5f99ad..316784d3be 100644
--- a/lib/Transforms/Utils/LCSSA.cpp
+++ b/lib/Transforms/Utils/LCSSA.cpp
@@ -225,9 +225,7 @@ void LCSSA::getLoopValuesUsedOutsideLoop(Loop *L,
// immediately here. It will be processed in next iteration.
BasicBlock::iterator InsertPoint;
if (InvokeInst *II = dyn_cast<InvokeInst>(I)) {
- InsertPoint = II->getNormalDest()->begin();
- while (isa<PHINode>(InsertPoint))
- ++InsertPoint;
+ InsertPoint = II->getNormalDest()->getFirstNonPHI();
} else {
InsertPoint = I;
InsertPoint++;