aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-stmts.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-vect-stmts.c')
-rw-r--r--gcc/tree-vect-stmts.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index 0ef4696..d71552296 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -10802,8 +10802,6 @@ vect_analyze_stmt (vec_info *vinfo,
if (STMT_VINFO_RELEVANT_P (stmt_info))
{
- tree type = gimple_expr_type (stmt_info->stmt);
- gcc_assert (!VECTOR_MODE_P (TYPE_MODE (type)));
gcall *call = dyn_cast <gcall *> (stmt_info->stmt);
gcc_assert (STMT_VINFO_VECTYPE (stmt_info)
|| (call && gimple_call_lhs (call) == NULL_TREE));
@@ -12076,11 +12074,6 @@ vect_get_vector_types_for_stmt (vec_info *vinfo, stmt_vec_info stmt_info,
"not vectorized: irregular stmt.%G", stmt);
}
- if (VECTOR_MODE_P (TYPE_MODE (gimple_expr_type (stmt))))
- return opt_result::failure_at (stmt,
- "not vectorized: vector stmt in loop:%G",
- stmt);
-
tree vectype;
tree scalar_type = NULL_TREE;
if (group_size == 0 && STMT_VINFO_VECTYPE (stmt_info))
@@ -12130,6 +12123,12 @@ vect_get_vector_types_for_stmt (vec_info *vinfo, stmt_vec_info stmt_info,
if (dump_enabled_p ())
dump_printf_loc (MSG_NOTE, vect_location, "vectype: %T\n", vectype);
}
+
+ if (scalar_type && VECTOR_MODE_P (TYPE_MODE (scalar_type)))
+ return opt_result::failure_at (stmt,
+ "not vectorized: vector stmt in loop:%G",
+ stmt);
+
*stmt_vectype_out = vectype;
/* Don't try to compute scalar types if the stmt produces a boolean
@@ -12140,8 +12139,8 @@ vect_get_vector_types_for_stmt (vec_info *vinfo, stmt_vec_info stmt_info,
/* The number of units is set according to the smallest scalar
type (or the largest vector size, but we only support one
vector size per vectorization). */
- HOST_WIDE_INT dummy;
- scalar_type = vect_get_smallest_scalar_type (stmt_info, &dummy, &dummy);
+ scalar_type = vect_get_smallest_scalar_type (stmt_info,
+ TREE_TYPE (vectype));
if (scalar_type != TREE_TYPE (vectype))
{
if (dump_enabled_p ())