d: Add float and double overloads for all core.math intrinsics
authorIain Buclaw <ibuclaw@gdcproject.org>
Thu, 26 Nov 2020 09:46:36 +0000 (10:46 +0100)
committerIain Buclaw <ibuclaw@gdcproject.org>
Fri, 27 Nov 2020 20:27:13 +0000 (21:27 +0100)
commit9285e0f694969dc2d1d9257378ddf6c8ef42de3c
tree438e40733f271a6c62e4df462073b45e16cd249d
parent67138ea1b041fe1637da6b3568f064f172d9358c
d: Add float and double overloads for all core.math intrinsics

For the math intrinsics: cos, fabs, ldexp, rint, rndtol, and sin, new
overloads have been added to the core.math module for matching float and
double types.  These have been implemented in the compiler.

A recent change to dump_function_to_file started triggering some
scan-tree-dump tests to FAIL, these have been adjusted as well when
updating the test.

gcc/d/ChangeLog:

* intrinsics.cc (maybe_expand_intrinsic): Handle new intrinsics.
* intrinsics.def (INTRINSIC_COS): Add float and double overloads.
(INTRINSIC_FABS): Likewise.
(INTRINSIC_LDEXP): Likewise.
(INTRINSIC_RINT): Likewise.
(INTRINSIC_RNDTOL): Likewise.
(INTRINSIC_SIN): Likewise.
(INTRINSIC_TOPREC): Adjust signature.

libphobos/ChangeLog:

* libdruntime/MERGE: Merge upstream druntime 5e4492c4.

gcc/testsuite/ChangeLog:

* gdc.dg/intrinsics.d: Adjust patterns in scan-tree-dump.
gcc/d/intrinsics.cc
gcc/d/intrinsics.def
gcc/testsuite/gdc.dg/intrinsics.d
libphobos/libdruntime/MERGE
libphobos/libdruntime/core/math.d