This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC][PATCH 0/2] aarch64: Add optimized ASIMD versions of sinf/cosf
- From: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- To: Joseph Myers <joseph at codesourcery dot com>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, Szabolcs Nagy <Szabolcs dot Nagy at arm dot com>
- Cc: nd <nd at arm dot com>, "Ashwin dot Sekhar at cavium dot com" <Ashwin dot Sekhar at cavium dot com>
- Date: Tue, 13 Jun 2017 15:25:26 +0000
- Subject: Re: [RFC][PATCH 0/2] aarch64: Add optimized ASIMD versions of sinf/cosf
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Wilco dot Dijkstra at arm dot com;
- Nodisclaimer: True
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
Joseph Myers wrote:
> On Tue, 13 Jun 2017, Szabolcs Nagy wrote:
>
> > the c implementation is generic
> > (sometimes the instruction scheduling is suboptimal and
> > i found that union based bithacks don't always give good
> > code but those are issues we can work on the gcc side)
>
> Indeed, I've told powerpc people trying to add powerpc-specific versions
> of those union-based macros to do the optimization on the compiler side.
> Exactly the same applies to AArch64 - there are lots of copies of
> fdlibm-based code and similar union-based code in different projects,
> making compilers optimize better will help more than just glibc.
Agreed. I recently committed an AArch64 fix for int<->FP moves
(https://gcc.gnu.org/ml/gcc-patches/2017-04/msg01282.html), so the
particular issue Szabolcs mentions is fixed. I've got several other
improvements inspired by non-optimal sequences in math functions
in review or development. It's fairly trivial to get GCC generate the
expected code, so there is no excuse for using assembly code.
Wilco