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

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Robin Dapp <[email protected]>:

https://gcc.gnu.org/g:87eeb9ed5d5932c4777f1a4358f21fec76cc420b

commit r17-5089-g87eeb9ed5d5932c4777f1a4358f21fec76cc420b
Author: Robin Dapp <[email protected]>
Date:   Mon Sep 28 15:21:44 2026 +0200

    lower-subreg: Don't decompose pre-existing concatns. [PR127443]

    Lower-subreg decomposes concatn subregs.  Since the regmode-natural-size
    changes we could trigger an ICE by insisting the inner mode is
    splittable into words.  But the CONCATN handling in lower-subreg is
    specifically for the CONCATNs that lower-subreg.cc itself creates, rather
    than a general operation.  For example, other parts of the file assume
    that a CONCATN has exactly two operands.  There are also other asserts
    that could trigger for preexisting CONCATNs.

    This patch sets a flag on these temporary CONCATNs to distinguish them from
    preexisting CONCATNs.  'volatil' is free and is used in a similar
    fashion by var-tracking.cc (for CONCAT rather than CONCATN).

    Co-Authored-By: Richard Sandiford <[email protected]>

            PR rtl-optimization/127443

    gcc/ChangeLog:

            * lower-subreg.cc (DECOMPOSED_REGISTER_P): New macro.
            (decompose_register): Mark decomposed.
            (resolve_reg_p): Only resolve decomposed regs.
            (resolve_subreg_p): Move.
            (simplify_subreg_concatn): Remove assert.
            (simplify_gen_subreg_concatn): Use resolve_subreg_p.
            (resolve_operand_for_swap_move_operator): Adjust assert.
            (resolve_debug): Unmark as decomposed.
            * rtl.h (struct GTY): Document usage of volatil in lower-subreg.

    gcc/testsuite/ChangeLog:

            * gcc.target/riscv/rvv/autovec/pr127443.c: New test.

Reply via email to