|
23 | 23 | // Generate dependencies for targets and check contents of the output bitcode files.
|
24 | 24 | //
|
25 | 25 | // RUN: clang-offload-deps -targets=openmp-x86_64-pc-linux-gnu,sycl-spir64 -outputs=%t.deps.x86_64,%t.deps.spir64 %t.fat
|
| 26 | +// RUN: clang-offload-deps -targets=openmp-x86_64-pc-linux-gnu,sycl-spir64 -outputs=%t.deps.x86_64,%t.deps.spir64 %t.fat |
26 | 27 | // RUN: llvm-dis -o - %t.deps.x86_64 | FileCheck %s --check-prefixes=CHECK-DEPS-X86_64
|
27 |
| -// RUN: llvm-dis -o - %t.deps.spir64 | FileCheck %s --check-prefixes=CHECK-DEPS-SPIR64 |
| 28 | +// RUN: llvm-dis -o - %t.deps.spir64 | FileCheck %s --check-prefixes=CHECK-DEPS-SPIR64 -DSPIRTriple=spir64 |
| 29 | +// |
| 30 | +// Check that the legacy 'sycldevice' symbols are still identified correctly |
| 31 | +// when 'unknown' environment has been specified/implied for SYCL via |
| 32 | +// clang-offload-bundler's -targets |
| 33 | +// |
| 34 | +// RUN: clang-offload-bundler -type=o -targets=host-%itanium_abi_triple,openmp-x86_64-pc-linux-gnu,sycl-spir64-unknown-unknown-sycldevice -inputs=%t.host,%t.x86_64,%t.spir64 -outputs=%t.legacy-sycldevice.fat |
| 35 | +// Check correct behavior for multiple targets |
| 36 | +// RUN: clang-offload-deps -targets=openmp-x86_64-pc-linux-gnu,sycl-spir64-unknown-unknown -outputs=%t.deps.legacy.x86_64,%t.deps.legacy.spir64 %t.legacy-sycldevice.fat |
| 37 | +// RUN: llvm-dis -o - %t.deps.legacy.spir64 | FileCheck %s --check-prefixes=CHECK-DEPS-SPIR64 -DSPIRTriple=spir64-unknown-unknown |
| 38 | +// Check correct behavior for shortened triple |
| 39 | +// RUN: clang-offload-deps -targets=sycl-spir64 -outputs=%t.deps.legacy.spir64-short %t.legacy-sycldevice.fat |
| 40 | +// RUN: llvm-dis -o - %t.deps.legacy.spir64-short | FileCheck %s --check-prefixes=CHECK-DEPS-SPIR64 -DSPIRTriple=spir64 |
28 | 41 |
|
29 | 42 | // CHECK-DEPS-X86_64: target triple = "x86_64-pc-linux-gnu"
|
30 | 43 | // CHECK-DEPS-X86_64: @bar = external global i8*
|
31 | 44 | // CHECK-DEPS-X86_64: @foo = external global i8*
|
32 | 45 | // CHECK-DEPS-X86_64: @offload.symbols = hidden local_unnamed_addr global [2 x i8*] [i8* bitcast (i8** @bar to i8*), i8* bitcast (i8** @foo to i8*)]
|
33 | 46 |
|
34 |
| -// CHECK-DEPS-SPIR64: target triple = "spir64" |
| 47 | +// CHECK-DEPS-SPIR64: target triple = "[[SPIRTriple]]" |
35 | 48 | // CHECK-DEPS-SPIR64: @bar = external global i8*
|
36 | 49 | // CHECK-DEPS-SPIR64: @foo = external global i8*
|
37 | 50 | // CHECK-DEPS-SPIR64: @llvm.used = appending global [2 x i8*] [i8* bitcast (i8** @bar to i8*), i8* bitcast (i8** @foo to i8*)], section "llvm.metadata"
|
|
0 commit comments