This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v0] PPC64: Attach SIMD attribute to cosf, sin, sinf function declarations.
- From: Tulio Magno Quites Machado Filho <tuliom at ascii dot art dot br>
- To: GT <tnggil at protonmail dot com>, libc-alpha at sourceware dot org
- Cc:
- Date: Thu, 13 Feb 2020 16:26:52 -0300
- Subject: Re: [PATCH v0] PPC64: Attach SIMD attribute to cosf, sin, sinf function declarations.
- References: <DvwHcak5KwVvbzMv_WCM7H9nJszCKQQ4SdW02ubyAj4LgcjJqDglQd8h9nDtibqBr1GO5JXfAfQJaWaHBS8FTGcz8d8Yu7pjFgLgszxBhvI=@protonmail.com>
GT <tnggil@protonmail.com> writes:
> This is the first of 2 patches required to enable GCC auto-vectorization
> of calls to libmvec.
>
> The changes here should have been part of earlier patches to libmvec
> which added SIMD versions of the functions.
>
> There are a few other small patches in tuliom/libmvec that should
> similarly have been part of earlier patches. Can we re-organize the
> patches in tuliom/libmvec using git rebase before submitting them for
> inclusion in master?
Could you be more specific, please?
What kind of reorganization are you suggesting?
> Subject: [PATCH v0] PPC64: Attach SIMD attribute to cosf, sin, sinf function
> declarations.
>
> These changes were mistakenly left out of the patches that added SIMD
> versions of these functions to libmvec.
This patch is not just adding missing data, it's also moving lines around.
Some of them seem to be re-sorted, but not all of them.
> diff --git a/sysdeps/powerpc/bits/math-vector.h b/sysdeps/powerpc/bits/math-vector.h
> index ce10dc4bb7..66651b02f3 100644
> --- a/sysdeps/powerpc/bits/math-vector.h
> +++ b/sysdeps/powerpc/bits/math-vector.h
> @@ -36,22 +36,28 @@
> # ifdef __DECL_SIMD_PPC64
> # undef __DECL_SIMD_cos
> # define __DECL_SIMD_cos __DECL_SIMD_PPC64
> -# undef __DECL_SIMD_log
> -# define __DECL_SIMD_log __DECL_SIMD_PPC64
> -# undef __DECL_SIMD_logf
> -# define __DECL_SIMD_logf __DECL_SIMD_PPC64
> +# undef __DECL_SIMD_cosf
> +# define __DECL_SIMD_cosf __DECL_SIMD_PPC64
> +# undef __DECL_SIMD_sin
> +# define __DECL_SIMD_sin __DECL_SIMD_PPC64
> +# undef __DECL_SIMD_sinf
> +# define __DECL_SIMD_sinf __DECL_SIMD_PPC64
> # undef __DECL_SIMD_sincos
> # define __DECL_SIMD_sincos __DECL_SIMD_PPC64
> # undef __DECL_SIMD_sincosf
> # define __DECL_SIMD_sincosf __DECL_SIMD_PPC64
> -# undef __DECL_SIMD_expf
> -# define __DECL_SIMD_expf __DECL_SIMD_PPC64
Why are these 2 lines moving to...
> +# undef __DECL_SIMD_log
> +# define __DECL_SIMD_log __DECL_SIMD_PPC64
> +# undef __DECL_SIMD_logf
> +# define __DECL_SIMD_logf __DECL_SIMD_PPC64
> # undef __DECL_SIMD_exp
> # define __DECL_SIMD_exp __DECL_SIMD_PPC64
> -# undef __DECL_SIMD_powf
> -# define __DECL_SIMD_powf __DECL_SIMD_PPC64
> +# undef __DECL_SIMD_expf
> +# define __DECL_SIMD_expf __DECL_SIMD_PPC64
... here?
--
Tulio Magno