http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50730
Ira Rosen <irar at il dot ibm.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2011-10-16 CC| |irar at il dot ibm.com Ever Confirmed|0 |1 --- Comment #1 from Ira Rosen <irar at il dot ibm.com> 2011-10-16 09:41:27 UTC --- Tested only with the vectorizer tests. Index: tree-vect-data-refs.c =================================================================== --- tree-vect-data-refs.c (revision 179789) +++ tree-vect-data-refs.c (working copy) @@ -2524,7 +2524,7 @@ vect_analyze_data_refs (loop_vec_info lo VEC (data_reference_p, heap) *datarefs; struct data_reference *dr; tree scalar_type; - bool res; + bool res, stop_bb_analysis = false; if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "=== vect_analyze_data_refs ===\n"); @@ -2579,12 +2579,19 @@ vect_analyze_data_refs (loop_vec_info lo { if (vect_print_dump_info (REPORT_UNVECTORIZED_LOCATIONS)) fprintf (vect_dump, "not vectorized: unhandled data-ref "); + return false; } stmt = DR_STMT (dr); stmt_info = vinfo_for_stmt (stmt); + if (stop_bb_analysis) + { + STMT_VINFO_VECTORIZABLE (stmt_info) = false; + continue; + } + /* Check that analysis of the data-ref succeeded. */ if (!DR_BASE_ADDRESS (dr) || !DR_OFFSET (dr) || !DR_INIT (dr) || !DR_STEP (dr)) @@ -2595,6 +2602,13 @@ vect_analyze_data_refs (loop_vec_info lo print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM); } + if (bb_vinfo) + { + STMT_VINFO_VECTORIZABLE (stmt_info) = false; + stop_bb_analysis = true; + continue; + } + return false; } @@ -2603,7 +2617,15 @@ vect_analyze_data_refs (loop_vec_info lo if (vect_print_dump_info (REPORT_UNVECTORIZED_LOCATIONS)) fprintf (vect_dump, "not vectorized: base addr of dr is a " "constant"); - return false; + + if (bb_vinfo) + { + STMT_VINFO_VECTORIZABLE (stmt_info) = false; + stop_bb_analysis = true; + continue; + } + + return false; } if (TREE_THIS_VOLATILE (DR_REF (dr))) @@ -2613,6 +2635,14 @@ vect_analyze_data_refs (loop_vec_info lo fprintf (vect_dump, "not vectorized: volatile type "); print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM); } + + if (bb_vinfo) + { + STMT_VINFO_VECTORIZABLE (stmt_info) = false; + stop_bb_analysis = true; + continue; + } + return false; } @@ -2628,6 +2658,14 @@ vect_analyze_data_refs (loop_vec_info lo "exception "); print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM); } + + if (bb_vinfo) + { + STMT_VINFO_VECTORIZABLE (stmt_info) = false; + stop_bb_analysis = true; + continue; + } + return false; } @@ -2745,6 +2783,14 @@ vect_analyze_data_refs (loop_vec_info lo "not vectorized: more than one data ref in stmt: "); print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM); } + + if (bb_vinfo) + { + STMT_VINFO_VECTORIZABLE (stmt_info) = false; + stop_bb_analysis = true; + continue; + } + return false; } @@ -2769,6 +2815,7 @@ vect_analyze_data_refs (loop_vec_info lo { /* Mark the statement as not vectorizable. */ STMT_VINFO_VECTORIZABLE (stmt_info) = false; + stop_bb_analysis = true; continue; } else