[llvm] [AMDGPU] Set GRANULATED_WAVEFRONT_SGPR_COUNT of compute_pgm_rsrc1 to 0 for gfx10+ (PR #154666)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 21 22:47:44 PDT 2025


================
@@ -1143,9 +1143,11 @@ void AMDGPUAsmPrinter::getSIProgramInfo(SIProgramInfo &ProgInfo,
     const MCExpr *SubGPR = MCBinaryExpr::createSub(DivGPR, OneConst, Ctx);
     return SubGPR;
   };
-
-  ProgInfo.SGPRBlocks = GetNumGPRBlocks(ProgInfo.NumSGPRsForWavesPerEU,
-                                        IsaInfo::getSGPREncodingGranule(&STM));
+  if (STM.getGeneration() >= AMDGPUSubtarget::GFX10)
+    ProgInfo.SGPRBlocks = CreateExpr(0ul);
+  else
----------------
arsenm wrote:

Braces 

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


More information about the llvm-commits mailing list