Auto-vectorization of if-conversion

Fahimeh Yazdanpanah fahim_yazdan@yahoo.com
Thu Dec 3 15:21:00 GMT 2009


Hello,

I am trying to vectorize this loop with gcc-4.4.2 under 64-bit linux ubuntu : 

 for (i = 0; i < 1024; i++)
         d[i] = (a[i] > 0 ? b[i] : c[i]);
      
but it is not vectorized. For compiling that, I use these flags:
gcc -O3  -fprefetch-loop-arrays  -lstdc++  -ftree-vectorize -ftree-vectorizer-verbose=2 -ffast-math -mfpmath=sse -march=core2

according to http://gcc.gnu.org/projects/tree-ssa/vectorization.html, it must be vectorized. Would you please tell me what I do wrong?

Thanks in advance,
Best regards,
Fahimeh



      



More information about the Gcc-help mailing list