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 = asind(x)7end function8 9! CHECK-LABEL: @_QPtest_real410! CHECK: %[[factor:.*]] = arith.constant 57.2957763 : f3211! CHECK: %[[result:.*]] = math.asin %{{.*}} fastmath<contract> : f3212! CHECK: %[[arg:.*]] = arith.mulf %[[result]], %[[factor]] fastmath<contract> : f3213 14function test_real8(x)15 real(8) :: x, test_real816 test_real8 = asind(x)17end function18 19! CHECK-LABEL: @_QPtest_real820! CHECK: %[[factor:.*]] = arith.constant 57.295779513082323 : f6421! CHECK: %[[result:.*]] = math.asin %{{.*}} fastmath<contract> : f6422! CHECK: %[[arg:.*]] = arith.mulf %[[result]], %[[factor]] fastmath<contract> : f6423 24function test_real16(x)25 real(16) :: x, test_real1626 test_real16 = asind(x)27end function28 29! CHECK-LABEL: @_QPtest_real1630! CHECK: %[[factor:.*]] = arith.constant 57.295779513082320876798154814105{{.*}} : f12831! CHECK: %[[result:.*]] = fir.call @_FortranAAsinF128({{.*}}) fastmath<contract> : (f128) -> f12832! CHECK: %[[arg:.*]] = arith.mulf %[[result]], %[[factor]] fastmath<contract> : f12833