[PATCH] D87556: [amdgpu] Lower SGPR-to-VGPR copy in the final phase of ISel.

Michael Liao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 11 22:06:03 PDT 2020


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

- Need to lower COPY from SGPR to VGPR to a real instruction as the standard COPY is used where the source and destination are from the same register bank so that we potentially coalesc them together and save one COPY. Considering that, backend optimizations, such as CSE, won't handle them. However, the copy from SGPR to VGPR always needs materializing to a native instruction, it should be lowered into a real one before other backend optimizations.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D87556

Files:
  llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
  llvm/lib/Target/AMDGPU/SIISelLowering.cpp
  llvm/test/CodeGen/AMDGPU/fabs.ll
  llvm/test/CodeGen/AMDGPU/fneg-fabs.ll
  llvm/test/CodeGen/AMDGPU/sgpr-copy-cse.ll
  llvm/test/CodeGen/AMDGPU/waitcnt-vscnt.ll
  llvm/test/CodeGen/AMDGPU/wqm.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87556.291373.patch
Type: text/x-patch
Size: 9229 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200912/96922010/attachment.bin>


More information about the llvm-commits mailing list