Message ID | 20230616080231.142845-1-juzhe.zhong@rivai.ai |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1161156vqr; Fri, 16 Jun 2023 01:03:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5f1GfaAjhDm8jftHnV5vMnheXga8Ow7aRLGh2BF/qp9CyeoXEtIuGJs5fXJzEqJC3D4f1h X-Received: by 2002:a17:907:3e27:b0:982:30e3:ddcb with SMTP id hp39-20020a1709073e2700b0098230e3ddcbmr1426054ejc.65.1686902592030; Fri, 16 Jun 2023 01:03:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686902592; cv=none; d=google.com; s=arc-20160816; b=D2FzgqV/plxTGisyuw1FYXrQ+T4EJzd/MpzC7YTuv4DAfw3qCLWBIici2OKTrk0VnX S1E+2BTelxGJez44RKq5k6PO4eYES0BCdRNW0TLKB1Vx+qPM+C3qgJN8guTnZLG34Juz fPGC88BvTBX7Slu5ClPHwMiH8ltqQtK9U9rldhlKOiMLLgQsRceYNk6rZiXyPTpoFDtL gQGJrylATBAZn2z9cbyC6ePISoTBVKIQoszqlddEoWvhl44smfBFlfMtnov6Ycw0COfq RG3M6zKZy67dwp1mW45EuRmIkLFyotGvBLFAY26eLUkWxdIEXMgZPaVCFuXProHiY3M2 0rRA== 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=GkFVFpMNMnhMXCW6oHg4KDVDM5YB7Pu5JENpa9IYTto=; b=gt9XiZall7++ldXV3pwtg5ZyxTHycddQd2YMDWOjDRPh/GXYA5kX7qbl1IP60CrBZa NllNhui1EF3nDWdRvLBVHgG3ef8f2TPWTEf1MVvpnyPjBL2wwe7/rG2Lix9xzdh7uh7z Zf19sRp75kEGuljLPPzqn+br5z4JbPgsgBkjvL4HvDFa3OKt37/FsmnF18uGpAGYsWFJ Q+Odt4Ra1gZWiLDJBBWHhSwbBZR64xlJ4zs82Hdt1G/PmGn5hsEnP0eEqajK4tJJqd0O t7fUbtqZk1x/U5C8k93QEnPP+ZE9h6IB2EPQ94DMVCqV5P1t7CofukUUF4d+3VNoHdU8 rvMg== 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 lo25-20020a170906fa1900b0098638efc275si497922ejb.688.2023.06.16.01.03.11 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Jun 2023 01:03:12 -0700 (PDT) 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 51CA03854E5E for <ouuuleilei@gmail.com>; Fri, 16 Jun 2023 08:03:10 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtpbg151.qq.com (smtpbg151.qq.com [18.169.211.239]) by sourceware.org (Postfix) with ESMTPS id 1C2763858431 for <gcc-patches@gcc.gnu.org>; Fri, 16 Jun 2023 08:02:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1C2763858431 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: bizesmtp69t1686902553tvudpib1 Received: from rios-cad5.localdomain ( [58.60.1.11]) by bizesmtp.qq.com (ESMTP) with id ; Fri, 16 Jun 2023 16:02:32 +0800 (CST) X-QQ-SSF: 01400000000000G0S000000A0000000 X-QQ-FEAT: +oIWmpEafD92jkJGAYzS2hs6Eicn/nbUydnfaIZhGzhn167rDnXRwQp2qXtti R04LnTE8ePLjKyHJ59Ny+XpK6slZDfagq4AkT5YiKAALrcC/1aRSd1eczgRox/CZfk3Ilkd tU1JgtCEPc4RKPr3VH+CJOC2mpx/C02/zLGbgAvZtKFHoA33WKq+pY8OWydmj7PecUEvsIW eqSBzTm8h3TuT+lAYMzINFzDKW2G5WtKXOxjqQE5h4sSIy/CiVZoaDHVfZRagL1uG7+3NBg f4G9Vm59TqW6tA9QahXDy1h688ZTVaBbSp6HkZRY3XHJMV0AdkuwT9wQIBTgW7sr7hXym/J upAp1bDO0o4irjJD1bs/06WDDtcx9udRiuehm+Sn4rE1VEUs1ueVJ4m7IMrLghRkrOVqz6I /Nv8rbiYuzftHuirSNzj7A== X-QQ-GoodBg: 2 X-BIZMAIL-ID: 11179499315510112410 From: Juzhe-Zhong <juzhe.zhong@rivai.ai> To: gcc-patches@gcc.gnu.org Cc: kito.cheng@gmail.com, kito.cheng@sifive.com, palmer@dabbelt.com, palmer@rivosinc.com, jeffreyalaw@gmail.com, rdapp.gcc@gmail.com, Juzhe-Zhong <juzhe.zhong@rivai.ai> Subject: [PATCH] RISC-V: Fix VL operand bug in VSETVL PASS[PR110264] Date: Fri, 16 Jun 2023 16:02:31 +0800 Message-Id: <20230616080231.142845-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:qybglogicsvrgz:qybglogicsvrgz7a-one-0 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, 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 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?1768845572557022092?= X-GMAIL-MSGID: =?utf-8?q?1768845572557022092?= |
Series |
RISC-V: Fix VL operand bug in VSETVL PASS[PR110264]
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
juzhe.zhong@rivai.ai
June 16, 2023, 8:02 a.m. UTC
This patch fixes this issue happens on both GCC-13 and GCC-14. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110264 The testcase is too big and I failed to reduce it so I didn't append test into this patch. This patch should not only land into GCC-14 but also should backport to GCC-13. PR target/110264 gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (insert_vsetvl): Fix bug. --- gcc/config/riscv/riscv-vsetvl.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
Comments
On 6/16/23 02:02, Juzhe-Zhong wrote: > This patch fixes this issue happens on both GCC-13 and GCC-14. > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110264 > > The testcase is too big and I failed to reduce it so I didn't append > test into this patch. > > This patch should not only land into GCC-14 but also should backport to GCC-13. > > PR target/110264 > > gcc/ChangeLog: > > * config/riscv/riscv-vsetvl.cc (insert_vsetvl): Fix bug. OK. Note, I've been swamped this week. So things are moving a bit slower than I'd like on the review side. jeff
Committed, thanks Jeff. Pan -----Original Message----- From: Gcc-patches <gcc-patches-bounces+pan2.li=intel.com@gcc.gnu.org> On Behalf Of Jeff Law via Gcc-patches Sent: Friday, June 16, 2023 11:53 PM To: Juzhe-Zhong <juzhe.zhong@rivai.ai>; gcc-patches@gcc.gnu.org Cc: kito.cheng@gmail.com; kito.cheng@sifive.com; palmer@dabbelt.com; palmer@rivosinc.com; rdapp.gcc@gmail.com Subject: Re: [PATCH] RISC-V: Fix VL operand bug in VSETVL PASS[PR110264] On 6/16/23 02:02, Juzhe-Zhong wrote: > This patch fixes this issue happens on both GCC-13 and GCC-14. > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110264 > > The testcase is too big and I failed to reduce it so I didn't append > test into this patch. > > This patch should not only land into GCC-14 but also should backport to GCC-13. > > PR target/110264 > > gcc/ChangeLog: > > * config/riscv/riscv-vsetvl.cc (insert_vsetvl): Fix bug. OK. Note, I've been swamped this week. So things are moving a bit slower than I'd like on the review side. jeff
diff --git a/gcc/config/riscv/riscv-vsetvl.cc b/gcc/config/riscv/riscv-vsetvl.cc index cae9be0d928..42cc6f29f26 100644 --- a/gcc/config/riscv/riscv-vsetvl.cc +++ b/gcc/config/riscv/riscv-vsetvl.cc @@ -744,7 +744,10 @@ insert_vsetvl (enum emit_type emit_type, rtx_insn *rinsn, if (vlmax_avl_p (info.get_avl ())) { gcc_assert (has_vtype_op (rinsn) || vsetvl_insn_p (rinsn)); - rtx vl_op = info.get_avl_reg_rtx (); + /* For user vsetvli a5, zero, we should use get_vl to get the VL + operand "a5". */ + rtx vl_op + = vsetvl_insn_p (rinsn) ? get_vl (rinsn) : info.get_avl_reg_rtx (); gcc_assert (!vlmax_avl_p (vl_op)); emit_vsetvl_insn (VSETVL_NORMAL, emit_type, info, vl_op, rinsn); return VSETVL_NORMAL;