diff options
author | Bill Wendling <isanbard@gmail.com> | 2010-06-25 20:42:55 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2010-06-25 20:42:55 +0000 |
commit | ef7acd9a24859fa01d2a69528cfbe91bb83fa3f9 (patch) | |
tree | 752ce02922557b6941570ec877fcbb223246da7f /llvm/lib | |
parent | 553fafc6ce649c5c57e095706658b8488abc67e9 (diff) | |
download | bcm5719-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.cpp | 4 |
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 { |