AMDGPU: Avoid assertions after SGPR spilling failed
authorNicolai Haehnle <nhaehnle@gmail.com>
Mon, 4 Jan 2016 15:50:01 +0000 (15:50 +0000)
committerNicolai Haehnle <nhaehnle@gmail.com>
Mon, 4 Jan 2016 15:50:01 +0000 (15:50 +0000)
commit98732e397c55abc7a214dd2d4f09a08a24382f35
tree22778df32632cbac80828f7bcf7b4d1d65533799
parent09816bb5493ff7d0645dc5b254a18a6c0d0a4078
AMDGPU: Avoid assertions after SGPR spilling failed

Summary:
The comment explains it: emitError does not necessarily exit the compilation
process, and then using NoRegister leads to assertions later on.
This generates incorrect code, of course, but the user should know to not use
the result when an error has been emitted.

It would be nice to have a test-case for this inside the LLVM repository,
but llc exits on error. shader-db tests trigger the underlying issue at least
on Tonga.

Reviewers: arsenm, tstellarAMD, mareko

Subscribers: arsenm, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256757 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
lib/Target/AMDGPU/SIRegisterInfo.cpp