https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108552
--- Comment #31 from Linus Torvalds <torva...@linux-foundation.org> --- (In reply to Richard Biener from comment #26) > > Now, in principle we should have applied store-motion and not only PRE which > would have avoided the issue, not tricking the RA into reloading the value > from where we store it in the loop, but the kernel uses -fno-tree-loop-im, > preventing that. If you enable that you'd get Note that we use -fno-tree-loop-im only for the GCOV case, and because of another problem with code generation with gcov. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69702 and the fix for the excessive stack use was to disable that compiler option. See https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c87bf431448b404a6ef5fbabd74c0e3e42157a7f for the kernel commit message.