From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2119) id 83D663857BB3; Fri, 14 Jul 2023 02:42:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 83D663857BB3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1689302555; bh=r+w0vdrriASRSrLZDfN6KUhbBSGonrmcDD3LUHsDajU=; h=From:To:Subject:Date:From; b=nBDztcQGu4MnffNeq7ehdvCdVJOzHCmGEoq/jdASv1we/VddPzGN1m8iJ0ytGOhLH IP4TlBbJPOlHRttlx+1S/QvSYdBMvG6/08+Yqz9aZ1zxRwW01fUCib2qXaK47RXwC3 lpRNP2TpnZpOpsTT6dofBnyiMfUzxCWi6ywayXXM= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Jeff Law To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/vendors/riscv/heads/gcc-13-with-riscv-opts)] Remove unnecessary md pattern for TARGET_XTHEADCONDMOV X-Act-Checkin: gcc X-Git-Author: Die Li X-Git-Refname: refs/vendors/riscv/heads/gcc-13-with-riscv-opts X-Git-Oldrev: 2efb0b56bc5e7dffbb3c9c567c63745cdafab85e X-Git-Newrev: 11ff95d33563974a211161950a492cee43d731d0 Message-Id: <20230714024235.83D663857BB3@sourceware.org> Date: Fri, 14 Jul 2023 02:42:35 +0000 (GMT) List-Id: https://gcc.gnu.org/g:11ff95d33563974a211161950a492cee43d731d0 commit 11ff95d33563974a211161950a492cee43d731d0 Author: Die Li Date: Sat Jun 3 11:02:09 2023 -0600 Remove unnecessary md pattern for TARGET_XTHEADCONDMOV There are 2 small changes in this patch, but they do not affect the result. 1. Remove unnecessary md pattern for TARGET_XTHEADCONDMOV in thead.md. The operands[4] in "if_then_else" are always comparison operations, so the generated rtl does not match the pattern that is expected to be deleted. 2. Change operands[4] from const0_rtx to operands[1] to maintain rtl consistency. Although when output assembly, only operands[4] CODE will affect the output result. Signed-off-by: Die Li gcc/ChangeLog: * config/riscv/thead.md (*th_cond_gpr_mov): Delete. Diff: --- gcc/config/riscv/thead.md | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/gcc/config/riscv/thead.md b/gcc/config/riscv/thead.md index 0623607d3dc..ea377872bde 100644 --- a/gcc/config/riscv/thead.md +++ b/gcc/config/riscv/thead.md @@ -120,25 +120,12 @@ /* Invert the condition and take else-block. */ rtx_code code = GET_CODE (operands[4]); code = (code == EQ) ? NE : EQ; - operands[4] = gen_rtx_fmt_ee (code, VOIDmode, const0_rtx, const0_rtx); + operands[4] = gen_rtx_fmt_ee (code, VOIDmode, operands[1], const0_rtx); return "th.mv%C4z\t%0,%z3,%1"; } [(set_attr "type" "condmove") (set_attr "mode" "")]) -(define_insn "*th_cond_gpr_mov" - [(set (match_operand:GPR 0 "register_operand" "=r,r") - (if_then_else:GPR - (match_operand:GPR2 1 "register_operand" "r,r") - (match_operand:GPR 2 "reg_or_0_operand" "rJ,0") - (match_operand:GPR 3 "reg_or_0_operand" "0,rJ")))] - "TARGET_XTHEADCONDMOV" - "@ - th.mvnez\t%0,%z2,%1 - th.mveqz\t%0,%z3,%1" - [(set_attr "type" "condmove") - (set_attr "mode" "")]) - ;; XTheadFmv ;; In RV32, we lack fmv.x.d and fmv.d.x, but XTheadFmv has instructions