From: Evan Cheng Date: Fri, 15 Feb 2008 21:36:51 +0000 (+0000) Subject: The copy instruction being coalesced will be removed, it is not a kill. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=bd3e5aac746d9d3ecbf6aea97ee573b2f0d4ab87;p=oota-llvm.git 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 --- diff --git a/lib/CodeGen/SimpleRegisterCoalescing.cpp b/lib/CodeGen/SimpleRegisterCoalescing.cpp index 0c83933726a..120c6fd415e 100644 --- a/lib/CodeGen/SimpleRegisterCoalescing.cpp +++ b/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;