Skip to content

Commit 8bd65a7

Browse files
committed
Merge from 'sycl' to 'sycl-web' (#15)
CONFLICT (content): Merge conflict in clang/test/Driver/clang-offload-bundler.c
2 parents e800b8d + b55e0d1 commit 8bd65a7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+473
-161
lines changed

clang/lib/Driver/ToolChains/Clang.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -6603,7 +6603,7 @@ void OffloadBundler::ConstructJobMultipleOutputs(
66036603
}
66046604
if (C.getDefaultToolChain().getTriple().isWindowsMSVCEnvironment() &&
66056605
Input.getType() == types::TY_Archive)
6606-
TypeArg = "ao";
6606+
TypeArg = "aoo";
66076607

66086608
// Get the type.
66096609
CmdArgs.push_back(TCArgs.MakeArgString(Twine("-type=") + TypeArg));
@@ -6754,7 +6754,7 @@ void SPIRVTranslator::ConstructJob(Compilation &C, const JobAction &JA,
67546754
TranslatorArgs.push_back("-o");
67556755
TranslatorArgs.push_back(Output.getFilename());
67566756
if (getToolChain().getTriple().isSYCLDeviceEnvironment()) {
6757-
TranslatorArgs.push_back("-spirv-max-version=1.0");
6757+
TranslatorArgs.push_back("-spirv-max-version=1.1");
67586758
TranslatorArgs.push_back("-spirv-ext=+all");
67596759
}
67606760
for (auto I : Inputs) {

clang/lib/Driver/ToolChains/SYCL.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const char *SYCL::Linker::constructLLVMSpirvCommand(Compilation &C,
3939
CmdArgs.push_back("-o");
4040
CmdArgs.push_back(OutputFileName);
4141
} else {
42-
CmdArgs.push_back("-spirv-max-version=1.0");
42+
CmdArgs.push_back("-spirv-max-version=1.1");
4343
CmdArgs.push_back("-spirv-ext=+all");
4444
CmdArgs.push_back("-o");
4545
CmdArgs.push_back(Output.getFilename());

clang/lib/Sema/SemaSYCL.cpp

100755100644
+5-1
Original file line numberDiff line numberDiff line change
@@ -1299,6 +1299,7 @@ void SYCLIntegrationHeader::emitFwdDecl(raw_ostream &O, const Decl *D) {
12991299
// print declaration into a string:
13001300
PrintingPolicy P(D->getASTContext().getLangOpts());
13011301
P.adjustForCPlusPlusFwdDecl();
1302+
P.PrintCanonicalTypes = true;
13021303
std::string S;
13031304
llvm::raw_string_ostream SO(S);
13041305
D->print(SO, P);
@@ -1511,8 +1512,11 @@ void SYCLIntegrationHeader::emit(raw_ostream &O) {
15111512
O << "', '" << c;
15121513
O << "'> {\n";
15131514
} else {
1515+
LangOptions LO;
1516+
PrintingPolicy P(LO);
1517+
P.PrintCanonicalTypes = true;
15141518
O << "template <> struct KernelInfo<"
1515-
<< eraseAnonNamespace(K.NameType.getAsString()) << "> {\n";
1519+
<< eraseAnonNamespace(K.NameType.getAsString(P)) << "> {\n";
15161520
}
15171521
O << " DLL_LOCAL\n";
15181522
O << " static constexpr const char* getName() { return \"" << K.Name

clang/test/CodeGenSYCL/basic-kernel-wrapper.cpp

100755100644
File mode changed.

clang/test/CodeGenSYCL/device-variables.cpp

100755100644
File mode changed.

clang/test/CodeGenSYCL/int_header1.cpp

+9-9
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
// RUN: FileCheck -input-file=%t.h %s
33

44
// CHECK:template <> struct KernelInfo<class KernelName> {
5-
// CHECK:template <> struct KernelInfo<::nm1::nm2::KernelName0> {
6-
// CHECK:template <> struct KernelInfo<::nm1::KernelName1> {
7-
// CHECK:template <> struct KernelInfo<::nm1::KernelName3< ::nm1::nm2::KernelName0>> {
8-
// CHECK:template <> struct KernelInfo<::nm1::KernelName3< ::nm1::KernelName1>> {
9-
// CHECK:template <> struct KernelInfo<::nm1::KernelName4< ::nm1::nm2::KernelName0>> {
10-
// CHECK:template <> struct KernelInfo<::nm1::KernelName4< ::nm1::KernelName1>> {
11-
// CHECK:template <> struct KernelInfo<::nm1::KernelName3<KernelName5>> {
12-
// CHECK:template <> struct KernelInfo<::nm1::KernelName4<KernelName7>> {
13-
// CHECK:template <> struct KernelInfo<::nm1::KernelName8< ::nm1::nm2::C>> {
5+
// CHECK:template <> struct KernelInfo<class nm1::nm2::KernelName0> {
6+
// CHECK:template <> struct KernelInfo<class nm1::KernelName1> {
7+
// CHECK:template <> struct KernelInfo<class nm1::KernelName3<class nm1::nm2::KernelName0>> {
8+
// CHECK:template <> struct KernelInfo<class nm1::KernelName3<class nm1::KernelName1>> {
9+
// CHECK:template <> struct KernelInfo<class nm1::KernelName4<class nm1::nm2::KernelName0>> {
10+
// CHECK:template <> struct KernelInfo<class nm1::KernelName4<class nm1::KernelName1>> {
11+
// CHECK:template <> struct KernelInfo<class nm1::KernelName3<class KernelName5>> {
12+
// CHECK:template <> struct KernelInfo<class nm1::KernelName4<class KernelName7>> {
13+
// CHECK:template <> struct KernelInfo<class nm1::KernelName8<class nm1::nm2::C>> {
1414
// CHECK:template <> struct KernelInfo<class TmplClassInAnonNS<class ClassInAnonNS>> {
1515

1616
// This test checks if the SYCL device compiler is able to generate correct

clang/test/CodeGenSYCL/integration_header.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@
4848
// CHECK-NEXT: };
4949
//
5050
// CHECK: template <> struct KernelInfo<class first_kernel> {
51-
// CHECK: template <> struct KernelInfo<::second_namespace::second_kernel<char>> {
52-
// CHECK: template <> struct KernelInfo<::third_kernel<1, int, ::point<X> >> {
53-
// CHECK: template <> struct KernelInfo<::fourth_kernel< ::template_arg_ns::namespaced_arg<1> >> {
51+
// CHECK: template <> struct KernelInfo<class second_namespace::second_kernel<char>> {
52+
// CHECK: template <> struct KernelInfo<class third_kernel<1, int, struct point<struct X> >> {
53+
// CHECK: template <> struct KernelInfo<class fourth_kernel<struct template_arg_ns::namespaced_arg<1> >> {
5454

5555
#include "sycl.hpp"
5656

clang/test/CodeGenSYCL/intel-fpga-reg.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,6 @@ void foo() {
142142
// CHECK-NEXT: store i32 addrspace(4)* %[[V_AP3]], i32 addrspace(4)** %bp, align 8, !tbaa !5
143143
}
144144

145-
// CHECK: declare i32 @llvm.annotation.i32(i32, i8*, i8*, i32) #4
146-
// CHECK: declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture writeonly, i8* nocapture readonly, i64, i1 immarg) #1
147-
// CHECK: declare i8* @llvm.ptr.annotation.p0i8(i8*, i8*, i8*, i32) #4
148-
// CHECK: declare i64 @llvm.annotation.i64(i64, i8*, i8*, i32) #4
149-
150145
template <typename name, typename Func>
151146
__attribute__((sycl_kernel)) void kernel_single_task(Func kernelFunc) {
152147
kernelFunc();

clang/test/CodeGenSYCL/kernel_functor.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ int main() {
168168
cl::sycl::detail::KernelInfo<Functor1>::getName();
169169
// CHECK: Functor1
170170
cl::sycl::detail::KernelInfo<ns::Functor2>::getName();
171-
// CHECK: ::ns::Functor2
171+
// CHECK: ns::Functor2
172172
cl::sycl::detail::KernelInfo<TmplFunctor<int>>::getName();
173173
// CHECK: TmplFunctor<int>
174174
cl::sycl::detail::KernelInfo<TmplConstFunctor<int>>::getName();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
// RUN: %clang -I %S/Inputs --sycl -Xclang -fsycl-int-header=%t.h %s -c -o kernel.spv
2+
// RUN: FileCheck -input-file=%t.h %s
3+
4+
// CHECK: // Forward declarations of templated kernel function types:
5+
// CHECK-NEXT: template <typename T, typename T2, long N, unsigned long M> struct functor1;
6+
// CHECK-NEXT: template <typename T, typename T2, long N, unsigned long M> struct functor2;
7+
// CHECK-NEXT: template <typename T, typename T2> struct functor3;
8+
//
9+
// CHECK: // Specializations of KernelInfo for kernel function types:
10+
// CHECK: template <> struct KernelInfo<struct functor1<long, unsigned long, 0, 1>> {
11+
// CHECK: template <> struct KernelInfo<struct functor2<long, unsigned long, 0, 1>> {
12+
// CHECK: template <> struct KernelInfo<struct functor3<int, int>> {
13+
// CHECK: template <> struct KernelInfo<struct functor3<long, int>> {
14+
// CHECK: template <> struct KernelInfo<struct functor3<int, unsigned long>> {
15+
// CHECK: template <> struct KernelInfo<struct functor3<long, float>> {
16+
// CHECK: template <> struct KernelInfo<struct functor3<float, unsigned long>> {
17+
// CHECK: template <> struct KernelInfo<struct functor3<long, unsigned long>> {
18+
19+
#include "sycl.hpp"
20+
21+
template <typename KernelName, typename KernelType>
22+
__attribute__((sycl_kernel)) void kernel_single_task(KernelType kernelFunc) {
23+
kernelFunc();
24+
}
25+
26+
typedef signed long int signed_integer_t;
27+
28+
using unsigned_integer_t = unsigned long int;
29+
30+
template <typename T, typename T2, signed long int N, unsigned long int M>
31+
struct functor1 { void operator()() {} };
32+
33+
template <typename T, typename T2, signed_integer_t N, unsigned_integer_t M>
34+
struct functor2 { void operator()() {} };
35+
36+
template <typename T, typename T2>
37+
struct functor3 { void operator()() {} };
38+
39+
template <typename T>
40+
struct functor3<signed_integer_t, T> { void operator()() {} };
41+
42+
template <typename T>
43+
struct functor3<T, unsigned_integer_t> { void operator()() {} };
44+
45+
template <>
46+
struct functor3<signed_integer_t, float> { void operator()() {} };
47+
48+
template <>
49+
struct functor3<float, unsigned_integer_t> { void operator()() {} };
50+
51+
template <>
52+
struct functor3<signed_integer_t, unsigned_integer_t> { void operator()() {} };
53+
54+
int main() {
55+
functor1<signed long int, unsigned long int, 0L, 1UL> Functor1;
56+
kernel_single_task<decltype(Functor1)>(Functor1);
57+
58+
functor2<signed_integer_t, unsigned_integer_t, 0L, 1UL> Functor2;
59+
kernel_single_task<decltype(Functor2)>(Functor2);
60+
61+
functor3<int, int> Functor3;
62+
kernel_single_task<decltype(Functor3)>(Functor3);
63+
64+
functor3<signed_integer_t, int> Functor4;
65+
kernel_single_task<decltype(Functor4)>(Functor4);
66+
67+
functor3<int, unsigned_integer_t> Functor5;
68+
kernel_single_task<decltype(Functor5)>(Functor5);
69+
70+
functor3<signed_integer_t, float> Functor6;
71+
kernel_single_task<decltype(Functor6)>(Functor6);
72+
73+
functor3<float, unsigned_integer_t> Functor7;
74+
kernel_single_task<decltype(Functor7)>(Functor7);
75+
76+
functor3<signed_integer_t, unsigned_integer_t> Functor8;
77+
kernel_single_task<decltype(Functor8)>(Functor8);
78+
79+
return 0;
80+
}

clang/test/Driver/clang-offload-bundler.c

+22-5
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
// CK-HELP: {{.*}}o {{.*}}- object
4848
// CK-HELP: {{.*}}gch {{.*}}- precompiled-header
4949
// CK-HELP: {{.*}}ast {{.*}}- clang AST file
50-
// CK-HELP: {{.*}}ao {{.*}}- archive; output file is a list of unbundled objects
50+
// CK-HELP: {{.*}}ao {{.*}}- archive with one object; output is an unbundled object
51+
// CK-HELP: {{.*}}aoo {{.*}}- archive; output file is a list of unbundled objects
5152
// CK-HELP: {{.*}}-unbundle {{.*}}- Unbundle bundled file into several output files.
5253

5354
//
@@ -91,13 +92,13 @@
9192
// CK-ERR9A: error: expecting exactly one host target but got 0.
9293
// CK-ERR9B: error: expecting exactly one host target but got 2.
9394

94-
// 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
95+
// 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
9596
// CK-ERR10: error: -unbundle and -check-section are not compatible options.
9697

97-
// 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
98+
// 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
9899
// CK-ERR11: error: only one input file supported in checking mode.
99100

100-
// 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
101+
// 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
101102
// CK-ERR12: error: only one target supported in checking mode.
102103

103104
// 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
@@ -278,10 +279,12 @@
278279
//
279280
// Check archive bundle.
280281
//
282+
283+
// Check file-list mode.
281284
// RUN: echo 'Invalid object' > %t.invalid.o
282285
// RUN: rm -f %t.a
283286
// RUN: llvm-ar crv %t.a %t.bundle3.o %t.invalid.o
284-
// 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
287+
// 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
285288
// RUN: wc -l %t.host.lst | FileCheck %s --check-prefix=CHECK-AR-FILE-LIST
286289
// RUN: wc -l %t.tgt1.lst | FileCheck %s --check-prefix=CHECK-AR-FILE-LIST
287290
// RUN: wc -l %t.tgt2.lst | FileCheck %s --check-prefix=CHECK-AR-FILE-LIST
@@ -291,6 +294,20 @@
291294

292295
// CHECK-AR-FILE-LIST: 1
293296

297+
// Check single-file mode.
298+
// 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
299+
// RUN: diff %t.o %t.host.out
300+
// RUN: diff %t.tgt1 %t.tgt1.out
301+
// RUN: diff %t.tgt2 %t.tgt2.out
302+
303+
// Check that bundler does not accept multi-file archive in single-file mode.
304+
// RUN: cp %t.bundle3.o %t.bundle4.o
305+
// RUN: llvm-ar crv %t.a %t.bundle3.o %t.bundle4.o %t.invalid.o
306+
// 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 \
307+
// RUN: | FileCheck %s --check-prefix CHECK-MULTI-FILE-AR-ERROR
308+
309+
// CHECK-MULTI-FILE-AR-ERROR: 'ao' file type is requested, but the archive contains multiple device objects; use 'aoo' instead
310+
294311
// Some code so that we can create a binary out of this file.
295312
int A = 0;
296313
void test_func(void) {

clang/test/Driver/sycl-offload-intelfpga.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
// CHK-FPGA-LINK: clang-offload-bundler{{.*}} "-type=o" "-targets=fpga-fpga_aocr-intel-{{.*}}-sycldevice" "-inputs=[[INPUT]]" "-check-section"
2222
// 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"
2323
// CHK-FPGA-LINK: llvm-link{{.*}} "[[OUTPUT2]]" "-o" "[[OUTPUT3:.+\.bc]]"
24-
// CHK-FPGA-LINK: llvm-spirv{{.*}} "-spirv-max-version=1.0" "-spirv-ext=+all" "-o" "[[OUTPUT4:.+\.spv]]" "[[OUTPUT3]]"
24+
// CHK-FPGA-LINK: llvm-spirv{{.*}} "-spirv-max-version=1.1" "-spirv-ext=+all" "-o" "[[OUTPUT4:.+\.spv]]" "[[OUTPUT3]]"
2525
// CHK-FPGA-EARLY: aoc{{.*}} "-o" "[[OUTPUT5:.+\.aocr]]" "[[OUTPUT4]]" "-sycl" "-rtl"
2626
// CHK-FPGA-IMAGE: aoc{{.*}} "-o" "[[OUTPUT5:.+\.aocx]]" "[[OUTPUT4]]" "-sycl"
2727
// CHK-FPGA-LINK: ld{{.*}} "-r" "[[INPUT]]" "-o" "[[OUTPUT6:.+\.o]]"

clang/test/Driver/sycl-offload-win.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// RUN: %clang_cl --target=x86_64-pc-windows-msvc -fsycl -foffload-static-lib=%t.lib %t.obj -### 2>&1 \
1414
// RUN: | FileCheck -DOBJ=%t.obj -DLIB=%t.lib %s -check-prefix=FOFFLOAD_STATIC_LIB
1515
// FOFFLOAD_STATIC_LIB: clang-offload-bundler{{(.exe)?}}{{.+}} "-type=o"{{.+}} "-inputs=[[OBJ]]"{{.+}} "-unbundle"
16-
// FOFFLOAD_STATIC_LIB: clang-offload-bundler{{(.exe)?}}{{.+}} "-type=ao"{{.+}} "-inputs=[[LIB]]"{{.+}} "-unbundle"
16+
// FOFFLOAD_STATIC_LIB: clang-offload-bundler{{(.exe)?}}{{.+}} "-type=aoo"{{.+}} "-inputs=[[LIB]]"{{.+}} "-unbundle"
1717
// FOFFLOAD_STATIC_LIB: llvm-link{{(.exe)?}}{{.*}} "@{{.*}}"
1818
// FOFFLOAD_STATIC_LIB: link{{(.exe)?}}{{.+}} "-defaultlib:[[LIB]]"
1919

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

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

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

clang/test/Driver/sycl.c

+10-2
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,20 @@
66

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

15+
/// Verify -fsycl-device-only phases
16+
// RUN: %clang -### -ccc-print-phases -fsycl-device-only %s 2>&1 | FileCheck %s --check-prefix=DEFAULT-PHASES
17+
// DEFAULT-PHASES: 0: input, "{{.*}}", c
18+
// DEFAULT-PHASES: 1: preprocessor, {0}, cpp-output
19+
// DEFAULT-PHASES: 2: compiler, {1}, ir
20+
// DEFAULT-PHASES: 3: backend, {2}, ir
21+
// DEFAULT-PHASES-NOT: linker
22+
1523
// -fsycl-help tests
1624
// Test with a bad argument is expected to fail
1725
// RUN: not %clang -fsycl-help=foo %s 2>&1 | FileCheck %s --check-prefix=SYCL-HELP-BADARG

clang/test/SemaSYCL/accessors-targets.cpp

100755100644
File mode changed.

clang/test/SemaSYCL/basic-kernel-wrapper.cpp

100755100644
File mode changed.

clang/test/SemaSYCL/built-in-type-kernel-arg.cpp

100755100644
File mode changed.

clang/test/SemaSYCL/fake-accessors.cpp

100755100644
File mode changed.

clang/test/SemaSYCL/wrapped-accessor.cpp

100755100644
File mode changed.

0 commit comments

Comments
 (0)