This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, rs6000] correct implementation of _mm_add_pi32 <mmintrin.h>
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Steven Munroe <munroesj at linux dot vnet dot ibm dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, David Edelsohn <dje dot gcc at gmail dot com>
- Date: Thu, 16 Nov 2017 04:24:39 -0600
- Subject: Re: [PATCH, rs6000] correct implementation of _mm_add_pi32 <mmintrin.h>
- Authentication-results: sourceware.org; auth=none
- References: <1510801101.8421.4.camel@oc7878010663>
Hi!
On Wed, Nov 15, 2017 at 08:58:21PM -0600, Steven Munroe wrote:
> A small thinko in the implementation of _mm_add_pi32 that only shows
> when compiling for power9.
This is okay, it is trivial and obvious. Please commit. Thanks,
Segher
> 2017-11-15 Steven Munroe <munroesj@gcc.gnu.org>
>
> * config/rs6000/mmintrin.h (_mm_add_pi32[_ARCH_PWR]): Correct
> parameter list for vec_splats.
>
> Index: gcc/config/rs6000/mmintrin.h
> ===================================================================
> --- gcc/config/rs6000/mmintrin.h (revision 254714)
> +++ gcc/config/rs6000/mmintrin.h (working copy)
> @@ -463,8 +463,8 @@ _mm_add_pi32 (__m64 __m1, __m64 __m2)
> #if _ARCH_PWR9
> __vector signed int a, b, c;
>
> - a = (__vector signed int)vec_splats (__m1, __m1);
> - b = (__vector signed int)vec_splats (__m2, __m2);
> + a = (__vector signed int)vec_splats (__m1);
> + b = (__vector signed int)vec_splats (__m2);
> c = vec_add (a, b);
> return (__builtin_unpack_vector_int128 ((__vector __int128_t)c, 0));
> #else
>