test eax, 1 ; use result
is_even(int): mov eax, edi not eax and eax, 1 ret
edit: my mistake, icc and clang produce the equivalent sequence "not edi; and edi, 1; mov eax, edi; ret".