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 10302d60aa78c3f5fe3462d7915fe06bde8a4322..d11c0ac1aad1387707d1e2a315a83caf533f0012 100644 (file)
@@ -1,3 +1,9 @@
+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):
index 1eeb85aa62a2037a89829273358ffba11c3f8b70..06cadc1cf8c2c58ad1ca97a69fd9f4ee79eb9840 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 3fe8a78b7d54312c806dcef02dfae655a030e3bf..c7f3af7539a6cb8c153cb0b2847a53f56030947d 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);
+}