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

--- Comment #3 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to Richard Biener from comment #1)
> With newcnt-=2 you get
> 
>         movl    %edx, %r8d
>         movl    %esi, %eax
>         leal    -2(%rsi), %edx
>         cmpl    %r8d, %edi
>         cmove   %edx, %eax
>         ret
> 

It could be better using cmovne

        leal    -2(%rsi), %eax
        cmpl    %edx, %edi
        cmovnel %esi, %eax
        retq

Reply via email to