1 // RUN: %clang_cc1 -emit-llvm -o - -aux-triple x86_64-pc-windows-msvc \
2 // RUN: -fms-extensions -triple amdgcn-amd-amdhsa \
3 // RUN: -target-cpu gfx1030 -fcuda-is-device -x hip %s \
4 // RUN: | FileCheck -check-prefix=DEV %s
6 // RUN: %clang_cc1 -emit-llvm -o - -triple x86_64-pc-windows-msvc \
7 // RUN: -fms-extensions -aux-triple amdgcn-amd-amdhsa \
8 // RUN: -aux-target-cpu gfx1030 -x hip %s \
9 // RUN: | FileCheck -check-prefix=HOST %s
11 // RUN: %clang_cc1 -emit-llvm -o - -triple x86_64-pc-windows-msvc \
12 // RUN: -fms-extensions -aux-triple amdgcn-amd-amdhsa \
13 // RUN: -aux-target-cpu gfx1030 -x hip %s \
14 // RUN: | FileCheck -check-prefix=HOST-NEG %s
16 // RUN: %clang_cc1 -emit-llvm -o - -triple x86_64-pc-windows-msvc \
17 // RUN: -fms-extensions -x c++ %s \
18 // RUN: | FileCheck -check-prefix=CPP %s
21 #include "Inputs/cuda.h"
24 // Check local struct 'Op' uses Itanium mangling number instead of MSVC mangling
25 // number in device side name mangling. It is the same in device and host
28 // DEV: define amdgpu_kernel void @_Z6kernelIZN4TestIiE3runEvE2OpEvv(
30 // HOST-DAG: @{{.*}} = {{.*}}c"_Z6kernelIZN4TestIiE3runEvE2OpEvv\00"
32 // HOST-NEG-NOT: @{{.*}} = {{.*}}c"_Z6kernelIZN4TestIiE3runEvE2Op_1Evv\00"
35 __attribute__((global)) void kernel()
40 // Check local struct 'Op' uses MSVC mangling number in host function name mangling.
41 // It is the same when compiled as HIP or C++ program.
43 // HOST-DAG: call void @"??$fun@UOp@?2??run@?$Test@H@@QEAAXXZ@@@YAXXZ"()
44 // CPP: call void @"??$fun@UOp@?2??run@?$Test@H@@QEAAXXZ@@@YAXXZ"()
59 kernel<Op><<<1, 1>>>();