98 if (!(C->
getValue() + 1).isPowerOf2())
IntegerType * getType() const
getType - Specialize the getType() method to always return an IntegerType, which reduces the amount o...
static APInt getSignBit(unsigned BitWidth)
Get the SignBit for a specific bit width.
static Type * makeCmpResultType(Type *opnd_type)
Create a result type for fcmp/icmp.
bool decomposeBitTestICmp(const ICmpInst *I, CmpInst::Predicate &Pred, Value *&X, Value *&Y, Value *&Z)
Decompose an icmp into the form ((X & Y) pred Z) if possible.
unsigned getBitWidth() const
getBitWidth - Return the bitwidth of this constant.
unsigned getICmpCode(const ICmpInst *ICI, bool InvertPred=false)
Encode a icmp predicate into a three bit mask.
Predicate getInversePredicate() const
For example, EQ -> NE, UGT -> ULE, SLT -> SGE, OEQ -> UNE, UGT -> OLE, OLT -> UGE, etc.
bool isSigned() const
Determine if this instruction is using a signed comparison.
static Constant * getNullValue(Type *Ty)
Constructor to create a '0' constant of arbitrary type.
const APInt & getValue() const
Return the constant as an APInt value reference.
bool isEquality() const
Return true if this predicate is either EQ or NE.
This file contains the declarations for the subclasses of Constant, which represent the different fla...
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang","erlang-compatible garbage collector")
This instruction compares its operands according to the predicate given to the constructor.
Predicate
This enumeration lists the possible predicates for CmpInst subclasses.
Value * getOperand(unsigned i) const
Predicate getPredicate() const
Return the predicate for this instruction.
LLVMContext & getContext() const
All values hold a context through their type.
bool isPowerOf2() const
Check if this APInt's value is a power of two greater than zero.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
This is the shared class of boolean and integer constants.
Type * getType() const
All values are typed, get the type of this value.
static Constant * get(Type *Ty, uint64_t V, bool isSigned=false)
If Ty is a vector type, return a Constant with a splat of the given value.
bool isZero() const
This is just a convenience method to make client code smaller for a common code.
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...
static GCRegistry::Add< ShadowStackGC > C("shadow-stack","Very portable GC for uncooperative code generators")
bool isAllOnesValue() const
Return true if this is the value that would be returned by getAllOnesValue.
Value * getICmpValue(bool Sign, unsigned Code, Value *LHS, Value *RHS, CmpInst::Predicate &NewICmpPred)
This is the complement of getICmpCode, which turns an opcode and two operands into either a constant ...
unsigned greater or equal
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
LLVM Value Representation.
static GCMetadataPrinterRegistry::Add< OcamlGCMetadataPrinter > Y("ocaml","ocaml 3.10-compatible collector")