This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
vectorization of non consecutive data-accesses
- From: Fahimeh Yazdanpanah <fahim_yazdan at yahoo dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Mon, 16 Nov 2009 04:09:06 -0800 (PST)
- Subject: 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