public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Matthew Malcomson <matmal01@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/vendors/ARM/heads/morello)] aarch64: Remove aarch64_movti_operand
Date: Thu,  5 May 2022 12:06:46 +0000 (GMT)	[thread overview]
Message-ID: <20220505120646.7FB6B385626C@sourceware.org> (raw)

https://gcc.gnu.org/g:e150f9f944dd9e46e1a41fce8fd98a8f4cc285b0

commit e150f9f944dd9e46e1a41fce8fd98a8f4cc285b0
Author: Richard Sandiford <richard.sandiford@arm.com>
Date:   Fri Apr 8 18:27:18 2022 +0100

    aarch64: Remove aarch64_movti_operand
    
    TImode moves were an odd-one-out, since they had their
    own dedicated predicate (aarch64_movti_operand) instead
    of reusing aarch64_mov_operand.  The only difference
    is that aarch64_movti_operand passes CONST_WIDE_INTs
    through aarch64_mov128_operand whereas aarch64_mov_operand
    didn't handle CONST_WIDE_INTs at all.
    
    This patch moves that check to aarch64_mov_operand and
    removes aarch64_movti_operand.

Diff:
---
 gcc/config/aarch64/aarch64.c     |  3 +++
 gcc/config/aarch64/aarch64.md    |  4 ++--
 gcc/config/aarch64/predicates.md | 10 ++--------
 3 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index f1f8624f455..03e16ca365d 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -19183,6 +19183,9 @@ aarch64_mov_operand_p (rtx x, machine_mode mode)
   if (CONST_INT_P (x))
     return true;
 
+  if (CONST_WIDE_INT_P (x))
+    return mode == TImode && aarch64_mov128_immediate (x);
+
   if (CONST_NULL_P (x))
     return true;
 
diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
index 9f17b48487e..93a68f848ba 100644
--- a/gcc/config/aarch64/aarch64.md
+++ b/gcc/config/aarch64/aarch64.md
@@ -1392,9 +1392,9 @@
 
 (define_insn "*movti_aarch64"
   [(set (match_operand:TI 0
-	 "nonimmediate_operand"  "=   r,w, r,w,r,m,m,w,m")
+	 "nonimmediate_operand" "=   r,w, r,w,r,m,m,w,m")
 	(match_operand:TI 1
-	 "aarch64_movti_operand" " rUti,r, w,w,m,r,Z,m,w"))]
+	 "aarch64_mov_operand"  " rUti,r, w,w,m,r,Z,m,w"))]
   "(register_operand (operands[0], TImode)
     || aarch64_reg_or_zero (operands[1], TImode))"
   "@
diff --git a/gcc/config/aarch64/predicates.md b/gcc/config/aarch64/predicates.md
index d9a419c1c83..e4b3796d0b4 100644
--- a/gcc/config/aarch64/predicates.md
+++ b/gcc/config/aarch64/predicates.md
@@ -328,23 +328,17 @@
 
 (define_predicate "aarch64_mov_operand"
   (and (match_code "reg,subreg,mem,const,const_int,symbol_ref,label_ref,high,
-		    const_poly_int,const_vector,const_null")
+		    const_poly_int,const_vector,const_null,const_wide_int")
        (ior (match_operand 0 "register_operand")
 	    (ior (match_operand 0 "memory_operand")
 		 (match_test "aarch64_mov_operand_p (op, mode)")))))
 
 (define_predicate "aarch64_nonmemory_operand"
   (and (match_code "reg,subreg,const,const_int,symbol_ref,label_ref,high,
-		    const_poly_int,const_vector")
+		    const_poly_int,const_vector,const_wide_int")
        (ior (match_operand 0 "register_operand")
 	    (match_test "aarch64_mov_operand_p (op, mode)"))))
 
-(define_predicate "aarch64_movti_operand"
-  (ior (match_operand 0 "register_operand")
-       (match_operand 0 "memory_operand")
-       (and (match_operand 0 "const_scalar_int_operand")
-	    (match_test "aarch64_mov128_immediate (op)"))))
-
 (define_predicate "aarch64_reg_or_imm"
   (ior (match_operand 0 "register_operand")
        (match_operand 0 "const_scalar_int_operand")))


                 reply	other threads:[~2022-05-05 12:06 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=20220505120646.7FB6B385626C@sourceware.org \
    --to=matmal01@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).