R600/SI: Fix allocating flat_scr_lo / flat_scr_hi
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 25 Nov 2014 07:53:06 +0000 (07:53 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 25 Nov 2014 07:53:06 +0000 (07:53 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222737 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/R600/SIRegisterInfo.cpp

index cffea129de9ebf7710f53a516d99c21967d70fd8..5dc0f755f144f4dfbe0c8e726d29ba414287fb1d 100644 (file)
@@ -40,6 +40,8 @@ BitVector SIRegisterInfo::getReservedRegs(const MachineFunction &MF) const {
 
   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);