1 // RUN: %clang_cc1 -triple spir64-unknown-unknown-sycldevice -aux-triple x86_64-pc-windows-msvc -fsycl-is-device -disable-llvm-passes -fsycl-is-device -emit-llvm %s -o - | FileCheck %s
2 // RUN: %clang_cc1 -triple x86_64-pc-windows-msvc -fsycl-is-device -disable-llvm-passes -fsycl-is-device -emit-llvm %s -o - | FileCheck %s
5 template<typename KN
, typename Func
>
6 __attribute__((sycl_kernel
)) void kernel(Func F
){
10 template<typename KN
, typename Func
>
11 __attribute__((sycl_kernel
)) void kernel2(Func F
){
15 template<typename KN
, typename Func
>
16 __attribute__((sycl_kernel
)) void kernel3(Func F
){
24 auto lambda1
= [](){};
25 auto lambda2
= [](int){};
26 auto lambda3
= [](double){};
28 kernel
<class K1
>(lambda1
);
29 kernel2
<class K2
>(lambda2
);
30 kernel3
<class K3
>(lambda3
);
32 // Ensure the kernels are named the same between the device and host
34 (void)__builtin_sycl_unique_stable_name(decltype(lambda1
));
35 (void)__builtin_sycl_unique_stable_name(decltype(lambda2
));
36 (void)__builtin_sycl_unique_stable_name(decltype(lambda3
));
38 // Make sure the following 3 are the same between the host and device compile.
39 // Note that these are NOT the same value as eachother, they differ by the
41 // CHECK: private unnamed_addr constant [17 x i8] c"_ZTSZ4mainEUlvE_\00"
42 // CHECK: private unnamed_addr constant [17 x i8] c"_ZTSZ4mainEUliE_\00"
43 // CHECK: private unnamed_addr constant [17 x i8] c"_ZTSZ4mainEUldE_\00"