https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109362
--- Comment #4 from Barry Revzin ---
Awesome!
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109362
--- Comment #3 from Jakub Jelinek ---
Reduced C testcase would be
struct S { long a, b; };
int
foo (struct S *v)
{
while (1)
{
__atomic_load_n (&v->a, __ATOMIC_ACQUIRE);
if (__atomic_load_n (&v->b, __ATOMIC_ACQUIRE))
r
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109362
Jakub Jelinek changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109362
--- Comment #1 from Barry Revzin ---
Sorry, in this reduced example, it doesn't actually consume an extra register -
only rdi is used.
In this slightly less reduced example:
#include
struct S {
std::atomic size;
std::atomic read_ptr