From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id DF6E23851C1D for ; Fri, 29 May 2020 12:38:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org DF6E23851C1D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=segher@kernel.crashing.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 04TCcBhZ005123; Fri, 29 May 2020 07:38:11 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 04TCcARf005122; Fri, 29 May 2020 07:38:10 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Fri, 29 May 2020 07:38:10 -0500 From: Segher Boessenkool To: "Kewen.Lin" , GCC Patches , Richard Guenther , Bill Schmidt , dje.gcc@gmail.com, richard.sandiford@arm.com Subject: Re: [PATCH 5/7] vect: Support vector load/store with length in vectorizer Message-ID: <20200529123810.GV31009@gate.crashing.org> References: <30906c0d-3b9f-e1e6-156f-c01fcf229cb9@linux.ibm.com> <4b7f2daf-467e-d940-b79c-31c1c30a1dd4@linux.ibm.com> <2fa0452b-9895-15f3-6db5-4233ff16b408@linux.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, TXREP, T_SPF_HELO_PERMERROR, T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 May 2020 12:38:15 -0000 Hi! On Fri, May 29, 2020 at 09:32:49AM +0100, Richard Sandiford wrote: > There's nothing to stop us using masks and lengths in the same loop > in future if we need to. It would “just” be a case of setting up both > the masks and the lengths in vect_set_loop_condition. But the point is > that doing that would be extra code, and there's no point writing that > extra code until it's needed. You won't ever get it right even, because you do not know exactly what will be needed :-) > If some future arch does support both mask-based and length-based > approaches, I think that's even less reason to make a binary choice > between them. How we prioritise the length and mask approaches when > both are available is something that we'll have to decide at the time. > > If your concern is that the arch might support masked operations > without wanting them to be used for loop control, we could test for > that case by checking whether while_ult_optab is implemented. Heh, sneaky. But at least for now it will work fine, and it is local, and not hard to change later. Segher