On Tue, Jun 8, 2021 at 9:36 PM Roger Sayle <ro...@nextmovesoftware.com> 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. Thanks, Richard. > > 2020-06-08 Roger Sayle <ro...@nextmovesoftware.com> > > gcc/ChangeLog > 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/testsuite/ChangeLog > * gcc.dg/builtins-70.c: New test. > > > Roger > -- > Roger Sayle > NextMove Software > Cambridge, UK >