Patchwork [COMMITTED] Tweak to patch for PR55492

login
register
mail settings
Submitter Richard Henderson
Date Dec. 14, 2012, 4:28 p.m.
Message ID <50CB53C8.6030904@redhat.com>
Download mbox | patch
Permalink /patch/206521/
State New
Headers show

Comments

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.

Committed.


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

Patch

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);