'Compare the given LLVM values of the given Numba types using
the comparison *key* (e.g. \'==\').  The values are first cast to
a common safe conversion type.'

def generic_compare(self, builder, key, argtypes, args):

    (at, bt) = argtypes
    (av, bv) = args
    ty = self.typing_context.unify_types(at, bt)
    assert (ty is not None)
    cav = self.cast(builder, av, at, ty)
    cbv = self.cast(builder, bv, bt, ty)
    cmpsig = typing.signature(types.boolean, ty, ty)
    cmpfunc = self.get_function(key, cmpsig)
    return cmpfunc(builder, (cav, cbv))
