diff options
author | Jakub Jelinek <jakub@redhat.com> | 2017-02-06 20:25:02 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2017-02-06 20:25:02 +0100 |
commit | dc06356ab8e628d54dbfe1f4c7a8c39aea6a06aa (patch) | |
tree | 1537510a32ad9f414098a6dfe3f93dd952b63f20 /gcc | |
parent | 176274c9bf515f3b71f00b2be71a9ee4771b271f (diff) | |
download | gcc-dc06356ab8e628d54dbfe1f4c7a8c39aea6a06aa.zip gcc-dc06356ab8e628d54dbfe1f4c7a8c39aea6a06aa.tar.gz gcc-dc06356ab8e628d54dbfe1f4c7a8c39aea6a06aa.tar.bz2 |
omp-expand.c (oxpand_omp_atomic_fetch_op, [...]): Return false if can_atomic_load_p is false.
* omp-expand.c (oxpand_omp_atomic_fetch_op,
expand_omp_atomic_pipeline): Return false if can_atomic_load_p is
false.
From-SVN: r245216
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/omp-expand.c | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7113dce..51b4859 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-02-06 Jakub Jelinek <jakub@redhat.com> + + * omp-expand.c (oxpand_omp_atomic_fetch_op, + expand_omp_atomic_pipeline): Return false if can_atomic_load_p is + false. + 2017-02-06 Segher Boessenkool <segher@kernel.crashing.org> PR rtl-optimization/68664 diff --git a/gcc/omp-expand.c b/gcc/omp-expand.c index 327c2e7..7365736 100644 --- a/gcc/omp-expand.c +++ b/gcc/omp-expand.c @@ -6241,7 +6241,7 @@ expand_omp_atomic_fetch_op (basic_block load_bb, matter is that (with the exception of i486 vs i586 and xadd) all targets that support any atomic operaton optab also implements compare-and-swap. Let optabs.c take care of expanding any compare-and-swap loop. */ - if (!can_compare_and_swap_p (imode, true)) + if (!can_compare_and_swap_p (imode, true) || !can_atomic_load_p (imode)) return false; gsi = gsi_last_bb (load_bb); @@ -6318,7 +6318,8 @@ expand_omp_atomic_pipeline (basic_block load_bb, basic_block store_bb, type = TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (addr))); itype = TREE_TYPE (TREE_TYPE (cmpxchg)); - if (!can_compare_and_swap_p (TYPE_MODE (itype), true)) + if (!can_compare_and_swap_p (TYPE_MODE (itype), true) + || !can_atomic_load_p (TYPE_MODE (itype))) return false; /* Load the initial value, replacing the GIMPLE_OMP_ATOMIC_LOAD. */ |