summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2010-06-25 20:42:55 +0000
committerBill Wendling <isanbard@gmail.com>2010-06-25 20:42:55 +0000
commitef7acd9a24859fa01d2a69528cfbe91bb83fa3f9 (patch)
tree752ce02922557b6941570ec877fcbb223246da7f /llvm/lib
parent553fafc6ce649c5c57e095706658b8488abc67e9 (diff)
downloadbcm5719-llvm-ef7acd9a24859fa01d2a69528cfbe91bb83fa3f9.tar.gz
bcm5719-llvm-ef7acd9a24859fa01d2a69528cfbe91bb83fa3f9.zip
We should remove the live range from the destination register only if *all* defs
are dead, not just the def of this register. I.e., a register could be dead, but it's subreg isn't. Testcase to follow with a subsequent patch. llvm-svn: 106878
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
index 62096714178..5a30ddf5645 100644
--- a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
+++ b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
@@ -1892,8 +1892,8 @@ bool SimpleRegisterCoalescing::runOnMachineFunction(MachineFunction &fn) {
if (li_->hasInterval(SrcReg)) {
LiveInterval &RegInt = li_->getInterval(SrcReg);
// If def of this move instruction is dead, remove its live range
- // from the dstination register's live interval.
- if (MI->registerDefIsDead(DstReg)) {
+ // from the destination register's live interval.
+ if (MI->allDefsAreDead()) {
if (!ShortenDeadCopySrcLiveRange(RegInt, MI))
ShortenDeadCopyLiveRange(RegInt, MI);
} else {
OpenPOWER on IntegriCloud