https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79430
--- Comment #79 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 41269 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41269&action=edit gcc7-pr79430.patch Untested patch meant for 7.x, which just modifies reg-stack.c and nothing else. Unlike the above patch which seems to affect also scheduling a lot, this one doesn't.