1 ! RUN: bbc -emit-fir -outline-intrinsics %s -o - | FileCheck %s --check-prefixes="CHECK,CMPLX-PRECISE"
2 ! RUN: bbc --math-runtime=precise -emit-fir -outline-intrinsics %s -o - | FileCheck %s --check-prefixes="CMPLX-PRECISE"
3 ! RUN: bbc --force-mlir-complex -emit-fir -outline-intrinsics %s -o - | FileCheck %s --check-prefixes="CMPLX-FAST"
4 ! RUN: %flang_fc1 -emit-fir -mllvm -outline-intrinsics %s -o - | FileCheck %s --check-prefixes="CHECK,CMPLX-PRECISE"
5 ! RUN: %flang_fc1 -fapprox-func -emit-fir -mllvm -outline-intrinsics %s -o - | FileCheck %s --check-prefixes="CMPLX-FAST"
6 ! RUN: %flang_fc1 -emit-fir -mllvm --math-runtime=precise -mllvm -outline-intrinsics %s -o - | FileCheck %s --check-prefixes="CMPLX-PRECISE"
7 ! RUN: %flang_fc1 -emit-fir -mllvm --force-mlir-complex -mllvm -outline-intrinsics %s -o - | FileCheck %s --check-prefixes="CMPLX-FAST"
9 ! CHECK-LABEL: sqrt_testr
10 subroutine sqrt_testr(a
, b
)
12 ! CHECK: fir.call @fir.sqrt.contract.f32.f32
16 ! CHECK-LABEL: sqrt_testd
17 subroutine sqrt_testd(a
, b
)
19 ! CHECK: fir.call @fir.sqrt.contract.f64.f64
23 ! CHECK-LABEL: sqrt_testc
24 subroutine sqrt_testc(z
)
26 ! CHECK: fir.call @fir.sqrt.contract.z4.z4
30 ! CHECK-LABEL: sqrt_testcd
31 subroutine sqrt_testcd(z
)
33 ! CHECK: fir.call @fir.sqrt.contract.z8.z8
37 ! CHECK-LABEL: @fir.sqrt.contract.f32.f32
38 ! CHECK: math.sqrt %{{.*}} : f32
40 ! CHECK-LABEL: @fir.sqrt.contract.f64.f64
41 ! CHECK: math.sqrt %{{.*}} : f64
43 ! CHECK-LABEL: func private @fir.sqrt.contract.z4.z4
44 ! CMPLX-FAST: complex.sqrt %{{.*}} : complex<f32>
45 ! CMPLX-PRECISE: fir.call @csqrtf
47 ! CHECK-LABEL: @fir.sqrt.contract.z8.z8
48 ! CMPLX-FAST: complex.sqrt %{{.*}} : complex<f64>
49 ! CMPLX-PRECISE: fir.call @csqrt