summaryrefslogtreecommitdiffstats
path: root/llvm/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
commitdcddd5701c8d73f6dd4e38537b6ade2a588b486f (patch)
treed852addf08cc3183e6d3681c629699e1d47a1cc8 /llvm/lib/Analysis/ScalarEvolutionExpander.cpp
parentae12e35004a145997ee15fd15d909feed09fac1c (diff)
downloadbcm5719-llvm-dcddd5701c8d73f6dd4e38537b6ade2a588b486f.tar.gz
bcm5719-llvm-dcddd5701c8d73f6dd4e38537b6ade2a588b486f.zip
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. llvm-svn: 99332
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolutionExpander.cpp')
-rw-r--r--llvm/lib/Analysis/ScalarEvolutionExpander.cpp13
1 files changed, 1 insertions, 12 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolutionExpander.cpp b/llvm/lib/Analysis/ScalarEvolutionExpander.cpp
index 138cdc64cd0..2e18ceac525 100644
--- a/llvm/lib/Analysis/ScalarEvolutionExpander.cpp
+++ b/llvm/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
OpenPOWER on IntegriCloud