This is the mail archive of the gcc-help@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]

vectorization of non consecutive data-accesses


Hello,

I used gcc for vectorization of non consecutive data-accesses.

Using gcc-4.3.3 and these flags, -O3  -ftree-vectorize -ftree-vectorizer-verbose=20 -ffast-math -mfpmath=sse -march=core2, I compiled the following loops hopefully to vectorized:

for (i = 0; i < N/2; i++){
  a[i] = b[2*i+1] * c[2*i+1] - b[2*i] * c[2*i];
  d[i] = b[2*i] * c[2*i+1] + b[2*i+1] * c[2*i];
}

for (i = 0; i < N; i+=4){
  a[i]=b[i];

but these loops were not vectorized. Please tell me what I did wrong?
   

Thanks a lot,
Fahimeh


      


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