------- Comment #2 from irar at il dot ibm dot com  2009-06-28 10:57 -------
So, the solution is to prevent vectorization of volatile types, like in the
patch below?

Index: tree-vect-data-refs.c
===================================================================
--- tree-vect-data-refs.c       (revision 149023)
+++ tree-vect-data-refs.c       (working copy)
@@ -1896,6 +1896,14 @@ vect_analyze_data_refs (loop_vec_info lo
           return false;
         }

+      if (TYPE_VOLATILE (TREE_TYPE (DR_REF (dr))))
+        {
+          if (vect_print_dump_info (REPORT_UNVECTORIZED_LOCATIONS))
+            fprintf (vect_dump, "not vectorized: memory access of volatile "
+                                "type");
+          return false;
+        }
+
       stmt = DR_STMT (dr);
       stmt_info = vinfo_for_stmt (stmt);


-- 


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

Reply via email to