From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by sourceware.org (Postfix) with ESMTPS id 2414A385840F for ; Tue, 25 Jul 2023 17:55:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2414A385840F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=nefkom.net Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4R9Pp30mm7z1sCH1; Tue, 25 Jul 2023 19:55:38 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 4R9Pp16fLCz1qqlS; Tue, 25 Jul 2023 19:55:37 +0200 (CEST) X-Virus-Scanned: amavis at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavis, port 10024) with ESMTP id Uuvz1OsepTSC; Tue, 25 Jul 2023 19:55:37 +0200 (CEST) X-Auth-Info: h41pdi9qselRAckFzE7YQmQeVzHrHLVhQyY9epqsI7l2m2wljh912202DhY/n+Ot Received: from igel.home (aftr-62-216-205-169.dynamic.mnet-online.de [62.216.205.169]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Tue, 25 Jul 2023 19:55:37 +0200 (CEST) Received: by igel.home (Postfix, from userid 1000) id BADA92C1376; Tue, 25 Jul 2023 19:55:36 +0200 (CEST) From: Andreas Schwab To: Xiao Zeng Cc: gcc-patches@gcc.gnu.org, jeffreyalaw@gmail.com, research_trasio@irq.a4lg.com, kito.cheng@gmail.com, zhengyu@eswincomputing.com, eri-sw-toolchain@eswincomputing.com Subject: Re: [PATCH 3/5] [RISC-V] Generate Zicond instruction for select pattern with condition eq or neq to 0 In-Reply-To: <20230719101156.21771-4-zengxiao@eswincomputing.com> (Xiao Zeng's message of "Wed, 19 Jul 2023 18:11:54 +0800") References: <20230719101156.21771-1-zengxiao@eswincomputing.com> <20230719101156.21771-4-zengxiao@eswincomputing.com> X-Yow: MERYL STREEP is my obstetrician! Date: Tue, 25 Jul 2023 19:55:36 +0200 Message-ID: <87tttrj2p3.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00,GIT_PATCH_0,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,KAM_NUMSUBJECT,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RCVD_IN_SORBS_HTTP,RCVD_IN_SORBS_SOCKS,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Jul 19 2023, Xiao Zeng wrote: > diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc > index 38d8eb2fcf5..7e6b24bd232 100644 > --- a/gcc/config/riscv/riscv.cc > +++ b/gcc/config/riscv/riscv.cc > @@ -2448,6 +2448,17 @@ riscv_rtx_costs (rtx x, machine_mode mode, int outer_code, int opno ATTRIBUTE_UN > *total = COSTS_N_INSNS (1); > return true; > } > + else if (TARGET_ZICOND && outer_code == SET && > + ((GET_CODE (XEXP (x, 1)) == REG && XEXP (x, 2) == const0_rtx) || > + (GET_CODE (XEXP (x, 2)) == REG && XEXP (x, 1) == const0_rtx) || > + (GET_CODE (XEXP (x, 1)) == REG && GET_CODE (XEXP (x, 2)) && > + XEXP (x, 1) == XEXP (XEXP (x, 0), 0)) || > + (GET_CODE (XEXP (x, 1)) == REG && GET_CODE (XEXP (x, 2)) && > + XEXP (x, 2) == XEXP (XEXP (x, 0), 0)))) Line breaks before the operator, not after. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."