AMDGPU/SI: Do not move scratch resource register on Tonga & Iceland
authorNicolai Haehnle <nhaehnle@gmail.com>
Tue, 5 Jan 2016 20:42:49 +0000 (20:42 +0000)
committerNicolai Haehnle <nhaehnle@gmail.com>
Tue, 5 Jan 2016 20:42:49 +0000 (20:42 +0000)
commitcb2ad1e2496de35dba7261471d8a52ea8126b43e
treeb4a96c29dcfac8fc53f4bcae4e284ae987a7286f
parent4b4923953554f6bd467b09b540963e38c5446c82
AMDGPU/SI: Do not move scratch resource register on Tonga & Iceland

Due to the SGPR init bug, every program claims to use the same number
of SGPRs anyway, so there's no point in trying to shift those registers
down from their initial spot of reservation.

Add a test that uses VGPR spilling and blocks most SGPRs from being used for
the scratch resource register. Previously, this would run into an assertion.

Differential Revision: http://reviews.llvm.org/D15724

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256870 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/SIFrameLowering.cpp
test/CodeGen/AMDGPU/large-alloca-compute.ll
test/CodeGen/AMDGPU/large-alloca-graphics.ll
test/CodeGen/AMDGPU/spill-alloc-sgpr-init-bug.ll [new file with mode: 0644]