lkml.org 
[lkml]   [2023]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] Bridging the gap between the Linux Kernel Memory Consistency Model (LKMM) and C11/C++11 atomics
On Mon, Jul 03, 2023 at 03:20:31PM -0400, Olivier Dion wrote:
[...]
> NOTE: On x86-64, we found at least one corner case [7] with Clang where
> a RELEASE exchange is optimized to a RELEASE store, when the returned
> value of the exchange is unused, breaking the above expectations.
> Although this type of optimization respect the standard "as-if"
> statement, we question its pertinence since a user should simply do a
> RELEASE store instead of an exchange in that case. With the
> introduction of these new primitives, these type of optimizations should
> be revisited.
>

FWIW, this is actually a LLVM bug:

https://github.com/llvm/llvm-project/issues/60418

Regards,
Boqun

\
 
 \ /
  Last update: 2023-07-05 09:06    [W:2.161 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site