https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118615
--- Comment #13 from Surya Kumari Jangala <jskumari at gcc dot gnu.org> --- Created attachment 60251 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60251&action=edit r15-2810 plus fix for xstormy16-elf issue Hello Andrew, Just wanted to let you know that I made a small change to r15-2810 to fix a compile time regression on xstormy16-elf. The regression was pointed out by Jeff Law. Please see https://gcc.gnu.org/pipermail/gcc-patches/2024-August/660028.html The compile time regression is happening because LRA pass is taking a lot of time. LRA consists of several stages and all the stages are repeated till the RTL reaches a stable state, ie, no more changes occur in the RTL. But with r15-2810, the stable state is not being reached. I made a small change to r15-2810 that fixes this compile time regression. The change is to move the caller-save register spill insn before the call insn only if the write insn (ie, the insn that writes to a pseudo which has been assigned a caller-save reg) and the call insn belong to separate basic blocks. I did not really check why this fix is enabling LRA to reach stable state. I have attached the patch containing the fix.