[Bug target/54841] New: Bad optimization on stack fill before call on ARM

vova7890 at mail dot ru gcc-bugzilla@gcc.gnu.org
Sat Oct 6 23:23:00 GMT 2012


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

             Bug #: 54841
           Summary: Bad optimization on stack fill before call on ARM
    Classification: Unclassified
           Product: gcc
           Version: 4.7.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: vova7890@mail.ru


GCC generating not best asm listing when before calling to function, he needs
to pass into a stack registers already setted before this, and it only needed
to pass it. Gcc passing it by str instruction. For example:

STR     R6, [SP, #4]
STR     R4, [SP]

It can be faster and smaller with this code:

STMEA   SP, {R4, R6}



---
Thanks



More information about the Gcc-bugs mailing list