mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 23:17:16 +00:00
If we reload a virtual register that's already been assigned, we want to mark
that instruction as its "last use". This fixes PR1925. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47758 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -480,8 +480,9 @@ MachineInstr *RALocal::reloadVirtReg(MachineBasicBlock &MBB, MachineInstr *MI,
|
||||
// If the virtual register is already available, just update the instruction
|
||||
// and return.
|
||||
if (unsigned PR = getVirt2PhysRegMapSlot(VirtReg)) {
|
||||
MarkPhysRegRecentlyUsed(PR); // Already have this value available!
|
||||
MarkPhysRegRecentlyUsed(PR); // Already have this value available!
|
||||
MI->getOperand(OpNum).setReg(PR); // Assign the input register
|
||||
getVirtRegLastUse(VirtReg) = std::make_pair(MI, OpNum);
|
||||
return MI;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user