[all-commits] [llvm/llvm-project] fb28bf: [AMDGPU] Fix liveness verifier error in hazard rec...

Stanislav Mekhanoshin via All-commits all-commits at lists.llvm.org
Wed Sep 7 16:31:01 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fb28bf3fb42e2e4ce9b606bcdd855c960b4592f1
      https://github.com/llvm/llvm-project/commit/fb28bf3fb42e2e4ce9b606bcdd855c960b4592f1
  Author: Stanislav Mekhanoshin <Stanislav.Mekhanoshin at amd.com>
  Date:   2022-09-07 (Wed, 07 Sep 2022)

  Changed paths:
    M llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp
    M llvm/test/CodeGen/AMDGPU/hazard-shift64.mir

  Log Message:
  -----------
  [AMDGPU] Fix liveness verifier error in hazard recognizer

After 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.

Differential Revision: https://reviews.llvm.org/D133459




More information about the All-commits mailing list