From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5026 invoked by alias); 17 Nov 2015 09:54:43 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 5015 invoked by uid 89); 17 Nov 2015 09:54:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Tue, 17 Nov 2015 09:54:41 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 3AA86ABDC; Tue, 17 Nov 2015 09:54:14 +0000 (UTC) Date: Tue, 17 Nov 2015 09:54:00 -0000 From: Richard Biener To: Alan Lawrence cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Improve BB vectorization dependence analysis In-Reply-To: <564A21F6.3020507@arm.com> Message-ID: References: <564A21F6.3020507@arm.com> User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2015-11/txt/msg02051.txt.bz2 On Mon, 16 Nov 2015, Alan Lawrence wrote: > On 09/11/15 12:55, Richard Biener wrote: > > > > Currently BB vectorization computes all dependences inside a BB > > region and fails all vectorization if it cannot handle some of them. > > > > This is obviously not needed - BB vectorization can restrict the > > dependence tests to those that are needed to apply the load/store > > motion effectively performed by the vectorization (sinking all > > participating loads/stores to the place of the last one). > > > > With restructuring it that way it's also easy to not give up completely > > but only for the SLP instance we cannot vectorize (this gives > > a slight bump in my SPEC CPU 2006 testing to 756 vectorized basic > > block regions). > > > > But first and foremost this patch is to reduce the dependence analysis > > cost and somewhat mitigate the compile-time effects of the first patch. > > > > For fixing PR56118 only a cost model issue remains. > > > > Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. > > > > Richard. > > > > 2015-11-09 Richard Biener > > > > PR tree-optimization/56118 > > * tree-vectorizer.h (vect_find_last_scalar_stmt_in_slp): Declare. > > * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Export. > > * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): New > > function. > > (vect_slp_analyze_data_ref_dependences): Instead of computing > > all dependences of the region DRs just analyze the code motions > > SLP vectorization will perform. Remove SLP instances that > > cannot have their store/load motions applied. > > (vect_analyze_data_refs): Allow DRs without a vectype > > in BB vectorization. > > > > * gcc.dg/vect/no-tree-sra-bb-slp-pr50730.c: Adjust. > > Since this, I've been seeing an ICE on gfortran.dg/vect/vect-9.f90 at on both > aarch64-none-linux-gnu and arm-none-linux-gnueabihf: > > spawn /home/alalaw01/build/gcc/testsuite/gfortran4/../../gfortran > -B/home/alalaw01/build/gcc/testsuite/gfortran4/../../ > -B/home/alalaw01/build/aarch64-unknown-linux-gnu/./libgfortran/ > /home/alalaw01/gcc/gcc/testsuite/gfortran.dg/vect/vect-9.f90 > -fno-diagnostics-show-caret -fdiagnostics-color=never -O -O2 -ftree-vectorize > -fvect-cost-model=unlimited -fdump-tree-vect-details -Ofast -S -o vect-9.s > /home/alalaw01/gcc/gcc/testsuite/gfortran.dg/vect/vect-9.f90:5:0: Error: > definition in block 13 follows the use for SSA_NAME: _339 in statement: > vectp.156_387 = &*cc_36(D)[_339]; > /home/alalaw01/gcc/gcc/testsuite/gfortran.dg/vect/vect-9.f90:5:0: internal > compiler error: verify_ssa failed > 0xcfc61b verify_ssa(bool, bool) > ../../gcc-fsf/gcc/tree-ssa.c:1039 > 0xa2fc0b execute_function_todo > ../../gcc-fsf/gcc/passes.c:1952 > 0xa30393 do_per_function > ../../gcc-fsf/gcc/passes.c:1632 > 0xa3058f execute_todo > ../../gcc-fsf/gcc/passes.c:2000 > Please submit a full bug report... > FAIL: gfortran.dg/vect/vect-9.f90 -O (internal compiler error) > FAIL: gfortran.dg/vect/vect-9.f90 -O (test for excess errors) > > Still there (on aarch64) at r230329. Please open a bugreport. Thanks, Richard.