https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109052
--- Comment #4 from Vladimir Makarov <vmakarov at gcc dot gnu.org> --- The complete solution would be running combine pass also after LRA. I am not sure how frequently the 2nd pass will improve the code. Also probably it might create some troubles the fix of which will require another LRA pass. The most generalized solution would be an approach of combined optimizations (integrated insn scheduling, RA, and code selection) but in practice it makes the integrated optimization too complicated. Less complicated solution could be implementation of combining secondary memory reload insns in postreload pass but implementing this in LRA is better because we increase possibility to assign hard regs to other pseudos as we don't need to allocate hard register to a pseudo which goes away. So I think the current patch is probably an adequate solution.