https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128174
--- Comment #4 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:0014e4b6a85c0352ea76210e684f2b1151e741bd commit r17-7146-g0014e4b6a85c0352ea76210e684f2b1151e741bd Author: Vladimir N. Makarov <[email protected]> Date: Thu Dec 3 16:32:30 2026 -0500 [PR 128174][LRA]: Don't add invariant unless stack slots are shared Previous patches for PR128174 broke gcov22.c test. LRA cycles on function containing setjmp which switches off sharing stack slots. Any new stack slot induced by using a new invariant results in increasing stack frame and changing offsets. On targets with small address displacements this results into new reload insns, new invariants and new spills. To fix this we just need to switch off adding new invariants when stack slots are not shared. gcc/ChangeLog: PR middle-end/128174 * lra-constraints.cc (add_invariant): Don't add invariant unless stack slots are shared. Add debug print.
