[PATCH] D127524: [AMDGPU] Make temp vgpr selection stable in indirectCopyToAGPR

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 10 12:02:01 PDT 2022


rampitec created this revision.
rampitec added reviewers: arsenm, foad.
Herald added subscribers: kosarev, jsilvanus, hsmhsm, kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl.
Herald added a project: All.
rampitec requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.

This uses rotating reminder of division by 3 to select another
temp vgpr each next time in a sequence of several agpr copies.
Therefore, temp vgpr selection depends on the generated agpr
number. This number could change with any unrelated change to
the register definitions.

Stabilize the selection by using a real agpr number.


https://reviews.llvm.org/D127524

Files:
  llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
  llvm/test/CodeGen/AMDGPU/accvgpr-copy.mir
  llvm/test/CodeGen/AMDGPU/agpr-copy-no-free-registers.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127524.436000.patch
Type: text/x-patch
Size: 52917 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220610/e8483c76/attachment.bin>


More information about the llvm-commits mailing list