An abstraction over a CmpInst predicate with optional samesign information.
Declared in <llvm/IR/CmpPredicate.h>
class CmpPredicate;
Covers floating-point predicates and a pack of an integer predicate with samesign information. Some functions in ICmpInst construct and return this type in place of a Predicate.
| Name | Description |
|---|---|
CmpPredicate [constructor] | Constructors |
dropSameSign | Drops samesign information. This is used when the samesign information should be dropped explicitly. |
getPreferredSignedPredicate | Attempt to return a signed CmpInst::Predicate from this CmpPredicate. |
hasSameSign | Query samesign information, for optimizations. |
operator CmpInst::Predicate | Implictly converts to the underlying Predicate, dropping samesign information. |
operator== | Equality operators |
operator!= | Inequality operators |
| Name | Description |
|---|---|
get | Do a ICmpInst::getCmpPredicate() or CmpInst::getPredicate(), as appropriate. |
getInverse | Get the inverse predicate of a CmpPredicate. |
getMatching | Compares two CmpPredicates taking samesign into account and returns the canonicalized CmpPredicate if they match. An alternative to operator==. |
getSwapped | getSwapped overloads |
| Name | Description |
|---|---|
getFlippedStrictnessPredicateAndConstant | Flip the strictness of an integer compare against a constant RHS. |
isImpliedByDomCondition | Return whether a compare is known from dominating conditions at ContextI. |
simplifyCmpInst | Given operands for a CmpInst, fold the result or return null. |
simplifyFCmpInst | Given operands for an FCmpInst, fold the result or return null. |
simplifyICmpInst | Given operands for an ICmpInst, fold the result or return null. |
PatternMatch::m_Cmp | Matches any compare of L and R, binding the predicate to Pred. |
PatternMatch::m_FCmp | Matches an fcmp of L and R, binding the predicate to Pred. |
PatternMatch::m_ICmp | Matches an icmp of L and R, binding the predicate to Pred. |
PatternMatch::m_ICmpLike | Matches icmp or an equivalent trunc-nuw-to-i1 pattern. |
PatternMatch::m_SpecificCmp | Matches any compare of L and R with predicate MatchPred. |
PatternMatch::m_SpecificFCmp | Matches an fcmp of L and R with predicate MatchPred. |
PatternMatch::m_SpecificICmp | Matches an icmp of L and R with predicate MatchPred. |
PatternMatch::m_c_ICmp | Matches an ICmp with a predicate over LHS and RHS in either order. Swaps the predicate if operands are commuted. |
PatternMatch::m_c_SpecificICmp | Matches an icmp of L and R with MatchPred in either order. |