1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00

AMDGPU: Scavenge register instead of findUnusedReg

llvm-svn: 356149
This commit is contained in:
Matt Arsenault 2019-03-14 14:19:01 +00:00
parent 15328ccefc
commit 557ae7b7e6

View File

@ -564,7 +564,7 @@ void SIRegisterInfo::buildSpillLoadStore(MachineBasicBlock::iterator MI,
// We don't have access to the register scavenger if this function is called
// during PEI::scavengeFrameVirtualRegs().
if (RS)
SOffset = RS->FindUnusedReg(&AMDGPU::SGPR_32RegClass);
SOffset = RS->scavengeRegister(&AMDGPU::SGPR_32RegClass, 0, false);
if (SOffset == AMDGPU::NoRegister) {
// There are no free SGPRs, and since we are in the process of spilling