public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Fwd: [PATCH][Bug target/84266] mmintrin.h intrinsic headers for PowerPC code fails on power9]
       [not found] <1518214552.4163.13.camel@gmail.com>
@ 2018-02-10  1:30 ` Steven Munroe
  0 siblings, 0 replies; only message in thread
From: Steven Munroe @ 2018-02-10  1:30 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: Forwarded message - [PATCH][Bug target/84266] mmintrin.h intrinsic headers for PowerPC code fails on power9 --]
[-- Type: message/rfc822, Size: 1885 bytes --]

From: Steven Munroe <munroesj52@gmail.com>
To: segher@gcc.gnu.org
Cc: seurer@gcc.gnu.org, wschmidt@gcc.gnu.org
Subject: [PATCH][Bug target/84266] mmintrin.h intrinsic headers for PowerPC code fails on power9
Date: Fri, 09 Feb 2018 16:15:52 -0600
Message-ID: <1518214552.4163.13.camel@gmail.com>

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.

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;

ready to commit?

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-02-10  1:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1518214552.4163.13.camel@gmail.com>
2018-02-10  1:30 ` [Fwd: [PATCH][Bug target/84266] mmintrin.h intrinsic headers for PowerPC code fails on power9] Steven Munroe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).