Optimize cmp(reg, 0) to test(reg, reg)

Thanks to @herumi, we reduced machine code bytes :)