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

--- Comment #2 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:e21fef7da92ef36af1e1b020ae5f35ef4f3c3fce

commit r15-2102-ge21fef7da92ef36af1e1b020ae5f35ef4f3c3fce
Author: Georg-Johann Lay <a...@gjlay.de>
Date:   Thu Jul 4 12:08:34 2024 +0200

    AVR: target/90616 - Improve adding constants that are 0 mod 256.

    This patch introduces a new insn that works as an insn combine
    pattern for

       (plus:HI (zero_extend:HI (reg:QI))
                (const_0mod256_operannd:HI))

    which requires at most 2 instructions.  When the input register operand
    is already in HImode, the addhi3 printer only adds the hi8 part when
    it sees a SYMBOL_REF or CONST aligned to at least 256 bytes.
    (The CONST_INT case was already handled).

    gcc/
            PR target/90616
            * config/avr/predicates.md (const_0mod256_operand): New predicate.
            * config/avr/constraints.md (Cp8): New constraint.
            * config/avr/avr.md (*aligned_add_symbol): New insn.
            * config/avr/avr.cc (avr_out_plus_symbol) [HImode]:
            When op2 is a multiple of 256, there is no need to add / subtract
            the lo8 part.
            (avr_rtx_costs_1) [PLUS && HImode]: Return expected costs for
            new insn *aligned_add_symbol as it applies.
  • [Bug target/90616] Suboptimal c... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to