pub fn new(builder: &mut Builder, pred: CmpPred, lhs: Value, rhs: Value) -> Self {
        builder.build_with(|builder, state| {
            state.add_operand(lhs);
            state.add_operand(rhs);
            let attr_ty = get_integer_type(builder.cx, 64);
            let attr = get_integer_attr(
                attr_ty,
                match pred {
                    CmpPred::Eq => 0,
                    CmpPred::Neq => 1,
                    CmpPred::Slt => 2,
                    CmpPred::Sle => 3,
                    CmpPred::Sgt => 4,
                    CmpPred::Sge => 5,
                    CmpPred::Ult => 6,
                    CmpPred::Ule => 7,
                    CmpPred::Ugt => 8,
                    CmpPred::Uge => 9,
                },
            );
            state.add_attribute("predicate", attr);
            state.add_result(get_integer_type(builder.cx, 1));
        })
    }
/// Create a new comparison operation.
Create a new comparison operation.
Create a new comparison operation .
pub fn new(builder: &mut Builder, pred: CmpPred, lhs: Value, rhs: Value) -> Self {
        builder.build_with(|builder, state| {
            state.add_operand(lhs);
            state.add_operand(rhs);
            let attr_ty = get_integer_type(builder.cx, 64);
            let attr = get_integer_attr(
                attr_ty,
                match pred {
                    CmpPred::Eq => 0,
                    CmpPred::Neq => 1,
                    CmpPred::Slt => 2,
                    CmpPred::Sle => 3,
                    CmpPred::Sgt => 4,
                    CmpPred::Sge => 5,
                    CmpPred::Ult => 6,
                    CmpPred::Ule => 7,
                    CmpPred::Ugt => 8,
                    CmpPred::Uge => 9,
                },
            );
            state.add_attribute("predicate", attr);
            state.add_result(get_integer_type(builder.cx, 1));
        })
    }
pub fn new ( builder : & mut Builder , pred : CmpPred , lhs : Value , rhs : Value ) -> Self { builder . build_with ( | builder , state | { state . add_operand ( lhs ) ; state . add_operand ( rhs ) ; let attr_ty = get_integer_type ( builder . cx , 64 ) ; let attr = get_integer_attr ( attr_ty , match pred { CmpPred :: Eq => 0 , CmpPred :: Neq => 1 , CmpPred :: Slt => 2 , CmpPred :: Sle => 3 , CmpPred :: Sgt => 4 , CmpPred :: Sge => 5 , CmpPred :: Ult => 6 , CmpPred :: Ule => 7 , CmpPred :: Ugt => 8 , CmpPred :: Uge => 9 , } , ) ; state . add_attribute ( " " , attr ) ; state . add_result ( get_integer_type ( builder . cx , 1 ) ) ; } ) }
Create a new comparison operation.
Create a new comparison operation .
builder
&mut Builder
pred
CmpPred
lhs
Value
rhs
Value
builder
&mut Builder
pred
CmpPred
lhs
Value
rhs
Value