Re: [PATCH] Improve vect_create_epilog_for_reduction (PR tree-optimization/80631)

2017-12-19 Thread Richard Biener
On Mon, 18 Dec 2017, Jakub Jelinek wrote: > Hi! > > When backporting the wrong-code bugfix parts of PR80631 to 7.3, I've noticed > that we perform the optimization to use the induc_val only when reduc_fn is > IFN_REDUC_{MAX,MIN}. That is true e.g. for AVX2, but not plain SSE2, so if > we have a

Re: [PATCH] Improve vect_create_epilog_for_reduction (PR tree-optimization/80631)

2017-12-18 Thread Jeff Law
On 12/18/2017 02:50 PM, Jakub Jelinek wrote: > Hi! > > When backporting the wrong-code bugfix parts of PR80631 to 7.3, I've noticed > that we perform the optimization to use the induc_val only when reduc_fn is > IFN_REDUC_{MAX,MIN}. That is true e.g. for AVX2, but not plain SSE2, so if > we have

[PATCH] Improve vect_create_epilog_for_reduction (PR tree-optimization/80631)

2017-12-18 Thread Jakub Jelinek
Hi! When backporting the wrong-code bugfix parts of PR80631 to 7.3, I've noticed that we perform the optimization to use the induc_val only when reduc_fn is IFN_REDUC_{MAX,MIN}. That is true e.g. for AVX2, but not plain SSE2, so if we have a loop like: void foo (int *v) { int found_index =