summaryrefslogtreecommitdiff
path: root/lib/Analysis/ScalarEvolutionExpander.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-03-23 21:53:22 +0000
committerDan Gohman <gohman@apple.com>2010-03-23 21:53:22 +0000
commite059ee832ca36d65a5fb87b0ac5bcdb0490b15cb (patch)
tree1f11818251a9807572828a48a2d3d028054acbec /lib/Analysis/ScalarEvolutionExpander.cpp
parenta495c7232d63d4eeab394791397ee384620f6864 (diff)
downloadllvm-e059ee832ca36d65a5fb87b0ac5bcdb0490b15cb.tar.gz
llvm-e059ee832ca36d65a5fb87b0ac5bcdb0490b15cb.tar.bz2
llvm-e059ee832ca36d65a5fb87b0ac5bcdb0490b15cb.tar.xz
Don't back past debug info intrinsics; SCEVExpander's strategy
for ignoring debug info intrinsics everywhere else is to advance past them, and it needs to be consistent. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99332 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ScalarEvolutionExpander.cpp')
-rw-r--r--lib/Analysis/ScalarEvolutionExpander.cpp13
1 files changed, 1 insertions, 12 deletions
diff --git a/lib/Analysis/ScalarEvolutionExpander.cpp b/lib/Analysis/ScalarEvolutionExpander.cpp
index 138cdc64cd..2e18ceac52 100644
--- a/lib/Analysis/ScalarEvolutionExpander.cpp
+++ b/lib/Analysis/ScalarEvolutionExpander.cpp
@@ -1268,19 +1268,8 @@ Value *SCEVExpander::expand(const SCEV *S) {
L = L->getParentLoop())
if (S->isLoopInvariant(L)) {
if (!L) break;
- if (BasicBlock *Preheader = L->getLoopPreheader()) {
+ if (BasicBlock *Preheader = L->getLoopPreheader())
InsertPt = Preheader->getTerminator();
- BasicBlock::iterator IP = InsertPt;
- // Back past any debug info instructions. Sometimes we inserted
- // something earlier before debug info but after any real instructions.
- // This should behave the same as if debug info was not present.
- while (IP != Preheader->begin()) {
- --IP;
- if (!isa<DbgInfoIntrinsic>(IP))
- break;
- InsertPt = IP;
- }
- }
} else {
// If the SCEV is computable at this level, insert it into the header
// after the PHIs (and after any other instructions that we've inserted