1 ; RUN: llc -O0 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 < %s | FileCheck %s
3 ; CallGraphAnalysis, which CodeGenSCC order depends on, does not look
4 ; through aliases. If GlobalOpt is never run, we do not see direct
7 @alias3 = hidden alias void (), ptr @aliasee_vgpr256_sgpr102
9 ; CHECK-LABEL: {{^}}kernel3:
10 ; CHECK: .amdhsa_next_free_vgpr max(totalnumvgprs(kernel3.num_agpr, kernel3.num_vgpr), 1, 0)
11 ; CHECK-NEXT: .amdhsa_next_free_sgpr (max(kernel3.numbered_sgpr+(extrasgprs(kernel3.uses_vcc, kernel3.uses_flat_scratch, 1)), 1, 0))-(extrasgprs(kernel3.uses_vcc, kernel3.uses_flat_scratch, 1))
13 ; CHECK: .set kernel3.num_vgpr, max(41, aliasee_vgpr256_sgpr102.num_vgpr)
14 ; CHECK-NEXT: .set kernel3.num_agpr, max(0, aliasee_vgpr256_sgpr102.num_agpr)
15 ; CHECK-NEXT: .set kernel3.numbered_sgpr, max(33, aliasee_vgpr256_sgpr102.numbered_sgpr)
16 define amdgpu_kernel void @kernel3() #0 {
18 call void @alias3() #2
22 ; CHECK: .set aliasee_vgpr256_sgpr102.num_vgpr, 253
23 ; CHECK-NEXT: .set aliasee_vgpr256_sgpr102.num_agpr, 0
24 ; CHECK-NEXT: .set aliasee_vgpr256_sgpr102.numbered_sgpr, 33
25 define internal void @aliasee_vgpr256_sgpr102() #1 {
27 call void asm sideeffect "; clobber v252 ", "~{v252}"()
31 attributes #0 = { noinline norecurse nounwind optnone }
32 attributes #1 = { noinline norecurse nounwind readnone willreturn "amdgpu-flat-work-group-size"="1,256" "amdgpu-waves-per-eu"="1,1" }
33 attributes #2 = { nounwind readnone willreturn }
35 !llvm.module.flags = !{!0}
36 !0 = !{i32 1, !"amdhsa_code_object_version", i32 500}