[llvm] r222737 - R600/SI: Fix allocating flat_scr_lo / flat_scr_hi

Matt Arsenault Matthew.Arsenault at amd.com
Mon Nov 24 23:53:06 PST 2014


Author: arsenm
Date: Tue Nov 25 01:53:06 2014
New Revision: 222737

URL: http://llvm.org/viewvc/llvm-project?rev=222737&view=rev
Log:
R600/SI: Fix allocating flat_scr_lo / flat_scr_hi

Only the super register flat_scr was marked as reserved,
so in some cases with high register usage it would still
try to allocate the subregisters.

Modified:
    llvm/trunk/lib/Target/R600/SIRegisterInfo.cpp

Modified: llvm/trunk/lib/Target/R600/SIRegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/SIRegisterInfo.cpp?rev=222737&r1=222736&r2=222737&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/SIRegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/R600/SIRegisterInfo.cpp Tue Nov 25 01:53:06 2014
@@ -40,6 +40,8 @@ BitVector SIRegisterInfo::getReservedReg
 
   Reserved.set(AMDGPU::INDIRECT_BASE_ADDR);
   Reserved.set(AMDGPU::FLAT_SCR);
+  Reserved.set(AMDGPU::FLAT_SCR_LO);
+  Reserved.set(AMDGPU::FLAT_SCR_HI);
 
   // Reserve some VGPRs to use as temp registers in case we have to spill VGPRs
   Reserved.set(AMDGPU::VGPR255);





More information about the llvm-commits mailing list