omp-low: Assume anything aligned to BIGGEST_ALIGNMENT is aligned.
authorRichard Henderson <rth@redhat.com>
Sun, 27 Nov 2011 00:01:04 +0000 (16:01 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Sun, 27 Nov 2011 00:01:04 +0000 (16:01 -0800)
        * omp-low.c (expand_omp_atomic): Assume anything aligned to
        BIGGEST_ALIGNMENT is aligned.

From-SVN: r181748

gcc/ChangeLog
gcc/omp-low.c

index 7b81a0e1d9edce530b241b6d57db0b2509538185..5d304c89026327da074000b1a7db4ea8e1fd79a4 100644 (file)
@@ -1,3 +1,8 @@
+2011-11-26  Richard Henderson  <rth@redhat.com>
+
+       * omp-low.c (expand_omp_atomic): Assume anything aligned to
+       BIGGEST_ALIGNMENT is aligned.
+
 2011-11-26  Richard Henderson  <rth@redhat.com>
 
        * config/m68k/m68k.md (UNSPECV_CAS_1, UNSPECV_CAS_2): New.
index a4bfb8413fe9ce151f61488ed8e3ae6d9859dd7a..4e1c2badae35738faf55fc631abf952174cea743 100644 (file)
@@ -5501,7 +5501,9 @@ expand_omp_atomic (struct omp_region *region)
       unsigned int align = TYPE_ALIGN_UNIT (type);
 
       /* __sync builtins require strict data alignment.  */
-      if (exact_log2 (align) >= index)
+      /* ??? Assume BIGGEST_ALIGNMENT *is* aligned.  */
+      if (exact_log2 (align) >= index
+         || align * BITS_PER_UNIT >= BIGGEST_ALIGNMENT)
        {
          /* Atomic load.  */
          if (loaded_val == stored_val