When we apply a divmod pattern this will break reductions by introducing
multiple uses of the reduction var, so avoid this pattern in reductions.
* tree-vect-patterns.cc (vect_recog_divmod_pattern): Avoid
for stmts participating in a reduction.
tree q, cst;
int prec;
- if (!is_gimple_assign (last_stmt))
+ if (!is_gimple_assign (last_stmt)
+ /* The pattern will disrupt the reduction chain with multiple uses. */
+ || vect_is_reduction (stmt_vinfo))
return NULL;
rhs_code = gimple_assign_rhs_code (last_stmt);