https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107006
--- Comment #11 from H. Peter Anvin <hpa at zytor dot com> --- If you look at the output, you see that the loops are already fully unrolled (at considerable code size cost.) Unfortunately, since the issue at hand is dealing with code written to be portable, adding gcc-specific hacks are not really a reasonable option.