This reverts r356149.
This is crashing on rocBLAS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356958
91177308-0d34-0410-b5e6-
96231b3b80d8
// 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