Skip to content

Commit

Permalink
Merge pull request #8621 from ggouaillardet/topic/gcc_builtin_workaround
Browse files Browse the repository at this point in the history
gcc_builtin: fix performance regression on x86_64
  • Loading branch information
hjelmn authored Mar 16, 2021
2 parents bf60e2e + d7e3f87 commit 2383393
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions opal/include/opal/sys/gcc_builtin/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
* Copyright (c) 2014-2018 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2016-2017 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2016-2021 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2018 Triad National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
Expand Down Expand Up @@ -61,9 +61,8 @@ static inline void opal_atomic_rmb(void)
{
#if OPAL_ASSEMBLY_ARCH == OPAL_X86_64
/* work around a bug in older gcc versions where ACQUIRE seems to get
* treated as a no-op instead of being equivalent to
* __asm__ __volatile__("": : :"memory") */
__atomic_thread_fence (__ATOMIC_SEQ_CST);
* treated as a no-op instead */
__asm__ __volatile__("": : :"memory");
#else
__atomic_thread_fence (__ATOMIC_ACQUIRE);
#endif
Expand Down

0 comments on commit 2383393

Please sign in to comment.