re PR target/92225 (ice in gen_smaxv2di3, at config/i386/sse.md:12225)
authorUros Bizjak <ubizjak@gmail.com>
Mon, 28 Oct 2019 11:29:43 +0000 (12:29 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Mon, 28 Oct 2019 11:29:43 +0000 (12:29 +0100)
PR target/92225
* config/i386/sse.md (REDUC_SSE_SMINMAX_MODE): Use TARGET_SSE4_2
condition for V2DImode.

testsuite/ChangeLog:

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

From-SVN: r277510

gcc/ChangeLog
gcc/config/i386/sse.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr92225.c [new file with mode: 0644]

index 10302d6..d11c0ac 100644 (file)
@@ -1,5 +1,11 @@
 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.
+
+2019-10-28  Uroš Bizjak  <ubizjak@gmail.com>
+
        * config/i386/sse.md (sse_cvtss2si<rex64namesuffix>_2):
        Remove %k operand modifier.
        (*vec_extractv2df_1_sse): Remove %q operand modifier.
index 1eeb85a..06cadc1 100644 (file)
 ;; 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 3fe8a78..c7f3af7 100644 (file)
@@ -1,3 +1,8 @@
+2019-10-28  Uroš Bizjak  <ubizjak@gmail.com>
+
+       PR target/92225
+       * gcc.target/i386/pr92225.c: New test.
+
 2019-10-28  Michael Matz  <matz@suse.de>
 
        PR middle-end/90796
diff --git a/gcc/testsuite/gcc.target/i386/pr92225.c b/gcc/testsuite/gcc.target/i386/pr92225.c
new file mode 100644 (file)
index 0000000..b123219
--- /dev/null
@@ -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);
+}