https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110087
--- Comment #7 from Uroš Bizjak <ubizjak at gmail dot com> --- 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