From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua1-x931.google.com (mail-ua1-x931.google.com [IPv6:2607:f8b0:4864:20::931]) by sourceware.org (Postfix) with ESMTPS id 658943858D1E for ; Tue, 25 Apr 2023 13:08:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 658943858D1E 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-ua1-x931.google.com with SMTP id a1e0cc1a2514c-76dae081228so3319092241.2 for ; Tue, 25 Apr 2023 06:08:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682428103; x=1685020103; 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=8Tjd0BfJVBAyzgIGEoPcJCwjmxpyYnaUezafJQcUCAM=; b=BxrT3vZTIWwtTAFyI/s3nhr5TQJdNmpRN1ZBqI7ldmlA5MgayxT/sh6pq6hehRNbDM tyAeyIF1BYrFG4AAISHZ+ktBDbyvS40UV5FRk1XaAYi1nnXg78mO15/BKdvygDgkeF+Y tTX9rVViSlzKRmmFfjFSbpBwWdiMic7rzjmOA06hR04L6QEHFu6TIZroO/4TwKr0GBN0 JSOKBh/+gyb7/cQpt9R5sKyF8x5MEfO56MbbqVWb9L2aVghz5GJljl42UnHpyHIr8NDS 4Hze41UtPQ8HU11V0OMIJN40Y3z1OqEDO/niEC69S9YVyfMJBJSJo1+x2fk6a7rB5bOl 1kRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682428103; x=1685020103; 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=8Tjd0BfJVBAyzgIGEoPcJCwjmxpyYnaUezafJQcUCAM=; b=b2D2ccat0VMLdG21s6/des10kuWB9xzMaELnyzaAXrDiM1LCrCs7Y/ydYLByLJaJyh TI1CkJ+qHlvp/+RpsJVlw4S+Bg2HK8YTT5VwkI23LXv/YeR2W+HEn0XpmwbFMuRDKxMh O/qwACiynQhj1jZw5cThDwqUxJIK64r6cYZqC4WnXAhBoqhbk5K3Idonj5JqKxZeDbvv qSH4YWqVFbSA2uUmMKw/dyljmdZleFhycAgZfORRJCeMzZA01fNeHxXjXylUp+Oqxdcb t+gamTl3JKEZiJr2pOez5ZKhY1/Bl61MYrXjd2P3wVvUJOlFzEQ44LttDQiAv1+4m3X+ PpPg== X-Gm-Message-State: AAQBX9fe/QztYzQ7jYjIi2SJKNn4C7xWqAR64+ek0amDPV7v3DntCzQY fFVek3iuQtWdRdAXxG9p6y56hDtE3yHP4NNT1ic= X-Google-Smtp-Source: AKy350Yv1YQGHr7uSBhFncCLrRDKQ9DLZKkSiy1AxIfvophemxJ9vgeLMuXCpcTh1HF4zDemBv/CAe2OLiaXEPKv5jc= X-Received: by 2002:a1f:ca04:0:b0:43b:3fda:1fba with SMTP id a4-20020a1fca04000000b0043b3fda1fbamr5090483vkg.6.1682428103484; Tue, 25 Apr 2023 06:08:23 -0700 (PDT) MIME-Version: 1.0 References: <20230419032117.930737-1-pan2.li@intel.com> <2908B8F5933F9196+20230419174105693011142@rivai.ai> In-Reply-To: From: Kito Cheng Date: Tue, 25 Apr 2023 21:08:12 +0800 Message-ID: Subject: Re: Re: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1) shortcut optimization To: "Li, Pan2" , Jeff Law Cc: "juzhe.zhong@rivai.ai" , gcc-patches , "Kito.cheng" , "Wang, Yanzhang" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE,WEIRD_PORT 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: Second thought on this, we should just add define_split rather than define_insn_and_split, otherwise we might hit the same issue again, and I expect the split pattern will only used in combine pass. On Sat, Apr 22, 2023 at 1:34=E2=80=AFPM Li, Pan2 via Gcc-patches wrote: > > Hi Kito > > Thanks for the suggestion. Sorry for late response due to stuck in the re= st rvv test files auto generation. > > I have similar discuss with juzhe for this approach, and take Patch v2's = way due to the below concern. > > 1. The vector.md Is quite complicated already, the maintenance may be out= of control if we will add many new define_insn_and_split for the shortcut. > 2. The new added pattern may not friendly for the underlying auto-vectori= zation. > > Juzhe can help to correct me if any misleading. > > Pan > > -----Original Message----- > From: Kito Cheng > Sent: Friday, April 21, 2023 9:02 PM > To: Li, Pan2 > Cc: juzhe.zhong@rivai.ai; gcc-patches ; Kito.che= ng ; Wang, Yanzhang > Subject: Re: Re: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1) shortcut opt= imization > > Hi Pan: > > One idea come to my mind, maybe we should add a new define_insn_and_split= pattern instead of change @pred_mov > > On Fri, Apr 21, 2023 at 7:17=E2=80=AFPM Li, Pan2 via Gcc-patches wrote: > > > > Thanks kito, will try to reproduce this issue and keep you posted. > > > > Pan > > > > -----Original Message----- > > From: Kito Cheng > > Sent: Friday, April 21, 2023 6:17 PM > > To: Li, Pan2 > > Cc: juzhe.zhong@rivai.ai; gcc-patches ; > > Kito.cheng ; Wang, Yanzhang > > > > Subject: Re: Re: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1) shortcut > > optimization > > > > I got a bunch of new fails including ICE for gcc testsuite, and some ca= ses are hanging there, could you take a look? > > > > $ riscv64-unknown-linux-gnu-gcc > > gcc.target/riscv/rvv/vsetvl/avl_single-92.c -O2 -march=3Drv32gcv > > -mabi=3Dilp32 > > during RTL pass: expand > > /scratch1/kitoc/riscv-gnu-workspace/riscv-gnu-toolchain-trunk/gcc/gcc/t= estsuite/gcc.target/riscv/rvv/vsetvl/avl_single-92.c: > > In function 'f': > > /scratch1/kitoc/riscv-gnu-workspace/riscv-gnu-toolchain-trunk/gcc/gcc/t= estsuite/gcc.target/riscv/rvv/vsetvl/avl_single-92.c:8:13: > > internal compiler error: in maybe_gen_insn, at optabs.cc:8102 > > 8 | vbool64_t mask =3D *(vbool64_t*) (in + 1000000); > > | ^~~~ > > 0x130d278 maybe_gen_insn(insn_code, unsigned int, expand_operand*) > > ../../../../riscv-gnu-toolchain-trunk/gcc/gcc/optabs.cc:8102 > > > > > > On Fri, Apr 21, 2023 at 5:47=E2=80=AFPM Li, Pan2 via Gcc-patches wrote: > > > > > > Kindly ping for the PATCH v2. Just FYI there will be some underlying = investigation based on this PATCH like VMSEQ. > > > > > > Pan > > > > > > -----Original Message----- > > > From: Li, Pan2 > > > Sent: Wednesday, April 19, 2023 7:27 PM > > > To: 'Kito Cheng' ; 'juzhe.zhong@rivai.ai' > > > > > > Cc: 'gcc-patches' ; 'Kito.cheng' > > > ; Wang, Yanzhang > > > Subject: RE: Re: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1) > > > shortcut optimization > > > > > > Update the Patch v2 for more detail information for clarification. Pl= ease help to review continuously. > > > > > > https://gcc.gnu.org/pipermail/gcc-patches/2023-April/616175.html > > > > > > Pan > > > > > > -----Original Message----- > > > From: Li, Pan2 > > > Sent: Wednesday, April 19, 2023 6:33 PM > > > To: Kito Cheng ; juzhe.zhong@rivai.ai > > > Cc: gcc-patches ; Kito.cheng > > > ; Wang, Yanzhang > > > Subject: RE: Re: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1) > > > shortcut optimization > > > > > > Sure thing. > > > > > > For Changlog, I consider it was generated automatically in previous. = LOL. > > > > > > Pan > > > > > > -----Original Message----- > > > From: Kito Cheng > > > Sent: Wednesday, April 19, 2023 5:46 PM > > > To: juzhe.zhong@rivai.ai > > > Cc: Li, Pan2 ; gcc-patches > > > ; Kito.cheng ; Wang, > > > Yanzhang > > > Subject: Re: Re: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1) > > > shortcut optimization > > > > > > HI JuZhe: > > > > > > Thanks for explaining! > > > > > > > > > Hi Pan: > > > > > > I think that would be helpful if JuZhe's explaining that could be wri= tten into the commit log. > > > > > > > > > > gcc/ChangeLog: > > > > > > > > * config/riscv/riscv-v.cc (emit_pred_op): > > > > * config/riscv/riscv-vector-builtins-bases.cc: > > > > * config/riscv/vector.md: > > > > > > And don't forgot write some thing in ChangeLog...:P