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

--- Comment #11 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Richard Sandiford <rsand...@gcc.gnu.org>:

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

commit r14-8518-gaeec7d87a28ac80c64ebfa88cef3dccee3ba8efc
Author: Richard Sandiford <richard.sandif...@arm.com>
Date:   Tue Jan 30 09:30:35 2024 +0000

    aarch64: Handle debug references to removed registers [PR113636]

    In this PR, we entered early-ra with quite a bit of dead code.
    The code was duly removed (to avoid wasting registers), but there
    was a dangling reference in debug instructions, which caused an
    ICE later.

    Fixed by resetting a debug instruction if it references a register
    that is no longer needed by non-debug instructions.

    gcc/
            PR target/113636
            * config/aarch64/aarch64-early-ra.cc (early_ra::replace_regs): Take
            the containing insn as an extra parameter.  Reset debug
instructions
            if they reference a register that is no longer used by real insns.
            (early_ra::apply_allocation): Update calls accordingly.

    gcc/testsuite/
            PR target/113636
            * go.dg/pr113636.go: New test.

Reply via email to