1 ; RUN: llvm-split -o %t %s -j 4 -mtriple amdgcn-amd-amdhsa
2 ; RUN: llvm-dis -o - %t0 | FileCheck --check-prefix=CHECK0 --implicit-check-not=define %s
3 ; RUN: llvm-dis -o - %t1 | FileCheck --check-prefix=CHECK1 --implicit-check-not=define %s
4 ; RUN: llvm-dis -o - %t2 | FileCheck --check-prefix=CHECK2 --implicit-check-not=define %s
5 ; RUN: llvm-dis -o - %t3 | FileCheck --check-prefix=CHECK3 --implicit-check-not=define %s
7 ; CHECK0: define internal void @PrivateHelper1()
8 ; CHECK0: define amdgpu_kernel void @D
10 ; CHECK1: define internal void @PrivateHelper0()
11 ; CHECK1: define amdgpu_kernel void @C
13 ; CHECK2: define internal void @OverridableHelper1()
14 ; CHECK2: define amdgpu_kernel void @B
16 ; CHECK3: define available_externally void @OverridableHelper0()
17 ; CHECK3: define amdgpu_kernel void @A
19 define available_externally void @OverridableHelper0() {
23 define internal void @OverridableHelper1() #0 {
27 define internal void @PrivateHelper0() {
31 define internal void @PrivateHelper1() {
35 define amdgpu_kernel void @A() {
36 call void @OverridableHelper0()
40 define amdgpu_kernel void @B() {
41 call void @OverridableHelper1()
45 define amdgpu_kernel void @C() {
46 call void @PrivateHelper0()
50 define amdgpu_kernel void @D() {
51 call void @PrivateHelper1()
55 attributes #0 = { nobuiltin }