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