Hi While looking at vect_model_reduction_cost function, it seems Richard's change in a recent commit r278611 missed an update to the following if condition. Since the check for EXTRACT_LAST_REDUCTION is now split above, the same check in the if condition will never be true.
gcc/ChangeLog 2019-xx-xx Sudakshina Das <sudi....@arm.com> * tree-vect-loop.c (vect_model_reduction_cost): Remove reduction_type check from if condition. Is this ok for trunk? Thanks Sudi
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index ca8c818..7469204 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -3933,7 +3933,7 @@ vect_model_reduction_cost (stmt_vec_info stmt_info, internal_fn reduc_fn, /* No extra instructions needed in the prologue. */ prologue_cost = 0; - if (reduction_type == EXTRACT_LAST_REDUCTION || reduc_fn != IFN_LAST) + if (reduc_fn != IFN_LAST) /* Count one reduction-like operation per vector. */ inside_cost = record_stmt_cost (cost_vec, ncopies, vec_to_scalar, stmt_info, 0, vect_body);