[llvm-commits] [llvm] r88881 - /llvm/trunk/lib/CodeGen/ProcessImplicitDefs.cpp
Lang Hames
lhames at gmail.com
Sun Nov 15 18:07:31 PST 2009
Author: lhames
Date: Sun Nov 15 20:07:31 2009
New Revision: 88881
URL: http://llvm.org/viewvc/llvm-project?rev=88881&view=rev
Log:
Fixes the bug exposed by Anton's test case in PR 5495:
Make sure when ProcessImplicitDefs removes a copy which kills its source reg that it
removes the copy from said reg's Kills list.
Modified:
llvm/trunk/lib/CodeGen/ProcessImplicitDefs.cpp
Modified: llvm/trunk/lib/CodeGen/ProcessImplicitDefs.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ProcessImplicitDefs.cpp?rev=88881&r1=88880&r2=88881&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/ProcessImplicitDefs.cpp (original)
+++ llvm/trunk/lib/CodeGen/ProcessImplicitDefs.cpp Sun Nov 15 20:07:31 2009
@@ -209,6 +209,10 @@
unsigned SrcReg, DstReg, SrcSubReg, DstSubReg;
if (tii_->isMoveInstr(*RMI, SrcReg, DstReg, SrcSubReg, DstSubReg) &&
Reg == SrcReg) {
+ if (RMO.isKill()) {
+ LiveVariables::VarInfo& vi = lv_->getVarInfo(Reg);
+ vi.removeKill(RMI);
+ }
RMI->setDesc(tii_->get(TargetInstrInfo::IMPLICIT_DEF));
for (int j = RMI->getNumOperands() - 1, ee = 0; j > ee; --j)
RMI->RemoveOperand(j);
More information about the llvm-commits
mailing list