diff options
Diffstat (limited to 'lib/CodeGen/PrologEpilogInserter.cpp')
| -rw-r--r-- | lib/CodeGen/PrologEpilogInserter.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/PrologEpilogInserter.cpp b/lib/CodeGen/PrologEpilogInserter.cpp index b2fdee6c8e4c..6ca69a124297 100644 --- a/lib/CodeGen/PrologEpilogInserter.cpp +++ b/lib/CodeGen/PrologEpilogInserter.cpp @@ -1026,8 +1026,12 @@ PEI::scavengeFrameVirtualRegs(MachineFunction &Fn) { // Replace this reference to the virtual register with the // scratch register. assert (ScratchReg && "Missing scratch register!"); + MachineRegisterInfo &MRI = Fn.getRegInfo(); Fn.getRegInfo().replaceRegWith(Reg, ScratchReg); + // Make sure MRI now accounts this register as used. + MRI.setPhysRegUsed(ScratchReg); + // Because this instruction was processed by the RS before this // register was allocated, make sure that the RS now records the // register as being used. |
