https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107719
Alexander Monakov <amonakov at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |amonakov at gcc dot gnu.org --- Comment #1 from Alexander Monakov <amonakov at gcc dot gnu.org> --- As you say, the inner loop is the same, and it iterates 32000 times. Most likely it crosses an instruction fetch boundary differently, try -falign-loops=32.