Skip to content

Commit 9f42124

Browse files
authored
[SYCL] Bypass the driver in SYCL FE tests (#2056)
1 parent ee98d31 commit 9f42124

17 files changed

+35
-70
lines changed

clang/test/CodeGenSYCL/address-space-swap.cpp

Lines changed: 0 additions & 34 deletions
This file was deleted.

clang/test/CodeGenSYCL/inlining.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang -fsycl-device-only %s -S -emit-llvm -o - | FileCheck %s
1+
// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice %s -S -emit-llvm -o - | FileCheck %s
22

33
template <typename name, typename Func>
44
__attribute__((sycl_kernel)) void kernel_single_task(Func kernelFunc) {

clang/test/CodeGenSYCL/int_header1.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang -I %S/Inputs -fsycl-device-only -Xclang -fsycl-int-header=%t.h %s -c -o kernel.spv
1+
// RUN: %clang_cc1 -I %S/Inputs -fsycl -fsycl-is-device -fsycl-int-header=%t.h %s -o %t.out
22
// RUN: FileCheck -input-file=%t.h %s
33

44
// CHECK:template <> struct KernelInfo<class KernelName> {

clang/test/CodeGenSYCL/int_header_inline_ns.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang -I %S/Inputs -fsycl-device-only -Xclang -fsycl-int-header=%t.h %s -c -o kernel.spv
1+
// RUN: %clang_cc1 -I %S/Inputs -fsycl -fsycl-is-device -fsycl-int-header=%t.h %s -o %t.out
22
// RUN: FileCheck -input-file=%t.h %s
33

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

clang/test/CodeGenSYCL/int_header_spec_const.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang -I %S/Inputs -fsycl-device-only -Xclang -fsycl-int-header=%t.h %s -c -o kernel.spv
1+
// RUN: %clang_cc1 -I %S/Inputs -fsycl -fsycl-is-device -fsycl-int-header=%t.h %s -o %t.out
22
// RUN: FileCheck -input-file=%t.h %s
33

44
#include "sycl.hpp"

clang/test/CodeGenSYCL/kernel_functor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang -I %S/Inputs -fsycl-device-only -Xclang -fsycl-int-header=%t.h %s -c -o %t.spv
1+
// RUN: %clang_cc1 -I %S/Inputs -fsycl -fsycl-is-device -fsycl-int-header=%t.h %s -o %t.spv
22
// RUN: FileCheck %s --input-file=%t.h
33

44
// Checks that functors are supported as SYCL kernels.

clang/test/CodeGenSYCL/kernel_name_with_typedefs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang -I %S/Inputs -fsycl-device-only -Xclang -fsycl-int-header=%t.h %s -c -o kernel.spv
1+
// RUN: %clang_cc1 -I %S/Inputs -fsycl -fsycl-is-device -fsycl-int-header=%t.h %s -o %t.out
22
// RUN: FileCheck -input-file=%t.h %s
33

44
#include "sycl.hpp"

clang/test/CodeGenSYCL/skip-host-classes.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// RUN: %clang -fsycl-device-only -c %s -o %t.ll -Xclang -fsycl-int-header=%t.hpp -emit-llvm -S
2-
// RUN: FileCheck < %t.ll %s --check-prefix=CHECK
1+
// RUN: %clang_cc1 -fsycl -fsycl-is-device -I %S/Inputs -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s
32

43
// CHECK-NOT: declare dso_local spir_func void {{.+}}test{{.+}}printer{{.+}}
54
class test {

clang/test/CodeGenSYCL/struct_kernel_param.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang -I %S/Inputs -fsycl-device-only -Xclang -fsycl-int-header=%t.h %s -c -o %T/kernel.spv
1+
// RUN: %clang_cc1 -I %S/Inputs -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -fsycl-int-header=%t.h %s -o %t.out
22
// RUN: FileCheck -input-file=%t.h %s
33

44
// CHECK: const kernel_param_desc_t kernel_signatures[] = {

clang/test/CodeGenSYCL/template-template-parameter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang -I %S/Inputs -fsycl-device-only -Xclang -fsycl-int-header=%t.h %s
1+
// RUN: %clang_cc1 -I %S/Inputs -fsycl -fsycl-is-device -fsycl-int-header=%t.h %s
22
// RUN: FileCheck -input-file=%t.h %s
33

44
#include <sycl.hpp>

clang/test/CodeGenSYCL/usm-int-header.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -I %S/Inputs -fsycl -fsycl-is-device -ast-dump %s | FileCheck %s
2-
// RUN: %clang -I %S/Inputs -fsycl -fsycl-device-only -Xclang -fsycl-int-header=%t.h %s -c -o kernel.spv
2+
// RUN: %clang_cc1 -I %S/Inputs -fsycl -fsycl -fsycl-is-device -fsycl-int-header=%t.h %s -o %t.out
33
// RUN: FileCheck -input-file=%t.h %s --check-prefix=INT-HEADER
44

55
// INT-HEADER:{ kernel_param_kind_t::kind_pointer, 8, 0 },

clang/test/CodeGenSYCL/wrapped-accessor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang -I %S/Inputs -fsycl-device-only -Xclang -fsycl-int-header=%t.h %s -c -o %T/kernel.spv
1+
// RUN: %clang_cc1 -I %S/Inputs -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -fsycl-int-header=%t.h %s -o %t.out
22
// RUN: FileCheck -input-file=%t.h %s
33
//
44
// CHECK: #include <CL/sycl/detail/kernel_desc.hpp>

clang/test/SemaSYCL/intel-max-global-work-dim.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %clang %s -fsyntax-only -fsycl-device-only -DTRIGGER_ERROR -Xclang -verify
2-
// RUN: %clang %s -fsyntax-only -Xclang -ast-dump -fsycl-device-only | FileCheck %s
1+
// RUN: %clang_cc1 %s -fsyntax-only -fsycl -fsycl-is-device -triple spir64 -DTRIGGER_ERROR -verify
2+
// RUN: %clang_cc1 %s -fsyntax-only -ast-dump -fsycl -fsycl-is-device -triple spir64 | FileCheck %s
33
// RUN: %clang_cc1 -fsycl -fsycl-is-host -fsyntax-only -verify %s
44

55
#ifndef __SYCL_DEVICE_ONLY__
@@ -57,31 +57,31 @@ __attribute__((sycl_kernel)) void kernel(Func kernelFunc) {
5757
}
5858

5959
int main() {
60-
// CHECK-LABEL: FunctionDecl {{.*}} _ZTSZ4mainE12test_kernel1
60+
// CHECK-LABEL: FunctionDecl {{.*}}test_kernel1
6161
// CHECK: SYCLIntelMaxGlobalWorkDimAttr {{.*}} 1
6262
kernel<class test_kernel1>(
6363
FuncObj());
6464

65-
// CHECK-LABEL: FunctionDecl {{.*}} _ZTSZ4mainE12test_kernel2
65+
// CHECK-LABEL: FunctionDecl {{.*}}test_kernel2
6666
// CHECK: SYCLIntelMaxGlobalWorkDimAttr {{.*}} 2
6767
kernel<class test_kernel2>(
6868
[]() [[intelfpga::max_global_work_dim(2)]] {});
6969

70-
// CHECK-LABEL: FunctionDecl {{.*}} _ZTSZ4mainE12test_kernel3
70+
// CHECK-LABEL: FunctionDecl {{.*}}test_kernel3
7171
// CHECK-NOT: SYCLIntelMaxGlobalWorkDimAttr {{.*}}
7272
kernel<class test_kernel3>(
7373
[]() {func_ignore();});
7474

7575
kernel<class test_kernel4>(
7676
TRIFuncObjGood1());
77-
// CHECK-LABEL: FunctionDecl {{.*}} _ZTSZ4mainE12test_kernel4
77+
// CHECK-LABEL: FunctionDecl {{.*}}test_kernel4
7878
// CHECK: ReqdWorkGroupSizeAttr {{.*}} 1 1 1
7979
// CHECK: SYCLIntelMaxWorkGroupSizeAttr {{.*}} 1 1 1
8080
// CHECK: SYCLIntelMaxGlobalWorkDimAttr {{.*}} 0
8181

8282
kernel<class test_kernel5>(
8383
TRIFuncObjGood2());
84-
// CHECK-LABEL: FunctionDecl {{.*}} _ZTSZ4mainE12test_kernel5
84+
// CHECK-LABEL: FunctionDecl {{.*}}test_kernel5
8585
// CHECK: ReqdWorkGroupSizeAttr {{.*}} 1 1 4
8686
// CHECK: SYCLIntelMaxWorkGroupSizeAttr {{.*}} 1 1 8
8787
// CHECK: SYCLIntelMaxGlobalWorkDimAttr {{.*}} 3

clang/test/SemaSYCL/intel-max-work-group-size.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %clang %s -fsyntax-only -fsycl-device-only -DTRIGGER_ERROR -Xclang -verify
2-
// RUN: %clang %s -fsyntax-only -Xclang -ast-dump -fsycl-device-only | FileCheck %s
1+
// RUN: %clang_cc1 %s -fsyntax-only -fsycl -fsycl-is-device -triple spir64 -DTRIGGER_ERROR -verify
2+
// RUN: %clang_cc1 %s -fsyntax-only -ast-dump -fsycl -fsycl-is-device -triple spir64 | FileCheck %s
33
// RUN: %clang_cc1 -fsycl -fsycl-is-host -fsyntax-only -verify %s
44

55
#ifndef __SYCL_DEVICE_ONLY__
@@ -42,17 +42,17 @@ __attribute__((sycl_kernel)) void kernel(Func kernelFunc) {
4242
}
4343

4444
int main() {
45-
// CHECK-LABEL: FunctionDecl {{.*}} _ZTSZ4mainE12test_kernel1
45+
// CHECK-LABEL: FunctionDecl {{.*}}test_kernel1
4646
// CHECK: SYCLIntelMaxWorkGroupSizeAttr {{.*}} 4 4 4
4747
kernel<class test_kernel1>(
4848
FuncObj());
4949

50-
// CHECK-LABEL: FunctionDecl {{.*}} _ZTSZ4mainE12test_kernel2
50+
// CHECK-LABEL: FunctionDecl {{.*}}test_kernel2
5151
// CHECK: SYCLIntelMaxWorkGroupSizeAttr {{.*}} 8 8 8
5252
kernel<class test_kernel2>(
5353
[]() [[intelfpga::max_work_group_size(8, 8, 8)]] {});
5454

55-
// CHECK-LABEL: FunctionDecl {{.*}} _ZTSZ4mainE12test_kernel3
55+
// CHECK-LABEL: FunctionDecl {{.*}}test_kernel3
5656
// CHECK-NOT: SYCLIntelMaxWorkGroupSizeAttr {{.*}}
5757
kernel<class test_kernel3>(
5858
[]() {func_ignore();});

clang/test/SemaSYCL/intel-restrict.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %clang %s -fsyntax-only -fsycl-device-only -DCHECKDIAG -Xclang -verify
2-
// RUN: %clang %s -fsyntax-only -Xclang -ast-dump -fsycl-device-only | FileCheck %s
1+
// RUN: %clang_cc1 %s -fsyntax-only -fsycl -fsycl-is-device -triple spir64 -DCHECKDIAG -verify
2+
// RUN: %clang_cc1 %s -fsyntax-only -ast-dump -fsycl -fsycl-is-device -triple spir64 | FileCheck %s
33

44
[[intel::kernel_args_restrict]] // expected-warning{{'kernel_args_restrict' attribute ignored}}
55
void func_ignore() {}
@@ -18,17 +18,17 @@ __attribute__((sycl_kernel)) void kernel(Func kernelFunc) {
1818
}
1919

2020
int main() {
21-
// CHECK-LABEL: FunctionDecl {{.*}} _ZTSZ4mainE12test_kernel1
21+
// CHECK-LABEL: FunctionDecl {{.*}}test_kernel1
2222
// CHECK: SYCLIntelKernelArgsRestrictAttr
2323
kernel<class test_kernel1>(
2424
FuncObj());
2525

26-
// CHECK-LABEL: FunctionDecl {{.*}} _ZTSZ4mainE12test_kernel2
26+
// CHECK-LABEL: FunctionDecl {{.*}}test_kernel2
2727
// CHECK: SYCLIntelKernelArgsRestrictAttr
2828
kernel<class test_kernel2>(
2929
[]() [[intel::kernel_args_restrict]] {});
3030

31-
// CHECK-LABEL: FunctionDecl {{.*}} _ZTSZ4mainE12test_kernel3
31+
// CHECK-LABEL: FunctionDecl {{.*}}test_kernel3
3232
// CHECK-NOT: SYCLIntelKernelArgsRestrictAttr
3333
kernel<class test_kernel3>(
3434
[]() {func_ignore();});

clang/test/SemaSYCL/num_simd_work_items.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %clang %s -fsycl -fsycl-device-only -fsyntax-only -DTRIGGER_ERROR -Xclang -verify
2-
// RUN: %clang %s -fsycl -fsycl-device-only -fsyntax-only -Xclang -ast-dump | FileCheck %s
1+
// RUN: %clang_cc1 %s -fsycl -fsycl-is-device -triple spir64 -fsyntax-only -DTRIGGER_ERROR -verify
2+
// RUN: %clang_cc1 %s -fsycl -fsycl-is-device -triple spir64 -fsyntax-only -ast-dump | FileCheck %s
33
// RUN: %clang_cc1 -fsycl -fsycl-is-host -fsyntax-only -verify %s
44

55
#ifndef __SYCL_DEVICE_ONLY__
@@ -34,17 +34,17 @@ __attribute__((sycl_kernel)) void kernel(Func kernelFunc) {
3434
}
3535

3636
int main() {
37-
// CHECK-LABEL: FunctionDecl {{.*}} _ZTSZ4mainE12test_kernel1
37+
// CHECK-LABEL: FunctionDecl {{.*}}test_kernel1
3838
// CHECK: SYCLIntelNumSimdWorkItemsAttr {{.*}} 42
3939
kernel<class test_kernel1>(
4040
FuncObj());
4141

42-
// CHECK-LABEL: FunctionDecl {{.*}} _ZTSZ4mainE12test_kernel2
42+
// CHECK-LABEL: FunctionDecl {{.*}}test_kernel2
4343
// CHECK: SYCLIntelNumSimdWorkItemsAttr {{.*}} 8
4444
kernel<class test_kernel2>(
4545
[]() [[intelfpga::num_simd_work_items(8)]] {});
4646

47-
// CHECK-LABEL: FunctionDecl {{.*}} _ZTSZ4mainE12test_kernel3
47+
// CHECK-LABEL: FunctionDecl {{.*}}test_kernel3
4848
// CHECK-NOT: SYCLIntelNumSimdWorkItemsAttr {{.*}} 2
4949
kernel<class test_kernel3>(
5050
[]() {func_ignore();});

clang/test/SemaSYCL/sampler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang -S -I %S/Inputs -fsycl-device-only -Xclang -ast-dump %s | FileCheck %s
1+
// RUN: %clang_cc1 -S -I %S/Inputs -fsycl -fsycl-is-device -triple spir64 -ast-dump %s | FileCheck %s
22

33
#include <sycl.hpp>
44

@@ -16,7 +16,7 @@ int main() {
1616
}
1717

1818
// Check declaration of the test kernel
19-
// CHECK: FunctionDecl {{.*}}use_kernel_for_test 'void (sampler_t)'
19+
// CHECK: FunctionDecl {{.*}}use_kernel_for_test{{.*}} 'void (sampler_t)'
2020
//
2121
// Check parameters of the test kernel
2222
// CHECK: ParmVarDecl {{.*}} used [[_arg_sampler:[0-9a-zA-Z_]+]] 'sampler_t'

0 commit comments

Comments
 (0)