------- Comment #9 from uros at kss-loka dot si 2005-10-04 12:45 ------- The problem here is that we are out of GENERAL_REGS at the point of. This can be seen in code, produced with -fomit-frame-pointer:
... .L4: movl 1052(%esp), %edx movl %ebp, (%edx,%ecx,4) <<<<< load to %ebp incl %ecx cmpl %ecx, %eax ja .L4 movl $10, %edx movl %edx, %esi subl %ecx, %esi cmpl $10, %eax je .L13 subl %eax, %edx movl %edx, 4(%esp) movl %edx, %ebx shrl $2, %ebx movl %ebx, %edi sall $2, %edi je .L8 .L9: movl %ebp, (%esp) <<< here %ebp is spilled to stack movss (%esp), %xmm1 shufps $0, %xmm1, %xmm1 movaps %xmm1, %xmm0 movl 1052(%esp), %edx ... It looks that register allocator is running out of registers. It allocates the last available reg, %ebp, that is usually used as a frame pointer. x86_64 target doesn't have this problem, as it has more registers (and is -fomit-frame-pointer by default). This bug is unfortunatelly not fixable in the i386 backend without fixing current register allocator. BTW: Peerhaps a tree expert could look into an optimized tree dump, maybe something can be done there. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24160