Re: PR 19893 & array_ref bug

2005-03-16 Thread Joseph S. Myers
On Wed, 16 Mar 2005, Steve Ellcey wrote: > But as Joseph pointed out we don't implement attributes on array > arguments so I get a warning when I try to use the __restrict__ > attribute on the array arguments. Without the __restrict__ attribute I > am sure we would not do any vectorization and th

Re: PR 19893 & array_ref bug

2005-03-16 Thread Mark Mitchell
Steve Ellcey wrote: From: Gabriel Dos Reis <[EMAIL PROTECTED]> | | Make them array arguments, instead of pointer arguments. I'm not sure | if GCC is smart enough to still vectorize them in that case, but | that's the right way to express it. An aligned array-of-floats decays | to an aligned poin

Re: PR 19893 & array_ref bug

2005-03-16 Thread Steve Ellcey
> From: Gabriel Dos Reis <[EMAIL PROTECTED]> > | > | Make them array arguments, instead of pointer arguments. I'm not sure > | if GCC is smart enough to still vectorize them in that case, but > | that's the right way to express it. An aligned array-of-floats decays > | to an aligned pointer-to-f

Re: PR 19893 & array_ref bug

2005-03-16 Thread Gabriel Dos Reis
Mark Mitchell <[EMAIL PROTECTED]> writes: | Steve Ellcey wrote: | > What do people think about this idea for changing the vect tests using | > gcc.dg/vect/vect-56.c as an example. The arguments (pa, pb, pc) would | > remain afloat type (vs. float) but the arrays would be changed from | > 'array o

Re: PR 19893 & array_ref bug

2005-03-16 Thread Joseph S. Myers
On Wed, 16 Mar 2005, Mark Mitchell wrote: > > It seems like we are lying about the alignment of the pa, pb, pc > > arguments but I don't see a way around this. > > Make them array arguments, instead of pointer arguments. I'm not sure if GCC > is smart enough to still vectorize them in that case,

Re: PR 19893 & array_ref bug

2005-03-16 Thread Mark Mitchell
Steve Ellcey wrote: What do people think about this idea for changing the vect tests using gcc.dg/vect/vect-56.c as an example. The arguments (pa, pb, pc) would remain afloat type (vs. float) but the arrays would be changed from 'array of aligned floats' to an array of floats where the actual arra

Re: PR 19893 & array_ref bug

2005-03-16 Thread Steve Ellcey
What do people think about this idea for changing the vect tests using gcc.dg/vect/vect-56.c as an example. The arguments (pa, pb, pc) would remain afloat type (vs. float) but the arrays would be changed from 'array of aligned floats' to an array of floats where the actual array itself is aligned.

Re: PR 19893 & array_ref bug

2005-03-16 Thread Mark Mitchell
Gabriel Dos Reis wrote: Mark Mitchell <[EMAIL PROTECTED]> writes: | Joe Buck wrote: | > On Tue, Mar 15, 2005 at 04:42:03PM -0800, Steve Ellcey wrote: | > | >>The simplest solution would probably be to ignore __aligned__ attributes | >>completely when we have an array. Or to do the change you sugge

Re: PR 19893 & array_ref bug

2005-03-16 Thread Gabriel Dos Reis
Mark Mitchell <[EMAIL PROTECTED]> writes: | Joe Buck wrote: | > On Tue, Mar 15, 2005 at 04:42:03PM -0800, Steve Ellcey wrote: | > | >>The simplest solution would probably be to ignore __aligned__ attributes | >>completely when we have an array. Or to do the change you suggested for | >>the vector

Re: PR 19893 & array_ref bug

2005-03-16 Thread Gabriel Dos Reis
Joe Buck <[EMAIL PROTECTED]> writes: | On Tue, Mar 15, 2005 at 04:42:03PM -0800, Steve Ellcey wrote: | > The simplest solution would probably be to ignore __aligned__ attributes | > completely when we have an array. Or to do the change you suggested for | > the vector tests and have the attribute

Re: PR 19893 & array_ref bug

2005-03-16 Thread Dorit Naishlos
> Steve Ellcey wrote: > > Most of the gcc.dg/vect/* tests contain something like: > > > >typedef float afloat __attribute__ ((__aligned__(16))); > >afloat a[N]; > > It looks like what is really intended here is to apply the alignment to > the array type. The point is that the entire ar

Re: PR 19893 & array_ref bug

2005-03-15 Thread Mark Mitchell
Joe Buck wrote: On Tue, Mar 15, 2005 at 04:42:03PM -0800, Steve Ellcey wrote: The simplest solution would probably be to ignore __aligned__ attributes completely when we have an array. Or to do the change you suggested for the vector tests and have the attribute attached to the array and not the e

Re: PR 19893 & array_ref bug

2005-03-15 Thread Joe Buck
On Tue, Mar 15, 2005 at 04:42:03PM -0800, Steve Ellcey wrote: > The simplest solution would probably be to ignore __aligned__ attributes > completely when we have an array. Or to do the change you suggested for > the vector tests and have the attribute attached to the array and not > the element t

Re: PR 19893 & array_ref bug

2005-03-15 Thread Steve Ellcey
> > The gcc.dg/compat/struct-layout problems seem to stem from > > struct-layout-1_generate.c. In generate_fields() it generates random > > types, some of these are arrays of some base type. Then based on > > another random number we might add an attribute like alignment. There > > is no check t

Re: PR 19893 & array_ref bug

2005-03-15 Thread Mark Mitchell
Steve Ellcey wrote: Most of the gcc.dg/vect/* tests contain something like: typedef float afloat __attribute__ ((__aligned__(16))); afloat a[N]; It looks like what is really intended here is to apply the alignment to the array type. The point is that the entire array has to be ap

Re: PR 19893 & array_ref bug

2005-03-15 Thread Steve Ellcey
> This program should generate an error; it's illogical. If the alignment > of the element is greater than the element size, then arrays of such a > type should be disallowed. Otherwise, stuff in either the compiler or > the program itself could make the justified assumption that things of >

Re: PR 19893 & array_ref bug

2005-03-09 Thread Mark Mitchell
Steve Ellcey wrote: I was looking at PR 19893 (gcc.dg/vect/vect-76 fails on ia64-hpux) and I think it is caused by a non-platform specific bug, though it may not cause vect-76 to fail on other platforms. I was hoping someone might be able to help me understand what is going on. Here is a cut down