[llvm] [AMDGPU][MC] update USER_SGPR_COUNT bits for GFX1250 (PR #192579)

Zeng Wu via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 22 22:47:16 PDT 2026


================
@@ -0,0 +1,12 @@
+// RUN: llvm-mc -triple=amdgcn-amd-amdhsa -mcpu=gfx1250 -filetype=asm %s 2>&1 | FileCheck %s
+
----------------
zwu-2025 wrote:

Not quite sure I follow the comment and please correct me if I am wrong. 
The bits for directive `amdhsa_user_sgpr_count` is 6 bits so the max value is 63 even though there are only 32 physical SGPRs. In assembly parser of `llvm-mc`, the value of user_sgpr_count is either from directive `amdhsa_user_sgpr_count `or sum of other directives like `amdhsa_user_sgpr_queue_ptr` and in the test, there are such directives. So the `33` should be a valid one?

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


More information about the llvm-commits mailing list