1 ; RUN: llvm-split -o %t %s -j 3 -mtriple amdgcn-amd-amdhsa -amdgpu-module-splitting-large-threshold=0
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
7 ; - A does a direct call to HelperA
8 ; - B is storing @HelperA
9 ; - C does a direct call to HelperA
11 ; The helper functions will get externalized, so C/A will end up
12 ; in the same partition.
17 ; CHECK1: define amdgpu_kernel void @B(ptr %dst)
19 ; CHECK2: define hidden void @HelperA()
20 ; CHECK2: define amdgpu_kernel void @A()
21 ; CHECK2: define amdgpu_kernel void @C()
23 define internal void @HelperA() {
27 define amdgpu_kernel void @A() {
32 define amdgpu_kernel void @B(ptr %dst) {
33 store ptr @HelperA, ptr %dst
37 define amdgpu_kernel void @C() {