1 // REQUIRES: nvptx-registered-target
2 // RUN: %clang_cc1 -verify -internal-isystem %S/Inputs/include -fopenmp -x c -triple powerpc64le-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm-bc %s -o %t-ppc-host.bc
3 // RUN: %clang_cc1 -verify -internal-isystem %S/../../lib/Headers/openmp_wrappers -include __clang_openmp_device_functions.h -internal-isystem %S/Inputs/include -fopenmp -x c -triple nvptx64-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -aux-triple powerpc64le-unknown-unknown -o - | FileCheck %s
4 // RUN: %clang_cc1 -verify -internal-isystem %S/Inputs/include -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm-bc %s -o %t-ppc-host.bc
5 // RUN: %clang_cc1 -verify -internal-isystem %S/../../lib/Headers/openmp_wrappers -include __clang_openmp_device_functions.h -internal-isystem %S/Inputs/include -fopenmp -x c++ -triple nvptx64-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -aux-triple powerpc64le-unknown-unknown -o - | FileCheck %s
6 // expected-no-diagnostics
14 // CHECK: define weak {{.*}} @__divsc3
15 // CHECK-DAG: call i32 @__nv_isnanf(
16 // CHECK-DAG: call i32 @__nv_isinff(
17 // CHECK-DAG: call i32 @__nv_finitef(
18 // CHECK-DAG: call float @__nv_copysignf(
19 // CHECK-DAG: call float @__nv_scalbnf(
20 // CHECK-DAG: call float @__nv_fabsf(
21 // CHECK-DAG: call float @__nv_logbf(
23 // CHECK: define weak {{.*}} @__mulsc3
24 // CHECK-DAG: call i32 @__nv_isnanf(
25 // CHECK-DAG: call i32 @__nv_isinff(
26 // CHECK-DAG: call float @__nv_copysignf(
28 // CHECK: define weak {{.*}} @__divdc3
29 // CHECK-DAG: call i32 @__nv_isnand(
30 // CHECK-DAG: call i32 @__nv_isinfd(
31 // CHECK-DAG: call i32 @__nv_isfinited(
32 // CHECK-DAG: call double @__nv_copysign(
33 // CHECK-DAG: call double @__nv_scalbn(
34 // CHECK-DAG: call double @__nv_fabs(
35 // CHECK-DAG: call double @__nv_logb(
37 // CHECK: define weak {{.*}} @__muldc3
38 // CHECK-DAG: call i32 @__nv_isnand(
39 // CHECK-DAG: call i32 @__nv_isinfd(
40 // CHECK-DAG: call double @__nv_copysign(
42 void test_scmplx(float _Complex a
) {
49 void test_dcmplx(double _Complex a
) {