1 // REQUIRES: nvptx-registered-target
2 // RUN: %clang_cc1 -x c++ -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 -x c++ -include __clang_openmp_device_functions.h -internal-isystem %S/../../lib/Headers/openmp_wrappers -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-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - | FileCheck %s
4 // expected-no-diagnostics
5 
6 #include <cmath>
7 
8 #pragma omp declare target
use_macro()9 int use_macro() {
10   double a(0);
11 // CHECK-NOT:  call {{.*}}
12 // CHECK:  call double @llvm.fabs.f64(double
13 // CHECK-NOT:  call {{.*}}
14 // CHECK:      ret i32 %conv
15   return (std::fpclassify(a) != FP_ZERO);
16 }
17 #pragma omp end declare target
18