From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vk1-xa2a.google.com (mail-vk1-xa2a.google.com [IPv6:2607:f8b0:4864:20::a2a]) by sourceware.org (Postfix) with ESMTPS id 2C4723858D20 for ; Mon, 12 Jun 2023 12:28:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2C4723858D20 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-vk1-xa2a.google.com with SMTP id 71dfb90a1353d-45bcbd77636so1129908e0c.1 for ; Mon, 12 Jun 2023 05:28:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686572879; x=1689164879; 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=cdXZ7vYTjzN2p2idq7J0vcI9OYg/mEBoFlQVdzjZ+eM=; b=bKxU1TfXTMa/T7LxA6Lyy4iVRTHZEMiBYmv2FQm7PhDiLH7BKkunbQarN7Z/vW9cFu NGZfGyWrmK15YqHcKBpuHqUMamKNV07b4xBuGD40Mbw30rwlLg/cKQOO3lr5npKKvNlH S29/YKz5ie+ngz4ijQ+p8rxUvNB+96Zgztef3RyzqwlycVTIFypBdBvqFL/7QpxmqS5P f5muoXUQYXZbTu4ERfKTlvj2+EGlsaoe/L/1Oy8FDP2smt0zKKWX/BQbGupxxYfoZjdn TLhFMY/n5fcBNNthmAByNpDk/QMSUtfmw1/y3t0vja6j88BgNLTCREcVyIAZNXNIRR7V cdCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686572879; x=1689164879; 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=cdXZ7vYTjzN2p2idq7J0vcI9OYg/mEBoFlQVdzjZ+eM=; b=ToXbTMl/mOFxQuSdWzN7e/difhvUwcHe3ZK5tFEIHy1I/r4UIwBDfniP9gH+mj7Ptr r6fxz28fIpFAHr4gy2/MIgkqFVs1SCM4XYqt7hmNlii2g/Jlr2GC/x2VbDd2iHU+Krvk BdFKZqCitIRwYESiTK80+imEh3e1Da9e0miD+sI228nSWmKn2UorMB29ueuW5MKLvqhT CJDKcOTopZgVWJRX0qHguEgRBwhqrPw2MI28R4Qyw/51okozumdtQPUSkqcPO4s9+bOO HeIsqJ329t787aHhZ3hJxXN05g5hL1dTs6eKrVTV/ADVchXRQ+ai1ZbjCaku05u584GW oMwQ== X-Gm-Message-State: AC+VfDzE9EWN3q4Ua/yC06awXWfu9VuouVEYl6CukPNvWt800CrhwX/c tb8dPV7ZZoKyGSviExN5B+GfmcFsTTg/do2EGp4= X-Google-Smtp-Source: ACHHUZ4OJ27F+FIe9VXG7UAZX4IR/+Vqg3mIq6+lkzL+0nL0+DnG5xc8z/6SYV3JbfM6rxNQgZ0jLZSXZcyKAAYuKh8= X-Received: by 2002:a1f:ed42:0:b0:45e:bb34:e43d with SMTP id l63-20020a1fed42000000b0045ebb34e43dmr3056580vkh.15.1686572879327; Mon, 12 Jun 2023 05:27:59 -0700 (PDT) MIME-Version: 1.0 References: <20230609143241.115366-1-juzhe.zhong@rivai.ai> <445cc0e3-68ba-f2ef-79b1-e0c2ff64f39d@gmail.com> <3F0FE5A55262F58C+202306100749599130402@rivai.ai> <6d08e70d-dc29-e47c-be43-ba48cfeddeee@gmail.com> <954A2C66661D7FB1+202306121758276127389@rivai.ai> In-Reply-To: <954A2C66661D7FB1+202306121758276127389@rivai.ai> From: Kito Cheng Date: Mon, 12 Jun 2023 20:27:48 +0800 Message-ID: Subject: Re: Re: [PATCH] RISC-V: Fix V_WHOLE && V_FRACT iterator requirement To: "juzhe.zhong@rivai.ai" Cc: Robin Dapp , gcc-patches , "Kito.cheng" , palmer , jeffreyalaw Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,BODY_8BITS,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 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: Some more detail here: https://gcc.gnu.org/pipermail/gcc-patches/2023-April/616051.html On Mon, Jun 12, 2023 at 5:58=E2=80=AFPM juzhe.zhong@rivai.ai wrote: > > I'd like you to defer to you commit my patch with your test (Jeff has app= roved my patch, just feel free to commit). > > Here is the description: > We have 3 configuration for "-march" > 1. zve32* (TARGET_MIN_VLEN =3D=3D 32), the LMUL =3D 1 mode will be VNx4Q= I, VNx2HI, VNx1SI > 2. zve64* (TARGET_MIN_VLEN =3D=3D 64), the LMUL =3D 1 mode will be VNx8Q= I, VNx4HI, VNx2SI > 3. zve64*_zvl128b (TARGET_MIN_VLEN >=3D 128), the LMUL =3D 1 mode will b= e VNx16QI, VNx8HI, VNx4SI > > We dynamically adjust BYTES_PER_VECTOR according to TARGET_MIN_VLEN. > For TARGET_MIN_VLEN =3D 32 (chunk=3D32), the LMUL =3D 1 size =3D (4,4) by= tes. > For TARGET_MIN_VLEN =3D 64 (chunk=3D64), the LMUL =3D 1 size =3D (8,8) by= tes. > For TARGET_MIN_VLEN >=3D 128 (chunk=3D128), the LMUL =3D 1 size =3D (16*n= ,16*n) bytes. > I have explained it many times. > https://gcc.gnu.org/pipermail/gcc-patches/2023-March/614935.html > https://gcc.gnu.org/pipermail/gcc-patches/2023-February/612574.html > > > > > juzhe.zhong@rivai.ai > > From: Robin Dapp > Date: 2023-06-12 17:51 > To: =E9=92=9F=E5=B1=85=E5=93=B2; gcc-patches > CC: rdapp.gcc; kito.cheng; palmer; Jeff Law > Subject: Re: [PATCH] RISC-V: Fix V_WHOLE && V_FRACT iterator requirement > > + (VNx16QI "TARGET_MIN_VLEN <=3D 128") > > + (VNx32QI "TARGET_MIN_VLEN <=3D 256") > > + (VNx64QI "TARGET_MIN_VLEN >=3D 64 && TARGET_MIN_VLEN <=3D 512") > > + (VNx128QI "TARGET_MIN_VLEN >=3D 128 && TARGET_MIN_VLEN <=3D 1024") > > > > This not correct, we always use VNx16QI as LMUL =3D m1 for min_vlen >= =3D 128. > > Requirement of TARGET_MIN_VLEN <=3D 128 is incorrect for VNx16QI. > > VNx32QI,...etc likewise. > > Please elaborate. What happens with a VNx16QI on a target with > min_vlen =3D=3D 256? Is it a full 256-bit vector with only the first hal= f > populated? If so, this need documentation either here or somewhere > else (but with a reference here). > > Either you can pick my testcase and amend your patch (plus > streamline formatting as well adding a proper comment) or I change > mine. Your call. > > Regards > Robin >