From 768069ee7a11756b9ba658a4395faa802fc71548 Mon Sep 17 00:00:00 2001 From: Dale Johannesen Date: Tue, 9 Mar 2010 01:08:11 +0000 Subject: [PATCH] Another place where debug info affected codegen. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98026 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/ScalarEvolutionExpander.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Analysis/ScalarEvolutionExpander.cpp b/lib/Analysis/ScalarEvolutionExpander.cpp index e27da966924..3c2cbfbe78e 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(InsertPt)) + InsertPt = llvm::next(BasicBlock::iterator(InsertPt)); while (isInsertedInstruction(InsertPt)) InsertPt = llvm::next(BasicBlock::iterator(InsertPt)); break;