No need to remove dead range from soon-to-be-dead live interval. Its val# may be out of whack.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41024 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2007-08-12 01:26:19 +00:00
parent 001f7534e0
commit ccb36a4f1b

View File

@ -316,9 +316,9 @@ bool SimpleRegisterCoalescing::JoinCopy(MachineInstr *CopyMI,
}
if (isShorten || isDead) {
// Shorten the live interval.
LiveInterval &LiveInInt = (repSrcReg == DstInt.reg) ? DstInt : SrcInt;
LiveInInt.removeRange(RemoveStart, RemoveEnd);
// Shorten the destination live interval.
if (repSrcReg == DstInt.reg)
DstInt.removeRange(RemoveStart, RemoveEnd);
}
} else {
// Coalescing failed.