diff mbox series

[rs6000] correct implementation of _mm_add_pi32 <mmintrin.h>

Message ID 1510801101.8421.4.camel@oc7878010663
State New
Headers show
Series [rs6000] correct implementation of _mm_add_pi32 <mmintrin.h> | expand

Commit Message

Steven Munroe Nov. 16, 2017, 2:58 a.m. UTC
A small thinko in the implementation of _mm_add_pi32 that only shows
when compiling for power9.

./gcc/ChangeLog:

2017-11-15  Steven Munroe  <munroesj@gcc.gnu.org>

	* config/rs6000/mmintrin.h (_mm_add_pi32[_ARCH_PWR]): Correct
	parameter list for vec_splats.

Comments

Segher Boessenkool Nov. 16, 2017, 10:24 a.m. UTC | #1
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
>
diff mbox series

Patch

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