------- Comment #19 from bonzini at gnu dot org 2007-12-19 12:13 ------- Created an attachment (id=14792) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14792&action=view) patch to almost fix the bug
With this patch: 1) local-alloc first tries to allocate registers that go into small classes 2) regclass tries to use the same class for an output and an input that dies 3) i386 modes_tiable_p allows tying SImode with DImode (but not vice versa) I get now this: pushl %esi pushl %ebx movl 12(%esp), %ecx movl 20(%esp), %eax movl 24(%esp), %ebx imull %ecx, %ebx movl 16(%esp), %esi imull %eax, %esi addl %esi, %ebx mull %ecx leal (%ebx,%edx), %edx popl %ebx popl %esi which has no moves. It still spills two registers because it is not able to use %edx (I'll look into it later). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17236