------- Comment #9 from irar at il dot ibm dot com  2010-09-12 09:46 -------
OK, thanks. I am going to test this patch, it only checks data-refs and
function calls:

Index: tree-vect-data-refs.c
===================================================================
--- tree-vect-data-refs.c       (revision 164227)
+++ tree-vect-data-refs.c       (working copy)
@@ -2542,6 +2542,17 @@ vect_analyze_data_refs (loop_vec_info lo
       offset = unshare_expr (DR_OFFSET (dr));
       init = unshare_expr (DR_INIT (dr));

+      if (stmt_could_throw_p (stmt))
+        {
+          if (vect_print_dump_info (REPORT_UNVECTORIZED_LOCATIONS))
+            {
+              fprintf (vect_dump, "not vectorized: statement can throw an "
+                       "exception ");
+              print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
+            }
+          return false;
+        }
+
       /* Update DR field in stmt_vec_info struct.  */

       /* If the dataref is in an inner-loop of the loop that is considered for
Index: tree-vect-stmts.c
===================================================================
--- tree-vect-stmts.c   (revision 164227)
+++ tree-vect-stmts.c   (working copy)
@@ -1343,6 +1343,9 @@ vectorizable_call (gimple stmt, gimple_s
   if (TREE_CODE (gimple_call_lhs (stmt)) != SSA_NAME)
     return false;

+  if (stmt_could_throw_p (stmt))
+    return false;
+
   vectype_out = STMT_VINFO_VECTYPE (stmt_info);

   /* Process function arguments.  */

Thanks,
Ira


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45470

Reply via email to