class ICmpInst
Declaration
class ICmpInst : public CmpInst { /* full declaration omitted */ };
Declared at: llvm/include/llvm/IR/Instructions.h:1158
Inherits from: CmpInst
Member Variables
Inherited from Value:
- protected SubclassOptionalData
- protected NumUserOperands
- protected IsUsedByMD
- protected HasName
- protected HasHungOffUses
- protected HasDescriptor
- public static MaxAlignmentExponent = 29
- public static MaximumAlignment = 1U << MaxAlignmentExponent
Method Overview
- public ICmpInst(llvm::Instruction * InsertBefore, llvm::CmpInst::Predicate pred, llvm::Value * LHS, llvm::Value * RHS, const llvm::Twine & NameStr = "")
- public ICmpInst(llvm::BasicBlock & InsertAtEnd, llvm::CmpInst::Predicate pred, llvm::Value * LHS, llvm::Value * RHS, const llvm::Twine & NameStr = "")
- public ICmpInst(llvm::CmpInst::Predicate pred, llvm::Value * LHS, llvm::Value * RHS, const llvm::Twine & NameStr = "")
- public static bool classof(const llvm::Instruction * I)
- public static bool classof(const llvm::Value * V)
- protected llvm::ICmpInst * cloneImpl() const
- public llvm::CmpInst::Predicate getSignedPredicate() const
- public static llvm::CmpInst::Predicate getSignedPredicate(llvm::CmpInst::Predicate pred)
- public llvm::CmpInst::Predicate getUnsignedPredicate() const
- public static llvm::CmpInst::Predicate getUnsignedPredicate(llvm::CmpInst::Predicate pred)
- public bool isCommutative() const
- public static bool isEquality(llvm::CmpInst::Predicate P)
- public bool isEquality() const
- public bool isRelational() const
- public static bool isRelational(llvm::CmpInst::Predicate P)
- public void swapOperands()
Inherited from CmpInst:
- public Create
- public Create
- public classof
- public classof
- public getFlippedStrictnessPredicate
- public getFlippedStrictnessPredicate
- public getInversePredicate
- public getInversePredicate
- public getNonStrictPredicate
- public getNonStrictPredicate
- public getOpcode
- public getPredicate
- public getPredicateName
- public getSignedPredicate
- public getSignedPredicate
- public getSwappedPredicate
- public getSwappedPredicate
- public isCommutative
- public isEquality
- public isFPPredicate
- public isFPPredicate
- public isFalseWhenEqual
- public isFalseWhenEqual
- public isImpliedFalseByMatchingCmp
- public isImpliedTrueByMatchingCmp
- public isIntPredicate
- public isIntPredicate
- public isOrdered
- public isSigned
- public isSigned
- public isTrueWhenEqual
- public isTrueWhenEqual
- public isUnordered
- public isUnsigned
- public isUnsigned
- public makeCmpResultType
- public setPredicate
- public swapOperands
Inherited from Instruction:
- public andIRFlags
- public applyMergedLocation
- public classof
- public clone
- public copyFastMathFlags
- public copyFastMathFlags
- public copyIRFlags
- public copyMetadata
- public dropPoisonGeneratingFlags
- public dropUnknownNonDebugMetadata
- public dropUnknownNonDebugMetadata
- public dropUnknownNonDebugMetadata
- public dropUnknownNonDebugMetadata
- public eraseFromParent
- public extractProfMetadata
- public extractProfTotalWeight
- public getAAMetadata
- public getAllMetadata
- public getAllMetadataOtherThanDebugLoc
- public getDebugLoc
- public getFastMathFlags
- public getFunction
- public getFunction
- public getMetadata
- public getMetadata
- public getModule
- public getModule
- public getNextNonDebugInstruction
- public getNextNonDebugInstruction
- public getNumSuccessors
- public getOpcode
- public getOpcodeName
- public getOpcodeName
- public getParent
- public getParent
- public getPrevNonDebugInstruction
- public getPrevNonDebugInstruction
- protected getSubclassDataFromInstruction
- public getSuccessor
- public hasAllowContract
- public hasAllowReassoc
- public hasAllowReciprocal
- public hasApproxFunc
- public hasAtomicLoad
- public hasAtomicStore
- public hasMetadata
- public hasMetadata
- public hasMetadata
- public hasMetadataOtherThanDebugLoc
- public hasNoInfs
- public hasNoNaNs
- public hasNoSignedWrap
- public hasNoSignedZeros
- public hasNoUnsignedWrap
- public insertAfter
- public insertBefore
- public isArithmeticShift
- public isAssociative
- public isAssociative
- public isAtomic
- public isBinaryOp
- public isBinaryOp
- public isBitwiseLogicOp
- public isBitwiseLogicOp
- public isCast
- public isCast
- public isCommutative
- public isCommutative
- public isEHPad
- public isExact
- public isExceptionalTerminator
- public isExceptionalTerminator
- public isFast
- public isFenceLike
- public isFuncletPad
- public isFuncletPad
- public isIdempotent
- public isIdempotent
- public isIdenticalTo
- public isIdenticalToWhenDefined
- public isIndirectTerminator
- public isIndirectTerminator
- public isIntDivRem
- public isIntDivRem
- public isLifetimeStartOrEnd
- public isLogicalShift
- public isNilpotent
- public isNilpotent
- public isSafeToRemove
- public isSameOperationAs
- public isShift
- public isShift
- public isTerminator
- public isTerminator
- public isUnaryOp
- public isUnaryOp
- public isUsedOutsideOfBlock
- public mayHaveSideEffects
- public mayReadFromMemory
- public mayReadOrWriteMemory
- public mayThrow
- public mayWriteToMemory
- public moveAfter
- public moveBefore
- public moveBefore
- public removeFromParent
- public replaceSuccessorWith
- public setAAMetadata
- public setDebugLoc
- public setFast
- public setFastMathFlags
- public setHasAllowReassoc
- public setHasAllowReciprocal
- public setHasApproxFunc
- public setHasNoInfs
- public setHasNoNaNs
- public setHasNoSignedWrap
- public setHasNoSignedZeros
- public setHasNoUnsignedWrap
- protected setInstructionSubclassData
- public setIsExact
- public setMetadata
- public setMetadata
- public setProfWeight
- public setSuccessor
- public swapProfMetadata
- public user_back
- public user_back
Inherited from User:
- protected Op
- protected Op
- protected OpFrom
- protected allocHungoffUses
- public classof
- public dropAllReferences
- public getDescriptor
- public getDescriptor
- public getNumOperands
- public getOperand
- public getOperandList
- public getOperandList
- public getOperandUse
- public getOperandUse
- protected growHungoffUses
- public op_begin
- public op_begin
- public op_end
- public op_end
- public operand_values
- public operand_values
- public operands
- public operands
- public replaceUsesOfWith
- public setGlobalVariableNumOperands
- public setNumHungOffUseOperands
- public setOperand
- public value_op_begin
- public value_op_begin
- public value_op_end
- public value_op_end
Inherited from Value:
- public DoPHITranslation
- public DoPHITranslation
- public addUse
- public assertModuleIsMaterialized
- public assertModuleIsMaterializedImpl
- public clearSubclassOptionalData
- public deleteValue
- public dump
- public getContext
- public getName
- public getNumUses
- public getPointerAlignment
- public getPointerDereferenceableBytes
- public getRawSubclassOptionalData
- protected getSubclassDataFromValue
- public getType
- public getValueID
- public getValueName
- public hasNUses
- public hasNUsesOrMore
- public hasName
- public hasOneUse
- public hasSameSubclassOptionalData
- public hasValueHandle
- public isSwiftError
- public isUsedByMetadata
- public isUsedInBasicBlock
- public materialized_use_begin
- public materialized_use_begin
- public materialized_use_empty
- public materialized_user_begin
- public materialized_user_begin
- public materialized_users
- public materialized_users
- public materialized_uses
- public materialized_uses
- public mutateType
- public print
- public print
- public printAsOperand
- public printAsOperand
- public replaceAllUsesWith
- public replaceNonMetadataUsesWith
- public replaceUsesOutsideBlock
- public replaceUsesWithIf
- public reverseUseList
- public setName
- public setValueName
- protected setValueSubclassData
- public sortUseList
- public stripAndAccumulateConstantOffsets
- public stripAndAccumulateConstantOffsets
- public stripAndAccumulateInBoundsConstantOffsets
- public stripAndAccumulateInBoundsConstantOffsets
- public stripInBoundsConstantOffsets
- public stripInBoundsConstantOffsets
- public stripInBoundsOffsets
- public stripInBoundsOffsets
- public stripPointerCasts
- public stripPointerCasts
- public stripPointerCastsAndAliases
- public stripPointerCastsAndAliases
- public stripPointerCastsAndInvariantGroups
- public stripPointerCastsAndInvariantGroups
- public stripPointerCastsSameRepresentation
- public stripPointerCastsSameRepresentation
- public takeName
- public use_begin
- public use_begin
- public use_empty
- public use_end
- public use_end
- public user_back
- public user_back
- public user_begin
- public user_begin
- public user_empty
- public user_end
- public user_end
- public users
- public users
- public uses
- public uses
Methods
¶ICmpInst(llvm::Instruction* InsertBefore,
llvm::CmpInst::Predicate pred,
llvm::Value* LHS,
llvm::Value* RHS,
const llvm::Twine& NameStr = "")
ICmpInst(llvm::Instruction* InsertBefore,
llvm::CmpInst::Predicate pred,
llvm::Value* LHS,
llvm::Value* RHS,
const llvm::Twine& NameStr = "")
Description
Constructor with insert-before-instruction semantics.
Declared at: llvm/include/llvm/IR/Instructions.h:1179
Parameters
- llvm::Instruction* InsertBefore
- llvm::CmpInst::Predicate pred
- llvm::Value* LHS
- llvm::Value* RHS
- const llvm::Twine& NameStr = ""
¶ICmpInst(llvm::BasicBlock& InsertAtEnd,
llvm::CmpInst::Predicate pred,
llvm::Value* LHS,
llvm::Value* RHS,
const llvm::Twine& NameStr = "")
ICmpInst(llvm::BasicBlock& InsertAtEnd,
llvm::CmpInst::Predicate pred,
llvm::Value* LHS,
llvm::Value* RHS,
const llvm::Twine& NameStr = "")
Description
Constructor with insert-at-end semantics.
Declared at: llvm/include/llvm/IR/Instructions.h:1194
Parameters
- llvm::BasicBlock& InsertAtEnd
- llvm::CmpInst::Predicate pred
- llvm::Value* LHS
- llvm::Value* RHS
- const llvm::Twine& NameStr = ""
¶ICmpInst(llvm::CmpInst::Predicate pred,
llvm::Value* LHS,
llvm::Value* RHS,
const llvm::Twine& NameStr = "")
ICmpInst(llvm::CmpInst::Predicate pred,
llvm::Value* LHS,
llvm::Value* RHS,
const llvm::Twine& NameStr = "")
Description
Constructor with no-insertion semantics
Declared at: llvm/include/llvm/IR/Instructions.h:1209
Parameters
- llvm::CmpInst::Predicate pred
- llvm::Value* LHS
- llvm::Value* RHS
- const llvm::Twine& NameStr = ""
¶static bool classof(const llvm::Instruction* I)
static bool classof(const llvm::Instruction* I)
Declared at: llvm/include/llvm/IR/Instructions.h:1284
Parameters
- const llvm::Instruction* I
¶static bool classof(const llvm::Value* V)
static bool classof(const llvm::Value* V)
Declared at: llvm/include/llvm/IR/Instructions.h:1287
Parameters
- const llvm::Value* V
¶llvm::ICmpInst* cloneImpl() const
llvm::ICmpInst* cloneImpl() const
Description
Clone an identical ICmpInst
Declared at: llvm/include/llvm/IR/Instructions.h:1175
¶llvm::CmpInst::Predicate getSignedPredicate()
const
llvm::CmpInst::Predicate getSignedPredicate()
const
Description
For example, EQ->EQ, SLE->SLE, UGT->SGT, etc.
Declared at: llvm/include/llvm/IR/Instructions.h:1225
Returns
the predicate that would be the result if the operand were regarded as signed. Return the signed version of the predicate
¶static llvm::CmpInst::Predicate
getSignedPredicate(llvm::CmpInst::Predicate pred)
static llvm::CmpInst::Predicate
getSignedPredicate(llvm::CmpInst::Predicate pred)
Description
This is a static version that you can use without an instruction. Return the signed version of the predicate.
Declared at: llvm/include/llvm/IR/Instructions.h:1231
Parameters
- llvm::CmpInst::Predicate pred
¶llvm::CmpInst::Predicate getUnsignedPredicate()
const
llvm::CmpInst::Predicate getUnsignedPredicate()
const
Description
For example, EQ->EQ, SLE->ULE, UGT->UGT, etc.
Declared at: llvm/include/llvm/IR/Instructions.h:1237
Returns
the predicate that would be the result if the operand were regarded as unsigned. Return the unsigned version of the predicate
¶static llvm::CmpInst::Predicate
getUnsignedPredicate(
llvm::CmpInst::Predicate pred)
static llvm::CmpInst::Predicate
getUnsignedPredicate(
llvm::CmpInst::Predicate pred)
Description
This is a static version that you can use without an instruction. Return the unsigned version of the predicate.
Declared at: llvm/include/llvm/IR/Instructions.h:1243
Parameters
- llvm::CmpInst::Predicate pred
¶bool isCommutative() const
bool isCommutative() const
Declared at: llvm/include/llvm/IR/Instructions.h:1259
Returns
true if the predicate of this ICmpInst is commutative Determine if this relation is commutative.
¶static bool isEquality(llvm::CmpInst::Predicate P)
static bool isEquality(llvm::CmpInst::Predicate P)
Description
Return true if this predicate is either EQ or NE. This also tests for commutativity.
Declared at: llvm/include/llvm/IR/Instructions.h:1247
Parameters
- llvm::CmpInst::Predicate P
¶bool isEquality() const
bool isEquality() const
Description
Return true if this predicate is either EQ or NE. This also tests for commutativity.
Declared at: llvm/include/llvm/IR/Instructions.h:1253
¶bool isRelational() const
bool isRelational() const
Description
Return true if the predicate is relational (not EQ or NE).
Declared at: llvm/include/llvm/IR/Instructions.h:1263
¶static bool isRelational(
llvm::CmpInst::Predicate P)
static bool isRelational(
llvm::CmpInst::Predicate P)
Description
Return true if the predicate is relational (not EQ or NE).
Declared at: llvm/include/llvm/IR/Instructions.h:1269
Parameters
- llvm::CmpInst::Predicate P
¶void swapOperands()
void swapOperands()
Description
Exchange the two operands to this instruction in such a way that it does not modify the semantics of the instruction. The predicate value may be changed to retain the same result if the predicate is order dependent (e.g. ult). Swap operands and adjust predicate.
Declared at: llvm/include/llvm/IR/Instructions.h:1278