Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGenSYCL / unique_stable_name_windows_diff.cpp
blob7dd08a0c892557642c01aa89b04a18dba527df3d
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 '-D$ADDRSPACE=addrspace(1) '
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 '-D$ADDRSPACE='
5 template<typename KN, typename Func>
6 __attribute__((sycl_kernel)) void kernel(Func F){
7 F();
10 template<typename KN, typename Func>
11 __attribute__((sycl_kernel)) void kernel2(Func F){
12 F(1);
15 template<typename KN, typename Func>
16 __attribute__((sycl_kernel)) void kernel3(Func F){
17 F(1.1);
20 int main() {
21 int i;
22 double d;
23 float 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
33 // invocations.
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 each other, they differ by the
40 // signature.
41 // CHECK: private unnamed_addr [[$ADDRSPACE]]constant [17 x i8] c"_ZTSZ4mainEUlvE_\00"
42 // CHECK: private unnamed_addr [[$ADDRSPACE]]constant [17 x i8] c"_ZTSZ4mainEUliE_\00"
43 // CHECK: private unnamed_addr [[$ADDRSPACE]]constant [17 x i8] c"_ZTSZ4mainEUldE_\00"