From: Uros Bizjak <ubizjak@gmail.com>
To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: [PATCH, i386]: Fix REDUC_SSE_SMINMAX_MODE mode iterator
Date: Mon, 28 Oct 2019 12:22:00 -0000 [thread overview]
Message-ID: <CAFULd4aTR+uKyqN7LFPmRE9Am1Rvkq4Py-CK34ASCk2cJskLVA@mail.gmail.com> (raw)
[-- 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);
+}
reply other threads:[~2019-10-28 11:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFULd4aTR+uKyqN7LFPmRE9Am1Rvkq4Py-CK34ASCk2cJskLVA@mail.gmail.com \
--to=ubizjak@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).