From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by sourceware.org (Postfix) with ESMTP id 02A8F3858D32 for ; Thu, 13 Apr 2023 12:30:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 02A8F3858D32 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=loongson.cn Received: from loongson.cn (unknown [10.20.4.52]) by gateway (Coremail) with SMTP id _____8BxONnr9Tdk1eUbAA--.43287S3; Thu, 13 Apr 2023 20:30:36 +0800 (CST) Received: from [10.20.4.52] (unknown [10.20.4.52]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Cxdbzq9TdkpGsiAA--.36429S2; Thu, 13 Apr 2023 20:30:35 +0800 (CST) Subject: Re: [PATCH] LoongArch: Remove the definition of the macro LOGICAL_OP_NON_SHORT_CIRCUIT under the architecture and use the default definition instead. To: Xi Ruoyao , gcc-patches@gcc.gnu.org Cc: i@xen0n.name, xuchenghua@loongson.cn References: <20230413115126.1568212-1-chenglulu@loongson.cn> From: Lulu Cheng Message-ID: <51862d0e-c8e7-b62b-a08b-d58427c6f66c@loongson.cn> Date: Thu, 13 Apr 2023 20:30:34 +0800 User-Agent: Mozilla/5.0 (X11; Linux mips64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-CM-TRANSID:AQAAf8Cxdbzq9TdkpGsiAA--.36429S2 X-CM-SenderInfo: xfkh0wpoxo3qxorr0wxvrqhubq/ X-Coremail-Antispam: 1Uk129KBjvJXoWrZrW5Xw47urW8Jw1UAr1fJFb_yoW8Jryrpr 97Aa43tFWkGrn3Kr1qq3s3W3y3tFy7KwnFga1SvFy0ka17uryjqF4rWrZagFn8Xw4rWr9F vr1Fgw4a9F45A37anT9S1TB71UUUUUDqnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU bxkYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20xvaj40_Wr0E3s 1l1IIY67AEw4v_JrI_Jryl8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xv wVC0I7IYx2IY67AKxVWUJVWUCwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVWUJVW8JwA2z4 x0Y4vEx4A2jsIE14v26F4UJVW0owA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Cr1j6rxdM2AI xVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6xACxx1l5I8CrVACY4xI64 kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1Y6r17McIj6I8E87Iv67AKxVWUJVW8JwAm 72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IY64vIr41lc7I2V7IY0VAS07AlzVAYIcxG8wCF04 k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18 MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr4 1lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1l IxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4 A2jsIEc7CjxVAFwI0_Jr0_GrUvcSsGvfC2KfnxnUUI43ZEXa7IU8r9N3UUUUU== X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00,BODY_8BITS,GIT_PATCH_0,KAM_DMARC_STATUS,NICE_REPLY_A,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: 在 2023/4/13 下午8:24, Xi Ruoyao 写道: > 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. >> >> gcc/ChangeLog: >> >>         * config/loongarch/loongarch.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Remove the macro >>         definition. > I think it's OK for GCC 13. At least the result is better for simple > cases like "x >= a && x < b". I also want to merge to GCC13.:-D > >> --- >>  gcc/config/loongarch/loongarch.h | 1 - >>  1 file changed, 1 deletion(-) >> >> diff --git a/gcc/config/loongarch/loongarch.h b/gcc/config/loongarch/loongarch.h >> index f8167875646..6b7dbecd3ff 100644 >> --- a/gcc/config/loongarch/loongarch.h >> +++ b/gcc/config/loongarch/loongarch.h >> @@ -836,7 +836,6 @@ typedef struct { >>     1 is the default; other values are interpreted relative to that.  */ >> >>  #define BRANCH_COST(speed_p, predictable_p) loongarch_branch_cost >> -#define LOGICAL_OP_NON_SHORT_CIRCUIT 0 >> >>  /* Return the asm template for a conditional branch instruction. >>     OPCODE is the opcode's mnemonic and OPERANDS is the asm template for