This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/67461] Multiple atomic stores generate a StoreLoad barrier between each one, not just at the end
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 20 Aug 2016 17:37:15 +0000
- Subject: [Bug c++/67461] Multiple atomic stores generate a StoreLoad barrier between each one, not just at the end
- Authentication-results: sourceware.org; auth=none
- Auto-submitted: auto-generated
- References: <bug-67461-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67461
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
Severity|minor |enhancement
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I should correct myself, there should be only if we have
__atomic_store(...,__ATOMIC_SEQ_CST)
__atomic_store(...,__ATOMIC_SEQ_CST)
__atomic_store(...,__ATOMIC_SEQ_CST)
This sequence can be converted into:
__atomic_store(...,__ATOMIC_RELEASE)
__atomic_store(...,__ATOMIC_RELEASE)
__atomic_store(...,__ATOMIC_SEQ_CST)