Where's the optimiser gone? Or: who reviews the code you ship?

Hi @ll,

who can tell me (or the world) why an optimising compiler emits the
code sequence shown in the left column (found 4x in the "builtins"
library)?
In the middle column the expected code sequence.

    mov eax, 0 # xor eax, eax # -3 bytes
    cmp ecx, edx # cmp edx, ecx
    jb @f # ja @f
    cmp edx, ecx # # -2 bytes
    mov eax, 1 # # -5 bytes
    adc eax, 0 # adc eax, 1 # -2 insns
@@: # @@:
    ret # ret

Stefan

Hi Stefan,

Could you answer these questions:

1) What is your input code?
2) What program are you running (and with what options)?

Thanks,
-Travis