summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2012-03-21 04:12:01 +0000
committerAndrew Trick <atrick@apple.com>2012-03-21 04:12:01 +0000
commit3bfafcba108baaf2b41259362aff7bad51f526fb (patch)
treed35795c1af7d5d3e3d9aa8b2cc7cae4f2546b2d0 /llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
parent34c863a0312c848a315207188c5503baefc0e41a (diff)
downloadbcm5719-llvm-3bfafcba108baaf2b41259362aff7bad51f526fb.tar.gz
bcm5719-llvm-3bfafcba108baaf2b41259362aff7bad51f526fb.zip
misched: fix LI update for bottom-up.
llvm-svn: 153158
Diffstat (limited to 'llvm/lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveIntervalAnalysis.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
index 70ed1c398ba..1019ad2594c 100644
--- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -1319,8 +1319,14 @@ private:
void moveEnteringDownFrom(SlotIndex OldIdx, IntRangePair& P) {
LiveInterval* LI = P.first;
LiveRange* LR = P.second;
+ // Extend the LiveRange if NewIdx is past the end.
if (NewIdx > LR->end) {
- moveKillFlags(LI->reg, LR->end, NewIdx);
+ // Move kill flags if OldIdx was not originally the end
+ // (otherwise LR->end points to an invalid slot).
+ if (LR->end.getRegSlot() != OldIdx.getRegSlot()) {
+ assert(LR->end > OldIdx && "LiveRange does not cover original slot");
+ moveKillFlags(LI->reg, LR->end, NewIdx);
+ }
LR->end = NewIdx.getRegSlot();
}
}
OpenPOWER on IntegriCloud