On 18/09/15 13:17, Richard Biener wrote:

Ok, I see.

That this case is already vectorized is because it implements MAX_EXPR,
modifying it slightly to

int foo (int *a)
{
   int val = 0;
   for (int i = 0; i < 1024; ++i)
     if (a[i] > val)
       val = a[i] + 1;
   return val;
}

makes it no longer handled by current code.


Yes. I believe the idea for the patch is to handle arbitrary expressions like

int foo (int *a)
{
   int val = 0;
   for (int i = 0; i < 1024; ++i)
     if (some_expression (i))
       val = another_expression (i);
   return val;
}

Cheers,
Alan

Reply via email to