[llvm] [AMDGPU] Rework architected SGPRs implementation (PR #79001)

Christudasan Devadasan via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 22 10:13:51 PST 2024


================
@@ -16,8 +16,8 @@ define amdgpu_ps i32 @test_ps() #1 {
 }
 
 ; GCN-LABEL: {{^}}test_cs:
-; GCN: s_mov_b64 s[4:5], s[0:1]
-; GCN: buffer_store_dword v{{[0-9]+}}, off, s[4:7], 0 offset:4
+; GCN: s_mov_b64 s[8:9], s[0:1]
+; GCN: buffer_store_dword v{{[0-9]+}}, off, s[8:11], 0 offset:4
----------------
cdevadas wrote:

The following change? It now enables workgroup IDs for AMDGPU_CS always.
SIMachineFunctionInfo.cpp:110
  - if (!AMDGPU::isGraphics(CC) ||
  -    (CC == CallingConv::AMDGPU_CS && ST.hasArchitectedSGPRs())) {
  
  +  if (!AMDGPU::isGraphics(CC) || CC == CallingConv::AMDGPU_CS ||
  +    ST.hasArchitectedSGPRs()) {

https://github.com/llvm/llvm-project/pull/79001


More information about the llvm-commits mailing list