From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vs1-xe30.google.com (mail-vs1-xe30.google.com [IPv6:2607:f8b0:4864:20::e30]) by sourceware.org (Postfix) with ESMTPS id 356B13858D28 for ; Sun, 5 Mar 2023 17:24:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 356B13858D28 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-xe30.google.com with SMTP id o32so7019531vsv.12 for ; Sun, 05 Mar 2023 09:24:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678037059; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=DIYJprIR3mgqciIxumLzVb93k+a1n2PUPPbkUvz2668=; b=DfqB/9+DLDNP2akEpKCg1f+pYTiEnEOa3BvPpkpJJTmoUzPPd+U4MZizftYfqNId3I aUV2DvL5DT6UolmlU9SfeuvkoCCN4xMssajwBx3KfBZN1dlVYwvI5wOstbilLYQpc/G5 Ien4S7xhnETACoUTgiyMM7AQRUUeSqpCoTLGoen8UJoVdm77gemr7NRkwRUa1eAF+I0o ijXLjjBFMozxovRZL4HPdrns8O6+XcbG0/4OGhx2CVuQ+x3EYlKbLFBqCPhs1ozyP9ao G3XEVQASgnwqywVG7dkWyCEOPY/+aa8t2vOafXqaywrgMqVe/jFvfTgoX16G/nyjbIvy b83w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678037059; h=content-transfer-encoding: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=DIYJprIR3mgqciIxumLzVb93k+a1n2PUPPbkUvz2668=; b=eOubgCl48Zc0E30z37U67bGPx3dLHnL1nORAOWzVkPcIV0yACL3VSAITVlXb+iyEkS 4hxiTsxj+Ef/AlwbRbw6jV8JlyjTe+wPN5JTwSqFfBqG0EcRpm9otjiWmEOKvNqI0YQq HMcjTZ8i5AZSFh8s6LN5bC9ufkOd2Fhm4hBW/53dtKiPD0QHl53+Cw3Nz/jF0VlEZohQ nj7CWMgw+Z6cfaSLkdjtgQkaKjxG0ujzjl02aBbMs1lYpzaecDn+oGYCL45s/zUqOnxU 6PtlXlCgLLqLmrMg49m+ubVEWSl6QuhRlYxvWCf1162q2mqRT/lt3Dn2b+AhjPe6FPsg UmJw== X-Gm-Message-State: AO0yUKVDV7I6T6C5/Xm9xzvCPjIDv9gERq9O1FXfd4VgQby1pFWhXNGR YXlF4Y6Y9epwdtpxLJmpg7gkz3NxZS10Ihk4jQf5kHgeemApbg== X-Google-Smtp-Source: AK7set/23mesbLZFECGzXrrxmRB31glWXI0NBz0IBVDCZr9Y1CUy4lXfrltmealJ/bCML2GSPrJ9yckF3kZGRW6/lWQ= X-Received: by 2002:a67:f406:0:b0:414:48a5:473f with SMTP id p6-20020a67f406000000b0041448a5473fmr5550121vsn.0.1678037058930; Sun, 05 Mar 2023 09:24:18 -0800 (PST) MIME-Version: 1.0 References: <20230305102430.266375-1-juzhe.zhong@rivai.ai> In-Reply-To: <20230305102430.266375-1-juzhe.zhong@rivai.ai> From: Kito Cheng Date: Mon, 6 Mar 2023 01:24:07 +0800 Message-ID: Subject: Re: [PATCH] RISC-V: Fix ICE for avl_single-86/avl_single-88/avl_single-90 To: juzhe.zhong@rivai.ai Cc: gcc-patches@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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,KAM_NUMSUBJECT,KAM_SHORT,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: Committed, thanks for the fix :) On Sun, Mar 5, 2023 at 6:25=E2=80=AFPM wrote: > > From: Ju-Zhe Zhong > > FAIL: gcc.target/riscv/rvv/vsetvl/avl_single-86.c -Og -g (internal > compiler error: Segmentation fault) > FAIL: gcc.target/riscv/rvv/vsetvl/avl_single-86.c -Og -g (test for > excess errors) > FAIL: gcc.target/riscv/rvv/vsetvl/avl_single-88.c -Og -g (internal > compiler error: Segmentation fault) > FAIL: gcc.target/riscv/rvv/vsetvl/avl_single-88.c -Og -g (test for > excess errors) > FAIL: gcc.target/riscv/rvv/vsetvl/avl_single-90.c -Og -g (internal > compiler error: Segmentation fault) > FAIL: gcc.target/riscv/rvv/vsetvl/avl_single-90.c -Og -g (test for > excess errors) > > gcc/ChangeLog: > > * config/riscv/riscv-vsetvl.cc (reg_available_p): Fix bug. > (pass_vsetvl::backward_demand_fusion): Ditto. > > --- > gcc/config/riscv/riscv-vsetvl.cc | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/gcc/config/riscv/riscv-vsetvl.cc b/gcc/config/riscv/riscv-vs= etvl.cc > index 9e25102a4f2..73f36a70331 100644 > --- a/gcc/config/riscv/riscv-vsetvl.cc > +++ b/gcc/config/riscv/riscv-vsetvl.cc > @@ -1528,7 +1528,7 @@ static bool > reg_available_p (const bb_info *bb, const vector_insn_info &info) > { > if (!info.get_avl_source ()) > - return true; > + return false; > insn_info *insn =3D info.get_avl_source ()->insn (); > if (insn->bb () =3D=3D bb) > return before_p (insn, info.get_insn ()); > @@ -3040,6 +3040,12 @@ pass_vsetvl::backward_demand_fusion (void) > continue; > if (e->src->index =3D=3D ENTRY_BLOCK_PTR_FOR_FN (cfun)->index) > continue; > + /* If prop is demand of vsetvl instruction and reaching doesn't= demand > + AVL. We don't backward propagate since vsetvl instruction ha= s no > + side effects. */ > + if (vsetvl_insn_p (prop.get_insn ()->rtl ()) > + && propagate_avl_across_demands_p (prop, block_info.reachin= g_out)) > + continue; > > if (block_info.reaching_out.unknown_p ()) > continue; > -- > 2.36.3 >