diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2016-07-28 14:30:43 +0000 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2016-07-28 14:30:43 +0000 |
commit | 19f430109903ad56a0689de25f42295e02f9543c (patch) | |
tree | e3867e712ebc8e3a9baae3db9fefbac651fbb8b5 /llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp | |
parent | db5f02b1c48d091d0faec9db5600baacf78a843e (diff) | |
download | bcm5719-llvm-19f430109903ad56a0689de25f42295e02f9543c.tar.gz bcm5719-llvm-19f430109903ad56a0689de25f42295e02f9543c.zip |
AMDGPU/SI: Don't use reserved VGPRs for SGPR spilling
Summary:
We were using reserved VGPRs for SGPR spilling and this was causing
some programs with a workgroup size of 1024 to use more than 64
registers, which is illegal.
Reviewers: arsenm, mareko, nhaehnle
Subscribers: nhaehnle, arsenm, llvm-commits, kzhuravl
Differential Revision: https://reviews.llvm.org/D22032
llvm-svn: 276980
Diffstat (limited to 'llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp')
-rw-r--r-- | llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp index 2b3c458218d..fca9c37d438 100644 --- a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp +++ b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp @@ -210,7 +210,8 @@ SIMachineFunctionInfo::SpilledReg SIMachineFunctionInfo::getSpilledReg ( Spill.Lane = Lane; if (!LaneVGPRs.count(LaneVGPRIdx)) { - unsigned LaneVGPR = TRI->findUnusedRegister(MRI, &AMDGPU::VGPR_32RegClass); + unsigned LaneVGPR = TRI->findUnusedRegister(MRI, &AMDGPU::VGPR_32RegClass, + *MF); if (LaneVGPR == AMDGPU::NoRegister) // We have no VGPRs left for spilling SGPRs. |