From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [89.208.246.23]) by sourceware.org (Postfix) with ESMTPS id 425753858C33 for ; Thu, 13 Apr 2023 12:24:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 425753858C33 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xry111.site DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1681388696; bh=Rco1fjIRpxLW4wUCnzSFXtIpgsawLYYBqYKHbeI2RDk=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=dA7YATDTRbn2h1MUs9fnEacR2fTCWRnlr9a/dhLI9QNFaJeRp4tm891v/lu+QD9Cq +LGxTbtm+5rbZ3jRQl4DINrV1w9VD2T9pHFAryFla0Zhd3TUGoplFr7To4NwiRi3sG Z166TUAAse0ABGbgGhMityixvMzdQwwGWhyoHgeg= Received: from [192.168.124.11] (unknown [113.140.11.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id AF5BB662E1; Thu, 13 Apr 2023 08:24:55 -0400 (EDT) Message-ID: Subject: Re: [PATCH] LoongArch: Remove the definition of the macro LOGICAL_OP_NON_SHORT_CIRCUIT under the architecture and use the default definition instead. From: Xi Ruoyao To: Lulu Cheng , gcc-patches@gcc.gnu.org Cc: i@xen0n.name, xuchenghua@loongson.cn Date: Thu, 13 Apr 2023 20:24:48 +0800 In-Reply-To: <20230413115126.1568212-1-chenglulu@loongson.cn> References: <20230413115126.1568212-1-chenglulu@loongson.cn> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.0 MIME-Version: 1.0 X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,LIKELY_SPAM_FROM,SPF_HELO_PASS,SPF_PASS,TXREP 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 Thu, 2023-04-13 at 19:51 +0800, Lulu Cheng wrote: > In some cases, setting this macro as the default can reduce the number of= conditional > branch instructions. >=20 > gcc/ChangeLog: >=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* config/loongarch/loonga= rch.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Remove the macro > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0definition. I think it's OK for GCC 13. At least the result is better for simple cases like "x >=3D a && x < b".=20 > --- > =C2=A0gcc/config/loongarch/loongarch.h | 1 - > =C2=A01 file changed, 1 deletion(-) >=20 > diff --git a/gcc/config/loongarch/loongarch.h b/gcc/config/loongarch/loon= garch.h > index f8167875646..6b7dbecd3ff 100644 > --- a/gcc/config/loongarch/loongarch.h > +++ b/gcc/config/loongarch/loongarch.h > @@ -836,7 +836,6 @@ typedef struct { > =C2=A0=C2=A0=C2=A0 1 is the default; other values are interpreted relativ= e to that.=C2=A0 */ > =C2=A0 > =C2=A0#define BRANCH_COST(speed_p, predictable_p) loongarch_branch_cost > -#define LOGICAL_OP_NON_SHORT_CIRCUIT 0 > =C2=A0 > =C2=A0/* Return the asm template for a conditional branch instruction. > =C2=A0=C2=A0=C2=A0 OPCODE is the opcode's mnemonic and OPERANDS is the as= m template for --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University