[PATCH] D150381: [AMDGPU] Add optional tied-op for wwm-register's epilog spill restore

Christudasan Devadasan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 11 10:06:04 PDT 2023


cdevadas created this revision.
cdevadas added reviewers: arsenm, sebastian-ne.
Herald added subscribers: foad, kerbowa, hiraditya, tpr, dstuttard, yaxunl, jvesely, kzhuravl, qcolombet.
Herald added a project: All.
cdevadas requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

The COPY inserted in the epilog block before return instruction as part
of ABI lowering, can get optimized during machine copy propagation if
the same register is used earlier in a wwm operation that demands the
prolog/epilog wwm-spill store/restore to preserve its inactive lanes.
With the spill restore in the epilog, the preceding COPY appears to be
dead during machine-cp. To avoid it, mark the same register as a tied-op
in the spill restore instruction to ensure a usage for the COPY.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D150381

Files:
  llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
  llvm/test/CodeGen/AMDGPU/preserve-only-inactive-lane.mir
  llvm/test/CodeGen/AMDGPU/tied-op-for-wwm-scratch-reg-spill-restore.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150381.521358.patch
Type: text/x-patch
Size: 5605 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230511/323a9380/attachment.bin>


More information about the llvm-commits mailing list