1 ! RUN: bbc -emit-fir %s -o - | FileCheck %s --check-prefixes="CHECK,CHECK-FAST"
2 ! RUN: bbc --math-runtime=precise -emit-fir %s -o - | FileCheck %s --check-prefixes="CHECK,CHECK-PRECISE"
3 ! RUN: %flang_fc1 -emit-fir %s -o - | FileCheck %s --check-prefixes="CHECK,CHECK-FAST"
10 ! CHECK-LABEL: @_QPtest_real4
11 ! CHECK-PRECISE: %[[atan:.*]] = fir.call @atanf({{%[A-Za-z0-9._]+}}) fastmath<contract> : (f32) -> f32
12 ! CHECK-FAST: %[[atan:.*]] = math.atan %{{.*}} : f32
13 ! CHECK: %[[dfactor:.*]] = arith.constant 57.295779513082323 : f64
14 ! CHECK: %[[factor:.*]] = fir.convert %[[dfactor]] : (f64) -> f32
15 ! CHECK: %{{.*}} = arith.mulf %[[atan]], %[[factor]] fastmath<contract> : f32
17 function test_real8(x
)
18 real(8) :: x
, test_real8
22 ! CHECK-LABEL: @_QPtest_real8
23 ! CHECK-PRECISE: %[[atan:.*]] = fir.call @atan({{%[A-Za-z0-9._]+}}) fastmath<contract> : (f64) -> f64
24 ! CHECK-FAST: %[[atan:.*]] = math.atan %{{.*}} : f64
25 ! CHECK: %[[factor:.*]] = arith.constant 57.295779513082323 : f64
26 ! CHECK: %{{.*}} = arith.mulf %[[atan]], %[[factor]] fastmath<contract> : f64