Skip to content

Commit

Permalink
Merge in fix for PR4910.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_26@82428 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
tlattner committed Sep 21, 2009
1 parent 66f1c6a commit f2641fb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/CodeGen/SimpleRegisterCoalescing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
Expand Down

0 comments on commit f2641fb

Please sign in to comment.