The following patch fixes http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57468
The patch actually restore the LRA behaviour for x86/x86-64 before rev. 199298. The revision was added for PPC SDmode value correct generation. So it is really needed for PPC64 and badly hurts x86/x86-64 performance (by doing secondary memory reloads when one pseudo is spilled).
The patch was successfully bootstrapped and tested on x86/x86-64 (with patch for pr57459).
Although the change in i386.c, it only concerns to LRA. So I've decided to commit it without x86/x86-64 maintainer approval. May be I am wrong in this situation. If somebody objects I am ready to revert the patch and wait for an approval.
Committed as rev. 199764. 2013-06-06 Vladimir Makarov <vmaka...@redhat.com> PR rtl-optimization/57468 * config/i386/i386.c (inline_secondary_memory_needed): Ignore spilled pseudos.