1 ; RUN: llc -mtriple=amdgcn--amdpal -mcpu=gfx90a < %s | FileCheck -check-prefixes=CHECK,GFX90A %s
2 ; RUN: llc -mtriple=amdgcn--amdpal -mcpu=gfx908 < %s | FileCheck -check-prefixes=CHECK,GFX908 %s
4 ; COM: Adapted from agpr-register-count.ll
5 ; COM: GFX900 and below should not have .agpr_count present in the metadata
8 ; CHECK: .type kernel_32_agprs
10 define amdgpu_kernel void @kernel_32_agprs() #0 {
12 call void asm sideeffect "", "~{v8}" ()
13 call void asm sideeffect "", "~{a31}" ()
17 ; CHECK: .type kernel_0_agprs
19 define amdgpu_kernel void @kernel_0_agprs() #0 {
21 call void asm sideeffect "", "~{v0}" ()
25 ; CHECK: .type kernel_40_vgprs
27 define amdgpu_kernel void @kernel_40_vgprs() #0 {
29 call void asm sideeffect "", "~{v39}" ()
30 call void asm sideeffect "", "~{a15}" ()
34 ; CHECK: .type kernel_max_gprs
35 ; CHECK: NumAgprs: 256
36 define amdgpu_kernel void @kernel_max_gprs() #0 {
38 call void asm sideeffect "", "~{v255}" ()
39 call void asm sideeffect "", "~{a255}" ()
43 ; CHECK: .type func_32_agprs
45 define void @func_32_agprs() #0 {
47 call void asm sideeffect "", "~{v8}" ()
48 call void asm sideeffect "", "~{a31}" ()
52 ; CHECK: .type kernel_call_func_32_agprs
54 define amdgpu_kernel void @kernel_call_func_32_agprs() #0 {
56 call void @func_32_agprs() #0
60 declare void @undef_func()
62 ; CHECK: .type kernel_call_undef_func
64 define amdgpu_kernel void @kernel_call_undef_func() #0 {
66 call void @undef_func()
71 ; CHECK: amdpal.pipelines:
72 ; GFX90A: agpr_count: 0x20
73 ; GFX90A: vgpr_count: 0x40
75 ; GFX908: agpr_count: 0x20
76 ; GFX908: vgpr_count: 0x20
78 attributes #0 = { nounwind noinline "amdgpu-flat-work-group-size"="1,512" }