[PATCH] D108830: [AMDGPU] Propagate defining src reg for AGPR to AGPR Copys

Vang Thao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 27 09:56:48 PDT 2021


vangthao created this revision.
Herald added subscribers: foad, kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl, arsenm.
vangthao requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

On targets that do not support AGPR to AGPR copying directly, try to find the
defining accvgpr_write and propagate its source vgpr register to the copies
before register allocation so the source vgpr register does not get clobbered.

The postrapseudos pass also attempt to propagate the defining accvgpr_write but
if the register to propagate is clobbered, it will give up and create new
temporary vgpr registers instead.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D108830

Files:
  llvm/lib/Target/AMDGPU/GCNPreRAOptimizations.cpp
  llvm/test/CodeGen/AMDGPU/agpr-to-agpr-copy.mir
  llvm/test/CodeGen/AMDGPU/llvm.amdgcn.mfma.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108830.369127.patch
Type: text/x-patch
Size: 9340 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210827/92cb7951/attachment-0001.bin>


More information about the llvm-commits mailing list