Kill info update bugs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41064 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/LiveInterval.cpp b/lib/CodeGen/LiveInterval.cpp
index d60c3b1..9697d43 100644
--- a/lib/CodeGen/LiveInterval.cpp
+++ b/lib/CodeGen/LiveInterval.cpp
@@ -109,6 +109,7 @@
void LiveInterval::extendIntervalEndTo(Ranges::iterator I, unsigned NewEnd) {
assert(I != ranges.end() && "Not a valid interval!");
unsigned ValId = I->ValId;
+ unsigned OldEnd = I->end;
// Search for the first interval that we can't merge with.
Ranges::iterator MergeTo = next(I);
@@ -123,7 +124,7 @@
ranges.erase(next(I), MergeTo);
// Update kill info.
- removeKillForValNum(ValId, I->start, I->end-1);
+ removeKillForValNum(ValId, OldEnd, I->end-1);
// If the newly formed range now touches the range after it and if they have
// the same value number, merge the two ranges into one range.