The copy instruction being coalesced will be removed, it is not a kill.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47179 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2008-02-15 21:36:51 +00:00
parent e3e09574ae
commit bd3e5aac74

View 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;