@@ -12116,7 +12116,7 @@ vectorizable_condition (vec_info *vinfo,
= STMT_VINFO_REDUC_DEF (vect_orig_stmt (stmt_info)) != NULL;
if (for_reduction)
{
- if (slp_node)
+ if (slp_node && SLP_TREE_LANES (slp_node) > 1)
return false;
reduc_info = info_for_reduction (vinfo, stmt_info);
reduction_type = STMT_VINFO_REDUC_TYPE (reduc_info);
@@ -12205,6 +12205,10 @@ vectorizable_condition (vec_info *vinfo,
cond_expr = NULL_TREE;
}
}
+ /* ??? The vectorized operand query below doesn't allow swapping
+ this way for SLP. */
+ if (slp_node)
+ return false;
std::swap (then_clause, else_clause);
}