1 ! RUN: bbc -emit-fir -hlfir=false %s -o - | FileCheck %s --check-prefixes="CHECK,CHECK-FAST"
2 ! RUN: %flang_fc1 -emit-fir -flang-deprecated-no-hlfir %s -o - | FileCheck %s --check-prefixes="CHECK,CHECK-FAST"
5 function test_real4(y
,x
)
6 real(4) :: x
, y
, test_real4
7 test_real4
= atan2d(y
,x
)
10 ! CHECK-LABEL: @_QPtest_real4
11 ! CHECK-FAST: %[[atan2:.*]] = math.atan2 %{{.*}}, %{{.*}}: f32
12 ! CHECK: %[[dfactor:.*]] = arith.constant 57.295779513082323 : f64
13 ! CHECK: %[[factor:.*]] = fir.convert %[[dfactor]] : (f64) -> f32
14 ! CHECK: %{{.*}} = arith.mulf %[[atan2]], %[[factor]] fastmath<contract> : f32
16 function test_real8(y
,x
)
17 real(8) :: x
, y
, test_real8
18 test_real8
= atan2d(y
,x
)
21 ! CHECK-LABEL: @_QPtest_real8
22 ! CHECK-FAST: %[[atan2:.*]] = math.atan2 %{{.*}}, %{{.*}}: f64
23 ! CHECK: %[[factor:.*]] = arith.constant 57.295779513082323 : f64
24 ! CHECK: %{{.*}} = arith.mulf %[[atan2]], %[[factor]] fastmath<contract> : f64