https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117933
Bug ID: 117933 Summary: [lra][avr] Increased code size / stack usage with -mlra Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: gjl at gcc dot gnu.org Target Milestone: --- Created attachment 59802 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59802&action=edit u32-to-string.c: C test case $ avr-gcc-15 -c -o x-v0.o u32-to-string.c -save-temps=obj -mmcu=atmega128 -Os $ avr-gcc-15 -c -o x-v1.o u32-to-string.c -save-temps=obj -mmcu=atmega128 -Os -mlra $ avr-size x-v0.o text data bss dec hex filename 120 0 0 120 78 x-v0.o $ avr-size x-v1.o text data bss dec hex filename 138 0 0 138 8a x-v1.o The prologue in either case is reading: u32_to_string: ; with -mno-lra (x-v0.s) push r16 push r17 push r28 /* prologue: function */ /* frame size = 0 */ /* stack size = 3 */ .L__stack_usage = 3 u32_to_string: ; with -mlra (x-v1.s) push r12 push r13 push r14 push r15 push r17 push r28 push r29 /* prologue: function */ /* frame size = 0 */ /* stack size = 7 */ .L__stack_usage = 7