1 ; RUN: sed 's/_MD_/, !callees !{ptr @CallCandidate0}/g' %s | llvm-split -o %t -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 ; RUN: sed 's/_MD_//g' %s | llvm-split -o %t-nomd -j 3 -mtriple amdgcn-amd-amdhsa
7 ; RUN: llvm-dis -o - %t-nomd0 | FileCheck --check-prefix=CHECK-NOMD0 --implicit-check-not=define %s
8 ; RUN: llvm-dis -o - %t-nomd1 | FileCheck --check-prefix=CHECK-NOMD1 --implicit-check-not=define %s
9 ; RUN: llvm-dis -o - %t-nomd2 | FileCheck --check-prefix=CHECK-NOMD2 --implicit-check-not=define %s
11 ; CHECK0: define internal void @HelperC
12 ; CHECK0: define amdgpu_kernel void @C
14 ; CHECK1: define hidden void @CallCandidate1
15 ; CHECK1: define internal void @HelperB
16 ; CHECK1: define amdgpu_kernel void @B
18 ; CHECK2: define internal void @HelperA
19 ; CHECK2: define hidden void @CallCandidate0
20 ; CHECK2: define amdgpu_kernel void @A
22 ; CHECK-NOMD0: define internal void @HelperC
23 ; CHECK-NOMD0: define amdgpu_kernel void @C
25 ; CHECK-NOMD1: define internal void @HelperB
26 ; CHECK-NOMD1: define amdgpu_kernel void @B
28 ; CHECK-NOMD2: define internal void @HelperA
29 ; CHECK-NOMD2: define hidden void @CallCandidate0
30 ; CHECK-NOMD2: define hidden void @CallCandidate1
31 ; CHECK-NOMD2: define amdgpu_kernel void @A
33 @addrthief = global [2 x ptr] [ptr @CallCandidate0, ptr @CallCandidate1]
35 define internal void @HelperA(ptr %call) {
36 call void %call() _MD_
40 define internal void @CallCandidate0() {
44 define internal void @CallCandidate1() {
48 define internal void @HelperB() {
52 define internal void @HelperC() {
56 define amdgpu_kernel void @A(ptr %call) {
57 call void @HelperA(ptr %call)
61 define amdgpu_kernel void @B() {
66 define amdgpu_kernel void @C() {