diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-11-15 12:59:37 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-11-15 12:59:37 +0000 |
commit | a38b8c3e9575c5d5eba00e4204a1d6d176ffbb8d (patch) | |
tree | a9db66aebef75033e2ff397e849c66b89273cd55 /gcc/tree-vect-stmts.c | |
parent | 7e336e21baa411b7551fc0bd4a3c82f698a95e92 (diff) | |
download | gcc-a38b8c3e9575c5d5eba00e4204a1d6d176ffbb8d.tar.gz |
2012-11-15 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 193527 using svnmerge.py
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@193531 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vect-stmts.c')
-rw-r--r-- | gcc/tree-vect-stmts.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index 2731084624c..2f4be11703b 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -5310,6 +5310,7 @@ vectorizable_condition (gimple stmt, gimple_stmt_iterator *gsi, bb_vec_info bb_vinfo = STMT_VINFO_BB_VINFO (stmt_info); VEC (tree, heap) *vec_oprnds0 = NULL, *vec_oprnds1 = NULL; VEC (tree, heap) *vec_oprnds2 = NULL, *vec_oprnds3 = NULL; + tree vec_cmp_type = vectype; if (slp_node || PURE_SLP_STMT (stmt_info)) ncopies = 1; @@ -5382,6 +5383,15 @@ vectorizable_condition (gimple stmt, gimple_stmt_iterator *gsi, && TREE_CODE (else_clause) != FIXED_CST) return false; + if (!INTEGRAL_TYPE_P (TREE_TYPE (vectype))) + { + unsigned int prec = GET_MODE_BITSIZE (TYPE_MODE (TREE_TYPE (vectype))); + tree cmp_type = build_nonstandard_integer_type (prec, 1); + vec_cmp_type = get_same_sized_vectype (cmp_type, vectype); + if (vec_cmp_type == NULL_TREE) + return false; + } + if (!vec_stmt) { STMT_VINFO_TYPE (stmt_info) = condition_vec_info_type; @@ -5488,8 +5498,8 @@ vectorizable_condition (gimple stmt, gimple_stmt_iterator *gsi, vec_then_clause = VEC_index (tree, vec_oprnds2, i); vec_else_clause = VEC_index (tree, vec_oprnds3, i); - vec_compare = build2 (TREE_CODE (cond_expr), vectype, - vec_cond_lhs, vec_cond_rhs); + vec_compare = build2 (TREE_CODE (cond_expr), vec_cmp_type, + vec_cond_lhs, vec_cond_rhs); vec_cond_expr = build3 (VEC_COND_EXPR, vectype, vec_compare, vec_then_clause, vec_else_clause); |