+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
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);
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. */