http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47521
--- Comment #5 from Tony Poppleton <tony.poppleton at gmail dot com> 2011-02-03 14:16:01 UTC --- As a quick test, would this be fixed by re-ordering the register file to move eax above edx? If so, then another possible fix to this would be to effectively re-run the RA pass multiple times, each time using a different register file, and then select the one that produces the "best" code and discard the other RA attempts. The register files would only differ in their sort order when register costs are equal. I am guessing that only a few such register files would be needed (in particular ones where the eax is shuffled around), rather than every single possible combination of sort orders (which would be prohibitive), so this doesn't necessarily have to impact the length of compilation by much. A metric would also be needed to be able to then select the "best" version of the compiled code - possibly using number of instructions and number of registers used?