Hi,

Please check line 4102 in match.pd. Notice that

    (if (flag_unsafe_math_optimizations)

And my code is inside that if :-)

Giuliano.
On Thu, Nov 29, 2018 at 2:37 AM Jeff Law <l...@redhat.com> wrote:
>
> On 11/27/18 12:38 PM, Giuliano Augusto Faulin Belinassi wrote:
> > Only do this optimization if funsafe-math and -fno-math-errno are
> > enabled, as pointed in the previous iteration.
> >
> > Also added one more test case to ensure that fno-math-errno is
> > required for the optimization.
> >
> > Special thanks for Wilco Dijsktra for all his help :-)
> >
> > gcc/ChangeLog
> > 2018-11-27  Giuliano Belinassi  <giuliano.belina...@usp.br>
> >
> >     * match.pd (sinh (atanh (x))): New simplification rules.
> >     (cosh (atanh (x))): Likewise.
> >
> > gcc/testsuite/ChangeLog
> > 2018-11-27  Giuliano Belinassi  <giuliano.belina...@usp.br>
> >
> >     * gcc.dg/sinhatanh-1.c: New test.
> >     * gcc.dg/sinhatanh-2.c: New test.
> >     * gcc.dg/sinhatanh-3.c: New test.
> >
> >
> > sinhatanhv4.patch
> >
> > Index: gcc/match.pd
> > ===================================================================
> > --- gcc/match.pd      (revision 266469)
> > +++ gcc/match.pd      (working copy)
> > @@ -4342,6 +4342,25 @@
> >        (rdiv { t_one; } (sqrts (plus (mult @0 @0) { t_one; })))
> >        (copysigns { t_zero; } @0))))))
> >
> > + (if (!flag_errno_math)
> You're missing the flag_unsafe_math_optimizations check AFAICT.  Right?
>
> jeff

Reply via email to