[llvm-commits] [llvm] r71635 - /llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp
Lang Hames
lhames at gmail.com
Tue May 12 21:18:59 PDT 2009
Author: lhames
Date: Tue May 12 23:18:47 2009
New Revision: 71635
URL: http://llvm.org/viewvc/llvm-project?rev=71635&view=rev
Log:
Fix for PR4121. If TwoAddressInstructionPass removes a dead def, and the regB
operand was killed, the kill needs to be removed from regB's VarInfo.
Modified:
llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp
Modified: llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp?rev=71635&r1=71634&r2=71635&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp (original)
+++ llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp Tue May 12 23:18:47 2009
@@ -858,6 +858,12 @@
}
}
}
+
+ // We're really going to nuke the old inst. If regB was marked
+ // as a kill we need to update its Kills list.
+ if (mi->getOperand(si).isKill())
+ LV->removeVirtualRegisterKilled(regB, mi);
+
mbbi->erase(mi); // Nuke the old inst.
mi = nmi;
++NumDeletes;
More information about the llvm-commits
mailing list