AMDGPU: Fix verifier error with argument passed in CSR SGPR
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 4 Feb 2021 22:12:46 +0000 (17:12 -0500)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 9 Feb 2021 18:49:44 +0000 (13:49 -0500)
commitf4ca6d8289ef116314d4d5080080907e8cb7342d
tree6b14ba13cdd2e4a3c36ae28e417f4ed4f1b4d1d1
parentb72a23650f573299aec30846fb844c3558921fb8
AMDGPU: Fix verifier error with argument passed in CSR SGPR

We need to avoid setting the kill flag on the CSR spill if there's an
additional use of the register after the spill.

This does rely on consistency between the entry block liveins and the
MRI's function live ins, which is not something the verifier checks
now.
llvm/lib/Target/AMDGPU/SILowerSGPRSpills.cpp
llvm/test/CodeGen/AMDGPU/spill-sgpr-csr-live-ins.mir [new file with mode: 0644]