1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

R600/SI: Use IMPLICIT_DEF and KILL when failing to spill VGPRs

This helps us avoid 'invalid register class for operand' verifier
errors.

llvm-svn: 225989
This commit is contained in:
Tom Stellard 2015-01-14 15:42:34 +00:00
parent a1355b54a5
commit 57bcd61d34

View File

@ -488,7 +488,7 @@ void SIInstrInfo::storeRegToStackSlot(MachineBasicBlock &MBB,
LLVMContext &Ctx = MF->getFunction()->getContext();
Ctx.emitError("SIInstrInfo::storeRegToStackSlot - Do not know how to"
" spill register");
BuildMI(MBB, MI, DL, get(AMDGPU::V_MOV_B32_e32), AMDGPU::VGPR0)
BuildMI(MBB, MI, DL, get(AMDGPU::KILL))
.addReg(SrcReg);
}
}
@ -535,8 +535,7 @@ void SIInstrInfo::loadRegFromStackSlot(MachineBasicBlock &MBB,
LLVMContext &Ctx = MF->getFunction()->getContext();
Ctx.emitError("SIInstrInfo::loadRegFromStackSlot - Do not know how to"
" restore register");
BuildMI(MBB, MI, DL, get(AMDGPU::V_MOV_B32_e32), DestReg)
.addReg(AMDGPU::VGPR0);
BuildMI(MBB, MI, DL, get(AMDGPU::IMPLICIT_DEF), DestReg);
}
}