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

--- 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:083892ba18452383a1f240072d2a96dd72321a4f

commit r15-5353-g083892ba18452383a1f240072d2a96dd72321a4f
Author: Georg-Johann Lay <a...@gjlay.de>
Date:   Sat Nov 16 14:26:02 2024 +0100

    AVR: target/116781 - Fix ICE due to (clobber (match_dup)) in tablejump.

    This patch avoids (clobber (match_dup)) in insn patterns for tablejump.
    The machine description now uses a scratch_operand instead which is
    possible since the clobbered entity is known in advance:

    3-byte PC        : REG_Z
    2-byte PC + JMP  : REG_Z
    2-byte PC + RJMP : None, hence scratch:HI is used.

    The avr-casesi pass and optimization has to be adjusted to the new
patterns.

            PR target/116781
    gcc/
            * config/avr/avr.md (*tablejump_split, *tablejump): Add
            operand 2 as a "scratch_operand" instead of a match_dup.
            (casesi): Adjust expander operands accordingly.  Use a scratch:HI
            when the jump address is not clobbered.  This is the case for a
            2-byte PC + has no JMP instruction.  In all the other cases, the
            affected operand is REG_Z (reg:HI 30).
            (casesi_<mode>_sequence): Adjust matcher to new anatomy.
            * config/avr/avr-passes.cc (avr_is_casesi_sequence)
            (avr_is_casesi_sequence, avr_optimize_casesi)
            (avr_casei_sequence_check_operands): Adjust to new anatomy.

Reply via email to