To find out if a register holds a zero, the naïve technique is to do this:
cmp eax, 0
But if you look at the opcode for this, you get this:
83 F8 00 cmp eax, 0
test
test eax, eax ; Equal to zero?
Examine the opcode you get:
85 c0 test eax, eax
You can also have a look into the Q&A Question on this technique.