diff options
-rw-r--r-- | lib/Analysis/ScalarEvolutionExpander.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Analysis/ScalarEvolutionExpander.cpp b/lib/Analysis/ScalarEvolutionExpander.cpp index e27da96..3c2cbfb 100644 --- a/lib/Analysis/ScalarEvolutionExpander.cpp +++ b/lib/Analysis/ScalarEvolutionExpander.cpp @@ -1286,6 +1286,8 @@ Value *SCEVExpander::expand(const SCEV *S) { // there) so that it is guaranteed to dominate any user inside the loop. if (L && S->hasComputableLoopEvolution(L) && L != PostIncLoop) InsertPt = L->getHeader()->getFirstNonPHI(); + while (isa<DbgInfoIntrinsic>(InsertPt)) + InsertPt = llvm::next(BasicBlock::iterator(InsertPt)); while (isInsertedInstruction(InsertPt)) InsertPt = llvm::next(BasicBlock::iterator(InsertPt)); break; |