Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 0 additions & 34 deletions clang/test/CodeGenSYCL/address-space-swap.cpp

This file was deleted.

2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/inlining.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clang -fsycl-device-only %s -S -emit-llvm -o - | FileCheck %s
// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice %s -S -emit-llvm -o - | FileCheck %s

template <typename name, typename Func>
__attribute__((sycl_kernel)) void kernel_single_task(Func kernelFunc) {
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/int_header1.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clang -I %S/Inputs -fsycl-device-only -Xclang -fsycl-int-header=%t.h %s -c -o kernel.spv
// RUN: %clang_cc1 -I %S/Inputs -fsycl -fsycl-is-device -fsycl-int-header=%t.h %s -o %t.out
// RUN: FileCheck -input-file=%t.h %s

// CHECK:template <> struct KernelInfo<class KernelName> {
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/int_header_inline_ns.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clang -I %S/Inputs -fsycl-device-only -Xclang -fsycl-int-header=%t.h %s -c -o kernel.spv
// RUN: %clang_cc1 -I %S/Inputs -fsycl -fsycl-is-device -fsycl-int-header=%t.h %s -o %t.out
// RUN: FileCheck -input-file=%t.h %s

// This test checks if the SYCL device compiler is able to generate correct
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/int_header_spec_const.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clang -I %S/Inputs -fsycl-device-only -Xclang -fsycl-int-header=%t.h %s -c -o kernel.spv
// RUN: %clang_cc1 -I %S/Inputs -fsycl -fsycl-is-device -fsycl-int-header=%t.h %s -o %t.out
// RUN: FileCheck -input-file=%t.h %s

#include "sycl.hpp"
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/kernel_functor.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clang -I %S/Inputs -fsycl-device-only -Xclang -fsycl-int-header=%t.h %s -c -o %t.spv
// RUN: %clang_cc1 -I %S/Inputs -fsycl -fsycl-is-device -fsycl-int-header=%t.h %s -o %t.spv
// RUN: FileCheck %s --input-file=%t.h

// Checks that functors are supported as SYCL kernels.
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/kernel_name_with_typedefs.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clang -I %S/Inputs -fsycl-device-only -Xclang -fsycl-int-header=%t.h %s -c -o kernel.spv
// RUN: %clang_cc1 -I %S/Inputs -fsycl -fsycl-is-device -fsycl-int-header=%t.h %s -o %t.out
// RUN: FileCheck -input-file=%t.h %s

#include "sycl.hpp"
Expand Down
3 changes: 1 addition & 2 deletions clang/test/CodeGenSYCL/skip-host-classes.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %clang -fsycl-device-only -c %s -o %t.ll -Xclang -fsycl-int-header=%t.hpp -emit-llvm -S
// RUN: FileCheck < %t.ll %s --check-prefix=CHECK
// RUN: %clang_cc1 -fsycl -fsycl-is-device -I %S/Inputs -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s

// CHECK-NOT: declare dso_local spir_func void {{.+}}test{{.+}}printer{{.+}}
class test {
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/struct_kernel_param.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clang -I %S/Inputs -fsycl-device-only -Xclang -fsycl-int-header=%t.h %s -c -o %T/kernel.spv
// RUN: %clang_cc1 -I %S/Inputs -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -fsycl-int-header=%t.h %s -o %t.out
// RUN: FileCheck -input-file=%t.h %s

// CHECK: const kernel_param_desc_t kernel_signatures[] = {
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/template-template-parameter.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clang -I %S/Inputs -fsycl-device-only -Xclang -fsycl-int-header=%t.h %s
// RUN: %clang_cc1 -I %S/Inputs -fsycl -fsycl-is-device -fsycl-int-header=%t.h %s
// RUN: FileCheck -input-file=%t.h %s

#include <sycl.hpp>
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/usm-int-header.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %clang_cc1 -I %S/Inputs -fsycl -fsycl-is-device -ast-dump %s | FileCheck %s
// RUN: %clang -I %S/Inputs -fsycl -fsycl-device-only -Xclang -fsycl-int-header=%t.h %s -c -o kernel.spv
// RUN: %clang_cc1 -I %S/Inputs -fsycl -fsycl -fsycl-is-device -fsycl-int-header=%t.h %s -o %t.out
// RUN: FileCheck -input-file=%t.h %s --check-prefix=INT-HEADER

// INT-HEADER:{ kernel_param_kind_t::kind_pointer, 8, 0 },
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/wrapped-accessor.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clang -I %S/Inputs -fsycl-device-only -Xclang -fsycl-int-header=%t.h %s -c -o %T/kernel.spv
// RUN: %clang_cc1 -I %S/Inputs -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -fsycl-int-header=%t.h %s -o %t.out
// RUN: FileCheck -input-file=%t.h %s
//
// CHECK: #include <CL/sycl/detail/kernel_desc.hpp>
Expand Down
14 changes: 7 additions & 7 deletions clang/test/SemaSYCL/intel-max-global-work-dim.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %clang %s -fsyntax-only -fsycl-device-only -DTRIGGER_ERROR -Xclang -verify
// RUN: %clang %s -fsyntax-only -Xclang -ast-dump -fsycl-device-only | FileCheck %s
// RUN: %clang_cc1 %s -fsyntax-only -fsycl -fsycl-is-device -triple spir64 -DTRIGGER_ERROR -verify
// RUN: %clang_cc1 %s -fsyntax-only -ast-dump -fsycl -fsycl-is-device -triple spir64 | FileCheck %s
// RUN: %clang_cc1 -fsycl -fsycl-is-host -fsyntax-only -verify %s

#ifndef __SYCL_DEVICE_ONLY__
Expand Down Expand Up @@ -57,31 +57,31 @@ __attribute__((sycl_kernel)) void kernel(Func kernelFunc) {
}

int main() {
// CHECK-LABEL: FunctionDecl {{.*}} _ZTSZ4mainE12test_kernel1
// CHECK-LABEL: FunctionDecl {{.*}}test_kernel1
// CHECK: SYCLIntelMaxGlobalWorkDimAttr {{.*}} 1
kernel<class test_kernel1>(
FuncObj());

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

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

kernel<class test_kernel4>(
TRIFuncObjGood1());
// CHECK-LABEL: FunctionDecl {{.*}} _ZTSZ4mainE12test_kernel4
// CHECK-LABEL: FunctionDecl {{.*}}test_kernel4
// CHECK: ReqdWorkGroupSizeAttr {{.*}} 1 1 1
// CHECK: SYCLIntelMaxWorkGroupSizeAttr {{.*}} 1 1 1
// CHECK: SYCLIntelMaxGlobalWorkDimAttr {{.*}} 0

kernel<class test_kernel5>(
TRIFuncObjGood2());
// CHECK-LABEL: FunctionDecl {{.*}} _ZTSZ4mainE12test_kernel5
// CHECK-LABEL: FunctionDecl {{.*}}test_kernel5
// CHECK: ReqdWorkGroupSizeAttr {{.*}} 1 1 4
// CHECK: SYCLIntelMaxWorkGroupSizeAttr {{.*}} 1 1 8
// CHECK: SYCLIntelMaxGlobalWorkDimAttr {{.*}} 3
Expand Down
10 changes: 5 additions & 5 deletions clang/test/SemaSYCL/intel-max-work-group-size.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %clang %s -fsyntax-only -fsycl-device-only -DTRIGGER_ERROR -Xclang -verify
// RUN: %clang %s -fsyntax-only -Xclang -ast-dump -fsycl-device-only | FileCheck %s
// RUN: %clang_cc1 %s -fsyntax-only -fsycl -fsycl-is-device -triple spir64 -DTRIGGER_ERROR -verify
// RUN: %clang_cc1 %s -fsyntax-only -ast-dump -fsycl -fsycl-is-device -triple spir64 | FileCheck %s
// RUN: %clang_cc1 -fsycl -fsycl-is-host -fsyntax-only -verify %s

#ifndef __SYCL_DEVICE_ONLY__
Expand Down Expand Up @@ -42,17 +42,17 @@ __attribute__((sycl_kernel)) void kernel(Func kernelFunc) {
}

int main() {
// CHECK-LABEL: FunctionDecl {{.*}} _ZTSZ4mainE12test_kernel1
// CHECK-LABEL: FunctionDecl {{.*}}test_kernel1
// CHECK: SYCLIntelMaxWorkGroupSizeAttr {{.*}} 4 4 4
kernel<class test_kernel1>(
FuncObj());

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

// CHECK-LABEL: FunctionDecl {{.*}} _ZTSZ4mainE12test_kernel3
// CHECK-LABEL: FunctionDecl {{.*}}test_kernel3
// CHECK-NOT: SYCLIntelMaxWorkGroupSizeAttr {{.*}}
kernel<class test_kernel3>(
[]() {func_ignore();});
Expand Down
10 changes: 5 additions & 5 deletions clang/test/SemaSYCL/intel-restrict.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %clang %s -fsyntax-only -fsycl-device-only -DCHECKDIAG -Xclang -verify
// RUN: %clang %s -fsyntax-only -Xclang -ast-dump -fsycl-device-only | FileCheck %s
// RUN: %clang_cc1 %s -fsyntax-only -fsycl -fsycl-is-device -triple spir64 -DCHECKDIAG -verify
// RUN: %clang_cc1 %s -fsyntax-only -ast-dump -fsycl -fsycl-is-device -triple spir64 | FileCheck %s

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

int main() {
// CHECK-LABEL: FunctionDecl {{.*}} _ZTSZ4mainE12test_kernel1
// CHECK-LABEL: FunctionDecl {{.*}}test_kernel1
// CHECK: SYCLIntelKernelArgsRestrictAttr
kernel<class test_kernel1>(
FuncObj());

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

// CHECK-LABEL: FunctionDecl {{.*}} _ZTSZ4mainE12test_kernel3
// CHECK-LABEL: FunctionDecl {{.*}}test_kernel3
// CHECK-NOT: SYCLIntelKernelArgsRestrictAttr
kernel<class test_kernel3>(
[]() {func_ignore();});
Expand Down
10 changes: 5 additions & 5 deletions clang/test/SemaSYCL/num_simd_work_items.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %clang %s -fsycl -fsycl-device-only -fsyntax-only -DTRIGGER_ERROR -Xclang -verify
// RUN: %clang %s -fsycl -fsycl-device-only -fsyntax-only -Xclang -ast-dump | FileCheck %s
// RUN: %clang_cc1 %s -fsycl -fsycl-is-device -triple spir64 -fsyntax-only -DTRIGGER_ERROR -verify
// RUN: %clang_cc1 %s -fsycl -fsycl-is-device -triple spir64 -fsyntax-only -ast-dump | FileCheck %s
// RUN: %clang_cc1 -fsycl -fsycl-is-host -fsyntax-only -verify %s

#ifndef __SYCL_DEVICE_ONLY__
Expand Down Expand Up @@ -34,17 +34,17 @@ __attribute__((sycl_kernel)) void kernel(Func kernelFunc) {
}

int main() {
// CHECK-LABEL: FunctionDecl {{.*}} _ZTSZ4mainE12test_kernel1
// CHECK-LABEL: FunctionDecl {{.*}}test_kernel1
// CHECK: SYCLIntelNumSimdWorkItemsAttr {{.*}} 42
kernel<class test_kernel1>(
FuncObj());

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

// CHECK-LABEL: FunctionDecl {{.*}} _ZTSZ4mainE12test_kernel3
// CHECK-LABEL: FunctionDecl {{.*}}test_kernel3
// CHECK-NOT: SYCLIntelNumSimdWorkItemsAttr {{.*}} 2
kernel<class test_kernel3>(
[]() {func_ignore();});
Expand Down
4 changes: 2 additions & 2 deletions clang/test/SemaSYCL/sampler.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clang -S -I %S/Inputs -fsycl-device-only -Xclang -ast-dump %s | FileCheck %s
// RUN: %clang_cc1 -S -I %S/Inputs -fsycl -fsycl-is-device -triple spir64 -ast-dump %s | FileCheck %s

#include <sycl.hpp>

Expand All @@ -16,7 +16,7 @@ int main() {
}

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