[llvm-branch-commits] [llvm] [AMDGPU] Add `.amdgpu.info` section for per-function metadata (PR #192384)
Shilei Tian via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Apr 16 16:46:58 PDT 2026
================
@@ -0,0 +1,115 @@
+// RUN: llvm-mc -triple=amdgcn-amd-amdhsa -mcpu=gfx900 -filetype=asm %s | FileCheck --check-prefix=ASM %s
+// RUN: llvm-mc -triple=amdgcn-amd-amdhsa -mcpu=gfx900 -filetype=obj %s | llvm-readobj -r --sections --section-data - | FileCheck --check-prefix=OBJ %s
+
+// Test that .amdgpu_info directives round-trip through the assembler (asm and
+// object emission) and produce the correct TLV-encoded .amdgpu.info section.
+
+ .text
+ .globl my_kernel
+ .p2align 8
+ .type my_kernel, at function
+my_kernel:
+ s_endpgm
+.Lfunc_end0:
+ .size my_kernel, .Lfunc_end0-my_kernel
+
+ .globl helper
+ .p2align 2
+ .type helper, at function
+helper:
+ s_setpc_b64 s[30:31]
+.Lfunc_end1:
+ .size helper, .Lfunc_end1-helper
+
+ .globl addr_taken_func
+ .p2align 2
+ .type addr_taken_func, at function
+addr_taken_func:
+ s_setpc_b64 s[30:31]
+.Lfunc_end2:
+ .size addr_taken_func, .Lfunc_end2-addr_taken_func
+
+ .globl extern_func
+
+// Kernel: flags=7 (KERNEL|VCC|FLAT_SCRATCH), resources, call edge, use edge,
----------------
shiltian wrote:
> Lit also has a default `COM:` prefix.
Good to know. Will change all of them.
https://github.com/llvm/llvm-project/pull/192384
More information about the llvm-branch-commits
mailing list