From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 3C9B73858D39 for ; Wed, 24 May 2023 15:47:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3C9B73858D39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0D4C51042; Wed, 24 May 2023 08:47:53 -0700 (PDT) Received: from localhost (e121540-lin.manchester.arm.com [10.32.110.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 644E03F762; Wed, 24 May 2023 08:47:07 -0700 (PDT) From: Richard Sandiford To: =?utf-8?B?6ZKf5bGF5ZOy?= Mail-Followup-To: =?utf-8?B?6ZKf5bGF5ZOy?= ,gcc-patches , rguenther , richard.sandiford@arm.com Cc: gcc-patches , rguenther Subject: Re: [PATCH V14] VECT: Add decrement IV iteration loop control by variable amount support References: <20230524144801.73537-1-juzhe.zhong@rivai.ai> <7AF1D88A0988DC3D+2023052423130398041121@rivai.ai> <5B94EE89DA317A86+2023052423421230674834@rivai.ai> Date: Wed, 24 May 2023 16:47:06 +0100 In-Reply-To: <5B94EE89DA317A86+2023052423421230674834@rivai.ai> (=?utf-8?B?IumSn+WxheWTsiIncw==?= message of "Wed, 24 May 2023 23:42:12 +0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-21.1 required=5.0 tests=BAYES_00,BODY_8BITS,KAM_DMARC_NONE,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: =E9=92=9F=E5=B1=85=E5=93=B2 writes: > Hi, Richard. I still don't understand it. Sorry about that. > >>> loop_len_48 =3D MIN_EXPR ; > >> _74 =3D loop_len_34 * 2 - loop_len_48; > > I have the tests already tested. > We have a MIN_EXPR to calculate the total elements: > loop_len_34 =3D MIN_EXPR ; > I think "8" is already multiplied by 2? > > Why do we need loop_len_34 * 2 ? > Could you give me more informations, The similiar tests you present we al= ready have > execution check and passed. I am not sure whether this patch has the issu= e that I didn't notice. Think about the maximum values of each SSA name: loop_len_34 =3D MIN_EXPR ; // MAX 8 loop_len_48 =3D MIN_EXPR ; // MAX 4 _74 =3D loop_len_34 - loop_len_48; // MAX 4 loop_len_49 =3D MIN_EXPR <_74, 4>; // MAX 4 (always =3D=3D _7= 4) _75 =3D _74 - loop_len_49; // 0 loop_len_50 =3D MIN_EXPR <_75, 4>; // 0 loop_len_51 =3D _75 - loop_len_50; // 0 So the final two y vectors will always have 0 controls. Thanks, Richard