codegen: implement cmp operators as builtins except eq

To operate Icmp.Eq, we probably need a switch statement to unbox the
right value.