------- 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

Reply via email to