This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 7/14] [x86_64] Vector math functions (log and tests)
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Andrew Senkevich <andrew dot n dot senkevich at gmail dot com>
- Cc: libc-alpha <libc-alpha at sourceware dot org>
- Date: Thu, 4 Jun 2015 17:44:06 +0000
- Subject: Re: [PATCH 7/14] [x86_64] Vector math functions (log and tests)
- Authentication-results: sourceware.org; auth=none
- References: <CAMXFM3uCX8KS=pr+ugD7aSgWs4rTfw=NqQkpYY6m7cQnnbYYPA at mail dot gmail dot com>
On Thu, 4 Jun 2015, Andrew Senkevich wrote:
> This patch adds vector implementations of log for x86_64 and tests.
I see this patch adds e.g. both _ZGVbN2v_log and _ZGVbN2v___log_finite, as
aliases.
That's the sort of thing that needs specifically explaining in the patch
write-up. In general, it's a bad idea to add extra interfaces to any of
glibc's shared libraries unless they actually have some sort of semantic
difference (or unless the interfaces are required to be usable without
including any headers) - and since all these vector functions are only for
-ffast-math, I don't think there is any semantic difference in the _finite
case.
My guess is that this is something to do with interaction of the pragmas
that cause these functions to be used and the asm redirection of e.g. log
to __log_finite (for -ffinite-math-only, which is implied by -ffast-math).
Now, I suppose you do want that redirection to be in effect for calls that
don't get vectorized. So I think you should try to work something out in
the compiler context as a way to say "vector calls should have their names
based on log not __log_finite, notwithstanding the redirection for scalar
calls", so we can avoid adding redundant ABIs to libmvec that are never
going to do anything different from the non-__*_finite ABIs.
--
Joseph S. Myers
joseph@codesourcery.com