aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SimpleRegisterCoalescing.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-08-12 01:26:19 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-08-12 01:26:19 +0000
commitccb36a4f1bcafdf0de8514e396a5d2acf29d3947 (patch)
tree9be73dc4164345561f7f253c89eca2b62e7bec2f /lib/CodeGen/SimpleRegisterCoalescing.cpp
parent001f7534e0311508cc93831a595785bb177f8a18 (diff)
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
Diffstat (limited to 'lib/CodeGen/SimpleRegisterCoalescing.cpp')
-rw-r--r--lib/CodeGen/SimpleRegisterCoalescing.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/SimpleRegisterCoalescing.cpp b/lib/CodeGen/SimpleRegisterCoalescing.cpp
index 6870aff816..e71b9d4c0f 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.