1; RUN: llc -O0 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 < %s | FileCheck %s
2
3; CallGraphAnalysis, which CodeGenSCC order depends on, does not look
4; through aliases. If GlobalOpt is never run, we do not see direct
5; calls,
6
7@alias1 = hidden alias void (), void ()* @aliasee_vgpr32_sgpr76
8
9; The parent kernel has a higher VGPR usage than the possible callees.
10
11; CHECK-LABEL: {{^}}kernel1:
12; CHECK: .amdhsa_next_free_vgpr 42
13; CHECK-NEXT: .amdhsa_next_free_sgpr 33
14define amdgpu_kernel void @kernel1() #0 {
15bb:
16  call void asm sideeffect "; clobber v40 ", "~{v40}"()
17  call void @alias1() #2
18  ret void
19}
20
21define internal void @aliasee_vgpr32_sgpr76() #1 {
22bb:
23  call void asm sideeffect "; clobber v26 ", "~{v26}"()
24  ret void
25}
26
27attributes #0 = { noinline norecurse nounwind optnone }
28attributes #1 = { noinline norecurse nounwind readnone willreturn "amdgpu-waves-per-eu"="8,10" }
29attributes #2 = { nounwind readnone willreturn }
30