https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67790
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> --- Author: rguenth Date: Wed Nov 18 08:31:32 2015 New Revision: 230518 URL: https://gcc.gnu.org/viewcvs?rev=230518&root=gcc&view=rev Log: 2015-11-18 Richard Biener <rguent...@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. Added: trunk/gcc/testsuite/gcc.dg/vect/pr67790.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-vect-loop.c