summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTanya Lattner <tonic@nondot.org>2009-09-21 03:01:01 +0000
committerTanya Lattner <tonic@nondot.org>2009-09-21 03:01:01 +0000
commit6f46e545d269452483443c9547913e212f83f57a (patch)
treea2be216a46d831ea0eef712b04e19a4542e789bf
parentb2d5a6d2e120c18a5f562db7933c9dfa6ed4a128 (diff)
downloadllvm-6f46e545d269452483443c9547913e212f83f57a.tar.gz
Merge in fix for PR4910.
llvm-svn: 82428
-rw-r--r--llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
index f3dd3607cc1d..7549c2816e76 100644
--- a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
+++ b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
@@ -527,14 +527,15 @@ static void removeRange(LiveInterval &li, unsigned Start, unsigned End,
if (!li_->hasInterval(*SR))
continue;
LiveInterval &sli = li_->getInterval(*SR);
+ unsigned RemoveStart = Start;
unsigned RemoveEnd = Start;
while (RemoveEnd != End) {
- LiveInterval::iterator LR = sli.FindLiveRangeContaining(Start);
+ LiveInterval::iterator LR = sli.FindLiveRangeContaining(RemoveStart);
if (LR == sli.end())
break;
RemoveEnd = (LR->end < End) ? LR->end : End;
- sli.removeRange(Start, RemoveEnd, true);
- Start = RemoveEnd;
+ sli.removeRange(RemoveStart, RemoveEnd, true);
+ RemoveStart = RemoveEnd;
}
}
}