vectorization of non consecutive data-accesses
Ira Rosen
IRAR@il.ibm.com
Mon Nov 16 12:44:00 GMT 2009
gcc-help-owner@gcc.gnu.org wrote on 16/11/2009 14:09:06:
> Fahimeh Yazdanpanah <fahim_yazdan@yahoo.com>
> Sent by: gcc-help-owner@gcc.gnu.org
>
> 16/11/2009 14:09
>
> To
>
> gcc-help@gcc.gnu.org
>
> cc
>
> 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];
> }
This one is not vectorizable on sse with 4.3 since the relevant
permutations were not supported then. The sse support was added to GCC 4.4.
I checked that the current trunk vectorizes this loop.
>
> for (i = 0; i < N; i+=4){
> a[i]=b[i];
>
> but these loops were not vectorized. Please tell me what I did wrong?
This loop contains not consecutive store with gap, which is not supported
for now.
Ira
>
>
> Thanks a lot,
> Fahimeh
>
>
>
More information about the Gcc-help
mailing list