https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115042
--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Vladimir Makarov <[email protected]>: https://gcc.gnu.org/g:9a7da540b63e7d77e747b5cdd6fdbbd3954e28c8 commit r16-7745-g9a7da540b63e7d77e747b5cdd6fdbbd3954e28c8 Author: Vladimir N. Makarov <[email protected]> Date: Thu Feb 26 15:01:53 2026 -0500 [PR115042, LRA]: Postpone processing of new reload insns LRA in this PR can not find regs for asm insn which requires 11 general regs when 13 regs are available. Arm subtarget (thumb) has two stores with low and high general regs. LRA systematically chooses stores involving low regs as having less costs and there are only 8 low regs. That is because LRA (and reload) chooses (mov) insn alternatives independently from register pressure. The proposed patch postpones processing new reload insns until reload pseudos are assigned and after that considers new reload insns. Depending on the assignment LRA chooses insns involving low or high regs. Generally speaking it can change code generation in better or worse way but it should be a rare case. The patch does not contain the test as original test is too big (300KB of C code). Unfortunately cvise after 2 days of work managed to decrease the test only to 100KB file. gcc/ChangeLog: PR target/115042 * lra-int.h (lra_constraint_insn_stack_clear): New prototype. * lra.cc (lra_constraint_insn_stack2): New vector. (lra_constraint_insn_stack_clear): New function. (lra): Initialize/finalize lra_constraint_insn_stack2. * lra-constraints.cc (lra_constraints): Use lra_constraint_insn_stack_clear to postpone processing new reload insns.
