public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, i386]: Fix REDUC_SSE_SMINMAX_MODE mode iterator
@ 2019-10-28 12:22 Uros Bizjak
  0 siblings, 0 replies; only message in thread
From: Uros Bizjak @ 2019-10-28 12:22 UTC (permalink / raw)
  To: gcc-patches

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

2019-10-28  Uroš Bizjak  <ubizjak@gmail.com>

    PR target/92225
    * config/i386/sse.md (REDUC_SSE_SMINMAX_MODE): Use TARGET_SSE4_2
    condition for V2DImode.

testsuite/ChangeLog:

2019-10-28  Uroš Bizjak  <ubizjak@gmail.com>

    PR target/92225
    * gcc.target/i386/pr92225.c: New test.

Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}.

Committed to mainline, will be backported to other release branches.

Uros.

[-- Attachment #2: p.diff.txt --]
[-- Type: text/plain, Size: 1041 bytes --]

Index: config/i386/sse.md
===================================================================
--- config/i386/sse.md	(revision 277509)
+++ config/i386/sse.md	(working copy)
@@ -2825,7 +2825,7 @@
 ;; Modes handled by reduc_sm{in,ax}* patterns.
 (define_mode_iterator REDUC_SSE_SMINMAX_MODE
   [(V4SF "TARGET_SSE") (V2DF "TARGET_SSE")
-   (V2DI "TARGET_SSE") (V4SI "TARGET_SSE") (V8HI "TARGET_SSE")
+   (V2DI "TARGET_SSE4_2") (V4SI "TARGET_SSE") (V8HI "TARGET_SSE")
    (V16QI "TARGET_SSE")])
 
 (define_expand "reduc_<code>_scal_<mode>"
Index: testsuite/gcc.target/i386/pr92225.c
===================================================================
--- testsuite/gcc.target/i386/pr92225.c	(nonexistent)
+++ testsuite/gcc.target/i386/pr92225.c	(working copy)
@@ -0,0 +1,19 @@
+/* PR target/92225 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-vectorize -msse2 -mno-sse4" } */
+
+void a (long);
+
+unsigned *b;
+
+void
+c ()
+{
+  long d = 2;
+  int e = 0;
+  
+  for (; e < 1024; e++)
+    if (b[e] > d)
+      d = b[e];
+  a (d);
+}

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

only message in thread, other threads:[~2019-10-28 11:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-28 12:22 [PATCH, i386]: Fix REDUC_SSE_SMINMAX_MODE mode iterator Uros Bizjak

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).