[Bug target/107456] std::atomic::fetch_xxx generate LOCK CMPXCHG instead of simpler LOCK instructions

2022-11-01 Thread thiago at kde dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107456 --- Comment #4 from Thiago Macieira --- (In reply to Thiago Macieira from comment #3) > With the Remote Atomic Operations (RAO) of AAND, AOR and AXOR, we can do > something. Correcting myself: the RAO instructions don't give us the result back

[Bug target/107456] std::atomic::fetch_xxx generate LOCK CMPXCHG instead of simpler LOCK instructions

2022-10-31 Thread thiago at kde dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107456 Thiago Macieira changed: What|Removed |Added CC||thiago at kde dot org --- Comment #3

[Bug target/107456] std::atomic::fetch_xxx generate LOCK CMPXCHG instead of simpler LOCK instructions

2022-10-30 Thread marko.makela at mariadb dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107456 --- Comment #2 from Marko Mäkelä --- Sorry for the noise. I posted a variant of the program to https://github.com/llvm/llvm-project/issues/58685 and g++-12 is already emitting the optimal code. Example: #include bool lock_add_sete(std::atomic

[Bug target/107456] std::atomic::fetch_xxx generate LOCK CMPXCHG instead of simpler LOCK instructions

2022-10-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107456 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---