AMDGPU: Fix using incorrect private resource with no allocation
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 28 Oct 2016 19:43:31 +0000 (19:43 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 28 Oct 2016 19:43:31 +0000 (19:43 +0000)
commit08906a3c62b7700bafda4de8a1538433abd69be9
treea4a6091fb04ad117b430b94c127503c2555b301b
parente28a0fc72a345ede4ef9d137a15d9c102f427931
AMDGPU: Fix using incorrect private resource with no allocation

It's possible to have a use of the private resource descriptor or
scratch wave offset registers even though there are no allocated
stack objects. This would result in continuing to use the maximum
number reserved registers. This could go over the number of SGPRs
available on VI, or violate the SGPR limit requested by
the function attributes.

llvm-svn: 285435
llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
llvm/test/CodeGen/AMDGPU/attr-amdgpu-num-sgpr.ll
llvm/test/CodeGen/AMDGPU/private-access-no-objects.ll
llvm/test/CodeGen/AMDGPU/si-sgpr-spill.ll
llvm/test/CodeGen/AMDGPU/spill-alloc-sgpr-init-bug.ll
llvm/test/CodeGen/AMDGPU/spill-m0.ll
llvm/test/CodeGen/AMDGPU/wqm.ll