This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/46932] Inefficient code sequence to access local variable
- From: "wilco at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 26 Jul 2017 10:49:49 +0000
- Subject: [Bug middle-end/46932] Inefficient code sequence to access local variable
- Auto-submitted: auto-generated
- References: <bug-46932-4@http.gcc.gnu.org/bugzilla/>
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