[llvm] [AMDGPU] Include unused preload kernarg in KD total SGPR count (PR #104743)

Austin Kerbow via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 19 08:22:21 PDT 2024


================
@@ -0,0 +1,14 @@
+; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx940 -filetype=obj < %s > %t
+; RUN: llvm-objdump -s -j .rodata %t | FileCheck --check-prefix=OBJDUMP %s
+
+; OBJDUMP: Contents of section .rodata:
+; OBJDUMP-NEXT: 0000 00000000 00000000 10010000 00000000
+; OBJDUMP-NEXT: 0010 00000000 00000000 00000000 00000000
+; OBJDUMP-NEXT: 0020 00000000 00000000 00000000 00000000
+; OBJDUMP-NEXT: 0030 4000af00 94130000 1a000400 00000000
+; OBJDUMP-NOT: 0030 0000af00 94130000 1a000400 00000000
----------------
kerbowa wrote:

> We need a human readable asm output for reference, and should check the different kind of SGPR usage numbers

The annoying part about this bug is we don't directly output a directive for this field anywhere, it's totally derivative. To find the problem I was modifying the KD in the binary directly.

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


More information about the llvm-commits mailing list