1 // RUN: %clang_cc1 -internal-isystem %S/Inputs/include -x c -fopenmp -triple x86_64-unknown-unknown -fopenmp-targets=amdgcn-amd-amdhsa -emit-llvm-bc %s -o %t-host.bc
2 // RUN: %clang_cc1 -internal-isystem %S/../../lib/Headers/openmp_wrappers -include __clang_openmp_device_functions.h -internal-isystem %S/../../lib/Headers/openmp_wrappers -internal-isystem %S/Inputs/include -x c -fopenmp -triple amdgcn-amd-amdhsa -aux-triple x86_64-unknown-unknown -fopenmp-targets=amdgcn-amd-amdhsa -emit-llvm %s -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-host.bc -o - | FileCheck %s --check-prefixes=CHECK
6 void test_complex_f64(double _Complex a
) {
7 // CHECK-LABEL: define {{.*}}test_complex_f64
10 // CHECK: call { double, double } @__divdc3
11 // CHECK: call { double, double } @__muldc3
16 // CHECK: define weak {{.*}} @__divdc3
17 // CHECK-DAG: call double @__ocml_fabs_f64(
18 // CHECK-DAG: call i32 @__ocml_isnan_f64(
19 // CHECK-DAG: call i32 @__ocml_isfinite_f64(
20 // CHECK-DAG: call double @__ocml_copysign_f64(
21 // CHECK-DAG: call double @__ocml_scalbn_f64(
22 // CHECK-DAG: call double @__ocml_logb_f64(
24 // CHECK: define weak {{.*}} @__muldc3
25 // CHECK-DAG: call i32 @__ocml_isnan_f64(
26 // CHECK-DAG: call i32 @__ocml_isinf_f64(
27 // CHECK-DAG: call double @__ocml_copysign_f64(
29 void test_complex_f32(float _Complex a
) {
30 // CHECK-LABEL: define {{.*}}test_complex_f32
33 // CHECK: call [2 x i32] @__divsc3
34 // CHECK: call [2 x i32] @__mulsc3
39 // CHECK: define weak {{.*}} @__divsc3
40 // CHECK-DAG: call float @__ocml_fabs_f32(
41 // CHECK-DAG: call i32 @__ocml_isnan_f32(
42 // CHECK-DAG: call i32 @__ocml_isfinite_f32(
43 // CHECK-DAG: call float @__ocml_copysign_f32(
44 // CHECK-DAG: call float @__ocml_scalbn_f32(
45 // CHECK-DAG: call float @__ocml_logb_f32(
47 // CHECK: define weak {{.*}} @__mulsc3
48 // CHECK-DAG: call i32 @__ocml_isnan_f32(
49 // CHECK-DAG: call i32 @__ocml_isinf_f32(
50 // CHECK-DAG: call float @__ocml_copysign_f32(