forked from OSchip/llvm-project
When deleting a machine instruction, make sure to remove it from the
livevariables information. This fixes several regalloc=local failures on x86 llvm-svn: 30062
This commit is contained in:
parent
f8f724a2b1
commit
bd79458b0e
|
@ -659,8 +659,11 @@ void RA::AllocateBasicBlock(MachineBasicBlock &MBB) {
|
|||
|
||||
// Finally, if this is a noop copy instruction, zap it.
|
||||
unsigned SrcReg, DstReg;
|
||||
if (TII.isMoveInstr(*MI, SrcReg, DstReg) && SrcReg == DstReg)
|
||||
if (TII.isMoveInstr(*MI, SrcReg, DstReg) && SrcReg == DstReg) {
|
||||
LV->removeVirtualRegistersKilled(MI);
|
||||
LV->removeVirtualRegistersDead(MI);
|
||||
MBB.erase(MI);
|
||||
}
|
||||
}
|
||||
|
||||
MachineBasicBlock::iterator MI = MBB.getFirstTerminator();
|
||||
|
|
Loading…
Reference in New Issue