[PATCH] D133067: [AMDGPU] W/a hazard if 64 bit shift amount is a highest allocated VGPR

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 31 16:05:37 PDT 2022


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

In this case gfx90a uses v0 instead of the correct register. Swap
the value temporarily with a lower register and then swap it back.

Unfortunately hazard recognizer works after wait count insertion,
so we cannot simply reuse an arbitrary register, hence w/a also
includes a full waitcount. This can be avoided if we run it from
expandPostRAPseudo, but that is a complete misplacement.


https://reviews.llvm.org/D133067

Files:
  llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp
  llvm/lib/Target/AMDGPU/GCNHazardRecognizer.h
  llvm/lib/Target/AMDGPU/GCNSubtarget.h
  llvm/test/CodeGen/AMDGPU/hazard-shift64.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133067.457124.patch
Type: text/x-patch
Size: 11526 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220831/24aa28f5/attachment.bin>


More information about the llvm-commits mailing list