Skip to content

Commit

Permalink
Merge from 'sycl' to 'sycl-web' (#15)
Browse files Browse the repository at this point in the history
  CONFLICT (content): Merge conflict in clang/test/Driver/clang-offload-bundler.c
  • Loading branch information
sndmitriev committed Sep 3, 2019
2 parents e800b8d + b55e0d1 commit 8bd65a7
Show file tree
Hide file tree
Showing 42 changed files with 473 additions and 161 deletions.
4 changes: 2 additions & 2 deletions clang/lib/Driver/ToolChains/Clang.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6603,7 +6603,7 @@ void OffloadBundler::ConstructJobMultipleOutputs(
}
if (C.getDefaultToolChain().getTriple().isWindowsMSVCEnvironment() &&
Input.getType() == types::TY_Archive)
TypeArg = "ao";
TypeArg = "aoo";

// Get the type.
CmdArgs.push_back(TCArgs.MakeArgString(Twine("-type=") + TypeArg));
Expand Down Expand Up @@ -6754,7 +6754,7 @@ void SPIRVTranslator::ConstructJob(Compilation &C, const JobAction &JA,
TranslatorArgs.push_back("-o");
TranslatorArgs.push_back(Output.getFilename());
if (getToolChain().getTriple().isSYCLDeviceEnvironment()) {
TranslatorArgs.push_back("-spirv-max-version=1.0");
TranslatorArgs.push_back("-spirv-max-version=1.1");
TranslatorArgs.push_back("-spirv-ext=+all");
}
for (auto I : Inputs) {
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Driver/ToolChains/SYCL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const char *SYCL::Linker::constructLLVMSpirvCommand(Compilation &C,
CmdArgs.push_back("-o");
CmdArgs.push_back(OutputFileName);
} else {
CmdArgs.push_back("-spirv-max-version=1.0");
CmdArgs.push_back("-spirv-max-version=1.1");
CmdArgs.push_back("-spirv-ext=+all");
CmdArgs.push_back("-o");
CmdArgs.push_back(Output.getFilename());
Expand Down
6 changes: 5 additions & 1 deletion clang/lib/Sema/SemaSYCL.cpp
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -1299,6 +1299,7 @@ void SYCLIntegrationHeader::emitFwdDecl(raw_ostream &O, const Decl *D) {
// print declaration into a string:
PrintingPolicy P(D->getASTContext().getLangOpts());
P.adjustForCPlusPlusFwdDecl();
P.PrintCanonicalTypes = true;
std::string S;
llvm::raw_string_ostream SO(S);
D->print(SO, P);
Expand Down Expand Up @@ -1511,8 +1512,11 @@ void SYCLIntegrationHeader::emit(raw_ostream &O) {
O << "', '" << c;
O << "'> {\n";
} else {
LangOptions LO;
PrintingPolicy P(LO);
P.PrintCanonicalTypes = true;
O << "template <> struct KernelInfo<"
<< eraseAnonNamespace(K.NameType.getAsString()) << "> {\n";
<< eraseAnonNamespace(K.NameType.getAsString(P)) << "> {\n";
}
O << " DLL_LOCAL\n";
O << " static constexpr const char* getName() { return \"" << K.Name
Expand Down
Empty file modified clang/test/CodeGenSYCL/basic-kernel-wrapper.cpp
100755 → 100644
Empty file.
Empty file modified clang/test/CodeGenSYCL/device-variables.cpp
100755 → 100644
Empty file.
18 changes: 9 additions & 9 deletions clang/test/CodeGenSYCL/int_header1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
// RUN: FileCheck -input-file=%t.h %s

// CHECK:template <> struct KernelInfo<class KernelName> {
// CHECK:template <> struct KernelInfo<::nm1::nm2::KernelName0> {
// CHECK:template <> struct KernelInfo<::nm1::KernelName1> {
// CHECK:template <> struct KernelInfo<::nm1::KernelName3< ::nm1::nm2::KernelName0>> {
// CHECK:template <> struct KernelInfo<::nm1::KernelName3< ::nm1::KernelName1>> {
// CHECK:template <> struct KernelInfo<::nm1::KernelName4< ::nm1::nm2::KernelName0>> {
// CHECK:template <> struct KernelInfo<::nm1::KernelName4< ::nm1::KernelName1>> {
// CHECK:template <> struct KernelInfo<::nm1::KernelName3<KernelName5>> {
// CHECK:template <> struct KernelInfo<::nm1::KernelName4<KernelName7>> {
// CHECK:template <> struct KernelInfo<::nm1::KernelName8< ::nm1::nm2::C>> {
// CHECK:template <> struct KernelInfo<class nm1::nm2::KernelName0> {
// CHECK:template <> struct KernelInfo<class nm1::KernelName1> {
// CHECK:template <> struct KernelInfo<class nm1::KernelName3<class nm1::nm2::KernelName0>> {
// CHECK:template <> struct KernelInfo<class nm1::KernelName3<class nm1::KernelName1>> {
// CHECK:template <> struct KernelInfo<class nm1::KernelName4<class nm1::nm2::KernelName0>> {
// CHECK:template <> struct KernelInfo<class nm1::KernelName4<class nm1::KernelName1>> {
// CHECK:template <> struct KernelInfo<class nm1::KernelName3<class KernelName5>> {
// CHECK:template <> struct KernelInfo<class nm1::KernelName4<class KernelName7>> {
// CHECK:template <> struct KernelInfo<class nm1::KernelName8<class nm1::nm2::C>> {
// CHECK:template <> struct KernelInfo<class TmplClassInAnonNS<class ClassInAnonNS>> {

// This test checks if the SYCL device compiler is able to generate correct
Expand Down
6 changes: 3 additions & 3 deletions clang/test/CodeGenSYCL/integration_header.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
// CHECK-NEXT: };
//
// CHECK: template <> struct KernelInfo<class first_kernel> {
// CHECK: template <> struct KernelInfo<::second_namespace::second_kernel<char>> {
// CHECK: template <> struct KernelInfo<::third_kernel<1, int, ::point<X> >> {
// CHECK: template <> struct KernelInfo<::fourth_kernel< ::template_arg_ns::namespaced_arg<1> >> {
// CHECK: template <> struct KernelInfo<class second_namespace::second_kernel<char>> {
// CHECK: template <> struct KernelInfo<class third_kernel<1, int, struct point<struct X> >> {
// CHECK: template <> struct KernelInfo<class fourth_kernel<struct template_arg_ns::namespaced_arg<1> >> {

#include "sycl.hpp"

Expand Down
5 changes: 0 additions & 5 deletions clang/test/CodeGenSYCL/intel-fpga-reg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,6 @@ void foo() {
// CHECK-NEXT: store i32 addrspace(4)* %[[V_AP3]], i32 addrspace(4)** %bp, align 8, !tbaa !5
}

// CHECK: declare i32 @llvm.annotation.i32(i32, i8*, i8*, i32) #4
// CHECK: declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture writeonly, i8* nocapture readonly, i64, i1 immarg) #1
// CHECK: declare i8* @llvm.ptr.annotation.p0i8(i8*, i8*, i8*, i32) #4
// CHECK: declare i64 @llvm.annotation.i64(i64, i8*, i8*, i32) #4

template <typename name, typename Func>
__attribute__((sycl_kernel)) void kernel_single_task(Func kernelFunc) {
kernelFunc();
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/kernel_functor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ int main() {
cl::sycl::detail::KernelInfo<Functor1>::getName();
// CHECK: Functor1
cl::sycl::detail::KernelInfo<ns::Functor2>::getName();
// CHECK: ::ns::Functor2
// CHECK: ns::Functor2
cl::sycl::detail::KernelInfo<TmplFunctor<int>>::getName();
// CHECK: TmplFunctor<int>
cl::sycl::detail::KernelInfo<TmplConstFunctor<int>>::getName();
Expand Down
80 changes: 80 additions & 0 deletions clang/test/CodeGenSYCL/kernel_name_with_typedefs.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
// RUN: %clang -I %S/Inputs --sycl -Xclang -fsycl-int-header=%t.h %s -c -o kernel.spv
// RUN: FileCheck -input-file=%t.h %s

// CHECK: // Forward declarations of templated kernel function types:
// CHECK-NEXT: template <typename T, typename T2, long N, unsigned long M> struct functor1;
// CHECK-NEXT: template <typename T, typename T2, long N, unsigned long M> struct functor2;
// CHECK-NEXT: template <typename T, typename T2> struct functor3;
//
// CHECK: // Specializations of KernelInfo for kernel function types:
// CHECK: template <> struct KernelInfo<struct functor1<long, unsigned long, 0, 1>> {
// CHECK: template <> struct KernelInfo<struct functor2<long, unsigned long, 0, 1>> {
// CHECK: template <> struct KernelInfo<struct functor3<int, int>> {
// CHECK: template <> struct KernelInfo<struct functor3<long, int>> {
// CHECK: template <> struct KernelInfo<struct functor3<int, unsigned long>> {
// CHECK: template <> struct KernelInfo<struct functor3<long, float>> {
// CHECK: template <> struct KernelInfo<struct functor3<float, unsigned long>> {
// CHECK: template <> struct KernelInfo<struct functor3<long, unsigned long>> {

#include "sycl.hpp"

template <typename KernelName, typename KernelType>
__attribute__((sycl_kernel)) void kernel_single_task(KernelType kernelFunc) {
kernelFunc();
}

typedef signed long int signed_integer_t;

using unsigned_integer_t = unsigned long int;

template <typename T, typename T2, signed long int N, unsigned long int M>
struct functor1 { void operator()() {} };

template <typename T, typename T2, signed_integer_t N, unsigned_integer_t M>
struct functor2 { void operator()() {} };

template <typename T, typename T2>
struct functor3 { void operator()() {} };

template <typename T>
struct functor3<signed_integer_t, T> { void operator()() {} };

template <typename T>
struct functor3<T, unsigned_integer_t> { void operator()() {} };

template <>
struct functor3<signed_integer_t, float> { void operator()() {} };

template <>
struct functor3<float, unsigned_integer_t> { void operator()() {} };

template <>
struct functor3<signed_integer_t, unsigned_integer_t> { void operator()() {} };

int main() {
functor1<signed long int, unsigned long int, 0L, 1UL> Functor1;
kernel_single_task<decltype(Functor1)>(Functor1);

functor2<signed_integer_t, unsigned_integer_t, 0L, 1UL> Functor2;
kernel_single_task<decltype(Functor2)>(Functor2);

functor3<int, int> Functor3;
kernel_single_task<decltype(Functor3)>(Functor3);

functor3<signed_integer_t, int> Functor4;
kernel_single_task<decltype(Functor4)>(Functor4);

functor3<int, unsigned_integer_t> Functor5;
kernel_single_task<decltype(Functor5)>(Functor5);

functor3<signed_integer_t, float> Functor6;
kernel_single_task<decltype(Functor6)>(Functor6);

functor3<float, unsigned_integer_t> Functor7;
kernel_single_task<decltype(Functor7)>(Functor7);

functor3<signed_integer_t, unsigned_integer_t> Functor8;
kernel_single_task<decltype(Functor8)>(Functor8);

return 0;
}
27 changes: 22 additions & 5 deletions clang/test/Driver/clang-offload-bundler.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
// CK-HELP: {{.*}}o {{.*}}- object
// CK-HELP: {{.*}}gch {{.*}}- precompiled-header
// CK-HELP: {{.*}}ast {{.*}}- clang AST file
// CK-HELP: {{.*}}ao {{.*}}- archive; output file is a list of unbundled objects
// CK-HELP: {{.*}}ao {{.*}}- archive with one object; output is an unbundled object
// CK-HELP: {{.*}}aoo {{.*}}- archive; output file is a list of unbundled objects
// CK-HELP: {{.*}}-unbundle {{.*}}- Unbundle bundled file into several output files.

//
Expand Down Expand Up @@ -91,13 +92,13 @@
// CK-ERR9A: error: expecting exactly one host target but got 0.
// CK-ERR9B: error: expecting exactly one host target but got 2.

// RUN: not clang-offload-bundler -type=i -targets=host-powerpc64le-ibm-linux-gnu,openmp-powerpc64le-ibm-linux-gnu -outputs=%t.i,%t.tgt1,%t.tgt2 -inputs=%t.bundle.i -unbundle -check-section 2>&1 | FileCheck %s --check-prefix CK-ERR10
// RUN: not clang-offload-bundler -type=i -targets=host-%itanium_abi_triple,openmp-powerpc64le-ibm-linux-gnu -outputs=%t.i,%t.tgt1,%t.tgt2 -inputs=%t.bundle.i -unbundle -check-section 2>&1 | FileCheck %s --check-prefix CK-ERR10
// CK-ERR10: error: -unbundle and -check-section are not compatible options.

// RUN: not clang-offload-bundler -type=i -targets=host-powerpc64le-ibm-linux-gnu,openmp-powerpc64le-ibm-linux-gnu -inputs=%t.bundle.i,%t.i -check-section 2>&1 | FileCheck %s --check-prefix CK-ERR11
// RUN: not clang-offload-bundler -type=i -targets=host-%itanium_abi_triple,openmp-powerpc64le-ibm-linux-gnu -inputs=%t.bundle.i,%t.i -check-section 2>&1 | FileCheck %s --check-prefix CK-ERR11
// CK-ERR11: error: only one input file supported in checking mode.

// RUN: not clang-offload-bundler -type=i -targets=host-powerpc64le-ibm-linux-gnu,openmp-powerpc64le-ibm-linux-gnu -inputs=%t.bundle.i -check-section 2>&1 | FileCheck %s --check-prefix CK-ERR12
// RUN: not clang-offload-bundler -type=i -targets=host-%itanium_abi_triple,openmp-powerpc64le-ibm-linux-gnu -inputs=%t.bundle.i -check-section 2>&1 | FileCheck %s --check-prefix CK-ERR12
// CK-ERR12: error: only one target supported in checking mode.

// RUN: not clang-offload-bundler -type=i -targets=openmp-powerpc64le-ibm-linux-gnu -inputs=%t.bundle.i -outputs=%t.r -check-section 2>&1 | FileCheck %s --check-prefix CK-ERR13
Expand Down Expand Up @@ -278,10 +279,12 @@
//
// Check archive bundle.
//

// Check file-list mode.
// RUN: echo 'Invalid object' > %t.invalid.o
// RUN: rm -f %t.a
// RUN: llvm-ar crv %t.a %t.bundle3.o %t.invalid.o
// RUN: clang-offload-bundler -type=ao -targets=host-%itanium_abi_triple,openmp-powerpc64le-ibm-linux-gnu,openmp-x86_64-pc-linux-gnu -outputs=%t.host.lst,%t.tgt1.lst,%t.tgt2.lst -inputs=%t.a -unbundle
// RUN: clang-offload-bundler -type=aoo -targets=host-%itanium_abi_triple,openmp-powerpc64le-ibm-linux-gnu,openmp-x86_64-pc-linux-gnu -outputs=%t.host.lst,%t.tgt1.lst,%t.tgt2.lst -inputs=%t.a -unbundle
// RUN: wc -l %t.host.lst | FileCheck %s --check-prefix=CHECK-AR-FILE-LIST
// RUN: wc -l %t.tgt1.lst | FileCheck %s --check-prefix=CHECK-AR-FILE-LIST
// RUN: wc -l %t.tgt2.lst | FileCheck %s --check-prefix=CHECK-AR-FILE-LIST
Expand All @@ -291,6 +294,20 @@

// CHECK-AR-FILE-LIST: 1

// Check single-file mode.
// RUN: clang-offload-bundler -type=ao -targets=host-%itanium_abi_triple,openmp-powerpc64le-ibm-linux-gnu,openmp-x86_64-pc-linux-gnu -outputs=%t.host.out,%t.tgt1.out,%t.tgt2.out -inputs=%t.a -unbundle
// RUN: diff %t.o %t.host.out
// RUN: diff %t.tgt1 %t.tgt1.out
// RUN: diff %t.tgt2 %t.tgt2.out

// Check that bundler does not accept multi-file archive in single-file mode.
// RUN: cp %t.bundle3.o %t.bundle4.o
// RUN: llvm-ar crv %t.a %t.bundle3.o %t.bundle4.o %t.invalid.o
// RUN: not clang-offload-bundler -type=ao -targets=host-%itanium_abi_triple,openmp-powerpc64le-ibm-linux-gnu,openmp-x86_64-pc-linux-gnu -outputs=%t.host.out,%t.tgt1.out,%t.tgt2.out -inputs=%t.a -unbundle 2>&1 \
// RUN: | FileCheck %s --check-prefix CHECK-MULTI-FILE-AR-ERROR

// CHECK-MULTI-FILE-AR-ERROR: 'ao' file type is requested, but the archive contains multiple device objects; use 'aoo' instead

// Some code so that we can create a binary out of this file.
int A = 0;
void test_func(void) {
Expand Down
2 changes: 1 addition & 1 deletion clang/test/Driver/sycl-offload-intelfpga.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// CHK-FPGA-LINK: clang-offload-bundler{{.*}} "-type=o" "-targets=fpga-fpga_aocr-intel-{{.*}}-sycldevice" "-inputs=[[INPUT]]" "-check-section"
// CHK-FPGA-LINK: clang-offload-bundler{{.*}} "-type=o" "-targets=host-x86_64-unknown-linux-gnu,sycl-spir64_fpga-unknown-{{.*}}-sycldevice" "-inputs=[[INPUT]]" "-outputs=[[OUTPUT1:.+\.o]],[[OUTPUT2:.+\.o]]" "-unbundle"
// CHK-FPGA-LINK: llvm-link{{.*}} "[[OUTPUT2]]" "-o" "[[OUTPUT3:.+\.bc]]"
// CHK-FPGA-LINK: llvm-spirv{{.*}} "-spirv-max-version=1.0" "-spirv-ext=+all" "-o" "[[OUTPUT4:.+\.spv]]" "[[OUTPUT3]]"
// CHK-FPGA-LINK: llvm-spirv{{.*}} "-spirv-max-version=1.1" "-spirv-ext=+all" "-o" "[[OUTPUT4:.+\.spv]]" "[[OUTPUT3]]"
// CHK-FPGA-EARLY: aoc{{.*}} "-o" "[[OUTPUT5:.+\.aocr]]" "[[OUTPUT4]]" "-sycl" "-rtl"
// CHK-FPGA-IMAGE: aoc{{.*}} "-o" "[[OUTPUT5:.+\.aocx]]" "[[OUTPUT4]]" "-sycl"
// CHK-FPGA-LINK: ld{{.*}} "-r" "[[INPUT]]" "-o" "[[OUTPUT6:.+\.o]]"
Expand Down
10 changes: 5 additions & 5 deletions clang/test/Driver/sycl-offload-win.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// RUN: %clang_cl --target=x86_64-pc-windows-msvc -fsycl -foffload-static-lib=%t.lib %t.obj -### 2>&1 \
// RUN: | FileCheck -DOBJ=%t.obj -DLIB=%t.lib %s -check-prefix=FOFFLOAD_STATIC_LIB
// FOFFLOAD_STATIC_LIB: clang-offload-bundler{{(.exe)?}}{{.+}} "-type=o"{{.+}} "-inputs=[[OBJ]]"{{.+}} "-unbundle"
// FOFFLOAD_STATIC_LIB: clang-offload-bundler{{(.exe)?}}{{.+}} "-type=ao"{{.+}} "-inputs=[[LIB]]"{{.+}} "-unbundle"
// FOFFLOAD_STATIC_LIB: clang-offload-bundler{{(.exe)?}}{{.+}} "-type=aoo"{{.+}} "-inputs=[[LIB]]"{{.+}} "-unbundle"
// FOFFLOAD_STATIC_LIB: llvm-link{{(.exe)?}}{{.*}} "@{{.*}}"
// FOFFLOAD_STATIC_LIB: link{{(.exe)?}}{{.+}} "-defaultlib:[[LIB]]"

Expand All @@ -31,7 +31,7 @@
// FOFFLOAD_STATIC_LIB_MULTI_O: clang-offload-bundler{{(.exe)?}}{{.+}} "-type=o"{{.+}} "-inputs=[[OBJ1]]"{{.+}} "-unbundle"
// FOFFLOAD_STATIC_LIB_MULTI_O: clang-offload-bundler{{(.exe)?}}{{.+}} "-type=o"{{.+}} "-inputs=[[OBJ2]]"{{.+}} "-unbundle"
// FOFFLOAD_STATIC_LIB_MULTI_O: clang-offload-bundler{{(.exe)?}}{{.+}} "-type=o"{{.+}} "-inputs=[[OBJ3]]"{{.+}} "-unbundle"
// FOFFLOAD_STATIC_LIB_MULTI_O: clang-offload-bundler{{(.exe)?}}{{.+}} "-type=ao"{{.+}} "-inputs=[[LIB]]"{{.+}} "-unbundle"
// FOFFLOAD_STATIC_LIB_MULTI_O: clang-offload-bundler{{(.exe)?}}{{.+}} "-type=aoo"{{.+}} "-inputs=[[LIB]]"{{.+}} "-unbundle"
// FOFFLOAD_STATIC_LIB_MULTI_O: llvm-link{{(.exe)?}}{{.*}} "@{{.*}}"
// FOFFLOAD_STATIC_LIB_MULTI_O: link{{(.exe)?}}{{.+}} "-defaultlib:[[LIB]]"

Expand All @@ -46,8 +46,8 @@
// RUN: %clang_cl --target=x86_64-pc-windows-msvc -fsycl -foffload-static-lib=%t1.lib -foffload-static-lib=%t2.lib %t.obj -### 2>&1 \
// RUN: | FileCheck -DOBJ=%t.obj -DLIB1=%t1.lib -DLIB2=%t2.lib %s -check-prefix=FOFFLOAD_STATIC_MULTI_LIB
// FOFFLOAD_STATIC_MULTI_LIB: clang-offload-bundler{{(.exe)?}}{{.+}} "-type=o"{{.+}} "-inputs=[[OBJ]]"{{.+}} "-unbundle"
// FOFFLOAD_STATIC_MULTI_LIB: clang-offload-bundler{{(.exe)?}}{{.+}} "-type=ao"{{.+}} "-inputs=[[LIB1]]"{{.+}} "-unbundle"
// FOFFLOAD_STATIC_MULTI_LIB: clang-offload-bundler{{(.exe)?}}{{.+}} "-type=ao"{{.+}} "-inputs=[[LIB2]]"{{.+}} "-unbundle"
// FOFFLOAD_STATIC_MULTI_LIB: clang-offload-bundler{{(.exe)?}}{{.+}} "-type=aoo"{{.+}} "-inputs=[[LIB1]]"{{.+}} "-unbundle"
// FOFFLOAD_STATIC_MULTI_LIB: clang-offload-bundler{{(.exe)?}}{{.+}} "-type=aoo"{{.+}} "-inputs=[[LIB2]]"{{.+}} "-unbundle"
// FOFFLOAD_STATIC_MULTI_LIB: llvm-link{{(.exe)?}}{{.*}} "@{{.*}}" "@{{.*}}"
// FOFFLOAD_STATIC_MULTI_LIB: link{{(.exe)?}}{{.+}} "-defaultlib:[[LIB1]]" "-defaultlib:[[LIB2]]"

Expand Down Expand Up @@ -85,7 +85,7 @@
// RUN: | FileCheck -DLIB=%t.lib %s -check-prefix=FOFFLOAD_STATIC_LIB_SRC2
// RUN: %clang_cl --target=x86_64-pc-windows-msvc -fsycl -foffload-static-lib=%t.lib %s -### 2>&1 \
// RUN: | FileCheck -DLIB=%t.lib %s -check-prefix=FOFFLOAD_STATIC_LIB_SRC2
// FOFFLOAD_STATIC_LIB_SRC2: clang-offload-bundler{{(.exe)?}}{{.+}} "-type=ao"{{.+}} "-inputs=[[LIB]]"{{.+}} "-unbundle"
// FOFFLOAD_STATIC_LIB_SRC2: clang-offload-bundler{{(.exe)?}}{{.+}} "-type=aoo"{{.+}} "-inputs=[[LIB]]"{{.+}} "-unbundle"
// FOFFLOAD_STATIC_LIB_SRC2: llvm-link{{(.exe)?}}{{.*}} "@{{.*}}"
// FOFFLOAD_STATIC_LIB_SRC2: link{{(.exe)?}}{{.+}} "-defaultlib:[[LIB]]"

Expand Down
12 changes: 10 additions & 2 deletions clang/test/Driver/sycl.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,20 @@

// DEFAULT: "-triple" "spir64-unknown-{{.*}}-sycldevice"{{.*}} "-fsycl-is-device"{{.*}} "-emit-llvm-bc"
// DEFAULT: "-internal-isystem" "{{.*lib.*clang.*include}}"
// DEFAULT-NOT: "{{.*}}llvm-spirv"{{.*}} "-spirv-max-version=1.0"{{.*}} "-spirv-ext=+all"
// DEFAULT-NOT: "{{.*}}llvm-spirv"{{.*}} "-spirv-max-version=1.1"{{.*}} "-spirv-ext=+all"
// NO-BITCODE: "-triple" "spir64-unknown-{{.*}}-sycldevice"{{.*}} "-fsycl-is-device"{{.*}} "-emit-llvm-bc"
// NO-BITCODE: "{{.*}}llvm-spirv"{{.*}} "-spirv-max-version=1.0"{{.*}} "-spirv-ext=+all"
// NO-BITCODE: "{{.*}}llvm-spirv"{{.*}} "-spirv-max-version=1.1"{{.*}} "-spirv-ext=+all"
// TARGET: "-triple" "spir64-unknown-linux-sycldevice"{{.*}} "-fsycl-is-device"{{.*}} "-emit-llvm-bc"
// COMBINED: "-triple" "spir64-unknown-{{.*}}-sycldevice"{{.*}} "-fsycl-is-device"{{.*}} "-emit-llvm-bc"

/// Verify -fsycl-device-only phases
// RUN: %clang -### -ccc-print-phases -fsycl-device-only %s 2>&1 | FileCheck %s --check-prefix=DEFAULT-PHASES
// DEFAULT-PHASES: 0: input, "{{.*}}", c
// DEFAULT-PHASES: 1: preprocessor, {0}, cpp-output
// DEFAULT-PHASES: 2: compiler, {1}, ir
// DEFAULT-PHASES: 3: backend, {2}, ir
// DEFAULT-PHASES-NOT: linker

// -fsycl-help tests
// Test with a bad argument is expected to fail
// RUN: not %clang -fsycl-help=foo %s 2>&1 | FileCheck %s --check-prefix=SYCL-HELP-BADARG
Expand Down
Empty file modified clang/test/SemaSYCL/accessors-targets.cpp
100755 → 100644
Empty file.
Empty file modified clang/test/SemaSYCL/basic-kernel-wrapper.cpp
100755 → 100644
Empty file.
Empty file modified clang/test/SemaSYCL/built-in-type-kernel-arg.cpp
100755 → 100644
Empty file.
Empty file modified clang/test/SemaSYCL/fake-accessors.cpp
100755 → 100644
Empty file.
Empty file modified clang/test/SemaSYCL/wrapped-accessor.cpp
100755 → 100644
Empty file.
Loading

0 comments on commit 8bd65a7

Please sign in to comment.