From: irar Date: Mon, 26 Apr 2010 06:39:27 +0000 (+0000) Subject: * tree-vectorizer.h (struct _stmt_vec_info): Add new field to X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=commitdiff_plain;h=2bb12b2ced08047bae8d57cb3345491feec5c90d * tree-vectorizer.h (struct _stmt_vec_info): Add new field to determine if the statement is vectorizable, and a macro to access it. * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Skip statements that can't be vectorized. If the analysis fails, mark the statement as unvectorizable if vectorizing basic block. (vect_compute_data_refs_alignment): Likewise. (vect_verify_datarefs_alignment): Skip statements marked as unvectorizable. Add print. (vect_analyze_group_access): Skip statements that can't be vectorized. If the analysis fails, mark the statement as unvectorizable if vectorizing basic block. (vect_analyze_data_ref_accesses, vect_analyze_data_refs): Likewise. * tree-vect-stmts.c (vectorizable_store): Fix the number of generated stmts for SLP. (new_stmt_vec_info): Initialize the new field. * tree-vect-slp.c (vect_build_slp_tree): Fail to vectorize statements marked as unvectorizable. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158719 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 52b8dd96a4f..1f40785085b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,26 @@ +2010-04-26 Ira Rosen + + * tree-vectorizer.h (struct _stmt_vec_info): Add new field to + determine if the statement is vectorizable, and a macro to + access it. + * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): + Skip statements that can't be vectorized. If the analysis + fails, mark the statement as unvectorizable if vectorizing + basic block. + (vect_compute_data_refs_alignment): Likewise. + (vect_verify_datarefs_alignment): Skip statements marked as + unvectorizable. Add print. + (vect_analyze_group_access): Skip statements that can't be + vectorized. If the analysis fails, mark the statement as + unvectorizable if vectorizing basic block. + (vect_analyze_data_ref_accesses, vect_analyze_data_refs): + Likewise. + * tree-vect-stmts.c (vectorizable_store): Fix the number of + generated stmts for SLP. + (new_stmt_vec_info): Initialize the new field. + * tree-vect-slp.c (vect_build_slp_tree): Fail to vectorize + statements marked as unvectorizable. + 2010-04-25 Joseph Myers * c-common.c (flag_isoc1x): New. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index aad791a3cb3..e0845fc7bdd 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2010-04-26 Ira Rosen + + * gcc.dg/vect/bb-slp-23.c: New test. + 2010-04-25 Joseph Myers * gcc.dg/c90-float-1.c: Also test that C1X macros are not defined. diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c index 6949ebdf873..f313294bd29 100644 --- a/gcc/tree-vect-slp.c +++ b/gcc/tree-vect-slp.c @@ -344,6 +344,19 @@ vect_build_slp_tree (loop_vec_info loop_vinfo, bb_vec_info bb_vinfo, print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM); } + /* Fail to vectorize statements marked as unvectorizable. */ + if (!STMT_VINFO_VECTORIZABLE (vinfo_for_stmt (stmt))) + { + if (vect_print_dump_info (REPORT_SLP)) + { + fprintf (vect_dump, + "Build SLP failed: unvectorizable statement "); + print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM); + } + + return false; + } + lhs = gimple_get_lhs (stmt); if (lhs == NULL_TREE) {