https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84757
--- Comment #4 from Vladimir Makarov <vmakarov at gcc dot gnu.org> --- Sorry, the analysis took more time than I thought. This PR can be solved only by introducing live range analysis in LRA on **subreg level**. IRA already has such analysis and therefore it makes such allocation (a right allocation in this case) which LRA became to consider questionable after committing http://gcc.gnu.org/viewcvs/gcc?view=revision&revision=244942. If any spill happened for the test, LRA would have generated the same code by GCC as before committing the patch. So on bigger functions, LRA actually generates the same quality code as for GCC 6.3. I think the PR will be not fixed for GCC-8 because implementing sub-register live range analysis in LRA is a big job and would be risky for the release.