Re: [PATCH] Fix another of the PR65930 reduction cases

2019-10-29 Thread Richard Biener
On Tue, 29 Oct 2019, Bernhard Reutner-Fischer wrote: > On 29 October 2019 10:36:47 CET, Richard Biener wrote: > >On Tue, 29 Oct 2019, Bernhard Reutner-Fischer wrote: > > > > > >Unfortunately it's not semantically equivalent ;) I could indeed > >break once cnt reaches 2 but not sure if it's wor

Re: [PATCH] Fix another of the PR65930 reduction cases

2019-10-29 Thread Bernhard Reutner-Fischer
On 29 October 2019 10:36:47 CET, Richard Biener wrote: >On Tue, 29 Oct 2019, Bernhard Reutner-Fischer wrote: > >Unfortunately it's not semantically equivalent ;) I could indeed >break once cnt reaches 2 but not sure if it's worth the ugliness ;) I managed to read cnt == 1 ;) So yep, not worth

Re: [PATCH] Fix another of the PR65930 reduction cases

2019-10-29 Thread Richard Biener
On Tue, 29 Oct 2019, Bernhard Reutner-Fischer wrote: > On Mon, 28 Oct 2019 14:55:37 +0100 (CET) > Richard Biener wrote: > > > Index: gcc/tree-vect-loop.c > > === > > --- gcc/tree-vect-loop.c(revision 277517) > > +++ gcc/tree-vec

Re: [PATCH] Fix another of the PR65930 reduction cases

2019-10-29 Thread Bernhard Reutner-Fischer
On Mon, 28 Oct 2019 14:55:37 +0100 (CET) Richard Biener wrote: > Index: gcc/tree-vect-loop.c > === > --- gcc/tree-vect-loop.c (revision 277517) > +++ gcc/tree-vect-loop.c (working copy) > @@ -2690,6 +2689,20 @@ pop: >

[PATCH] Fix another of the PR65930 reduction cases

2019-10-28 Thread Richard Biener
For the new testcase we end up using an indermediate value of the reduction chain as reduction result. This can be easily supported by generating epilogues for (poossibly multiple) intermediate values. For this to work the following relaxes cycle detection to allow out-of-loop uses plus it make