aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-analyze.c
diff options
context:
space:
mode:
authorIra Rosen <irar@il.ibm.com>2007-10-24 07:51:09 +0000
committerIra Rosen <irar@gcc.gnu.org>2007-10-24 07:51:09 +0000
commit20e545c381eecde36210a913e013e588422a3cef (patch)
treebe49be44f7fe1b474532f24bb801a3fab5d4758b /gcc/tree-vect-analyze.c
parent6f4fd5362d14e6ca794b629befd60b7b3aa56a42 (diff)
downloadgcc-20e545c381eecde36210a913e013e588422a3cef.zip
gcc-20e545c381eecde36210a913e013e588422a3cef.tar.gz
gcc-20e545c381eecde36210a913e013e588422a3cef.tar.bz2
tree-vect-analyze.c (vect_build_slp_tree): Return false if vectype cannot be determined for the scalar type.
* 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. From-SVN: r129598
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 ff81f9d..8975e64 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;