diff options
author | Lang Hames <lhames@gmail.com> | 2009-05-13 04:18:47 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2009-05-13 04:18:47 +0000 |
commit | 8d4636d516a5f8675fe7d30bc85cd9144f65ba3c (patch) | |
tree | 2bc1ae53e0217b0e672f2a1136f89faf8c50546f /llvm/lib/CodeGen/TwoAddressInstructionPass.cpp | |
parent | e2df3f9fe5978dd0025247cf20ee4a20bb29fe75 (diff) | |
download | bcm5719-llvm-8d4636d516a5f8675fe7d30bc85cd9144f65ba3c.tar.gz bcm5719-llvm-8d4636d516a5f8675fe7d30bc85cd9144f65ba3c.zip |
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.
llvm-svn: 71635
Diffstat (limited to 'llvm/lib/CodeGen/TwoAddressInstructionPass.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TwoAddressInstructionPass.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp index e37639e068a..2ec0c712222 100644 --- a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp +++ b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp @@ -858,6 +858,12 @@ bool TwoAddressInstructionPass::runOnMachineFunction(MachineFunction &MF) { } } } + + // 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; |