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:
Chris Lattner 2006-09-03 00:06:08 +00:00
parent f8f724a2b1
commit bd79458b0e
1 changed files with 4 additions and 1 deletions

View File

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