------- Comment #3 from pluto at agmk dot net 2006-09-05 21:35 ------- (In reply to comment #1) > -funswitch-loops fixes the loops.
i don't think it is fixed. imho this is only a partial fix. > For the first function, we get: > .L4: > movl %ebx, (%esp) > call *%esi > jmp .L4 > > and: > .L3: > movl (%ebx), %eax <=== [1] > movl %ebx, (%esp) > call *-1(%eax,%edi) <=== [1] > .p2align 4,,4 > jmp .L3 [1] is still less effective than optimized_loop. movl 12(%ebp), %eax # f, f movl 8(%ebp), %esi # a, a movl 16(%ebp), %edx # f, f testb $1, %al #, f$__pfn movl %eax, %ebx # f, f$__pfn je .L13 movl (%esi,%edx), %eax #* f$__delta, tmp65 movl -1(%eax,%ebx), %ebx #, f$__pfn .L13: movl %esi, (%esp) # a, call *%ebx # f$__pfn jmp .L13 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28957