Some subtargets use architected SGPRs for workgroup
IDs instead of the regular SGPRs. This patch enables
the support for the same and is guarded under the
subtarget feature FeatureArchitectedSGPRs.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/AMDGPU/SIISelLowering.cpp | ||
---|---|---|
2260 | Also, should I guard this check with HasArchitectedSGPRS? | |
llvm/test/CodeGen/AMDGPU/workgroup-id-in-arch-sgprs.ll | ||
27 | Will change. | |
54 | If there is no WorkGroupIDZ, I thought I can skip that part. |
llvm/test/CodeGen/AMDGPU/workgroup-id-in-arch-sgprs.ll | ||
---|---|---|
54 | I don't understand. How do you know "there is no WorkGroupIDZ"? Just because this function does not call @llvm.amdgcn.workgroup.id.z? |
llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h | ||
---|---|---|
707 | The hasWorkGroupIDZ() will be set to 1 if there is a workgroup IDZ used. Otherwise, this function would return false. |
llvm/lib/Target/AMDGPU/SIISelLowering.cpp | ||
---|---|---|
2200 | It is not at all clear how hasArchitectedSGPRs and hasUserSGPRInit16Bug should interact. Instead of guessing, how about asserting !HasArchitectedSGPRs here unless/until there is an ASIC that has both features? |
It is not at all clear how hasArchitectedSGPRs and hasUserSGPRInit16Bug should interact. Instead of guessing, how about asserting !HasArchitectedSGPRs here unless/until there is an ASIC that has both features?