[PATCH] D124385: AMDGPU: Special case divergence analysis for wave ID computation
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 25 06:52:44 PDT 2022
arsenm created this revision.
arsenm added a reviewer: AMDGPU.
Herald added subscribers: hsmhsm, foad, kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl.
Herald added a project: All.
arsenm requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.
Specially recognize the 1D computation as wave uniform. Insert a
readfirstlane during codegen prepare to assert the result is uniform
even if the operand is not. It would be better if the DAG divergence
could maintain the same property after the division is optimized into
shifts.
Addresses issue 54010.
There's currently a potential pass ordering issue because m_Mul
doesn't automatically handle commuted operands. The order the group ID
appears in the multiply is non-canonical after the lowering for
uniform-work-group-size replaces the operand.
https://reviews.llvm.org/D124385
Files:
llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
llvm/test/Analysis/DivergenceAnalysis/AMDGPU/wave-id-computation.ll
llvm/test/CodeGen/AMDGPU/wave-id-computation.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124385.424892.patch
Type: text/x-patch
Size: 34462 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220425/0b4d897c/attachment.bin>
More information about the llvm-commits
mailing list