AMDGPU: Release the scavenged offset register during VGPR spill
authorNicolai Haehnle <nhaehnle@gmail.com>
Wed, 10 Feb 2016 20:13:58 +0000 (20:13 +0000)
committerNicolai Haehnle <nhaehnle@gmail.com>
Wed, 10 Feb 2016 20:13:58 +0000 (20:13 +0000)
commitd791bd07c707c432f0f97d88e8161274a5867f78
treec5e0aed311c70c078c5aa466c096a8c5fcea9f0d
parentd76d4aabdd4e070924966e8c7bc2073f85bfebb9
AMDGPU: Release the scavenged offset register during VGPR spill

Summary:
This fixes a crash where subsequent spills would be unable to scavenge
a register. In particular, it fixes a crash in piglit's
spec@glsl-1.50@execution@geometry@max-input-components (the test still
has a shader that fails to compile because of too many SGPR spills, but
at least it doesn't crash any more).

This is a candidate for the release branch.

Reviewers: arsenm, tstellarAMD

Subscribers: qcolombet, arsenm

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

llvm-svn: 260427
llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
llvm/test/CodeGen/AMDGPU/spill-scavenge-offset.ll [new file with mode: 0644]