[all-commits] [llvm/llvm-project] aef781: [AMDGPU] Add llvm.amdgcn.wqm.demote intrinsic

Carl Ritson via All-commits all-commits at lists.llvm.org
Sun Feb 14 16:40:59 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: aef781b47a5e3a82eb70a9c96595915fc7fe6cb3
      https://github.com/llvm/llvm-project/commit/aef781b47a5e3a82eb70a9c96595915fc7fe6cb3
  Author: Carl Ritson <carl.ritson at amd.com>
  Date:   2021-02-15 (Mon, 15 Feb 2021)

  Changed paths:
    M llvm/include/llvm/IR/IntrinsicsAMDGPU.td
    M llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUSearchableTables.td
    M llvm/lib/Target/AMDGPU/SIInstructions.td
    M llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp
    M llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp
    A llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.wqm.demote.ll
    A llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-amdgcn.live.mask.mir
    A llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-amdgcn.wqm.demote.mir
    A llvm/test/CodeGen/AMDGPU/llvm.amdgcn.wqm.demote.ll

  Log Message:
  -----------
  [AMDGPU] Add llvm.amdgcn.wqm.demote intrinsic

Add intrinsic which demotes all active lanes to helper lanes.
This is used to implement demote to helper Vulkan extension.

In practice demoting a lane to helper simply means removing it
from the mask of live lanes used for WQM/WWM/Exact mode.
Where the shader does not use WQM, demotes just become kills.

Additionally add llvm.amdgcn.live.mask intrinsic to complement
demote operations. In theory llvm.amdgcn.ps.live can be used
to detect helper lanes; however, ps.live can be moved by LICM.
The movement of ps.live cannot be remedied without changing
its type signature and such a change would require ps.live
users to update as well.

Reviewed By: piotr

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




More information about the All-commits mailing list