15 #ifndef LLVM_ANALYSIS_CMPINSTANALYSIS_H 16 #define LLVM_ANALYSIS_CMPINSTANALYSIS_H 47 unsigned getICmpCode(
const ICmpInst *ICI,
bool InvertPred =
false);
66 Value *&
X, APInt &
Mask,
67 bool LookThroughTrunc =
true);
Constant * getPredForICmpCode(unsigned Code, bool Sign, Type *OpTy, CmpInst::Predicate &Pred)
This is the complement of getICmpCode.
Type
MessagePack types as defined in the standard, with the exception of Integer being divided into a sign...
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
This class represents lattice values for constants.
bool decomposeBitTestICmp(Value *LHS, Value *RHS, CmpInst::Predicate &Pred, Value *&X, APInt &Mask, bool LookThroughTrunc=true)
Decompose an icmp into the form ((X & Mask) pred 0) if possible.
unsigned getICmpCode(const ICmpInst *ICI, bool InvertPred=false)
Encode a icmp predicate into a three bit mask.
Predicate
This enumeration lists the possible predicates for CmpInst subclasses.
std::underlying_type< E >::type Mask()
Get a bitmask with 1s in all places up to the high-order bit of E's largest value.
bool predicatesFoldable(CmpInst::Predicate P1, CmpInst::Predicate P2)
Return true if both predicates match sign or if at least one of them is an equality comparison (which...