[Fwd:,[PATCH,Bug,target/84266] mmintrin.h intrinsic headers for PowerPC code fails on power9]

Message ID 1518226203.4163.15.camel@gmail.com
State New
Headers show
Series
  • [Fwd:,[PATCH,Bug,target/84266] mmintrin.h intrinsic headers for PowerPC code fails on power9]
Related show

Commit Message

Steven Munroe Feb. 10, 2018, 1:30 a.m.
This has a simple fix that I have tested on power8 and Seurer are
tested on power9.

While there may be a more elegent coding for the require casts, this is
the simplest change, considering the current stage.

2018-02-09  Steven Munroe  <munroesj@gcc.gnu.org>

	* config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
	Cast vec_cmpeq result to correct type.
	* config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
	Cast vec_cmpgt result to correct type.


ready to commit?

Patch

Index: gcc/config/rs6000/mmintrin.h
===================================================================
--- gcc/config/rs6000/mmintrin.h	(revision 257533)
+++ gcc/config/rs6000/mmintrin.h	(working copy)
@@ -854,7 +854,7 @@ 
 
   a = (__vector signed int)vec_splats (__m1);
   b = (__vector signed int)vec_splats (__m2);
-  c = (__vector signed short)vec_cmpeq (a, b);
+  c = (__vector signed int)vec_cmpeq (a, b);
   return (__builtin_unpack_vector_int128 ((__vector __int128_t)c, 0));
 #else
   __m64_union m1, m2, res;
@@ -883,7 +883,7 @@ 
 
   a = (__vector signed int)vec_splats (__m1);
   b = (__vector signed int)vec_splats (__m2);
-  c = (__vector signed short)vec_cmpgt (a, b);
+  c = (__vector signed int)vec_cmpgt (a, b);
   return (__builtin_unpack_vector_int128 ((__vector __int128_t)c, 0));
 #else
   __m64_union m1, m2, res;