mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-18 10:31:57 +00:00
Correctly constrain a register class when computing frame offsets, as the Thumb2
add instruction takes an rGPR. This fixes the last of PR8825. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131619 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6fcb6e454b
commit
21803721d5
@ -1111,6 +1111,10 @@ materializeFrameBaseRegister(MachineBasicBlock *MBB,
|
||||
if (Ins != MBB->end())
|
||||
DL = Ins->getDebugLoc();
|
||||
|
||||
const TargetInstrDesc &TID = TII.get(ADDriOpc);
|
||||
MachineRegisterInfo &MRI = MBB->getParent()->getRegInfo();
|
||||
MRI.constrainRegClass(BaseReg, TID.OpInfo[0].getRegClass(this));
|
||||
|
||||
MachineInstrBuilder MIB =
|
||||
BuildMI(*MBB, Ins, DL, TII.get(ADDriOpc), BaseReg)
|
||||
.addFrameIndex(FrameIdx).addImm(Offset);
|
||||
|
Loading…
Reference in New Issue
Block a user