This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
auto vectorization - should this work ?
- From: Gianni Mariani <gianni at mariani dot ws>
- To: gcc at gcc dot gnu dot org
- Date: Sun, 06 May 2007 18:14:05 +1000
- Subject: auto vectorization - should this work ?
Should the vectorizer optimizer do the right thing with this :
typedef float real;
typedef struct A
{
real a[1000];
real b[1000];
} __attribute__ ((aligned (16))) A;
void foo( A * const s )
{
int i;
for ( i=0; i<1000; ++i)
{
s->a[i]=100*s->a[i]+300*s->b[i];
}
}
gcc -S -O3 -ftree-vectorize -ftree-vectorizer-verbose=6 -m32 -msse3
xxx_optimizer.c
xxx_optimizer.c:16: note: not vectorized: can't determine dependence
between s_5->a[i_16] and s_5->a[i_16]
xxx_optimizer.c:16: note: vectorized 0 loops in function.
It appears to not ...