[PATCH] D133459: [AMDGPU] Fix liveness verifier error in hazard recognizer

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 7 15:33:24 PDT 2022


rampitec created this revision.
rampitec added reviewers: kerbowa, cfang, vangthao, bcahoon.
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.

After D133067 <https://reviews.llvm.org/D133067> we are inserting swaps to use a new physical
register. I have noticed verifier errors about undefined
physical register uses if we are tracking liveness post RA.

We have no access to LIS at this point, so mark new register
uses as undef to calm down the verifier. Liveness should not
matter at this point anyway.

Note the description of the RegState::Undef: "Value of the
register doesn't matter." I.e. it does not say it is strictly
undefined. In fact that is what we really need: this value
does not matter.

I also had to modify the test a bit since with tracking enabled
it does not pass verification even before the recognizer.


https://reviews.llvm.org/D133459

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133459.458584.patch
Type: text/x-patch
Size: 16733 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220907/3b332648/attachment.bin>


More information about the llvm-commits mailing list