This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/49157] Unnecessary stack save/restore code generated for a leaf function (arm-elf-gcc)


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49157

Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.06.01 19:56:05
                 CC|                            |ramana at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #1 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> 2011-06-01 19:56:05 UTC ---
With an arm-linux-gnueabi toolchain I see the following code - it's pointless
creating space on the stack in this case. 

foo:
    @ args = 0, pretend = 0, frame = 8
    @ frame_needed = 0, uses_anonymous_args = 0
    @ link register save eliminated.
    add    r0, r0, r0, lsr #16
    sub    sp, sp, #8
    sxth    r0, r0
    add    sp, sp, #8
    bx    lr


Possibly related to PR36409.

Ramana


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]