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 663873858D35 for ; Wed, 26 Apr 2023 04:22:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 663873858D35 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-44048c2de31so4103578e0c.0 for ; Tue, 25 Apr 2023 21:22:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682482922; x=1685074922; 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=CxI7LK4XBQGIzAKWd9+rVc0VSBoUOQViiwXbd+zAvbU=; b=HgEEOOEZ80JiROWAvozCQiiIMIUbhcnA5ZhUxK6oYM6mNigdZ1zOE58ZN0V+YtUVAj zqTeM/VJ6J5q+BUTV3/+1+k5vGZZQdrm8ZxTeQkcBzmQARB65i4N8pSrk8dYPKXVkn9p onl+Ty38Gpy4T2lRr6zoNNi4+Rj+0XUyrmf3Jy9RJ546Mw+Z7XpcMkpeXpbFj3uzhkrU YUwJFRTc/3eoFZi1ZtDZM3zxTdSaNZF0VmOgCddsKKBCndy4D3T9rP6ZpARzAk6rWpWp 5Qk2Uvn7naVGh+dCv3Ix2ktD7Tz9xikfBY78N9H5d8j8sUBlS999RBejIHDo5KHmGN6U m39Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682482922; x=1685074922; 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=CxI7LK4XBQGIzAKWd9+rVc0VSBoUOQViiwXbd+zAvbU=; b=U9Le4zohpFiPRAMUYRuXLePlAK7+2IBVFXF+YQk2xeMU+i+RsYXHgppi6otGov7jwu vkmGKOhWcFkokjPjJn1sutrRDNRxPVV6bL+thqF19wSWODoKz296sJz+sesmK3aLYmXq kX4lx/Wr8O42CuTWINnK7oXOzTDi2wlgLzgCEK25RoXOtYGdTNnc3W3Vdl6j0VIU/PJG HTTj0z3rnVz8UHxTCrlB4VCTBgoWhHNFXaPgzEFcnBj2eT6NNXUmhSAyLQ5/T9P7WhZ3 TBfkS+VxWMyI4hwdNaRvD6aXt0fULh+8OexfKN6G8uZKqqJQJOSmdi/Y79xKLgjG8dBJ 4bXg== X-Gm-Message-State: AAQBX9eOiQVYcmSOsghPb/2VHdTgLOAu8M+euc35L9ubL0ELtoSZE7dP XoYEYtRMUTmOMgVuj/+xAmq3UAd9DrEQ49anzt8= X-Google-Smtp-Source: AKy350YVL1oyNxr1J9TUnQhIoUKIvjq3cnBMBSlImWpVdsPp3bQciwdlJOoJNBjvw/UKRUeStY2EATiiKoDwBgG3oqk= X-Received: by 2002:a1f:5ed0:0:b0:440:6152:fb75 with SMTP id s199-20020a1f5ed0000000b004406152fb75mr6593998vkb.13.1682482922456; Tue, 25 Apr 2023 21:22:02 -0700 (PDT) MIME-Version: 1.0 References: <20230313082855.248118-1-juzhe.zhong@rivai.ai> <0c328c8e-21bc-5aee-af79-f53bd078c665@gmail.com> <043664043D9CE9DE+20230424110542546796124@rivai.ai> In-Reply-To: <043664043D9CE9DE+20230424110542546796124@rivai.ai> From: Kito Cheng Date: Wed, 26 Apr 2023 12:21:51 +0800 Message-ID: Subject: Re: Re: [PATCH] RISC-V: Fine tune gather load RA constraint To: "juzhe.zhong@rivai.ai" Cc: jeffreyalaw , gcc-patches Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.4 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 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 to trunk On Mon, Apr 24, 2023 at 11:06=E2=80=AFAM juzhe.zhong@rivai.ai wrote: > > Adding earlyclobber is to make dest operand do not overlap with source o= perand. > For example: > for gather load, vluxei.v v8,(a5),v8 is illegal according to RVV ISA. > GCC is using same way as LLVM which is also adding earlyclobber for model= ing disabling overlap between dest and source operand. > > > > juzhe.zhong@rivai.ai > > From: Jeff Law > Date: 2023-04-22 04:36 > To: juzhe.zhong; gcc-patches > CC: kito.cheng > Subject: Re: [PATCH] RISC-V: Fine tune gather load RA constraint > > > On 3/13/23 02:28, juzhe.zhong@rivai.ai wrote: > > From: Ju-Zhe Zhong > > > > For DEST EEW < SOURCE EEW, we can partial overlap register > > according to RVV ISA. > > > > gcc/ChangeLog: > > > > * config/riscv/vector.md: Fix RA constraint. > > > > gcc/testsuite/ChangeLog: > > > > * gcc.target/riscv/rvv/base/narrow_constraint-12.c: New test. > This is OK. > > The one question I keep having when I read these patterns is why we have > the earlyclobber. > > Earlyclobber means that the output is potentially written before the > inputs are consumed. Typically for a single instruction pattern such > constraints wouldn't make a lot of sense as *usually* the inputs are > consumed before the output is written. > > Just looking for a clarification as to why the earlyclobbers are needed > at all, particularly for non-reduction patterns. > > jeff >