[llvm] [AMDGPU] Add `.amdgpu.info` section for per-function metadata (PR #192384)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 20 13:56:09 PDT 2026


================
@@ -0,0 +1,83 @@
+; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -amdgpu-enable-object-linking -filetype=obj < %s | llvm-readobj -r - | FileCheck %s
+; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -amdgpu-enable-object-linking -filetype=asm < %s | FileCheck %s --check-prefix=ASM --implicit-check-not=.amdgpu_num_agpr
+
+; Test ABI register-size type ID generation for various function types.
+; The type ID encodes each parameter/return by bit width: v=void, i=<=32-bit,
+; l=33-64-bit. Types with the same register footprint share an encoding
+; (e.g. float(float) and i32(i32) both produce "ii").
+
+define void @void_void() {
+  ret void
+}
+
+define i32 @i32_i32(i32 %x) {
+  ret i32 %x
+}
+
----------------
arsenm wrote:

Yes, exactly. You didn't test the full suite of types 

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


More information about the llvm-commits mailing list