[PATCH] D145045: [AMDGPU] Extend WorkGroupID* codegen for compute shaders

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 7 02:36:10 PST 2023


foad accepted this revision.
foad added a comment.
This revision is now accepted and ready to land.

Looks OK to me, thanks.



================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:2428-2436
     assert(!Info->hasDispatchPtr() && !Info->hasKernargSegmentPtr() &&
            (!Info->hasFlatScratchInit() || Subtarget->enableFlatScratch()) &&
-           !Info->hasWorkGroupIDX() && !Info->hasWorkGroupIDY() &&
-           !Info->hasWorkGroupIDZ() && !Info->hasWorkGroupInfo() &&
-           !Info->hasLDSKernelId() && !Info->hasWorkItemIDX() &&
-           !Info->hasWorkItemIDY() && !Info->hasWorkItemIDZ());
+           ((!Info->hasWorkGroupIDX() && !Info->hasWorkGroupIDY() &&
+             !Info->hasWorkGroupIDZ()) ||
+            (CallConv == CallingConv::AMDGPU_CS &&
+             Subtarget->hasArchitectedSGPRs())) &&
+           !Info->hasWorkGroupInfo() && !Info->hasLDSKernelId() &&
----------------



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145045/new/

https://reviews.llvm.org/D145045



More information about the llvm-commits mailing list