[AMDGPU] Introduce Strict WQM mode
authorPiotr Sobczak <Piotr.Sobczak@amd.com>
Wed, 3 Mar 2021 09:18:28 +0000 (10:18 +0100)
committerPiotr Sobczak <Piotr.Sobczak@amd.com>
Wed, 3 Mar 2021 13:19:16 +0000 (14:19 +0100)
commit4672bac1776e2245abfd671e208fd56d21cca1ad
treec598b0e5b45250ccd9b494795c14ab0d2df65f9a
parent5d613e42d3761e106e5dd8d1731517f410605144
[AMDGPU] Introduce Strict WQM mode

* Add amdgcn_strict_wqm intrinsic.
* Add a corresponding STRICT_WQM machine instruction.
* The semantic is similar to amdgcn_strict_wwm with a notable difference that not all threads will be forcibly enabled during the computations of the intrinsic's argument, but only all threads in quads that have at least one thread active.
* The difference between amdgc_wqm and amdgcn_strict_wqm, is that in the strict mode an inactive lane will always be enabled irrespective of control flow decisions.

Reviewed By: critson

Differential Revision: https://reviews.llvm.org/D96258
llvm/include/llvm/IR/IntrinsicsAMDGPU.td
llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
llvm/lib/Target/AMDGPU/SIInstructions.td
llvm/lib/Target/AMDGPU/SIPreAllocateWWMRegs.cpp
llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp
llvm/test/CodeGen/AMDGPU/wqm.ll