------- Comment #2 from hubicka at gcc dot gnu dot org  2009-11-30 17:29 -------
With 4.5 we seem to be all fine here:
j...@gcc17:~/trunk/build/gcc$ ./g++ -B ./ -O2 tt.c -fdump-tree-all-details -S
-fdump-rtl-all-details-blocks
j...@gcc17:~/trunk/build/gcc$ more tt.s
        .file   "tt.c"
        .text
        .p2align 4,,15
.globl _Z11test_expectPcS_S_S_
        .type   _Z11test_expectPcS_S_S_, @function
_Z11test_expectPcS_S_S_:
.LFB0:
        cmpq    %rcx, %rdx
        sete    %dl
        cmpq    %rsi, %rdi
        sete    %al
        testb   %al, %dl
        je      .L2
        jmp     _Z6likelyv
.L2:
        jmp     _Z8unlikelyv
.LFE0:

and the conditional jump is predicted in the proper direction in greg dumps as
having 1% probability to reach unlikely.
Of course we miss here the conditional tailcall case.

Honza


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42233

Reply via email to