[all-commits] [llvm/llvm-project] 3611c0: [AMDGPU] SIWholeQuadMode: avoid execz effects in e...

Carl Ritson via All-commits all-commits at lists.llvm.org
Thu Aug 1 02:46:58 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3611c0b7038a8a11796f22fbd063074624b89081
      https://github.com/llvm/llvm-project/commit/3611c0b7038a8a11796f22fbd063074624b89081
  Author: Carl Ritson <carl.ritson at amd.com>
  Date:   2024-08-01 (Thu, 01 Aug 2024)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp
    M llvm/test/CodeGen/AMDGPU/wqm.ll

  Log Message:
  -----------
  [AMDGPU] SIWholeQuadMode: avoid execz effects in exact regions (#101157)

Exact mode regions within WQM may have EXEC=0 in divergent control flow.
This occurs if a branch is only taken by helper lanes and an instruction
requiring WQM disabling is encountered.

The current code extends the exact region as far as possible; however,
this can result in it including instructions with unwanted side effects
at EXEC=0.
In particular readfirstlane combined with scalar loads can produce
invalid memory accesses in this circumstance.

Workaround this by shrinking exact regions to only the instructions
requiring WQM disabling when unwanted side effects are present.
Eventually we should branch over these regions when EXEC=0, but this
requires visibility of CFG/divergence information not currently
available.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list