[AMDGPU] Allow architected SGPRs for workgroup IDs
authorChristudasan Devadasan <Christudasan.Devadasan@amd.com>
Fri, 10 Feb 2023 07:54:07 +0000 (13:24 +0530)
committerChristudasan Devadasan <Christudasan.Devadasan@amd.com>
Mon, 13 Feb 2023 16:41:35 +0000 (22:11 +0530)
commit1c9e6238fe2fe27ee9cdb594e4f2bb33bb416e49
tree6f834efe881429ee34489cc99d3869d390b7e6e2
parentb35d0a6834f8d648ef03a15fba43847b99863a60
[AMDGPU] Allow architected SGPRs for workgroup IDs

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.

Reviewed By: foad

Differential Revision: https://reviews.llvm.org/D143707
llvm/lib/Target/AMDGPU/SIISelLowering.cpp
llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h
llvm/test/CodeGen/AMDGPU/workgroup-id-in-arch-sgprs.ll [new file with mode: 0644]