(op (vec_cond:s @0 @1 @2) (vec_cond:s @0 @3 @4))
(if (TREE_CODE_CLASS (op) != tcc_comparison
|| types_match (type, TREE_TYPE (@1))
- || expand_vec_cond_expr_p (type, TREE_TYPE (@0), ERROR_MARK))
+ || expand_vec_cond_expr_p (type, TREE_TYPE (@0), ERROR_MARK)
+ || (optimize_vectors_before_lowering_p ()
+ /* The following is optimistic on the side of non-support, we are
+ missing the legacy vcond{,u,eq} cases. Do this only when
+ lowering will be able to fixup.. */
+ && !expand_vec_cond_expr_p (TREE_TYPE (@1),
+ TREE_TYPE (@0), ERROR_MARK)))
(vec_cond @0 (op! @1 @3) (op! @2 @4))))
/* (c ? a : b) op d --> c ? (a op d) : (b op d) */
(op (vec_cond:s @0 @1 @2) @3)
(if (TREE_CODE_CLASS (op) != tcc_comparison
|| types_match (type, TREE_TYPE (@1))
- || expand_vec_cond_expr_p (type, TREE_TYPE (@0), ERROR_MARK))
+ || expand_vec_cond_expr_p (type, TREE_TYPE (@0), ERROR_MARK)
+ || (optimize_vectors_before_lowering_p ()
+ && !expand_vec_cond_expr_p (TREE_TYPE (@1),
+ TREE_TYPE (@0), ERROR_MARK)))
(vec_cond @0 (op! @1 @3) (op! @2 @3))))
(simplify
(op @3 (vec_cond:s @0 @1 @2))
(if (TREE_CODE_CLASS (op) != tcc_comparison
|| types_match (type, TREE_TYPE (@1))
- || expand_vec_cond_expr_p (type, TREE_TYPE (@0), ERROR_MARK))
+ || expand_vec_cond_expr_p (type, TREE_TYPE (@0), ERROR_MARK)
+ || (optimize_vectors_before_lowering_p ()
+ && !expand_vec_cond_expr_p (TREE_TYPE (@1),
+ TREE_TYPE (@0), ERROR_MARK)))
(vec_cond @0 (op! @3 @1) (op! @3 @2)))))
#if GIMPLE