Re: [PATCH/RFC] Make loop-header-copying more aggressive, rerun before tree-if-conversion

2015-07-01 Thread Jeff Law
On 06/30/2015 10:04 AM, Alan Lawrence wrote: Jeff Law wrote: Thanks. Does running the phi-only propagator after the loop header copying help? At first glance it would seem that it ought to propagate the values of those degenerate PHIs then eliminate those PHIs. It was written to cleanup

Re: [PATCH/RFC] Make loop-header-copying more aggressive, rerun before tree-if-conversion

2015-06-30 Thread Alan Lawrence
Jeff Law wrote: Thanks. Does running the phi-only propagator after the loop header copying help? At first glance it would seem that it ought to propagate the values of those degenerate PHIs then eliminate those PHIs. It was written to cleanup after jump threading which has a tendency to

Re: [PATCH/RFC] Make loop-header-copying more aggressive, rerun before tree-if-conversion

2015-06-23 Thread Jeff Law
On 06/19/2015 11:38 AM, Alan Lawrence wrote: Jeff Law wrote: On 05/22/2015 09:42 AM, Alan Lawrence wrote: This patch does so (and makes slightly less conservative, to tackle the example above). I found I had to make this a separate pass, so that the phi nodes were cleaned up at the end of the

Re: [PATCH/RFC] Make loop-header-copying more aggressive, rerun before tree-if-conversion

2015-06-19 Thread Alan Lawrence
Richard Biener wrote: Apart from Jeffs comment - the usual fix for the undesired vectorization is to put a __asm__ volatile (); in the loop. In vect-strided-a-u16-i4.c, narrowing the scope of the declaration seemed to preserve the original intent. I've been able to drop the other testsuite

Re: [PATCH/RFC] Make loop-header-copying more aggressive, rerun before tree-if-conversion

2015-06-19 Thread Alan Lawrence
Jeff Law wrote: On 05/22/2015 09:42 AM, Alan Lawrence wrote: This patch does so (and makes slightly less conservative, to tackle the example above). I found I had to make this a separate pass, so that the phi nodes were cleaned up at the end of the pass before running tree_if_conversion. What

Re: [PATCH/RFC] Make loop-header-copying more aggressive, rerun before tree-if-conversion

2015-05-28 Thread Richard Biener
On Fri, May 22, 2015 at 5:42 PM, Alan Lawrence alan.lawre...@arm.com wrote: This example which I wrote to test ifconversion, currently fails to if-convert or vectorize: int foo () { for (int i = 0; i 32 ; i++) { int m = (a[i] i) ? 5 : 4; b[i] = a[i] * m; } }

Re: [PATCH/RFC] Make loop-header-copying more aggressive, rerun before tree-if-conversion

2015-05-27 Thread Jeff Law
On 05/22/2015 09:42 AM, Alan Lawrence wrote: This patch does so (and makes slightly less conservative, to tackle the example above). I found I had to make this a separate pass, so that the phi nodes were cleaned up at the end of the pass before running tree_if_conversion. Also at this stage in

[PATCH/RFC] Make loop-header-copying more aggressive, rerun before tree-if-conversion

2015-05-22 Thread Alan Lawrence
This example which I wrote to test ifconversion, currently fails to if-convert or vectorize: int foo () { for (int i = 0; i 32 ; i++) { int m = (a[i] i) ? 5 : 4; b[i] = a[i] * m; } } ...because jump-threading in dom1 rearranged the loop into a form that neither