brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 175a490 Raw
33 lines · plain
1! REQUIRES: flang-supports-f128-math2! RUN: %flang_fc1 -emit-fir %s -o - | FileCheck %s --check-prefixes="CHECK"3 4function test_real4(x)5  real :: x, test_real46  test_real4 = acosd(x)7end function8 9! CHECK-LABEL: @_QPtest_real410! CHECK: %[[factor:.*]] = arith.constant 57.2957763 : f3211! CHECK: %[[result:.*]] = math.acos %{{.*}} fastmath<contract> : f3212! CHECK: %[[arg:.*]] = arith.mulf %[[result]], %[[factor]] fastmath<contract> : f3213 14function test_real8(x)15  real(8) :: x, test_real816  test_real8 = acosd(x)17end function18 19! CHECK-LABEL: @_QPtest_real820! CHECK: %[[factor:.*]] = arith.constant 57.295779513082323 : f6421! CHECK: %[[result:.*]] = math.acos %{{.*}} fastmath<contract> : f6422! CHECK: %[[arg:.*]] = arith.mulf %[[result]], %[[factor]] fastmath<contract> : f6423 24function test_real16(x)25  real(16) :: x, test_real1626  test_real16 = acosd(x)27end function28 29! CHECK-LABEL: @_QPtest_real1630! CHECK: %[[factor:.*]] = arith.constant 57.295779513082320876798154814105{{.*}} : f12831! CHECK: %[[result:.*]] = fir.call @_FortranAAcosF128({{.*}}) fastmath<contract> : (f128) -> f12832! CHECK: %[[arg:.*]] = arith.mulf %[[result]], %[[factor]] fastmath<contract> : f12833