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  <ubiz...@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.

Reply via email to