[AMDGPU][AsmParser][NFC] Get rid of custom default operand handlers.
[llvm-project.git] / clang / test / Headers / nvptx_device_math_macro.cpp
blob02bdc1f35b0b6a2c52b575d63df2ca28d406826b
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
6 #include <cmath>
8 #pragma omp declare target
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);
17 #pragma omp end declare target