From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vs1-xe2e.google.com (mail-vs1-xe2e.google.com [IPv6:2607:f8b0:4864:20::e2e]) by sourceware.org (Postfix) with ESMTPS id 74BED3858D20 for ; Fri, 27 Jan 2023 10:09:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 74BED3858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-vs1-xe2e.google.com with SMTP id i188so4770657vsi.8 for ; Fri, 27 Jan 2023 02:09:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=XuyI5mFe7EpaGz2894zJXylbDuPsG3kg5Efce6r1QIY=; b=Qp72pokVFPtzs4Q7RxWlXQ6EikWDbYqQ4SWRbtNjQCJ4Z4MpRXkKbJME++5yrSQ3SC b+MdvuEj3+cJRnoJ+uUhgAOEPYhsv/2hohnnzHDgDp5mG0jWxWlu0gQf66y5AO/nfaql mw5OeCcym6coC0pMZQmFWPlS3ykwQuXWTCJ753pyLfcXWSTxWfa4LVW26HmwYM7Dr9pb NLbieu1tX8yclpk18HU9NiExJsQo/eTeuXGO60KyfXpO4I5X5E52/J0pyazYvbCbR/mQ 8JPKeVhqITr3Xrl01dezqUPq4gUUNC/aGw98A58Fca3R/5fid+sdyvyvqaOLUxgq/Vbt scEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=XuyI5mFe7EpaGz2894zJXylbDuPsG3kg5Efce6r1QIY=; b=ic/zhBP5vyssN+ehNkRxylDmzU94Tfo0G2CAbFDc50/oz6becdKgt5K33AaPVui+No wJRBcsmEO5mas2ZW4EhCKYewDHZVcDN4IijtMzLT23ZTQfVRB6NrsnRuUb5CSI6O72hA 5OyzUVjm98T++hKRxpMmTRCVFPGqdHDJ3LPJWoju2FYSmPseDc6YmOfVAR66jsI46Y/a YXeJDv8GVV9O8oHvRCsdsNIE6MGSSWtXuab6uIgF2b8acpr+5haWIEWRALA4Wn8RNh4D ntPWxRVZHNDFor7qLaQK0gVaisbMJBoM02+xRr8PchRi71B+3L3GQ8SuZPWrbXg0OWgm aAmw== X-Gm-Message-State: AO0yUKWTlQ/QrXArswtfVGfOqLrsToRIunVQVDnyuTjbV2T0qXHSTek0 IX7L0cTwBN8GiceocqMJ3N04YTV3HYmoz8S29HVSrZlO X-Google-Smtp-Source: AK7set/96SQSZr/dTnD+v6JUaUiKed8d1i3blqNa4lqEVzLIgni6a+SJtExlvjEGV89qQEb6afuGci72tob54Vn3OJo= X-Received: by 2002:a67:fe13:0:b0:3e9:a641:7acb with SMTP id l19-20020a67fe13000000b003e9a6417acbmr1275814vsr.30.1674814156721; Fri, 27 Jan 2023 02:09:16 -0800 (PST) MIME-Version: 1.0 References: <20230118030921.69098-1-juzhe.zhong@rivai.ai> In-Reply-To: <20230118030921.69098-1-juzhe.zhong@rivai.ai> From: Kito Cheng Date: Fri, 27 Jan 2023 18:09:05 +0800 Message-ID: Subject: Re: [PATCH] RISC-V: Fix bug of before_p function To: juzhe.zhong@rivai.ai Cc: gcc-patches@gcc.gnu.org, palmer@dabbelt.com Content-Type: multipart/alternative; boundary="000000000000e0537205f33c0ec3" X-Spam-Status: No, score=-8.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,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: --000000000000e0537205f33c0ec3 Content-Type: text/plain; charset="UTF-8" Committed with more comments to describe why this should be fixed. On Wed, Jan 18, 2023 at 11:10 AM wrote: > From: Ju-Zhe Zhong > > 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 > > --000000000000e0537205f33c0ec3--