https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79593
--- Comment #17 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Uroš Bizjak from comment #15) > For the remaining issue: > > mov eax, DWORD PTR [eax+4] > ... > mov DWORD PTR [esp], eax # worse than v6: spills to stack! > fld DWORD PTR [esp] # instead of 'fsubr DWORD PTR [eax+4]' > fsubrp st(2), st > > register allocator doesn't figure out that it loaded eax from [eax+4] a > couple of insns above - instead of a spill, it can access the value from the > same location. > > This is a RA regression from gcc-5. Vlad, do you think you could have a look at this? I presume wants to spill a reg to stack for "m" input and it has been loaded earlier from some other memory location that hasn't been changed in between, it should be fine to use the earlier memory location and omit the spill.