This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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 ...





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]