http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46213
Ira Rosen <irar at il dot ibm.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED AssignedTo|unassigned at gcc dot |irar at gcc dot gnu.org |gnu.org | --- Comment #4 from Ira Rosen <irar at il dot ibm.com> 2010-11-02 08:32:15 UTC --- I am testing: Index: tree-vect-loop.c =================================================================== --- tree-vect-loop.c (revision 166172) +++ tree-vect-loop.c (working copy) @@ -1800,7 +1800,11 @@ vect_is_simple_reduction_1 (loop_vec_inf simply rewriting this into "res += -x[i]". Avoid changing gimple instruction for the first simple tests and only do this if we're allowed to change code at all. */ - if (code == MINUS_EXPR && modify) + if (code == MINUS_EXPR + && modify + && (op1 = gimple_assign_rhs1 (def_stmt)) + && TREE_CODE (op1) == SSA_NAME + && SSA_NAME_DEF_STMT (op1) == phi) code = PLUS_EXPR; if (check_reduction