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

--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-16 branch has been updated by Max Filippov
<[email protected]>:

https://gcc.gnu.org/g:268858a01895f7cd184c21a5cb07bd06608e9947

commit r16-9724-g268858a01895f7cd184c21a5cb07bd06608e9947
Author: Alexey Lapshin <[email protected]>
Date:   Mon Sep 28 23:59:53 2026 +0700

    xtensa: Don't index reg_renumber before LRA in xt_true_regnum

    xt_true_regnum is used by move expanders and insn conditions, which
    IRA invokes through emit_move_insn and recog_memoized when emitting
    moves for regional allocation.  At that point reg_renumber has not
    been resized to cover the new pseudos, so indexing it reads out of
    bounds.  Before LRA starts reg_renumber holds no final assignments,
    so only consult it once LRA is in progress or reload has completed.

    gcc/ChangeLog:
            PR target/107549

            * config/xtensa/xtensa.cc (xt_true_regnum): Don't index
            reg_renumber before LRA starts.

    (cherry picked from commit cd15f0e559442c9b387d3cb7c6ce07d7109b825e)

Reply via email to