brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 231f02b Raw
26 lines · plain
1# REQUIRES: spirv-registered-target2 3# RUN: llvm-as %S/Inputs/SYCL/foo.ll -o %t.foo.bc4# RUN: llvm-as %S/Inputs/SYCL/bar.ll -o %t.bar.bc5# RUN: llvm-as %S/Inputs/SYCL/baz.ll -o %t.baz.bc6# RUN: llvm-as %S/Inputs/SYCL/libsycl.ll -o %t.libsycl.bc7# RUN: clang-sycl-linker %t.foo.bc %t.bar.bc -triple=spirv64 --dry-run -o a.spv --print-linked-module 2>&1 | FileCheck %s --check-prefix=CHECK-SIMPLE8 9# RUN: not clang-sycl-linker %t.bar.bc %t.baz.bc -triple=spirv64 --dry-run -o a.spv --print-linked-module 2>&1 | FileCheck %s --check-prefix=CHECK-MULTIPLE-DEFS10 11# RUN: clang-sycl-linker %t.foo.bc %t.bar.bc -device-libs=%t.libsycl.bc -library-path= -triple=spirv64 --dry-run -o a.spv --print-linked-module 2>&1 | FileCheck %s --check-prefix=CHECK-DEVICE-LIB12 13; CHECK-SIMPLE: define {{.*}}foo_func1{{.*}}14; CHECK-SIMPLE: define {{.*}}foo_func2{{.*}}15; CHECK-SIMPLE: define {{.*}}bar_func1{{.*}}16; CHECK-SIMPLE-NOT: define {{.*}}addFive{{.*}}17; CHECK-SIMPLE-NOT: define {{.*}}unusedFunc{{.*}}18 19; CHECK-MULTIPLE-DEFS: error: Linking globals named {{.*}}bar_func1{{.*}} symbol multiply defined!20 21; CHECK-DEVICE-LIB: define {{.*}}foo_func1{{.*}}22; CHECK-DEVICE-LIB: define {{.*}}foo_func2{{.*}}23; CHECK-DEVICE-LIB: define {{.*}}bar_func1{{.*}}24; CHECK-DEVICE-LIB: define {{.*}}addFive{{.*}}25; CHECK-DEVICE-LIB-NOT: define {{.*}}unusedFunc{{.*}}26