This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Extend WorkGroupID* codegen for compute shaders
ClosedPublic

Authored by cdevadas on Mar 1 2023, 1:27 AM.

Details

Summary

Currently, the codegen support for llvm.amdgcn.workgroup.id*
intrinsics are enabled only for compute kernels. In addition,
this patch enables their selection for compute shaders on
subtargets that have architected SGPRs.

Diff Detail

Event Timeline

cdevadas created this revision.Mar 1 2023, 1:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 1 2023, 1:27 AM
cdevadas requested review of this revision.Mar 1 2023, 1:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 1 2023, 1:27 AM
cdevadas updated this revision to Diff 501423.Mar 1 2023, 1:47 AM

Renamed the testcase.

cdevadas updated this revision to Diff 501583.Mar 1 2023, 11:02 AM
cdevadas retitled this revision from [AMDGPU] Extend WorkGroupID* codegen for subtargets with architected SGPRs to [AMDGPU] Extend WorkGroupID* codegen for compute shaders.
cdevadas edited the summary of this revision. (Show Details)

Extended only for amdgpu_cs and when the subtarget has architected SGPRs enabled.

foad accepted this revision.Mar 7 2023, 2:36 AM

Looks OK to me, thanks.

llvm/lib/Target/AMDGPU/SIISelLowering.cpp
2428–2436
This revision is now accepted and ready to land.Mar 7 2023, 2:36 AM
cdevadas updated this revision to Diff 502976.Mar 7 2023, 3:33 AM
cdevadas edited the summary of this revision. (Show Details)

Split the assertion into smaller chunks.

This revision was automatically updated to reflect the committed changes.