From: Matt Arsenault Date: Mon, 25 Mar 2019 21:41:40 +0000 (+0000) Subject: Revert "AMDGPU: Scavenge register instead of findUnusedReg" X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b2435c6b835356355658e7c07a8ea95e7a5caa8d;p=llvm Revert "AMDGPU: Scavenge register instead of findUnusedReg" 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 --- diff --git a/lib/Target/AMDGPU/SIRegisterInfo.cpp b/lib/Target/AMDGPU/SIRegisterInfo.cpp index 3346d303a1e..8e49b647aa7 100644 --- a/lib/Target/AMDGPU/SIRegisterInfo.cpp +++ b/lib/Target/AMDGPU/SIRegisterInfo.cpp @@ -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