mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-10 18:34:09 +00:00
R600/SI: Use IMPLICIT_DEF and KILL when failing to spill VGPRs
This helps us avoid 'invalid register class for operand' verifier errors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225989 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
33040cf56e
commit
65e0a4d4da
@ -488,7 +488,7 @@ void SIInstrInfo::storeRegToStackSlot(MachineBasicBlock &MBB,
|
|||||||
LLVMContext &Ctx = MF->getFunction()->getContext();
|
LLVMContext &Ctx = MF->getFunction()->getContext();
|
||||||
Ctx.emitError("SIInstrInfo::storeRegToStackSlot - Do not know how to"
|
Ctx.emitError("SIInstrInfo::storeRegToStackSlot - Do not know how to"
|
||||||
" spill register");
|
" spill register");
|
||||||
BuildMI(MBB, MI, DL, get(AMDGPU::V_MOV_B32_e32), AMDGPU::VGPR0)
|
BuildMI(MBB, MI, DL, get(AMDGPU::KILL))
|
||||||
.addReg(SrcReg);
|
.addReg(SrcReg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -535,8 +535,7 @@ void SIInstrInfo::loadRegFromStackSlot(MachineBasicBlock &MBB,
|
|||||||
LLVMContext &Ctx = MF->getFunction()->getContext();
|
LLVMContext &Ctx = MF->getFunction()->getContext();
|
||||||
Ctx.emitError("SIInstrInfo::loadRegFromStackSlot - Do not know how to"
|
Ctx.emitError("SIInstrInfo::loadRegFromStackSlot - Do not know how to"
|
||||||
" restore register");
|
" restore register");
|
||||||
BuildMI(MBB, MI, DL, get(AMDGPU::V_MOV_B32_e32), DestReg)
|
BuildMI(MBB, MI, DL, get(AMDGPU::IMPLICIT_DEF), DestReg);
|
||||||
.addReg(AMDGPU::VGPR0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user