https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66573
Segher Boessenkool <segher at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED CC| |segher at gcc dot gnu.org Resolution|--- |INVALID --- Comment #6 from Segher Boessenkool <segher at gcc dot gnu.org> --- bb-reorder changes the conditional branch so that the fallthrough path is the most likely. It now also does this for -O1. This is faster on essentially all processors, including the ones the OP mentions. Without profiling information showing otherwise, GCC assumes the call to bar2 is more frequent than the one to bar1 (61% vs. 39%). This is a heuristic, it might need retuning, but that needs a lot more data than this one testcase. Closing as invalid.