From 71a495a26422eda3b10183903fa3600cdc410786 Mon Sep 17 00:00:00 2001 From: irar Date: Wed, 24 Oct 2007 07:51:09 +0000 Subject: * 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 --- gcc/tree-vect-analyze.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'gcc/tree-vect-analyze.c') 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; -- cgit v1.2.1