[llvm] [AMDGPU] Do not propagate vgpr count in dVGPR mode (PR #187078)

Jannik Silvanus via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 2 04:27:01 PDT 2026


================
@@ -0,0 +1,120 @@
+; RUN: llc -mtriple=amdgcn-amd-amdpal -mcpu=gfx1200 < %s | FileCheck -check-prefix=DVGPR %s
+; RUN: sed 's/"amdgpu-dynamic-vgpr-block-size"="16"/"amdgpu-dynamic-vgpr-block-size"="0"/' %s \
+; RUN:   | llc -mtriple=amdgcn-amd-amdpal -mcpu=gfx1200 | FileCheck -check-prefix=NODVGPR %s
+
+; DVGPR:  .set .Lgfx_func_a.num_vgpr, 40
+; DVGPR:  .set .Lamdgpu_cs_main.num_vgpr, max(42, .Lgfx_func_a.num_vgpr)
+; DVGPR:  .set .Lfunc.0.num_vgpr, max(11, .Lgfx_func_a.num_vgpr)
+; DVGPR:  .set .Lfunc.1.num_vgpr, 82
+; DVGPR:  .set .Lfunc.2.num_vgpr, max(11, amdgpu.max_num_vgpr)
+; DVGPR:  .set .Lfunc.3.num_vgpr, 11
+; DVGPR:  .set .Lfunc.4.num_vgpr, max(82, amdgpu.max_num_vgpr)
+; DVGPR:  .set .Lretry_vgpr_alloc.num_vgpr, 11
+; DVGPR:  .set .Lfirst_retry_wrapper.num_vgpr, 11
+; DVGPR:  .set amdgpu.max_num_vgpr, 82
----------------
jasilvanus wrote:

Oh, good point. Can you please add a description of the test at the top, explaining what it does, highlighting the fact that it mixes dVGPR on/off, and that we want to test for which patterns we take which VGPR counts into account?

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


More information about the llvm-commits mailing list