[COMMITTED] Tweak to patch for PR55492

Submitted by Richard Henderson on Dec. 14, 2012, 4:28 p.m.


Message ID 50CB53C8.6030904@redhat.com
State New
Headers show

Commit Message

Richard Henderson Dec. 14, 2012, 4:28 p.m.
Yvan noticed that the set of memory models has already been
validated by expand_builtin_atomic_store, so the test here
in expand_atomic_store is fully redundant.


* optabs.c (expand_atomic_store): Elide redundant model test.

Patch hide | download patch | download mbox

diff --git a/gcc/optabs.c b/gcc/optabs.c
index 99fd025..4f3cbb4 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -7537,8 +7537,7 @@  expand_atomic_store (rtx mem, rtx val, enum memmodel model, bool use_release)
   /* Otherwise assume stores are atomic, and emit the proper barriers.  */
-  if (model == MEMMODEL_SEQ_CST || model == MEMMODEL_RELEASE)
-    expand_mem_thread_fence (model);
+  expand_mem_thread_fence (model);
   emit_move_insn (mem, val);