[AMDGPU] Avoid use of V_READLANE into EXEC in SGPR spills
authorCarl Ritson <carl.ritson@amd.com>
Sat, 20 Jun 2020 01:23:34 +0000 (10:23 +0900)
committerCarl Ritson <carl.ritson@amd.com>
Sat, 20 Jun 2020 03:10:47 +0000 (12:10 +0900)
commit4a7de36afc785070d35a951dfa470d5e91acd540
tree24b527c113c289b6580a99fa026bca31a80e5b57
parentb885b1b92d3d9bfcc8229476f4ad4660305d6160
[AMDGPU] Avoid use of V_READLANE into EXEC in SGPR spills

Always prefer to clobber input SGPRs and restore them after the
spill.  This applies to both spills to VGPRs and scratch.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D81914
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
llvm/test/CodeGen/AMDGPU/fold-reload-into-exec.mir [new file with mode: 0644]
llvm/test/CodeGen/AMDGPU/sgpr-spill.mir
llvm/test/CodeGen/AMDGPU/si-sgpr-spill.ll
llvm/test/CodeGen/AMDGPU/spill-special-sgpr.mir