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

llvm-svn: 41024
This commit is contained in:
Evan Cheng 2007-08-12 01:26:19 +00:00
parent 460e34afed
commit af21e9550e
1 changed files with 3 additions and 3 deletions

View File

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