mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-24 04:45:00 +00:00
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:
parent
32cd719eba
commit
f6a337d7fb
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user