brintos

brintos / llvm-project-archived public Read only

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