Revert "AMDGPU: Scavenge register instead of findUnusedReg"

This reverts r356149.

This is crashing on rocBLAS.

llvm-svn: 356958
This commit is contained in:
Matt Arsenault 2019-03-25 21:41:40 +00:00
parent 95550e412f
commit 8bbc159786
1 changed files with 1 additions and 1 deletions

View File

@ -575,7 +575,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->scavengeRegister(&AMDGPU::SGPR_32RegClass, 0, false);
SOffset = RS->FindUnusedReg(&AMDGPU::SGPR_32RegClass);
if (SOffset == AMDGPU::NoRegister) {
// There are no free SGPRs, and since we are in the process of spilling