https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91289
--- Comment #14 from Segher Boessenkool <segher at gcc dot gnu.org> --- Author: segher Date: Sat Oct 26 16:38:59 2019 New Revision: 277472 URL: https://gcc.gnu.org/viewcvs?rev=277472&root=gcc&view=rev Log: rs6000: Fix allocate_stack in a corner case (PR91289) When we have -fstack-limit-symbol with sysv we can end up with a non- existing instruction (you cannot add an immediate to register 0). Fix this by using register 11 instead. It might be used for something else already though, so save and restore its value around this. In optimizing compiles these extra moves are usually removed again: the restore by cprop_hardreg, and then the save by rtl_dce. PR target/91289 * config/rs6000/rs6000-logue.c (rs6000_emit_allocate_stack): Don't add an immediate to r0; use r11 instead. Save and restore r11 to r0 around this. Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/rs6000-logue.c