https://gcc.gnu.org/bugzilla/show_bug.cgi?id=34903
--- Comment #11 from Segher Boessenkool <segher at gcc dot gnu.org> --- lmw and stmw always restore/store r31, you cannot do multiple ranges. lswi/stwsi could help. Also, the current rs6000 code does not use lmw/stmw if that wouldn't cover all GPRs to restore.