On Fri, Feb 21, 2014 at 11:32:41AM +0100, Richard Biener wrote:
> 
> This attempts to fix PR60276 - the fact that the vectorizer dependence
> analysis is run too early and that it invalidates assumptions it
> makes there later.  The specific issue in question arises when
> the vectorizer needs to effectively unroll the loop and by
> performing all vectorized loads first and vectorized stores last
> the idea that it can ignore known dependences with negative
> distance doesn't work out if that distance is too short.
> 
> The following is the shortest (and eventually backportable) change
> I could come up with - record the negative distance during
> dependence analysis and re-validate it when decisions about
> stmt copying and group sizes are fixed.
> 
> Bootstrapped and tested on x86_64-unknown-linux-gnu - does this look
> ok?

Ok, thanks.

> 2014-02-21  Richard Biener  <rguent...@suse.de>
> 
>       PR tree-optimization/60276
>       * tree-vectorizer.h (struct _stmt_vec_info): Add min_neg_dist field.
>       (STMT_VINFO_MIN_NEG_DIST): New macro.
>       * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Record
>       STMT_VINFO_MIN_NEG_DIST.
>       * tree-vect-stmts.c (vectorizable_load): Verify if assumptions
>       made for negative dependence distances still hold.
> 
>       * gcc.dg/vect/pr60276.c: New testcase.

        Jakub

Reply via email to