[Bug middle-end/46932] Inefficient code sequence to access local variable
wilco at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jul 26 10:49:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46932
--- Comment #5 from Wilco <wilco at gcc dot gnu.org> ---
Author: wilco
Date: Wed Jul 26 10:49:17 2017
New Revision: 250564
URL: https://gcc.gnu.org/viewcvs?rev=250564&root=gcc&view=rev
Log:
Fix PR46932: Block auto increment on frame pointer
Block auto increment on frame pointer references. This is never
beneficial since the SFP expands into SP+C or FP+C during register
allocation. The generated code for the testcase is now as expected:
str x30, [sp, -32]!
strb w0, [sp, 31]
add x0, sp, 31
bl foo3
ldr x30, [sp], 32
ret
gcc/
PR middle-end/46932
* auto-inc-dec.c (parse_add_or_inc): Block autoinc on sfp.
gcc/testsuite/
PR middle-end/46932
* gcc.dg/pr46932.c: New testcase.
Added:
trunk/gcc/testsuite/gcc.dg/pr46932.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/auto-inc-dec.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list