https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96846
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |uros at gcc dot gnu.org --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- mov edx, DWORD PTR [rdi] cmp edx, esi sete al cmp edx, r9d sete dl or eax, edx movzx eax, al This isn't what the peepholes are looking for, there are several other insns in between, and peephole2s only work on exact insn sequences, doing anything more complex would require doing it in some machine specific pass. Note, while in theory it could add xor eax, eax before the cmp edx, esi insn, it can't add xor edx, edx because the second comparison uses that register.