https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94617
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- Note the RTL if-conversion pass doesn't recognize what we present to it. If you alter initial RTL expansion via -fno-tree-ter (not recommended in general) we produce a more 1:1 translation of the code as _Z16vanilla_bandpassiiiPKcS0_: .LFB0: .cfi_startproc movl %esi, %r9d cmpl %edx, %edi setle %sil cmpl %r9d, %edx setl %al testb %al, %sil movq %rcx, %rax cmovne %r8, %rax ret which I wouldn't expect to execute faster though.