Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGenHipStdPar / unannotated-functions-get-emitted.cpp
blobdfd6b3da0a291b136f13112d7565216c2a5c638a
1 // RUN: %clang_cc1 -x hip -emit-llvm -fcuda-is-device \
2 // RUN: -o - %s | FileCheck --check-prefix=NO-HIPSTDPAR-DEV %s
4 // RUN: %clang_cc1 --hipstdpar -emit-llvm -fcuda-is-device \
5 // RUN: -o - %s | FileCheck --check-prefix=HIPSTDPAR-DEV %s
7 #define __device__ __attribute__((device))
9 // NO-HIPSTDPAR-DEV-NOT: {{.*}}void @foo({{.*}})
10 // HIPSTDPAR-DEV: {{.*}}void @foo({{.*}})
11 extern "C" void foo(float *a, float b) {
12 *a = b;
15 // NO-HIPSTDPAR-DEV: {{.*}}void @bar({{.*}})
16 // HIPSTDPAR-DEV: {{.*}}void @bar({{.*}})
17 extern "C" __device__ void bar(float *a, float b) {
18 *a = b;