summaryrefslogtreecommitdiff
path: root/gcc/omp-low.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2011-11-27 00:01:04 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2011-11-27 00:01:04 +0000
commit084e63568d05c56b5c0ac234c2fe80933487aa4e (patch)
tree4166641a79717454183702f3b0705dafe61b5668 /gcc/omp-low.c
parentee2d89e91305a34354bc5c5add944a3fc3e9acea (diff)
downloadgcc-084e63568d05c56b5c0ac234c2fe80933487aa4e.tar.gz
omp-low: Assume anything aligned to BIGGEST_ALIGNMENT is aligned.
* 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
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r--gcc/omp-low.c4
1 files changed, 3 insertions, 1 deletions
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