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 | 60dc7345eb1543546064a35c7c2c4ea08b40f9c0 (patch) | |
tree | 48a89fddcac5385307f9bfbc883031fbbf5c2274 /lib/CodeGen/TwoAddressInstructionPass.cpp | |
parent | 467c430316b7a5b6fa8069531ca8d603b1e1197f (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71635 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TwoAddressInstructionPass.cpp')
-rw-r--r-- | lib/CodeGen/TwoAddressInstructionPass.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/TwoAddressInstructionPass.cpp b/lib/CodeGen/TwoAddressInstructionPass.cpp index e37639e068..2ec0c71222 100644 --- a/lib/CodeGen/TwoAddressInstructionPass.cpp +++ b/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; |