brintos

brintos / llvm-project-archived public Read only

0
0
Text · 939 B · 0f20a73 Raw
37 lines · plain
1; RUN: llvm-split -o %t %s -j 3 -mtriple amdgcn-amd-amdhsa -amdgpu-module-splitting-large-threshold=02; RUN: llvm-dis -o - %t0 | FileCheck --check-prefix=CHECK0 --implicit-check-not=define %s3; RUN: llvm-dis -o - %t1 | FileCheck --check-prefix=CHECK1 --implicit-check-not=define %s4 5; 3 kernels:6;   - A does a direct call to HelperA7;   - B is storing @HelperA8;   - C does a direct call to HelperA9;10; The helper functions will get externalized, so C/A will end up11; in the same partition.12 13; CHECK0: define amdgpu_kernel void @B(ptr %dst)14 15; CHECK1: define hidden void @HelperA()16; CHECK1: define amdgpu_kernel void @A()17; CHECK1: define amdgpu_kernel void @C()18 19define internal void @HelperA() {20  ret void21}22 23define amdgpu_kernel void @A() {24  call void @HelperA()25  ret void26}27 28define amdgpu_kernel void @B(ptr %dst) {29  store ptr @HelperA, ptr %dst30  ret void31}32 33define amdgpu_kernel void @C() {34  call void @HelperA()35  ret void36}37