This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, middle-end/i386]: Fix PR88556, Inline built-in sinh, cosh, tanh for -ffast-math
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 20 Dec 2018 11:30:09 +0100
- Subject: Re: [PATCH, middle-end/i386]: Fix PR88556, Inline built-in sinh, cosh, tanh for -ffast-math
- References: <CAFULd4YPT0cTRt-7w-0JeJht_a1_3gTOCiFhkr4ccF5wVSxO0g@mail.gmail.com>
On Thu, Dec 20, 2018 at 11:08 AM Uros Bizjak <ubizjak@gmail.com> wrote:
>
> Attached patch inlines calls to asinh{,f,l}, acosh{,f,l} and
> atanh{,f,l} using x87 XFmode arithmetic. The expanders are modelled
> after the removed inlines in glibc [1].
>
> 2018-12-20 Uros Bizjak <ubizjak@gmail.com>
>
> PR target/88556
> * internal-fn.def (COSH): New.
> (SINH): Ditto.
> (TANH): Ditto.
> * optabs.def (cosh_optab): New.
> (sinh_optab): Ditto.
> (tanh_optab): Ditto.
> * config/i386/i386-protos.h (ix86_emit_i387_sinh): New prototype.
> (ix86_emit_i387_cosh): Ditto.
> (ix86_emit_i387_tanh): Ditto.
> * config/i386/i386.c (ix86_emit_i387_sinh): New function.
> (ix86_emit_i387_cosh): Ditto.
> (ix86_emit_i387_tanh): Ditto.
> * config/i386/i386.md (sinhxf2): New expander.
> (sinh<mode>2): Ditto.
> (coshxf2): Ditto.
> (cosh<mode>2): Ditto.
> (tanhxf2): Ditto.
> (tanh<mode>2): Ditto.
>
> Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}.
>
> The patch also needs approval for its straightforward middle-end parts.
Consider those "obvious".
Richard.
>
> [1] https://sourceware.org/ml/libc-alpha/2018-12/msg00772.html
>
> Uros.