<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Incorrect code generation for atomic operations if HAVE_INTEL_ATOMIC_PRIMITIVES defined"
href="https://bugs.freedesktop.org/show_bug.cgi?id=103559#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Incorrect code generation for atomic operations if HAVE_INTEL_ATOMIC_PRIMITIVES defined"
href="https://bugs.freedesktop.org/show_bug.cgi?id=103559">bug 103559</a>
from <span class="vcard"><a class="email" href="mailto:ajohnson@redneon.com" title="Adrian Johnson <ajohnson@redneon.com>"> <span class="fn">Adrian Johnson</span></a>
</span></b>
<pre>I would just use __sync_fetch_and_add(x, 0) for the get. The C++11 atomics were
added in gcc 4.7 (about 5 years ago). Anyone caring about speed should be using
a recent version of gcc.
What version of gcc were you using? Maybe the old versions that don't support
C++11 atomics do not optimize away the read.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>