diff options
author | Tanya Lattner <tonic@nondot.org> | 2009-09-21 03:01:01 +0000 |
---|---|---|
committer | Tanya Lattner <tonic@nondot.org> | 2009-09-21 03:01:01 +0000 |
commit | f2641fb4d0090497b8a757581718c218d33f64f3 (patch) | |
tree | ff696e9a00f06f12fa4cb408916d720888ec0999 | |
parent | 66f1c6a5452af6ac0f47de9adb48cd2e6745eb58 (diff) | |
download | llvm-f2641fb4d0090497b8a757581718c218d33f64f3.tar.gz |
Merge in fix for PR4910.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_26@82428 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/SimpleRegisterCoalescing.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/CodeGen/SimpleRegisterCoalescing.cpp b/lib/CodeGen/SimpleRegisterCoalescing.cpp index f3dd3607cc1d..7549c2816e76 100644 --- a/lib/CodeGen/SimpleRegisterCoalescing.cpp +++ b/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; } } } |