Re: [PATCH] Fix PR tree-optimization/53636 (SLP generates invalid misaligned access)

2012-06-20 Thread Ulrich Weigand
Richard Guenther wrote: > In this testcase the alignment of arr[i] should be irrelevant - it is > not part of the stmts that are going to be vectorized. Agreed. > But of course this may be > simply an odering issue in how we analyze data-references / statements > in basic-block vectorization (th

Re: [PATCH] Fix PR tree-optimization/53636 (SLP generates invalid misaligned access)

2012-06-20 Thread Mikael Pettersson
Richard Guenther writes: > On Tue, Jun 19, 2012 at 11:36 PM, Mikael Pettersson wrote: > > Richard Guenther writes: > >  > On Fri, Jun 15, 2012 at 5:00 PM, Ulrich Weigand > > wrote: > >  > > Richard Guenther wrote: > >  > >> On Fri, Jun 15, 2012 at 3:13 PM, Ulrich Weigand > > wrote: > >

Re: [PATCH] Fix PR tree-optimization/53636 (SLP generates invalid misaligned access)

2012-06-20 Thread Richard Guenther
On Tue, Jun 19, 2012 at 11:36 PM, Mikael Pettersson wrote: > Richard Guenther writes: >  > On Fri, Jun 15, 2012 at 5:00 PM, Ulrich Weigand > wrote: >  > > Richard Guenther wrote: >  > >> On Fri, Jun 15, 2012 at 3:13 PM, Ulrich Weigand > wrote: >  > >> > However, there is a second case where we

Re: [PATCH] Fix PR tree-optimization/53636 (SLP generates invalid misaligned access)

2012-06-19 Thread Mikael Pettersson
Richard Guenther writes: > On Fri, Jun 15, 2012 at 5:00 PM, Ulrich Weigand wrote: > > Richard Guenther wrote: > >> On Fri, Jun 15, 2012 at 3:13 PM, Ulrich Weigand > >> wrote: > >> > However, there is a second case where we need to check every pass: if > >> > we're not actually vectorizing

Re: [PATCH] Fix PR tree-optimization/53636 (SLP generates invalid misaligned access)

2012-06-17 Thread Richard Guenther
On Fri, Jun 15, 2012 at 5:00 PM, Ulrich Weigand wrote: > Richard Guenther wrote: >> On Fri, Jun 15, 2012 at 3:13 PM, Ulrich Weigand wrote: >> > However, there is a second case where we need to check every pass: if >> > we're not actually vectorizing any loop, but are performing basic-block >> > S

Re: [PATCH] Fix PR tree-optimization/53636 (SLP generates invalid misaligned access)

2012-06-15 Thread Ulrich Weigand
Richard Guenther wrote: > On Fri, Jun 15, 2012 at 3:13 PM, Ulrich Weigand wrote: > > However, there is a second case where we need to check every pass: if > > we're not actually vectorizing any loop, but are performing basic-block > > SLP. In this case, it would appear that we need the same check

Re: [PATCH] Fix PR tree-optimization/53636 (SLP generates invalid misaligned access)

2012-06-15 Thread Richard Guenther
On Fri, Jun 15, 2012 at 3:13 PM, Ulrich Weigand wrote: > Hello, > > PR tree-optimization/53636 is a crash due to an invalid unaligned access > generated by the vectorizer. > > The problem is that vect_compute_data_ref_alignment uses DR_ALIGNED_TO > as computed by the default data-ref analysis to d

[PATCH] Fix PR tree-optimization/53636 (SLP generates invalid misaligned access)

2012-06-15 Thread Ulrich Weigand
Hello, PR tree-optimization/53636 is a crash due to an invalid unaligned access generated by the vectorizer. The problem is that vect_compute_data_ref_alignment uses DR_ALIGNED_TO as computed by the default data-ref analysis to decide whether an access is sufficiently aligned for the vectorizer.