brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · e00d91c Raw
50 lines · plain
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"8 9! CHECK-LABEL: sqrt_testr10subroutine sqrt_testr(a, b)11  real :: a, b12! CHECK: fir.call @fir.sqrt.contract.f32.f3213  b = sqrt(a)14end subroutine15 16! CHECK-LABEL: sqrt_testd17subroutine sqrt_testd(a, b)18  real(kind=8) :: a, b19! CHECK: fir.call @fir.sqrt.contract.f64.f6420  b = sqrt(a)21end subroutine22 23! CHECK-LABEL: sqrt_testc24subroutine sqrt_testc(z)25  complex :: z26! CHECK: fir.call @fir.sqrt.contract.z32.z3227  z = sqrt(z)28end subroutine29 30! CHECK-LABEL: sqrt_testcd31subroutine sqrt_testcd(z)32  complex(kind=8) :: z33! CHECK: fir.call @fir.sqrt.contract.z64.z6434  z = sqrt(z)35end subroutine36 37! CHECK-LABEL: @fir.sqrt.contract.f32.f3238! CHECK: math.sqrt %{{.*}} : f3239 40! CHECK-LABEL: @fir.sqrt.contract.f64.f6441! CHECK: math.sqrt %{{.*}} : f6442 43! CHECK-LABEL: func private @fir.sqrt.contract.z32.z3244! CMPLX-FAST: complex.sqrt %{{.*}} : complex<f32>45! CMPLX-PRECISE: fir.call @csqrtf46 47! CHECK-LABEL: @fir.sqrt.contract.z64.z6448! CMPLX-FAST: complex.sqrt %{{.*}} : complex<f64>49! CMPLX-PRECISE: fir.call @csqrt50