This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, middle-end/i386]: Fix PR88502, Inline built-in asinh, acosh, atanh for -ffast-math
On Mon, 17 Dec 2018, Uros Bizjak wrote:
> ... and the patch.
middle-end parts are OK.
> On Mon, Dec 17, 2018 at 8:58 AM Uros Bizjak <ubizjak@gmail.com> wrote:
> >
> > Attached patch inlines calls to asinh{,f}, acosh{,f,l} and atanh{,f,l}
> > using x87 XFmode arithmetic. In the patch, I left out asinhl due to
> > its reduced input argument range, but perhaps it could be added back,
> > since we are expanding under flag_unsafe_math_optimizations. The
> > expanders are modelled after the removed inlines in glibc [1] (which
> > also include asinhl, with a comment mentioning its reduced input
> > argument range).
> >
> > 2018-12-17 Uros Bizjak <ubizjak@gmail.com>
> >
> > PR target/88502
> > * internal-fn.def (ACOSH): New.
> > (ASINH): Ditto.
> > (ATANH): Ditto.
> > * optabs.def (acosh_optab): New.
> > (asinh_optab): Ditto.
> > (atanh_optab): Ditto.
> > * config/i386/i386-protos.h (ix86_emit_i387_asinh): New prototype.
> > (ix86_emit_i387_acosh): Ditto.
> > (ix86_emit_i387_atanh): Ditto.
> > * config/i386/i386.c (ix86_emit_i387_asinh): New function.
> > (ix86_emit_i387_acosh): Ditto.
> > (ix86_emit_i387_atanh): Ditto.
> > * config/i386/i386.md (asinh<mode>2): New expander.
> > (acoshxf2): Ditto.
> > (acosh<mode>2): Ditto.
> > (atanhxf2): Ditto.
> > (atanh<mode>2): Ditto.
> >
> > Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}.
> >
> > The patch also needs approval for its straightforward middle-end parts.
> >
> > [1] https://sourceware.org/ml/libc-alpha/2018-12/msg00519.html
> >
> > Uros.
>
--
Richard Biener <rguenther@suse.de>
SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)