From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13065 invoked by alias); 2 Jul 2010 17:41:32 -0000 Received: (qmail 13000 invoked by uid 48); 2 Jul 2010 17:41:20 -0000 Date: Fri, 02 Jul 2010 17:41:00 -0000 Message-ID: <20100702174120.12999.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/40657] allocate local variables with fewer instructions In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "carrot at google dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-07/txt/msg00230.txt.bz2 ------- Comment #10 from carrot at google dot com 2010-07-02 17:41 ------- The patch optimizes the prologue part only, the epilogue can also be enhanced. Now compile the attached test case, I get push {r0, r1, r2, lr} add r0, sp, #4 bl bar ldr r0, [sp, #4] add sp, sp, #12 pop {pc} The last two instructions can be merged as pop {r1-r3, pc} -- carrot at google dot com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40657