On 18/08/11 06:56, Ira Rosen wrote:
How can I tell the vectoriser that a input is a multiple of something?
Unfortunately, I don't think you can.

I think you can do something like this:

void multiple(struct image * __restrict dst, struct image * __restrict
src, int h)
{
   if (h & 0xf)
     __gcc_unreachable ();

   for (int i = 0; i < h; i++) {
       dst->d[i] = A*src->d[i] + B*src->d[i+1];
   }
}

[Just off the top of my head - you'd have to check the syntax for gcc_unreachable.]

That should allow the value range propagation to do the right thing whilst inserting no real code, but whether that's properly hooked into vectorization I have no idea?

Andrew

_______________________________________________
linaro-toolchain mailing list
linaro-toolchain@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-toolchain

Reply via email to