public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Christophe Lyon <clyon@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/users/clyon/heads/mve-autovec)] FIXME fix mve_mov + iterator
Date: Tue, 16 Nov 2021 14:06:58 +0000 (GMT)	[thread overview]
Message-ID: <20211116140658.98E413857809@sourceware.org> (raw)

https://gcc.gnu.org/g:99c2fd4bca994ab7022d57ad3e48ec2347226638

commit 99c2fd4bca994ab7022d57ad3e48ec2347226638
Author: Christophe Lyon <christophe.lyon@foss.st.com>
Date:   Wed Oct 20 15:09:02 2021 +0000

    FIXME fix mve_mov + iterator

Diff:
---
 gcc/config/arm/iterators.md |  1 +
 gcc/config/arm/mve.md       | 17 ++---------------
 gcc/config/arm/vfp.md       | 16 ++++++++--------
 3 files changed, 11 insertions(+), 23 deletions(-)

diff --git a/gcc/config/arm/iterators.md b/gcc/config/arm/iterators.md
index b7249f2b189..65a889a5ba0 100644
--- a/gcc/config/arm/iterators.md
+++ b/gcc/config/arm/iterators.md
@@ -273,6 +273,7 @@
 (define_mode_iterator MVE_5 [V8HI V4SI])
 (define_mode_iterator MVE_6 [V8HI V4SI])
 (define_mode_iterator MVE_7 [V16BI V8BI V4BI])
+(define_mode_iterator MVE_7_HI [HI V16BI V8BI V4BI])
 
 ;;----------------------------------------------------------------------------
 ;; Code iterators
diff --git a/gcc/config/arm/mve.md b/gcc/config/arm/mve.md
index 9da78657798..ccca7f8d2c0 100644
--- a/gcc/config/arm/mve.md
+++ b/gcc/config/arm/mve.md
@@ -10517,26 +10517,13 @@
   [(set_attr "type" "mve_load")]
 )
 
+;; Expander for VxBI moves
 (define_expand "mov<mode>"
   [(set (match_operand:MVE_7 0 "nonimmediate_operand")
-        (match_operand:MVE_7 1 "nonimmediate_operand"))]
+        (match_operand:MVE_7 1 "general_operand"))]
   "TARGET_HAVE_MVE"
   {
     if (!register_operand (operands[0], <MODE>mode))
       operands[1] = force_reg (<MODE>mode, operands[1]);
   }
 )
-
-(define_insn "*mve_mov<mode>"
-  [(set (match_operand:MVE_7 0 "nonimmediate_operand" "=rk, m, r, Up, r")
-        (match_operand:MVE_7 1 "nonimmediate_operand"  "rk, r, m, r, Up"))]
-  "TARGET_HAVE_MVE
-  && (register_operand (operands[0], <MODE>mode)
-      || register_operand (operands[1], <MODE>mode))"
-  "@
-  mov%?\t%0, %1
-  strh%?\t%1, %0
-  ldrh%?\t%0, %1
-  vmsr%?\t P0, %1
-  vmrs%?\t %0, P0"
-)
diff --git a/gcc/config/arm/vfp.md b/gcc/config/arm/vfp.md
index 93e963696da..9c357cc0389 100644
--- a/gcc/config/arm/vfp.md
+++ b/gcc/config/arm/vfp.md
@@ -73,14 +73,14 @@
 
 (define_insn "*thumb2_movhi_vfp"
  [(set
-   (match_operand:HI 0 "nonimmediate_operand"
+   (match_operand:MVE_7_HI 0 "nonimmediate_operand"
     "=rk, r, l, r, m, r, *t, r, *t, Up, r")
-   (match_operand:HI 1 "general_operand"
+   (match_operand:MVE_7_HI 1 "general_operand"
     "rk, I, Py, n, r, m, r, *t, *t, r, Up"))]
  "TARGET_THUMB2 && TARGET_VFP_BASE
   && !TARGET_VFP_FP16INST
-  && (register_operand (operands[0], HImode)
-       || register_operand (operands[1], HImode))"
+  && (register_operand (operands[0], <MODE>mode)
+       || register_operand (operands[1], <MODE>mode))"
 {
   switch (which_alternative)
     {
@@ -173,13 +173,13 @@
 
 (define_insn "*thumb2_movhi_fp16"
  [(set
-   (match_operand:HI 0 "nonimmediate_operand"
+   (match_operand:MVE_7_HI 0 "nonimmediate_operand"
     "=rk, r, l, r, m, r, *t, r, *t, Up, r")
-   (match_operand:HI 1 "general_operand"
+   (match_operand:MVE_7_HI 1 "general_operand"
     "rk, I, Py, n, r, m, r, *t, *t, r, Up"))]
  "TARGET_THUMB2 && (TARGET_VFP_FP16INST || TARGET_HAVE_MVE)
-  && (register_operand (operands[0], HImode)
-       || register_operand (operands[1], HImode))"
+  && (register_operand (operands[0], <MODE>mode)
+       || register_operand (operands[1], <MODE>mode))"
 {
   switch (which_alternative)
     {


             reply	other threads:[~2021-11-16 14:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-16 14:06 Christophe Lyon [this message]
2022-01-12  8:28 Christophe Lyon

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=20211116140658.98E413857809@sourceware.org \
    --to=clyon@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).