https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61837
--- Comment #8 from Segher Boessenkool <segher at gcc dot gnu.org> --- -funswitch-loops changes things like for (...) { if (...) ...1; else ...2; } into if (...) { for (...) ...1; } else { for (...) ...2; } which often is not a good idea. This is why this is not done at -O2: -O2 is only for optimisations that almost never hurt performance.