On 9/28/26 8:13 AM, Robin Dapp wrote:
Hi, Lower-subreg decomposes concatn subregs. Since the regmode-natural-size changes we could trigger an ICE by insisting the inner mode of such a subreg 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). Bootstrapped and regtested on x86, power10, and aarch64. Regtested on risc64. Regards Robin 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. ---
OK jeff
