/// the validity of the less-or-equal relationship.
///
/// \returns true if *this <= RHS when considered unsigned.
- bool ule(uint64_t RHS) const { return ule(APInt(getBitWidth(), RHS)); }
+ bool ule(uint64_t RHS) const { return !ugt(RHS); }
/// \brief Signed less or equal comparison
///
/// validity of the less-or-equal relationship.
///
/// \returns true if *this <= RHS when considered signed.
- bool sle(uint64_t RHS) const { return sle(APInt(getBitWidth(), RHS)); }
+ bool sle(uint64_t RHS) const { return !sgt(RHS); }
/// \brief Unsigned greather than comparison
///
/// the validity of the greater-or-equal relationship.
///
/// \returns true if *this >= RHS when considered unsigned.
- bool uge(uint64_t RHS) const { return uge(APInt(getBitWidth(), RHS)); }
+ bool uge(uint64_t RHS) const { return !ult(RHS); }
/// \brief Signed greather or equal comparison
///
/// the validity of the greater-or-equal relationship.
///
/// \returns true if *this >= RHS when considered signed.
- bool sge(uint64_t RHS) const { return sge(APInt(getBitWidth(), RHS)); }
+ bool sge(uint64_t RHS) const { return !slt(RHS); }
/// This operation tests if there are any pairs of corresponding bits
/// between this APInt and RHS that are both set.