brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 83039c0 Raw
35 lines · plain
1! REQUIRES: flang-supports-f128-math2! RUN: bbc -emit-fir -hlfir=false %s -o - | FileCheck %s --check-prefixes="CHECK,CHECK-FAST"3! RUN: %flang_fc1 -emit-fir -flang-deprecated-no-hlfir %s -o - | FileCheck %s --check-prefixes="CHECK,CHECK-FAST"4 5 6function test_real4(y, x)7  real(4) :: x, y, test_real48  test_real4 = atan2pi(y, x)9end function10 11! CHECK-LABEL: @_QPtest_real412! CHECK-FAST: %[[atan2:.*]] = math.atan2 %{{.*}}, %{{.*}}: f3213! CHECK: %[[inv_pi:.*]] = arith.constant 0.318309873 : f3214! CHECK: %{{.*}} = arith.mulf %[[atan2]], %[[inv_pi]] fastmath<contract> : f3215 16function test_real8(y, x)17  real(8) :: x, y, test_real818  test_real8 = atan2pi(y, x)19end function20 21! CHECK-LABEL: @_QPtest_real822! CHECK-FAST: %[[atan2:.*]] = math.atan2 %{{.*}}, %{{.*}}: f6423! CHECK: %[[inv_pi:.*]] = arith.constant 0.31830988618379069 : f6424! CHECK: %{{.*}} = arith.mulf %[[atan2]], %[[inv_pi]] fastmath<contract> : f6425 26function test_real16(y, x)27  real(16) :: x, y, test_real1628  test_real16 = atan2pi(y, x)29end function30 31! CHECK-LABEL: @_QPtest_real1632! CHECK: %[[atan2:.*]] = math.atan2 %{{.*}}, %{{.*}}: f12833! CHECK: %[[inv_pi:.*]] = arith.constant 0.3183098861837906715377675267450{{.*}} : f12834! CHECK: %{{.*}} = arith.mulf %[[atan2]], %[[inv_pi]] fastmath<contract> : f12835