https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77308
--- Comment #46 from Richard Earnshaw <rearnsha at gcc dot gnu.org> --- (In reply to wilco from comment #44) > (In reply to Bernd Edlinger from comment #38) > > Created attachment 39939 [details] > > proposed patch, v2 > > > > > Unlike the previous patch, thumb1 stack usage stays at 1588 bytes, > > because thumb1 cannot split the adddi3 pattern, once it is emitted. > > We can split into a new pattern that contains adds/adc together. Splitting > should help Thumb-1 the most as it has just 3 allocatable DI mode > registers... Not on Thumb-1 we can't. Because of register allocation limitations, we cannot expose the flags until after register allocation has completed. (Since the register allocator needs to be able to insert loads, adds and copy instructions between any two insns. The add and copy instructions clobber the flags, making early splitting impossible.