[PATCH] D80282: [AMDGPU] Make SGPR spills exec mask agnostic

Carl Ritson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 20 02:40:07 PDT 2020


critson created this revision.
critson added reviewers: sameerds, arsenm, foad, tpr.
Herald added subscribers: llvm-commits, kerbowa, hiraditya, t-tye, dstuttard, yaxunl, nhaehnle, wdng, jvesely, kzhuravl, qcolombet, MatzeB.
Herald added a project: LLVM.

Explicitly set the exec mask for SGPR spills and reloads.
This fixes a bug where SGPR spills to memory could be incorrect
if the exec mask was 0 (or differed between spill and reload).

Additionally pack scalar subregisters (upto 16/32 per VGPR),
so that the majority of scalar types can be spilt or reloaded
with a simple memory access.  This should amortize some of the
additional overhead of manipulating the exec mask.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D80282

Files:
  llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
  llvm/lib/Target/AMDGPU/SIRegisterInfo.h
  llvm/test/CodeGen/AMDGPU/control-flow-fastregalloc.ll
  llvm/test/CodeGen/AMDGPU/partial-sgpr-to-vgpr-spills.ll
  llvm/test/CodeGen/AMDGPU/si-spill-sgpr-stack.ll
  llvm/test/CodeGen/AMDGPU/spill-m0.ll
  llvm/test/CodeGen/AMDGPU/spill-scavenge-offset.ll
  llvm/test/CodeGen/AMDGPU/spill-wide-sgpr.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80282.265174.patch
Type: text/x-patch
Size: 29067 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200520/c0e9a6ca/attachment-0001.bin>


More information about the llvm-commits mailing list