diff options
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocLocal.cpp')
-rw-r--r-- | llvm/lib/CodeGen/RegAllocLocal.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/RegAllocLocal.cpp b/llvm/lib/CodeGen/RegAllocLocal.cpp index cbbc7c22997..188b3b34170 100644 --- a/llvm/lib/CodeGen/RegAllocLocal.cpp +++ b/llvm/lib/CodeGen/RegAllocLocal.cpp @@ -496,6 +496,9 @@ MachineInstr *RA::reloadVirtReg(MachineBasicBlock &MBB, MachineInstr *MI, MachineBasicBlock::iterator MII = MI; if (RegInfo->foldMemoryOperand(MII, OpNum, FrameIndex)) { ++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; } |