1 ; RUN: llvm-split -o %t %s -j 3 -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
6 ; 3 kernels with each their own dependencies should go into 3
7 ; distinct partitions. The most expensive kernel should be
8 ; seen first and go into the last partition.
10 ; CHECK0: define amdgpu_kernel void @C
11 ; CHECK0: define internal void @HelperC
14 ; CHECK1: define amdgpu_kernel void @A
15 ; CHECK1: define internal void @HelperA
17 ; CHECK2: define amdgpu_kernel void @B
18 ; CHECK2: define internal void @HelperB
20 define amdgpu_kernel void @A() {
25 define internal void @HelperA() {
29 define amdgpu_kernel void @B(ptr %x) {
37 define internal void @HelperB() {
41 define amdgpu_kernel void @C() {
46 define internal void @HelperC() {