This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/55492] __atomic_load doesn't match ACQUIRE memory model
- From: "yvan.roux at linaro dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 14 Dec 2012 10:14:15 +0000
- Subject: [Bug middle-end/55492] __atomic_load doesn't match ACQUIRE memory model
- Auto-submitted: auto-generated
- References: <bug-55492-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55492
--- Comment #8 from Yvan Roux <yvan.roux at linaro dot org> 2012-12-14 10:14:15 UTC ---
Hi Richard,
Thanks for having applied and cleaned my patch.
Regarding this cleanup, if we want to be consistant I think we have to remove
the memory model test in expand_atomic_store (see the peace of patch below) as
the atomic_store valid memory model variants are RELAXED, SEQ_CST, and RELEASE
and that expand_mem_thread_fence doesn't emit any barrier in the RELEASE model
case.
Thanks,
Yvan
@@ -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);