public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/ARM/heads/morello)] aarch64: Remove aarch64_movti_operand
@ 2022-05-05 12:06 Matthew Malcomson
0 siblings, 0 replies; only message in thread
From: Matthew Malcomson @ 2022-05-05 12:06 UTC (permalink / raw)
To: gcc-cvs
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")))
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-05-05 12:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-05 12:06 [gcc(refs/vendors/ARM/heads/morello)] aarch64: Remove aarch64_movti_operand Matthew Malcomson
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).