aboutsummaryrefslogtreecommitdiff
path: root/gcc/match.pd
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2024-10-25 12:38:24 +0200
committerRichard Biener <rguenth@gcc.gnu.org>2024-10-25 13:44:33 +0200
commit35c3aac80e7a18c32436259143cba0f47bd0cb5a (patch)
tree1bcbfc83788e8145c96427a0696cadcb6451e213 /gcc/match.pd
parenta0e37a6bf6e13968ddad3560213eece4baa34bee (diff)
downloadgcc-35c3aac80e7a18c32436259143cba0f47bd0cb5a.zip
gcc-35c3aac80e7a18c32436259143cba0f47bd0cb5a.tar.gz
gcc-35c3aac80e7a18c32436259143cba0f47bd0cb5a.tar.bz2
Default expand_vec_cond_expr_p code to ERROR_MARK
As we want to transition to only vcond_mask expanders the following makes it possible to easier distinguish queries that rely on vcond queries for expand_vec_cond_expr_p from those of vcond_mask by for the latter having the comparison code defaulted to ERROR_MARK. * optabs-tree.h (expand_vec_cond_expr_p): Default the comparison code to ERROR_MARK. * match.pd: Remove unneded expand_vec_cond_expr_p args. * tree-vect-generic.cc (expand_vector_condition): Likewise. * tree-vect-loop.cc (vect_reduction_update_partial_vector_usage): Likewise. * tree-vect-stmts.cc (vectorizable_simd_clone_call): Likewise. (scan_store_can_perm_p): Likewise. (vectorizable_condition): Likewise.
Diffstat (limited to 'gcc/match.pd')
-rw-r--r--gcc/match.pd17
1 files changed, 7 insertions, 10 deletions
diff --git a/gcc/match.pd b/gcc/match.pd
index 93536a3..e622ccb 100644
--- a/gcc/match.pd
+++ b/gcc/match.pd
@@ -411,7 +411,7 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
tree ones = build_all_ones_cst (vec_cmp_type);
}
(if (expand_vec_cmp_expr_p (vec_cmp_type, vec_truth_type, LT_EXPR)
- && expand_vec_cond_expr_p (vec_cmp_type, vec_truth_type, LT_EXPR))
+ && expand_vec_cond_expr_p (vec_cmp_type, vec_truth_type))
(view_convert:type (vec_cond (lt:vec_truth_type
(view_convert:vec_cmp_type @0)
{ zeros; })
@@ -5805,13 +5805,12 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
(if (VECTOR_TYPE_P (type)
&& (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))
|| (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))))
+ && !expand_vec_cond_expr_p (TREE_TYPE (@1), TREE_TYPE (@0)))))
(vec_cond @0 (op! @1 @3) (op! @2 @4))))
/* (c ? a : b) op d --> c ? (a op d) : (b op d) */
@@ -5820,20 +5819,18 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
(if (VECTOR_TYPE_P (type)
&& (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))
|| (optimize_vectors_before_lowering_p ()
- && !expand_vec_cond_expr_p (TREE_TYPE (@1),
- TREE_TYPE (@0), ERROR_MARK))))
+ && !expand_vec_cond_expr_p (TREE_TYPE (@1), TREE_TYPE (@0)))))
(vec_cond @0 (op! @1 @3) (op! @2 @3))))
(simplify
(op @3 (vec_cond:s @0 @1 @2))
(if (VECTOR_TYPE_P (type)
&& (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))
|| (optimize_vectors_before_lowering_p ()
- && !expand_vec_cond_expr_p (TREE_TYPE (@1),
- TREE_TYPE (@0), ERROR_MARK))))
+ && !expand_vec_cond_expr_p (TREE_TYPE (@1), TREE_TYPE (@0)))))
(vec_cond @0 (op! @3 @1) (op! @3 @2)))))
#if GIMPLE