[PATCH] Add sinh(tanh(x)) and cosh(tanh(x)) rules
Richard Biener
richard.guenther@gmail.com
Mon Nov 12 14:17:00 GMT 2018
On Sat, Nov 10, 2018 at 6:36 AM Segher Boessenkool
<segher@kernel.crashing.org> wrote:
>
> On Fri, Nov 09, 2018 at 01:03:55PM -0700, Jeff Law wrote:
> > >> And signed zeroes. Yeah. I think it would have to be
> > >> flag_unsafe_math_optimizations + some more.
> > >
> > > Indeed.
> > So we need to give Giuliano some clear guidance on guarding. This is
> > out of my area of expertise, so looking to y'all to help here.
>
> IMO, it needs flag_unsafe_optimizations, as above; and it needs to be
> investigated which (if any) options like flag_signed_zeros it needs in
> addition to that. It needs an option like that whenever the new expression
> can give a zero with a different sign than the original expression, etc.
> Although it could be said that flag_unsafe_optimizations supercedes all
> of that. It isn't clear.
It indeed isn't clear whether at least some of the other flags make no
sense with -funsafe-math-optimizations. Still at least for
documentation purposes
please use !flag_siged_zeros && flag_unsafe_math_optimizations && ...
flag_unsafe_math_optimizations is generally used when there's extra rounding
involved. Some specific kind of transforms have individual flags and do not
require flag_unsafe_math_optimizations (re-association and contraction
for example).
I'm not sure I would require flag_unsafe_math_optimizations for a 2ulp
error though.
Richard.
>
> Segher
More information about the Gcc-patches
mailing list