On 18/09/2015 14:53, "Alan Hayward" <alan.hayw...@arm.com> wrote:
> > >On 18/09/2015 14:26, "Alan Lawrence" <alan.lawre...@arm.com> wrote: > >>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; >>} > >Yes, that’s correct. Hopefully my new test cases should cover everything. > Attached is a new version of the patch containing all the changes requested by Richard. Thanks, Alan.
0001-Support-for-vectorizing-conditional-expressions.patch
Description: Binary data