Another place where debug info affected codegen.
authorDale Johannesen <dalej@apple.com>
Tue, 9 Mar 2010 01:08:11 +0000 (01:08 +0000)
committerDale Johannesen <dalej@apple.com>
Tue, 9 Mar 2010 01:08:11 +0000 (01:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98026 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/ScalarEvolutionExpander.cpp

index e27da966924703fd4cdaf7fda34a6f15e0c387ef..3c2cbfbe78ebac1bc3e9e3666e4b2ac99b185a81 100644 (file)
@@ -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;