1 // REQUIRES: nvptx-registered-target
2 // RUN: %clang_cc1 -internal-isystem %S/Inputs/include -fopenmp -triple powerpc64le-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm-bc %s -o %t-ppc-host.bc
3 // RUN: %clang_cc1 -internal-isystem %S/../../lib/Headers/openmp_wrappers -include __clang_openmp_device_functions.h -internal-isystem %S/Inputs/include -fopenmp -triple nvptx64-nvidia-cuda -aux-triple powerpc64le-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm %s -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - | FileCheck %s
7 // 4 calls to modf(f), all translated to __nv_modf calls:
10 // CHECK: call noundef double @__nv_modf(double
12 // CHECK: call noundef float @__nv_modff(float
14 // CHECK: call noundef double @__nv_modf(double
16 // CHECK: call noundef float @__nv_modff(float
25 #pragma omp target map(from: intx, dx)
28 dx
= std::modf(x
, &ipart
);
29 intx
= static_cast<int>(ipart
);
37 test_modf
<double>(1.0);
38 test_modf
<float>(1.0);
44 res
= modf(1.1, &intpart
);
50 res
= modff(1.1f
, &intpart
);