From: Richard Henderson Date: Sun, 27 Nov 2011 00:01:04 +0000 (-0800) Subject: omp-low: Assume anything aligned to BIGGEST_ALIGNMENT is aligned. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fec2ef4b687d67253426e011975c3defa7e52f29;p=gcc.git omp-low: Assume anything aligned to BIGGEST_ALIGNMENT is aligned. * omp-low.c (expand_omp_atomic): Assume anything aligned to BIGGEST_ALIGNMENT is aligned. From-SVN: r181748 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7b81a0e1d9e..5d304c89026 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-11-26 Richard Henderson + + * omp-low.c (expand_omp_atomic): Assume anything aligned to + BIGGEST_ALIGNMENT is aligned. + 2011-11-26 Richard Henderson * config/m68k/m68k.md (UNSPECV_CAS_1, UNSPECV_CAS_2): New. diff --git a/gcc/omp-low.c b/gcc/omp-low.c index a4bfb8413fe..4e1c2badae3 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -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