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

--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Georg-Johann Lay <g...@gcc.gnu.org>:

https://gcc.gnu.org/g:c0f5b6caff669037444506cb6008a378356ec209

commit r14-9281-gc0f5b6caff669037444506cb6008a378356ec209
Author: Georg-Johann Lay <a...@gjlay.de>
Date:   Sun Mar 3 18:15:58 2024 +0100

    AVR: ad target/114100 - Don't print unused frame pointer adjustments.

    Without -mfuse-add, when fake reg+offset addressing is used, the
    output routines are saving some instructions when the base reg
    is unused after.  This patch adds that optimization for the case
    when the base is the frame pointer and the frame pointer adjustments
    are split away from the move insn by -mfuse-add in .split2.
       Direct usage of reg_unused_after is not possible because that
    function looks at the destination of the current insn, which won't
    work for offsetting the frame pointer in printing PLUS code.
    It can use an extended version of _reg_unused_after though.

    gcc/
            PR target/114100
            * config/avr/avr-protos.h (_reg_unused_after): Remove proto.
            * config/avr/avr.cc (_reg_unused_after): Make static.  And
            add 3rd argument to skip the current insn.
            (reg_unused_after): Adjust call of reg_unused_after.
            (avr_out_plus_1) [AVR_TINY && -mfuse-add >= 2]: Don't output
            unneeded frame pointer adjustments.

Reply via email to