221
|
1 // RUN: %clang_cc1 -fsycl-is-device -emit-llvm -disable-llvm-passes \
|
|
2 // RUN: -triple spir64 -emit-llvm %s -o - | FileCheck %s
|
|
3
|
|
4 // CHECK-DAG: Function Attrs:
|
|
5 // CHECK-DAG-SAME: convergent
|
|
6 // CHECK-DAG-NEXT: define void @_Z3foov
|
|
7 void foo() {
|
|
8 int a = 1;
|
|
9 }
|
|
10
|
|
11 template <typename Name, typename Func>
|
|
12 __attribute__((sycl_kernel)) void kernel_single_task(const Func &kernelFunc) {
|
|
13 kernelFunc();
|
|
14 }
|
|
15
|
|
16 int main() {
|
|
17 kernel_single_task<class fake_kernel>([] { foo(); });
|
|
18 return 0;
|
|
19 }
|