diff options
author | ienkovich <ienkovich@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-11-10 12:14:19 +0000 |
---|---|---|
committer | ienkovich <ienkovich@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-11-10 12:14:19 +0000 |
commit | b602a8ec03bbd9f24433b1e0810285d0c00d4111 (patch) | |
tree | 98ceea7a2dde64ee53313efd5b9861e249694e69 /gcc/optabs-tree.c | |
parent | cf5489c1f23e5e430f4d2ed6a0422e75b682f094 (diff) | |
download | gcc-b602a8ec03bbd9f24433b1e0810285d0c00d4111.tar.gz |
gcc/
2015-11-10 Ilya Enkovich <enkovich.gnu@gmail.com>
* optabs-query.h (get_vcond_mask_icode): New.
* optabs-tree.c (expand_vec_cond_expr_p): Use
get_vcond_mask_icode for VEC_COND_EXPR with mask.
* optabs.c (expand_vec_cond_mask_expr): New.
(expand_vec_cond_expr): Use get_vcond_mask_icode
when possible.
* optabs.def (vcond_mask_optab): New.
* tree-vect-patterns.c (vect_recog_bool_pattern): Don't
generate redundant comparison for COND_EXPR.
* tree-vect-stmts.c (vect_is_simple_cond): Allow SSA_NAME
as a condition.
(vectorizable_condition): Likewise.
* tree-vect-slp.c (vect_get_and_check_slp_defs): Allow
cond_exp with no embedded comparison.
(vect_build_slp_tree_1): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230101 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/optabs-tree.c')
-rw-r--r-- | gcc/optabs-tree.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/optabs-tree.c b/gcc/optabs-tree.c index aa863cfb941..d8876199496 100644 --- a/gcc/optabs-tree.c +++ b/gcc/optabs-tree.c @@ -342,6 +342,9 @@ expand_vec_cond_expr_p (tree value_type, tree cmp_op_type) { machine_mode value_mode = TYPE_MODE (value_type); machine_mode cmp_op_mode = TYPE_MODE (cmp_op_type); + if (VECTOR_BOOLEAN_TYPE_P (cmp_op_type)) + return get_vcond_mask_icode (TYPE_MODE (value_type), + TYPE_MODE (cmp_op_type)) != CODE_FOR_nothing; if (GET_MODE_SIZE (value_mode) != GET_MODE_SIZE (cmp_op_mode) || GET_MODE_NUNITS (value_mode) != GET_MODE_NUNITS (cmp_op_mode) || get_vcond_icode (TYPE_MODE (value_type), TYPE_MODE (cmp_op_type), |