Re: [PATCH] Relax the requirement of reduction pattern in GCC vectorizer.

2013-10-15 Thread Cong Hou
I have corrected the ChangeLog format, and committed this patch. Thank you! Cong On Tue, Oct 15, 2013 at 6:38 AM, Richard Biener wrote: > On Sat, Sep 28, 2013 at 3:28 AM, Cong Hou wrote: >> The current GCC vectorizer requires the following pattern as a simple >> reduction computation: >> >>

Re: [PATCH] Relax the requirement of reduction pattern in GCC vectorizer.

2013-10-15 Thread Richard Biener
On Sat, Sep 28, 2013 at 3:28 AM, Cong Hou wrote: > The current GCC vectorizer requires the following pattern as a simple > reduction computation: > >loop_header: > a1 = phi < a0, a2 > > a3 = ... > a2 = operation (a3, a1) > > But a3 can also be defined outside of the loop. For ex

Re: [PATCH] Relax the requirement of reduction pattern in GCC vectorizer.

2013-10-14 Thread Cong Hou
Ping... thanks, Cong On Wed, Oct 2, 2013 at 11:18 AM, Cong Hou wrote: > Ping.. Any comment on this patch? > > > thanks, > Cong > > > On Sat, Sep 28, 2013 at 9:34 AM, Xinliang David Li wrote: >> You can also add a test case of this form: >> >> int foo( int t, int n, int *dst) >> { >>int j

Re: [PATCH] Relax the requirement of reduction pattern in GCC vectorizer.

2013-10-02 Thread Cong Hou
Ping.. Any comment on this patch? thanks, Cong On Sat, Sep 28, 2013 at 9:34 AM, Xinliang David Li wrote: > You can also add a test case of this form: > > int foo( int t, int n, int *dst) > { >int j = 0; >int s = 1; >t++; >for (j = 0; j < n; j++) > { > dst[j] = t;

Re: [PATCH] Relax the requirement of reduction pattern in GCC vectorizer.

2013-09-28 Thread Xinliang David Li
You can also add a test case of this form: int foo( int t, int n, int *dst) { int j = 0; int s = 1; t++; for (j = 0; j < n; j++) { dst[j] = t; s *= t; } return s; } where without the fix the loop vectorization is missed. David On Fri, Sep 27, 2013 at

[PATCH] Relax the requirement of reduction pattern in GCC vectorizer.

2013-09-27 Thread Cong Hou
The current GCC vectorizer requires the following pattern as a simple reduction computation: loop_header: a1 = phi < a0, a2 > a3 = ... a2 = operation (a3, a1) But a3 can also be defined outside of the loop. For example, the following loop can benefit from vectorization but the G