[Bug tree-optimization/107462] Missed optimization of std::atomic::fetch_xxx "null operations" to std::atomic::load()

2023-05-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107462

Andrew Pinski  changed:

   What|Removed |Added

   Severity|normal  |enhancement
 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1
   Last reconfirmed||2023-05-19

--- Comment #2 from Andrew Pinski  ---
Confirmed.

[Bug tree-optimization/107462] Missed optimization of std::atomic::fetch_xxx "null operations" to std::atomic::load()

2022-10-30 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107462

Andrew Pinski  changed:

   What|Removed |Added

  Component|c++ |tree-optimization
   Keywords||missed-optimization

--- Comment #1 from Andrew Pinski  ---
There might be a dup of this bug already but gcc does not try to optimize fetch
and add to just fetch if the operation was going to be a nop.