[PATCH] D143707: [AMDGPU] Allow architected SGPRs for workgroup IDs

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 10 03:05:26 PST 2023


foad added inline comments.


================
Comment at: llvm/test/CodeGen/AMDGPU/workgroup-id-in-arch-sgprs.ll:53
+; GCN-GISEL-NEXT:    s_waitcnt vmcnt(0)
+; GCN-GISEL-NEXT:    v_mov_b32_e32 v1, ttmp7
+; GCN-GISEL-NEXT:    global_store_dword v0, v1, s[2:3]
----------------
cdevadas wrote:
> foad wrote:
> > Doesn't this value need to be ANDed with 0xffff?
> If there is no WorkGroupIDZ, I thought I can skip that part.
> Just like the packedTID here.
> https://github.com/llvm/llvm-project/blob/main/llvm/lib/Target/AMDGPU/SIISelLowering.cpp#L1934
I don't understand. How do you know "there is no WorkGroupIDZ"? Just because this function does not call @llvm.amdgcn.workgroup.id.z?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D143707



More information about the llvm-commits mailing list