This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On 18/09/2015 14:53, "Alan Hayward" <Alan.Hayward@arm.com> wrote: > > >On 18/09/2015 14:26, "Alan Lawrence" <Alan.Lawrence@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.
Attachment:
0001-Support-for-vectorizing-conditional-expressions.patch
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |