2015-11-18 Richard Biener <rguenther@suse.de>
commitebacf0e35be407ef9edb5fb8900ebea102e77acc
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 18 Nov 2015 08:31:32 +0000 (18 08:31 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 18 Nov 2015 08:31:32 +0000 (18 08:31 +0000)
tree3dd101923b7b9075ba8cb94d8319a4457ff1823b
parent75e685eddc31039374915d69f9eeb0b40e2f1149
2015-11-18  Richard Biener  <rguenther@suse.de>

PR tree-optimization/67790
* tree-vect-loop.c (vect_is_simple_reduction_1): Remove
IL rewrite for MINUS_EXPR reductions, rename back to ...
(vect_is_simple_reduction): ... this, removing the wrapper.
(vect_force_simple_reduction): Adjust.
(vectorizable_reduction): Adjust reduc_index for MINUS_EXPR
reductions and make use if reduc_index in all places.  For
the final reduction of MINUS_EXPR use PLUS_EXPR.

* gcc.dg/vect/pr67790.c: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230518 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/pr67790.c [new file with mode: 0644]
gcc/tree-vect-loop.c