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 A24233971C45 for ; Thu, 10 Sep 2020 10:47:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A24233971C45 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=richard.sandiford@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 408901063; Thu, 10 Sep 2020 03:47:01 -0700 (PDT) Received: from localhost (e121540-lin.manchester.arm.com [10.32.98.126]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C0C4B3F68F; Thu, 10 Sep 2020 03:47:00 -0700 (PDT) From: Richard Sandiford To: Richard Biener Mail-Followup-To: Richard Biener , gcc-patches@gcc.gnu.org, richard.sandiford@arm.com Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] fix useless unsharing of SLP tree References: Date: Thu, 10 Sep 2020 11:46:59 +0100 In-Reply-To: (Richard Biener's message of "Thu, 10 Sep 2020 11:14:05 +0200 (CEST)") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham 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: Thu, 10 Sep 2020 10:47:03 -0000 Richard Biener writes: > On Thu, 10 Sep 2020, Richard Sandiford wrote: > >> Richard Biener writes: >> > This avoids unsharing the SLP tree when optimizing load permutations >> > for reductions but there is no actual permute taking place. >> > >> > Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. >> > >> > 2020-09-09 Richard Biener >> > >> > * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Do >> > nothing when the permutation doesn't permute. >> >> Drive-by comment, sorry for not looking in more detail first, but: >> is there a difference in semantics between an identity load_permutation >> and a null load_permutation? Seems like it would be good to have >> a canonical form. > > Well, yes - an identity load_permutation will become non-identity > if there's a GROUP_GAP and we end up with a VF > 1. We're simply > postponing figuring this out until we have VF fixed (and > vect_attempt_slp_rearrange_stmts is quite legacy now and at an > odd place - sth I hope to address). So with GROUP_GAP == 1 > and an identity permute the permute should be NULL. > > I've run into this during development of other stuff but decided > to push this fix since it might as well happen for the SLP > reduction case. It's probably a regression from when I pushed > permute validity check to vectorizable_load. Ah, OK, thanks. Richard