]> granicus.if.org Git - llvm/commitdiff
Revert "AMDGPU: Scavenge register instead of findUnusedReg"
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 25 Mar 2019 21:41:40 +0000 (21:41 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 25 Mar 2019 21:41:40 +0000 (21:41 +0000)
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

lib/Target/AMDGPU/SIRegisterInfo.cpp

index 3346d303a1e481fb68b5905f4da40f907017c731..8e49b647aa7e62d84da888032bfc15f48d591984 100644 (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