From: Evan Cheng Date: Sun, 12 Aug 2007 01:26:19 +0000 (+0000) Subject: No need to remove dead range from soon-to-be-dead live interval. Its val# may be... X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=ccb36a4f1bcafdf0de8514e396a5d2acf29d3947;p=oota-llvm.git 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 --- diff --git a/lib/CodeGen/SimpleRegisterCoalescing.cpp b/lib/CodeGen/SimpleRegisterCoalescing.cpp index 6870aff8166..e71b9d4c0f8 100644 --- a/lib/CodeGen/SimpleRegisterCoalescing.cpp +++ b/lib/CodeGen/SimpleRegisterCoalescing.cpp @@ -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.