summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-02-15 21:36:51 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-02-15 21:36:51 +0000
commit803bb6d699506491c0a98467cc225a4f2b0ef88c (patch)
tree7e2554bda960a807a2c6941c180acfd8c998c4f1
parentd66c7919047a7b972782e6db784559f4ef5e92be (diff)
downloadbcm5719-llvm-803bb6d699506491c0a98467cc225a4f2b0ef88c.tar.gz
bcm5719-llvm-803bb6d699506491c0a98467cc225a4f2b0ef88c.zip
The copy instruction being coalesced will be removed, it is not a kill.
llvm-svn: 47179
-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 0c83933726a..120c6fd415e 100644
--- a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
+++ b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
@@ -300,10 +300,10 @@ bool SimpleRegisterCoalescing::RemoveCopyByCommutingDef(LiveInterval &IntA,
if (ULR->valno != AValNo)
continue;
UseMO.setReg(NewReg);
- if (UseMO.isKill())
- BKills.push_back(li_->getUseIndex(UseIdx)+1);
if (UseMI == CopyMI)
continue;
+ if (UseMO.isKill())
+ BKills.push_back(li_->getUseIndex(UseIdx)+1);
unsigned SrcReg, DstReg;
if (!tii_->isMoveInstr(*UseMI, SrcReg, DstReg))
continue;
OpenPOWER on IntegriCloud