vectorization, scheduling and aliasing

roy rosen
Tue Apr 27 08:04:00 GMT 2010


I have looked a bit more and tried also ia-64 and bfin and actually I
can't find a single example where vectorized code using __restrict__
variables would break the dependency between stores and loads.

for this simple program:

unsigned short xxx(unsigned short* __restrict__ a, unsigned short*
__restrict__ b)
   int i;
   for (i = 0; i < 8; i++)
       a[i] = b[i];
   return 0;

After unrolling and vectorization I get for all architectures that
there is a dependency between the first store (to a) and the second
load (from b).
since these are restrict variables I think this behavior is incorrect.

Can someone please show me such an example? Or is this feature not yet

Thanks, Roy.

More information about the Gcc mailing list