[PATCH] PR middle-end/53267: Constant fold BUILT_IN_FMOD.
Wed Jun 9 10:51:07 GMT 2021
On Tue, Jun 8, 2021 at 9:36 PM Roger Sayle <firstname.lastname@example.org> wrote:
> Here's a three line patch to implement constant folding for fmod,
> fmodf and fmodl, which resolves an enhancement request from 2012.
> The following patch has been tested on x86_64-pc-linux-gnu with
> a make bootstrap and make -k check with no new failures.
> Ok for mainline?
OK. I double-checked and mpfr_fmod appeared in mpfr 2.4.0 and
we require at least 3.1.0.
> 2020-06-08 Roger Sayle <email@example.com>
> PR middle-end/53267
> * fold-const-call.c (fold_const_call_sss) [CASE_CFN_FMOD]:
> Support evaluation of fmod/fmodf/fmodl at compile-time.
> * gcc.dg/builtins-70.c: New test.
> Roger Sayle
> NextMove Software
> Cambridge, UK
More information about the Gcc-patches