https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110093
--- Comment #5 from Vladimir Makarov <vmakarov at gcc dot gnu.org> --- (In reply to Georg-Johann Lay from comment #4) > > > So are you saying that the bug is actually in lower-subreg.cc ? No. lower subreg is fine. Sorry to be unclear. To generate a better code for the current test case (or analogous cases) we need live analysis on sub-register level. Currently it is done only on whole pseudo-register level. First of all DFA (data flow analysis framework) should be modified. As I showed DFA wrongly calculate that pseudo r44 lives at the start of BB2, although it is not (r44 value is not used before insn #37). It is a big job. The problem is also that the active development of DFA stopped long time ago and their developers do not work on gcc anymore. Secondly, after DFA modification RA (and may be other optimizations) should be modified to work with this information on BB-level. It is a medium size project for me and probably it would take 2-3 months of my work time. So looking at this situation, I would suggest to make -fno-split-wide-types a default for AVR target to solve this and and analogous PRs. May be it is not necessary for good performance of real avr applications. I am not user AVR and can not say how severe this problem for the real applications.