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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
We get this now:

        movq    %rdi, %rax
        movq    %rsi, %rdx
        negq    %rax
        adcq    $0, %rdx
        negq    %rdx

ICC produces:
        xorl      %edx, %edx                                    #3.10
        xorl      %eax, %eax                                    #3.10
        subq      %rdi, %rax                                    #3.10
        sbbq      %rsi, %rdx                                    #3.10
        ret                                                     #3.10

Which seems even better.

LLVM does produce:
        movq    %rdi, %rax
        xorl    %edx, %edx
        negq    %rax
        sbbq    %rsi, %rdx

Which basically combines the addcq and negq together and changes one mov into
an exor.

Reply via email to