diff options
author | Shao-Ce SUN <sunshaoce@iscas.ac.cn> | 2023-06-06 00:55:59 +0800 |
---|---|---|
committer | Shao-Ce SUN <sunshaoce@iscas.ac.cn> | 2023-06-06 02:01:36 +0800 |
commit | 68f55d78e3cd842f1bbdf9a112da7d86fd3a8d36 (patch) | |
tree | ce0822f8205fca31f51573ea2921fa232f8aa6d5 /flang/module | |
parent | 65ceb42d636ea758a2c9ecdfb7473d528983a1e2 (diff) | |
download | llvm-68f55d78e3cd842f1bbdf9a112da7d86fd3a8d36.zip llvm-68f55d78e3cd842f1bbdf9a112da7d86fd3a8d36.tar.gz llvm-68f55d78e3cd842f1bbdf9a112da7d86fd3a8d36.tar.bz2 |
[Flang] Map `ieee_fma` intrinsic to `llvm.fma`
Map `ieee_fma` intrinsic to LLVM IR as `llvm.fma`.
Reviewed By: klausler
Differential Revision: https://reviews.llvm.org/D151872
Diffstat (limited to 'flang/module')
-rw-r--r-- | flang/module/__fortran_builtins.f90 | 1 | ||||
-rw-r--r-- | flang/module/ieee_arithmetic.f90 | 11 |
2 files changed, 2 insertions, 10 deletions
diff --git a/flang/module/__fortran_builtins.f90 b/flang/module/__fortran_builtins.f90 index 295ebbe..0b0cec0 100644 --- a/flang/module/__fortran_builtins.f90 +++ b/flang/module/__fortran_builtins.f90 @@ -52,6 +52,7 @@ module __Fortran_builtins __builtin_threadIdx, __builtin_blockDim, __builtin_blockIdx, __builtin_gridDim integer, parameter :: __builtin_warpsize = 32 + intrinsic :: __builtin_fma intrinsic :: __builtin_ieee_is_nan, __builtin_ieee_is_negative, & __builtin_ieee_is_normal intrinsic :: __builtin_ieee_next_after, __builtin_ieee_next_down, & diff --git a/flang/module/ieee_arithmetic.f90 b/flang/module/ieee_arithmetic.f90 index 20e63e1..64a5b25 100644 --- a/flang/module/ieee_arithmetic.f90 +++ b/flang/module/ieee_arithmetic.f90 @@ -15,6 +15,7 @@ module ieee_arithmetic use __Fortran_ieee_exceptions use __Fortran_builtins, only: & + ieee_fma => __builtin_fma, & ieee_is_nan => __builtin_ieee_is_nan, & ieee_is_negative => __builtin_ieee_is_negative, & ieee_is_normal => __builtin_ieee_is_normal, & @@ -220,16 +221,6 @@ module ieee_arithmetic PRIVATE_RR(IEEE_COPY_SIGN) #undef IEEE_COPY_SIGN_RR -#define IEEE_FMA_R(AKIND) \ - elemental real(AKIND) function ieee_fma_a##AKIND(a, b, c); \ - real(AKIND), intent(in) :: a, b, c; \ - end function ieee_fma_a##AKIND; - interface ieee_fma - SPECIFICS_R(IEEE_FMA_R) - end interface ieee_fma - PRIVATE_R(IEEE_FMA) -#undef IEEE_FMA_R - #define IEEE_GET_ROUNDING_MODE_I(RKIND) \ subroutine ieee_get_rounding_mode_i##RKIND(round_value, radix); \ import ieee_round_type; \ |