[llvm-branch-commits] [llvm] [AMDGPU] Move `getAddressableNumVGPRs` to TargetParser (PR #226821)

Nikhil Kotikalapudi via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sun Sep 27 23:59:37 PDT 2026


================
@@ -3327,6 +3327,37 @@ TEST(TargetParserTest, testAMDGPUDynamicVGPRAllocGranule) {
             8u);
 }
 
+TEST(TargetParserTest, testAMDGPUDynamicVGPRAddressableNum) {
+  for (auto Kind :
+       {AMDGPU::GK_GFX1200, AMDGPU::GK_GFX1250, AMDGPU::GK_GFX1310}) {
+    SCOPED_TRACE(AMDGPU::getArchNameAMDGCN(Kind).str());
+    for (bool IsWave32 : {false, true}) {
----------------
nkotikal wrote:

getAddressableNumVGPRs in this test shouldnt reach the IsWave32 conditional anyway because DynamicVGPRBlockSize is nonzero. So it doesn't make sense to me to loop over both false and true unless you believe this is an important regression guard?

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


More information about the llvm-branch-commits mailing list