https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103544
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P2 --- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- if (!single_defuse_cycle && !lane_reduc_code_p && reduction_type != FOLD_LEFT_REDUCTION) { stmt_vec_info tem = vect_stmt_to_vectorize (STMT_VINFO_REDUC_DEF (phi_info)); if (slp_node && REDUC_GROUP_FIRST_ELEMENT (tem)) { gcc_assert (!REDUC_GROUP_NEXT_ELEMENT (tem)); tem = REDUC_GROUP_FIRST_ELEMENT (tem); } STMT_VINFO_DEF_TYPE (vect_orig_stmt (tem)) = vect_internal_def; STMT_VINFO_DEF_TYPE (tem) = vect_internal_def; fails to work here, because we end up visiting the reduction stmt before the reduction PHI because we have a hybrid use that makes another entry into the SLP graph, reaching the reduction stmt over the backedge. But the above relies on us doing the reduction analysis on the PHI node before the analysis of the reduction stmt.