https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111588
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- >for programs that know they are effectively always multithreaded they pay for >a runtime branch and .text segment bloat for an optimization that never >applies. The bloat is not much and the overhead for a branch compared to atomics is still not going to have a bent. I suspect you are looking into the wrong place for optimizations really.