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
7 ; - Each function has an internal helper
8 ; - @A and @B's helpers does an indirect call.
10 ; For non-kernels, indirect calls shouldn't matter, so
11 ; @CallCandidate doesn't have to be in A/B's partition, unlike
12 ; in the corresponding tests for kernels where it has to.
14 ; CHECK0: define internal void @HelperC
15 ; CHECK0: define internal void @HelperD
16 ; CHECK0: define internal void @C
17 ; CHECK0: define internal void @D
19 ; CHECK1: define hidden void @HelperA
20 ; CHECK1: define hidden void @CallCandidate()
21 ; CHECK1: define internal void @A
23 ; CHECK2: define hidden void @HelperB
24 ; CHECK2: define internal void @HelperC
25 ; CHECK2: define internal void @HelperD
26 ; CHECK2: define internal void @B
28 @addrthief = global [3 x ptr] [ptr @HelperA, ptr @HelperB, ptr @CallCandidate]
30 define internal void @HelperA(ptr %call) {
35 define internal void @HelperB(ptr %call) {
42 define internal void @CallCandidate() {
46 define internal void @HelperC() {
50 define internal void @HelperD() {
54 define internal void @A(ptr %call) {
55 call void @HelperA(ptr %call)
59 define internal void @B(ptr %call) {
60 call void @HelperB(ptr %call)
64 define internal void @C() {
69 define internal void @D() {