https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110087
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Uroš Bizjak from comment #7) > Similar conversion, not performed by gcc: > > --cut here-- > #include <stdbool.h> > > _Bool foo (void); > > int bar (int r) > { > if (foo ()) > r++; > > return r; > } > --cut here-- > > gcc -O2: > > movl %edi, %ebx > call foo > cmpb $1, %al > sbbl $-1, %ebx > movl %ebx, %eax > > could be: > > movl %edi, %ebx > callq foo > movzbl %al, %eax > addl %ebx, %eax Please file this separately, since it is a different issue. Though I think there are dups of that one too.