summaryrefslogtreecommitdiff
path: root/gcc/tree-vect-analyze.c
diff options
context:
space:
mode:
authorirar <irar@138bc75d-0d04-0410-961f-82ee72b054a4>2007-10-24 07:51:09 +0000
committerirar <irar@138bc75d-0d04-0410-961f-82ee72b054a4>2007-10-24 07:51:09 +0000
commit71a495a26422eda3b10183903fa3600cdc410786 (patch)
treebe49be44f7fe1b474532f24bb801a3fab5d4758b /gcc/tree-vect-analyze.c
parent57dc7a828e7e3425f638a3b760c934b2dfc6eebd (diff)
downloadgcc-71a495a26422eda3b10183903fa3600cdc410786.tar.gz
* tree-vect-analyze.c (vect_build_slp_tree): Return false if
vectype cannot be determined for the scalar type. (vect_analyze_slp_instance): Likewise. * tree-vect-transform.c (vect_model_reduction_cost): Change the return type to bool. Return false if vectype cannot be determined for the scalar type. (vect_get_constant_vectors): Return false if vectype cannot be determined for the scalar type. (get_initial_def_for_induction, vect_get_vec_def_for_operand, get_initial_def_for_reduction, vect_create_epilog_for_reduction, vectorizable_reduction): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@129598 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vect-analyze.c')
-rw-r--r--gcc/tree-vect-analyze.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/tree-vect-analyze.c b/gcc/tree-vect-analyze.c
index ff81f9d033f..8975e64ab71 100644
--- a/gcc/tree-vect-analyze.c
+++ b/gcc/tree-vect-analyze.c
@@ -2682,6 +2682,16 @@ vect_build_slp_tree (loop_vec_info loop_vinfo, slp_tree *node,
scalar_type = TREE_TYPE (GIMPLE_STMT_OPERAND (stmt, 0));
vectype = get_vectype_for_scalar_type (scalar_type);
+ if (!vectype)
+ {
+ if (vect_print_dump_info (REPORT_SLP))
+ {
+ fprintf (vect_dump, "Build SLP failed: unsupported data-type ");
+ print_generic_expr (vect_dump, scalar_type, TDF_SLIM);
+ }
+ return false;
+ }
+
gcc_assert (LOOP_VINFO_VECT_FACTOR (loop_vinfo));
vectorization_factor = LOOP_VINFO_VECT_FACTOR (loop_vinfo);
ncopies = vectorization_factor / TYPE_VECTOR_SUBPARTS (vectype);
@@ -2987,6 +2997,16 @@ vect_analyze_slp_instance (loop_vec_info loop_vinfo, tree stmt)
/* FORNOW: multiple types are not supported. */
scalar_type = TREE_TYPE (DR_REF (STMT_VINFO_DATA_REF (vinfo_for_stmt (stmt))));
vectype = get_vectype_for_scalar_type (scalar_type);
+ if (!vectype)
+ {
+ if (vect_print_dump_info (REPORT_SLP))
+ {
+ fprintf (vect_dump, "Build SLP failed: unsupported data-type ");
+ print_generic_expr (vect_dump, scalar_type, TDF_SLIM);
+ }
+ return false;
+ }
+
nunits = TYPE_VECTOR_SUBPARTS (vectype);
vectorization_factor = LOOP_VINFO_VECT_FACTOR (loop_vinfo);
ncopies = vectorization_factor / nunits;