Just one very small point...
On 19/10/15 09:17, Alan Hayward wrote:
> - if (check_reduction
> - && (!commutative_tree_code (code) || !associative_tree_code (code)))
> + if (check_reduction)
> {
> - if (dump_enabled_p ())
> - report_vect_op (MSG_MISSED_OPTIMIZATION, def_stmt,
> - "reduction: not commutative/associative: ");
> - return NULL;
> + if (code != COND_EXPR
> + && (!commutative_tree_code (code) || !associative_tree_code (code)))
> + {
> + if (dump_enabled_p ())
> + report_vect_op (MSG_MISSED_OPTIMIZATION, def_stmt,
> + "reduction: not commutative/associative: ");
> + return NULL;
> + }
> +
> + if (code == COND_EXPR)
> + *v_reduc_type = COND_REDUCTION;
Wouldn't this be easier written as
if (code == COND_EXPR)
*v_reduc_type = COND_REDUCTION;
else if (!commutative_tree_code (code) || !associative_tree_code (code))
{...}
? Your call!
Cheers, Alan