https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30315
Vincent Lefèvre <vincent-gcc at vinc17 dot net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |vincent-gcc at vinc17 dot net --- Comment #20 from Vincent Lefèvre <vincent-gcc at vinc17 dot net> --- Similar to comment 16: void d (unsigned int a, unsigned int b) { unsigned int diff = a - b; if (diff == 0) feq (); else if (diff > a) flt (); else fgt (); } is not optimized. Under Debian, GCC 10.0.0 20190527 (experimental) [trunk revision 271671] gives for x86_64 (i386 is similar): [...] xorl %eax, %eax cmpl %esi, %edi setb %al je .L7 testl %eax, %eax je .L5 [...] I would expect just a cmpl, a je and a jl.