https://gcc.gnu.org/bugzilla/show_bug.cgi?id=17234

--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I can no longer reproduce this issue with a more recent compiler.  Also The
order of the basic block changed.
So we have now:
entry
je L3
calls
L3:
ret

Most likely due to the heurstics changes.
Anyways I force the other order using __builtin_expect and I get:
bar:
        pushl   %esi
        xorl    %eax, %eax
        pushl   %ebx
        subl    $20, %esp
        movl    32(%esp), %esi
        movl    4(%esi), %ebx
        testl   %ebx, %ebx
        jne     .L8
        addl    $20, %esp
        popl    %ebx
        popl    %esi
        ret
        .p2align 4,,10
        .p2align 3
.L8:
        subl    $12, %esp
        sall    $2, %ebx
        pushl   $132
        call    baz
        addl    $12, %esp
        pushl   %ebx
        pushl   (%esi)
        pushl   %eax
        movl    %eax, 28(%esp)
        call    foo
        addl    $16, %esp
        movl    12(%esp), %eax
        addl    $20, %esp
        popl    %ebx
        popl    %esi
        ret

---- CUT ---
We duplicate the ret here even.

Reply via email to