summaryrefslogtreecommitdiffstats
path: root/llvm/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
commitaf21e9550e36e6b8f1e7cce84fe4c75af976cd6b (patch)
tree5c246fd7ef79594f251add0fe2f44462e3644021 /llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
parent460e34afeda6256070e19960ceec4408e64216ae (diff)
downloadbcm5719-llvm-af21e9550e36e6b8f1e7cce84fe4c75af976cd6b.tar.gz
bcm5719-llvm-af21e9550e36e6b8f1e7cce84fe4c75af976cd6b.zip
No need to remove dead range from soon-to-be-dead live interval. Its val# may be out of whack.
llvm-svn: 41024
Diffstat (limited to 'llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp')
-rw-r--r--llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
index 6870aff8166..e71b9d4c0f8 100644
--- a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud