OSDN Git Service

The copy instruction being coalesced will be removed, it is not a kill.
authorEvan Cheng <evan.cheng@apple.com>
Fri, 15 Feb 2008 21:36:51 +0000 (21:36 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Fri, 15 Feb 2008 21:36:51 +0000 (21:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47179 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SimpleRegisterCoalescing.cpp

index 0c83933..120c6fd 100644 (file)
@@ -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;