From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2049) id 7FB6B385626C; Thu, 5 May 2022 12:06:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7FB6B385626C Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Matthew Malcomson To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/vendors/ARM/heads/morello)] aarch64: Remove aarch64_movti_operand X-Act-Checkin: gcc X-Git-Author: Richard Sandiford X-Git-Refname: refs/vendors/ARM/heads/morello X-Git-Oldrev: 7d455a032ba1fbd1efc991b576d5bd8329f736e2 X-Git-Newrev: e150f9f944dd9e46e1a41fce8fd98a8f4cc285b0 Message-Id: <20220505120646.7FB6B385626C@sourceware.org> Date: Thu, 5 May 2022 12:06:46 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2022 12:06:46 -0000 https://gcc.gnu.org/g:e150f9f944dd9e46e1a41fce8fd98a8f4cc285b0 commit e150f9f944dd9e46e1a41fce8fd98a8f4cc285b0 Author: Richard Sandiford 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")))