1 ; RUN: llvm-split -o %t %s -j 3 -mtriple amdgcn-amd-amdhsa
2 ; RUN: llvm-dis -o - %t0 | FileCheck --check-prefix=CHECK0 %s
3 ; RUN: llvm-dis -o - %t1 | FileCheck --check-prefix=CHECK1 %s
4 ; RUN: llvm-dis -o - %t2 | FileCheck --check-prefix=CHECK2 %s
6 ; 3 kernels share a common helper, that helper should be
7 ; cloned in all partitions.
10 ; CHECK0: define internal void @Helper
11 ; CHECK0: define amdgpu_kernel void @C
15 ; CHECK1: define internal void @Helper
16 ; CHECK1: define amdgpu_kernel void @B
20 ; CHECK2: define internal void @Helper
21 ; CHECK2: define amdgpu_kernel void @A
24 define internal void @Helper() {
28 define amdgpu_kernel void @A() {
33 define amdgpu_kernel void @B() {
38 define amdgpu_kernel void @C() {