https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106210
--- Comment #6 from Segher Boessenkool <segher at gcc dot gnu.org> --- The prepare_shrink_wrap code handles only very limited very simple cases. After g:8d2d39587d94 there is another copy at this point (which is an *improvement*, it gives more freedom). I don't see how this trips up prepare_shrink_wrap though? Btw, for rs6000 this is no longer shrink-wrapped in GCC 6 already, long before that commit. It saves r3 in r31 then (was r9), and that makes requires_stack_frame_p return true (because that reg needs to be saved on the stack before use, being non-volatile and all).