https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118089

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Earnshaw <rearn...@gcc.gnu.org>:

https://gcc.gnu.org/g:5163cf2ae14c5e7ec730ad72680564001d0d0441

commit r15-7373-g5163cf2ae14c5e7ec730ad72680564001d0d0441
Author: Richard Earnshaw <rearn...@arm.com>
Date:   Thu Dec 19 16:00:48 2024 +0000

    arm: Use POP {pc} to return when returning [PR118089]

    When generating thumb2 code,
            LDM SP!, {PC}
    is a two-byte instruction, whereas
            LDR PC, [SP], #4
    is needs 4 bytes.  When optimizing for size, or when there's no obvious
    performance benefit prefer the former.

    gcc/ChangeLog:

            PR target/118089
            * config/arm/arm.cc (thumb2_expand_return): Use LDM SP!, {PC}
            when optimizing for size, or when there's no performance benefit
over
            LDR PC, [SP], #4.
            (arm_expand_epilogue): Likewise.

Reply via email to