forked from OSchip/llvm-project
Fix problem fusing spill code into instructions: we didn't update the live
variable information to take into account the change of instruction address. llvm-svn: 11628
This commit is contained in:
parent
4c988391e1
commit
f5c5e1f458
|
@ -496,6 +496,9 @@ MachineInstr *RA::reloadVirtReg(MachineBasicBlock &MBB, MachineInstr *MI,
|
||||||
MachineBasicBlock::iterator MII = MI;
|
MachineBasicBlock::iterator MII = MI;
|
||||||
if (RegInfo->foldMemoryOperand(MII, OpNum, FrameIndex)) {
|
if (RegInfo->foldMemoryOperand(MII, OpNum, FrameIndex)) {
|
||||||
++NumFused;
|
++NumFused;
|
||||||
|
// Since we changed the address of MI, make sure to update live variables
|
||||||
|
// to know that the new instruction has the properties of the old one.
|
||||||
|
LV->instructionChanged(MI, MII);
|
||||||
return MII;
|
return MII;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue