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
This commit is contained in:
Lang Hames 2009-05-13 04:18:47 +00:00
parent 32cd719eba
commit f6a337d7fb

View File

@ -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;