public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Uros Bizjak <uros@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r12-6554] ii386: Add 16-bit vector modes to xop_pcmov [PR104003]
Date: Thu, 13 Jan 2022 16:20:08 +0000 (GMT)	[thread overview]
Message-ID: <20220113162008.0ED753857C4F@sourceware.org> (raw)

https://gcc.gnu.org/g:9d8e27fac3c6426fbfaf30d51cbf2761c5491a6a

commit r12-6554-g9d8e27fac3c6426fbfaf30d51cbf2761c5491a6a
Author: Uros Bizjak <ubizjak@gmail.com>
Date:   Thu Jan 13 17:18:59 2022 +0100

    ii386: Add 16-bit vector modes to xop_pcmov [PR104003]
    
    2022-01-13  Uroš Bizjak  <ubizjak@gmail.com>
    
    gcc/ChangeLog:
    
            PR target/104003
            * config/i386/mmx.md (*xop_pcmov_<mode>): Use VI_16_32 mode iterator.
    
    gcc/testsuite/ChangeLog:
    
            PR target/104003
            * g++.target/i386/pr103861-1-sse4.C: New test.
            * g++.target/i386/pr103861-1-xop.C: Ditto.

Diff:
---
 gcc/config/i386/mmx.md                          | 10 +++++-----
 gcc/testsuite/g++.target/i386/pr103861-1-sse4.C |  5 +++++
 gcc/testsuite/g++.target/i386/pr103861-1-xop.C  |  5 +++++
 3 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/gcc/config/i386/mmx.md b/gcc/config/i386/mmx.md
index 8a8142c8a09..295a132bc46 100644
--- a/gcc/config/i386/mmx.md
+++ b/gcc/config/i386/mmx.md
@@ -2704,11 +2704,11 @@
   [(set_attr "type" "sse4arg")])
 
 (define_insn "*xop_pcmov_<mode>"
-  [(set (match_operand:VI_32 0 "register_operand" "=x")
-        (if_then_else:VI_32
-          (match_operand:VI_32 3 "register_operand" "x")
-          (match_operand:VI_32 1 "register_operand" "x")
-          (match_operand:VI_32 2 "register_operand" "x")))]
+  [(set (match_operand:VI_16_32 0 "register_operand" "=x")
+        (if_then_else:VI_16_32
+          (match_operand:VI_16_32 3 "register_operand" "x")
+          (match_operand:VI_16_32 1 "register_operand" "x")
+          (match_operand:VI_16_32 2 "register_operand" "x")))]
   "TARGET_XOP"
   "vpcmov\t{%3, %2, %1, %0|%0, %1, %2, %3}"
   [(set_attr "type" "sse4arg")])
diff --git a/gcc/testsuite/g++.target/i386/pr103861-1-sse4.C b/gcc/testsuite/g++.target/i386/pr103861-1-sse4.C
new file mode 100644
index 00000000000..a07b3ad111d
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr103861-1-sse4.C
@@ -0,0 +1,5 @@
+/* PR target/103861 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -msse4" } */
+
+#include "pr103861-1.C"
diff --git a/gcc/testsuite/g++.target/i386/pr103861-1-xop.C b/gcc/testsuite/g++.target/i386/pr103861-1-xop.C
new file mode 100644
index 00000000000..d65542dc57f
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr103861-1-xop.C
@@ -0,0 +1,5 @@
+/* PR target/103861 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mxop" } */
+
+#include "pr103861-1.C"


                 reply	other threads:[~2022-01-13 16:20 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=20220113162008.0ED753857C4F@sourceware.org \
    --to=uros@gcc.gnu.org \
    --cc=gcc-cvs@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).