1 // RUN: %clang_cc1 -x hip -emit-llvm -fcuda-is-device \
2 // RUN: -o - %s | FileCheck --check-prefix=NO-HIPSTDPAR-DEV %s
3
4 // RUN: %clang_cc1 --hipstdpar -emit-llvm -fcuda-is-device \
5 // RUN: -o - %s | FileCheck --check-prefix=HIPSTDPAR-DEV %s
6
7 #define __device__ __attribute__((device))
8
9 // NO-HIPSTDPAR-DEV-NOT: {{.*}}void @foo({{.*}})
10 // HIPSTDPAR-DEV: {{.*}}void @foo({{.*}})
foo(float * a,float b)11 extern "C" void foo(float *a, float b) {
12 *a = b;
13 }
14
15 // NO-HIPSTDPAR-DEV: {{.*}}void @bar({{.*}})
16 // HIPSTDPAR-DEV: {{.*}}void @bar({{.*}})
bar(float * a,float b)17 extern "C" __device__ void bar(float *a, float b) {
18 *a = b;
19 }
20