OSDN Git Service

omp-low: Assume anything aligned to BIGGEST_ALIGNMENT is aligned.
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 27 Nov 2011 00:01:04 +0000 (00:01 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 27 Nov 2011 00:01:04 +0000 (00:01 +0000)
        * omp-low.c (expand_omp_atomic): Assume anything aligned to
        BIGGEST_ALIGNMENT is aligned.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181748 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/omp-low.c

index 7b81a0e..5d304c8 100644 (file)
@@ -1,5 +1,10 @@
 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.
        (UNSPECV_TAS_1, UNSPECV_TAS_2): New.
        (I): New mode iterator.
index a4bfb84..4e1c2ba 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