[flang] Enable folding of some more intrinsic functions
authorJean Perier <jperier@nvidia.com>
Fri, 22 Mar 2019 16:22:00 +0000 (09:22 -0700)
committerGitHub <noreply@github.com>
Wed, 27 Mar 2019 17:16:07 +0000 (10:16 -0700)
commit167730fd91b119cfefec4e39adf468887979a7e8
treef10e98ce668072bbf5d0848a085b9fd26d5a0217
parentdc3cca342719ea2f219c223c6c84aa55b6514599
[flang] Enable folding of some more intrinsic functions

Enable folding of the following 80 intrinsic functions:

+ Without runtime:

++ Integer:
abs, dim, dshiftl, dshiftr, exponent, iand, ibclr, ibset, ieor, int,
ior, ishft, kind, len, leadz, maskl, maskr, merge_bits, popcnt, poppar,
shifta, shiftl, shiftr, trailz

++ Real:
abs, aimag, aint, dprod, real

+ Complex:
cmplx, conjg

++ Logical:
bge, bgt, ble, blt

+ With Runtime :

+ Real:
acos, acosh, asinh, atan, atan2, atanh, bessel_j0, bessel_j1,
bessel_jn (elemental), bessel_y0, bessel_y1, bessel_yn (elemental),
cos, cosh, erf, erfc, erfc_scaled, exp, gamma, hypot, log, log10,
log_gamma, mod, sin, sqrt, sinh, sqrt, tan, tanh

++ Complex:
acos, acosh, asin, asinh, atan, atanh, cos, cosh, exp, log, sin,
sinh, sqrt, tan, tanh

Original-commit: flang-compiler/f18@7e7d1920f882e7ca22c1320dd9b7e0a3d6eaec28
Tree-same-pre-rewrite: false
flang/lib/evaluate/fold.cc