This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PR 19893 & array_ref bug
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: mark at codesourcery dot com, gdr at integrable-solutions dot net,Joe dot Buck at synopsys dot COM
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 16 Mar 2005 11:43:58 -0800 (PST)
- Subject: Re: PR 19893 & array_ref bug
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.
It seems like we are lying about the alignment of the pa, pb, pc
arguments but I don't see a way around this. If we changed GCC to pad
the array elements (in order to obey the alignment request) wouldn't we
actually break our ability to vectorize things?
Steve Ellcey
sje@cup.hp.com
*** vect-56.c.orig Wed Mar 16 11:38:49 2005
--- vect-56.c Wed Mar 16 11:39:46 2005
*************** main1 (afloat * __restrict__ pa, afloat
*** 40,48 ****
int main (void)
{
int i;
! afloat a[N];
! afloat b[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57};
! afloat c[N] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
check_vect ();
--- 40,50 ----
int main (void)
{
int i;
! float a[N] __attribute__ ((__aligned__(16)));
! float b[N] __attribute__ ((__aligned__(16))) =
! {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57};
! float c[N] __attribute__ ((__aligned__(16))) =
! {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
check_vect ();