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

--- Comment #2 from Uroš Bizjak <ubizjak 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
> 
> so it's if-conversions preference to generate setCC which I'm not sure is
> really worse here, is it?  We're saving a zero extend and some reg-reg moves.

This if-conversion is intentional, since cmove needs well predicted comparison,
which is not always the case.

> I'm sure we have a duplicate report about this.

PR 79389 shows devastating SciMark2.0 results with cmove for random values of
compare operands.

Related to PR 56309.

Reply via email to