https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3507
Joseph C. Sible <josephcsible at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josephcsible at gmail dot com --- Comment #59 from Joseph C. Sible <josephcsible at gmail dot com> --- x86_64-*-* should be added to the target list. With the original test case, GCC 10.1 produces this: foo: movq %rdi, %rax subq %rsi, %rax cmpq %rsi, %rdi leaq 100(%rax), %rdx cmovb %rdx, %rax ret It should instead produce this: foo: subq %rsi, %rdi leaq 100(%rdi), %rax cmovae %rdi, %rax ret By the way, I thought that using __builtin_usubl_overflow might be a useful workaround for this bug, but it turns out that it currently isn't really, since it has a different missed optimization of its own: bug #96289