Message ID | 20230118030921.69098-1-juzhe.zhong@rivai.ai |
---|---|
State | Unresolved |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2114111wrn; Tue, 17 Jan 2023 19:10:08 -0800 (PST) X-Google-Smtp-Source: AMrXdXsin+AOcvm99dOmq4L/wdEKoeu3VJq8K4YlF2XlAJp42XErCl1n4DKbRt8E3UNUVdvI0zVZ X-Received: by 2002:a17:906:f0d1:b0:84d:450b:8767 with SMTP id dk17-20020a170906f0d100b0084d450b8767mr4909155ejb.21.1674011408425; Tue, 17 Jan 2023 19:10:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674011408; cv=none; d=google.com; s=arc-20160816; b=a02jFmWeNyDey10G7DFUgph351fbzgrfPPCUu/WotdoLItydyB8EbgF8jl/PZLOUl+ Nf6KuTmkdq25d3YaPbxwYOZPbxG1GGJ20gwPqsU+3pBB0n/hVmLQof+8V77dzzzVig8G 01Ohldm/DT1niuieE52PCjHarv1lz5inmmIVDVpn0iN5yeYoWrCZa4Vj/YEaoHWWKK8d j8WS8ndT8ROVn+fzXmgvLXQcH6gDjTJ4INFmXTczKiuzaFATXydO+UkBeg31EJKiLbFS 4N2we4ZLfLIA+l2mk1at83YIaTXf4dd2kEqiTkubA0zuRCJLyx97gxZEbXFRCZ6p88T3 6uvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:feedback-id :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dmarc-filter:delivered-to; bh=/+ffXszaaEy1sC4XEGGTuwCcgZkO/xCnunCRj51+p4Q=; b=vGDYfPMq/gQSm+chQ53tBUEEBZfl7coMKWLzKvdS38AaIyc7YXR8d/Q/zVitSP9Yjr YDyTXeWrX7revSKGIlXWvtFDS1SAVBRskdZK318lI0DeNnXIIcDZ2PdEujzqzvF8wugR zFshlNGLI3N3M8897pcVXLyexAOswTBD1OE9KJQTcQKaNw98pbGAg6sn8XFXs+8NXUzE AJVk2aqR7Ax35H9LQ1IjPU9kehbQ5AstUdkaUTGyXTeNBMqmVk4ZB4T5j6bI1MIWb7mN TXjS/ukZtROrTHKPXMM7x2S5FuFEMhgv5zjLE5ZsJ9XihpISQTvhOyK5YVgR8//bB9H3 /hmw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id sb10-20020a1709076d8a00b0086a2cb250d5si10718769ejc.505.2023.01.17.19.10.08 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jan 2023 19:10:08 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 32F51385841E for <ouuuleilei@gmail.com>; Wed, 18 Jan 2023 03:10:04 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtpbgjp3.qq.com (smtpbgjp3.qq.com [54.92.39.34]) by sourceware.org (Postfix) with ESMTPS id 0DD9B3858D28 for <gcc-patches@gcc.gnu.org>; Wed, 18 Jan 2023 03:09:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0DD9B3858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivai.ai Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivai.ai X-QQ-mid: bizesmtp81t1674011364ta60al3a Received: from rios-cad5.localdomain ( [58.60.1.11]) by bizesmtp.qq.com (ESMTP) with id ; Wed, 18 Jan 2023 11:09:23 +0800 (CST) X-QQ-SSF: 01400000000000E0L000000A0000000 X-QQ-FEAT: 0laiA9+vjACqCq1i+OYYESJ+4iXjyns6r5umP8ymf72VQvcMEYeXeoVxxYLi1 HDJ8crD2DMFhn1t09PcsXAdKaVc8rb4VuLLreElxs9Mu6KFvnlMjm7HgE9XbMKiHr8XshPe iD1QrRWh/p/xRGonc/87I1CFDI0vIi0IAFtjX2mzOUE2A6Df4bOKWQm0U2RGaUyThmkNZoW gXyvCCyn+6/rcF5IISOhJ9yhnjNHASTuDMiIEGBAbwgGxOMJFS1bnWgMbnUfsxKYlKSZ70F 1bFH3psHKFYhENjjXwqzNdNEwR+CgkYrasZi6VLx1OPX3z4MnbaExr/M2RLjQcgn+OGu08h JBqosHO+2dm0sZwGnHxRphASHdVKnlbo6cjVrvjO9o2zGotj+VVaOz8E39hx9/O8UMrYt+w X-QQ-GoodBg: 2 From: juzhe.zhong@rivai.ai To: gcc-patches@gcc.gnu.org Cc: kito.cheng@gmail.com, palmer@dabbelt.com, Ju-Zhe Zhong <juzhe.zhong@rivai.ai> Subject: [PATCH] RISC-V: Fix bug of before_p function Date: Wed, 18 Jan 2023 11:09:21 +0800 Message-Id: <20230118030921.69098-1-juzhe.zhong@rivai.ai> X-Mailer: git-send-email 2.36.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:rivai.ai:qybglogicsvr:qybglogicsvr7 X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755328186608327438?= X-GMAIL-MSGID: =?utf-8?q?1755328186608327438?= |
Series |
RISC-V: Fix bug of before_p function
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
juzhe.zhong@rivai.ai
Jan. 18, 2023, 3:09 a.m. UTC
From: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
gcc/ChangeLog:
* config/riscv/riscv-vsetvl.cc (before_p): Fix bug.
---
gcc/config/riscv/riscv-vsetvl.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Committed with more comments to describe why this should be fixed. On Wed, Jan 18, 2023 at 11:10 AM <juzhe.zhong@rivai.ai> wrote: > From: Ju-Zhe Zhong <juzhe.zhong@rivai.ai> > > gcc/ChangeLog: > > * config/riscv/riscv-vsetvl.cc (before_p): Fix bug. > > --- > gcc/config/riscv/riscv-vsetvl.cc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gcc/config/riscv/riscv-vsetvl.cc > b/gcc/config/riscv/riscv-vsetvl.cc > index 26d096ea939..728a32dacd6 100644 > --- a/gcc/config/riscv/riscv-vsetvl.cc > +++ b/gcc/config/riscv/riscv-vsetvl.cc > @@ -188,7 +188,7 @@ real_insn_and_same_bb_p (const insn_info *insn, const > bb_info *bb) > static bool > before_p (const insn_info *insn1, const insn_info *insn2) > { > - return insn1->compare_with (insn2) == -1; > + return insn1->compare_with (insn2) < 0; > } > > static bool > -- > 2.36.3 > >
diff --git a/gcc/config/riscv/riscv-vsetvl.cc b/gcc/config/riscv/riscv-vsetvl.cc index 26d096ea939..728a32dacd6 100644 --- a/gcc/config/riscv/riscv-vsetvl.cc +++ b/gcc/config/riscv/riscv-vsetvl.cc @@ -188,7 +188,7 @@ real_insn_and_same_bb_p (const insn_info *insn, const bb_info *bb) static bool before_p (const insn_info *insn1, const insn_info *insn2) { - return insn1->compare_with (insn2) == -1; + return insn1->compare_with (insn2) < 0; } static bool