https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91909
--- Comment #6 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> --- Author: rsandifo Date: Fri Sep 27 08:21:37 2019 New Revision: 276175 URL: https://gcc.gnu.org/viewcvs?rev=276175&root=gcc&view=rev Log: Fix reduc_index==1 handling for COND_REDUCTION (PR91909) The then/else order of the VEC_COND_EXPRs created by vect_create_epilog_for_reduction meeds to line up with the main VEC_COND_EXPR. 2019-09-27 Richard Sandiford <richard.sandif...@arm.com> gcc/ PR tree-optimization/91909 * tree-vect-loop.c (vect_create_epilog_for_reduction): Take a reduc_index parameter. When handling COND_REDUCTION, make sure that the reduction phi operand is in the correct arm of the VEC_COND_EXPR. (vectorizable_reduction): Pass reduc_index to the above. Modified: trunk/gcc/ChangeLog trunk/gcc/tree-vect-loop.c