https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85287
--- Comment #5 from Segher Boessenkool <segher at gcc dot gnu.org> --- Author: segher Date: Tue Apr 10 21:37:34 2018 New Revision: 259299 URL: https://gcc.gnu.org/viewcvs?rev=259299&root=gcc&view=rev Log: rs6000: Fix stack clash for big residuals (PR85287) The stack clash protection code had a logic error in how it decided whether to put the final update size in a register, or to emit it directly in an insn. This fixes it. It also tidies some surrounding code. PR target/85287 * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size for stack clash protection in a register whenever we need it to be in a register. Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/rs6000.md