class CmpInst
Declaration
class CmpInst : public Instruction { /* full declaration omitted */ };
Declared at: llvm/include/llvm/IR/InstrTypes.h:722
Inherits from: Instruction
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
- protected CmpInst(llvm::Type * ty, Instruction::OtherOps op, llvm::CmpInst::Predicate pred, llvm::Value * LHS, llvm::Value * RHS, const llvm::Twine & Name, llvm::BasicBlock * InsertAtEnd)
- protected CmpInst(llvm::Type * ty, Instruction::OtherOps op, llvm::CmpInst::Predicate pred, llvm::Value * LHS, llvm::Value * RHS, const llvm::Twine & Name = "", llvm::Instruction * InsertBefore = nullptr, llvm::Instruction * FlagsSource = nullptr)
- public static llvm::CmpInst * Create(llvm::Instruction::OtherOps Op, llvm::CmpInst::Predicate predicate, llvm::Value * S1, llvm::Value * S2, const llvm::Twine & Name = "", llvm::Instruction * InsertBefore = nullptr)
- public static llvm::CmpInst * Create(llvm::Instruction::OtherOps Op, llvm::CmpInst::Predicate predicate, llvm::Value * S1, llvm::Value * S2, const llvm::Twine & Name, llvm::BasicBlock * InsertAtEnd)
- public static bool classof(const llvm::Instruction * I)
- public static bool classof(const llvm::Value * V)
- public llvm::CmpInst::Predicate getFlippedStrictnessPredicate() const
- public static llvm::CmpInst::Predicate getFlippedStrictnessPredicate(llvm::CmpInst::Predicate pred)
- public llvm::CmpInst::Predicate getInversePredicate() const
- public static llvm::CmpInst::Predicate getInversePredicate(llvm::CmpInst::Predicate pred)
- public llvm::CmpInst::Predicate getNonStrictPredicate() const
- public static llvm::CmpInst::Predicate getNonStrictPredicate(llvm::CmpInst::Predicate pred)
- public llvm::Instruction::OtherOps getOpcode() const
- public llvm::CmpInst::Predicate getPredicate() const
- public static llvm::StringRef getPredicateName(llvm::CmpInst::Predicate P)
- public llvm::CmpInst::Predicate getSignedPredicate()
- public static llvm::CmpInst::Predicate getSignedPredicate(llvm::CmpInst::Predicate pred)
- public llvm::CmpInst::Predicate getSwappedPredicate() const
- public static llvm::CmpInst::Predicate getSwappedPredicate(llvm::CmpInst::Predicate pred)
- public bool isCommutative() const
- public bool isEquality() const
- public static bool isFPPredicate(llvm::CmpInst::Predicate P)
- public bool isFPPredicate() const
- public bool isFalseWhenEqual() const
- public static bool isFalseWhenEqual(llvm::CmpInst::Predicate predicate)
- public static bool isImpliedFalseByMatchingCmp(llvm::CmpInst::Predicate Pred1, llvm::CmpInst::Predicate Pred2)
- public static bool isImpliedTrueByMatchingCmp(llvm::CmpInst::Predicate Pred1, llvm::CmpInst::Predicate Pred2)
- public bool isIntPredicate() const
- public static bool isIntPredicate(llvm::CmpInst::Predicate P)
- public static bool isOrdered(llvm::CmpInst::Predicate predicate)
- public bool isSigned() const
- public static bool isSigned(llvm::CmpInst::Predicate predicate)
- public bool isTrueWhenEqual() const
- public static bool isTrueWhenEqual(llvm::CmpInst::Predicate predicate)
- public static bool isUnordered(llvm::CmpInst::Predicate predicate)
- public bool isUnsigned() const
- public static bool isUnsigned(llvm::CmpInst::Predicate predicate)
- public static llvm::Type * makeCmpResultType(llvm::Type * opnd_type)
- public void setPredicate(llvm::CmpInst::Predicate P)
- public void 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
¶CmpInst(llvm::Type* ty,
Instruction::OtherOps op,
llvm::CmpInst::Predicate pred,
llvm::Value* LHS,
llvm::Value* RHS,
const llvm::Twine& Name,
llvm::BasicBlock* InsertAtEnd)
CmpInst(llvm::Type* ty,
Instruction::OtherOps op,
llvm::CmpInst::Predicate pred,
llvm::Value* LHS,
llvm::Value* RHS,
const llvm::Twine& Name,
llvm::BasicBlock* InsertAtEnd)
Declared at: llvm/include/llvm/IR/InstrTypes.h:774
Parameters
- llvm::Type* ty
- Instruction::OtherOps op
- llvm::CmpInst::Predicate pred
- llvm::Value* LHS
- llvm::Value* RHS
- const llvm::Twine& Name
- llvm::BasicBlock* InsertAtEnd
¶CmpInst(llvm::Type* ty,
Instruction::OtherOps op,
llvm::CmpInst::Predicate pred,
llvm::Value* LHS,
llvm::Value* RHS,
const llvm::Twine& Name = "",
llvm::Instruction* InsertBefore = nullptr,
llvm::Instruction* FlagsSource = nullptr)
CmpInst(llvm::Type* ty,
Instruction::OtherOps op,
llvm::CmpInst::Predicate pred,
llvm::Value* LHS,
llvm::Value* RHS,
const llvm::Twine& Name = "",
llvm::Instruction* InsertBefore = nullptr,
llvm::Instruction* FlagsSource = nullptr)
Declared at: llvm/include/llvm/IR/InstrTypes.h:769
Parameters
- llvm::Type* ty
- Instruction::OtherOps op
- llvm::CmpInst::Predicate pred
- llvm::Value* LHS
- llvm::Value* RHS
- const llvm::Twine& Name = ""
- llvm::Instruction* InsertBefore = nullptr
- llvm::Instruction* FlagsSource = nullptr
¶static llvm::CmpInst* Create(
llvm::Instruction::OtherOps Op,
llvm::CmpInst::Predicate predicate,
llvm::Value* S1,
llvm::Value* S2,
const llvm::Twine& Name = "",
llvm::Instruction* InsertBefore = nullptr)
static llvm::CmpInst* Create(
llvm::Instruction::OtherOps Op,
llvm::CmpInst::Predicate predicate,
llvm::Value* S1,
llvm::Value* S2,
const llvm::Twine& Name = "",
llvm::Instruction* InsertBefore = nullptr)
Description
Construct a compare instruction, given the opcode, the predicate and the two operands. Optionally (if InstBefore is specified) insert the instruction into a BasicBlock right before the specified instruction. The specified Instruction is allowed to be a dereferenced end iterator. Create a CmpInst
Declared at: llvm/include/llvm/IR/InstrTypes.h:789
Parameters
- llvm::Instruction::OtherOps Op
- llvm::CmpInst::Predicate predicate
- llvm::Value* S1
- llvm::Value* S2
- const llvm::Twine& Name = ""
- llvm::Instruction* InsertBefore = nullptr
¶static llvm::CmpInst* Create(
llvm::Instruction::OtherOps Op,
llvm::CmpInst::Predicate predicate,
llvm::Value* S1,
llvm::Value* S2,
const llvm::Twine& Name,
llvm::BasicBlock* InsertAtEnd)
static llvm::CmpInst* Create(
llvm::Instruction::OtherOps Op,
llvm::CmpInst::Predicate predicate,
llvm::Value* S1,
llvm::Value* S2,
const llvm::Twine& Name,
llvm::BasicBlock* InsertAtEnd)
Description
Construct a compare instruction, given the opcode, the predicate and the two operands. Also automatically insert this instruction to the end of the BasicBlock specified. Create a CmpInst
Declared at: llvm/include/llvm/IR/InstrTypes.h:798
Parameters
- llvm::Instruction::OtherOps Op
- llvm::CmpInst::Predicate predicate
- llvm::Value* S1
- llvm::Value* S2
- const llvm::Twine& Name
- llvm::BasicBlock* InsertAtEnd
¶static bool classof(const llvm::Instruction* I)
static bool classof(const llvm::Instruction* I)
Description
Methods for support type inquiry through isa, cast, and dyn_cast:
Declared at: llvm/include/llvm/IR/InstrTypes.h:966
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/InstrTypes.h:970
Parameters
- const llvm::Value* V
¶llvm::CmpInst::Predicate
getFlippedStrictnessPredicate() const
llvm::CmpInst::Predicate
getFlippedStrictnessPredicate() const
Description
For predicate of kind "is X or equal to 0" returns the predicate "is X". For predicate of kind "is X" returns the predicate "is X or equal to 0". does not support other kind of predicates.
Declared at: llvm/include/llvm/IR/InstrTypes.h:862
Returns
the predicate that does not contains is equal to zero if it had and vice versa. Return the flipped strictness of predicate
¶static llvm::CmpInst::Predicate
getFlippedStrictnessPredicate(
llvm::CmpInst::Predicate pred)
static llvm::CmpInst::Predicate
getFlippedStrictnessPredicate(
llvm::CmpInst::Predicate pred)
Description
This is a static version that you can use without an instruction available. Return the flipped strictness of predicate
Declared at: llvm/include/llvm/IR/InstrTypes.h:869
Parameters
- llvm::CmpInst::Predicate pred
¶llvm::CmpInst::Predicate getInversePredicate()
const
llvm::CmpInst::Predicate getInversePredicate()
const
Description
For example, EQ -> NE, UGT -> ULE, SLT -> SGE, OEQ -> UNE, UGT -> OLE, OLT -> UGE, etc.
Declared at: llvm/include/llvm/IR/InstrTypes.h:831
Returns
the inverse predicate for the instruction's current predicate. Return the inverse of the instruction's predicate.
¶static llvm::CmpInst::Predicate
getInversePredicate(llvm::CmpInst::Predicate pred)
static llvm::CmpInst::Predicate
getInversePredicate(llvm::CmpInst::Predicate pred)
Description
For example, EQ -> NE, UGT -> ULE, SLT -> SGE, OEQ -> UNE, UGT -> OLE, OLT -> UGE, etc.
Declared at: llvm/include/llvm/IR/InstrTypes.h:839
Parameters
- llvm::CmpInst::Predicate pred
Returns
the inverse predicate for predicate provided in \p pred. Return the inverse of a given predicate
¶llvm::CmpInst::Predicate getNonStrictPredicate()
const
llvm::CmpInst::Predicate getNonStrictPredicate()
const
Description
For example, SGT -> SGE, SLT -> SLE, ULT -> ULE, UGT -> UGE. Returns the non-strict version of strict comparisons.
Declared at: llvm/include/llvm/IR/InstrTypes.h:873
¶static llvm::CmpInst::Predicate
getNonStrictPredicate(
llvm::CmpInst::Predicate pred)
static llvm::CmpInst::Predicate
getNonStrictPredicate(
llvm::CmpInst::Predicate pred)
Description
This is a static version that you can use without an instruction available.
Declared at: llvm/include/llvm/IR/InstrTypes.h:882
Parameters
- llvm::CmpInst::Predicate pred
Returns
the non-strict version of comparison provided in \p pred. If \p pred is not a strict comparison predicate, returns \p pred. Returns the non-strict version of strict comparisons.
¶llvm::Instruction::OtherOps getOpcode() const
llvm::Instruction::OtherOps getOpcode() const
Description
Get the opcode casted to the right type
Declared at: llvm/include/llvm/IR/InstrTypes.h:802
¶llvm::CmpInst::Predicate getPredicate() const
llvm::CmpInst::Predicate getPredicate() const
Description
Return the predicate for this instruction.
Declared at: llvm/include/llvm/IR/InstrTypes.h:807
¶static llvm::StringRef getPredicateName(
llvm::CmpInst::Predicate P)
static llvm::StringRef getPredicateName(
llvm::CmpInst::Predicate P)
Declared at: llvm/include/llvm/IR/InstrTypes.h:822
Parameters
- llvm::CmpInst::Predicate P
¶llvm::CmpInst::Predicate getSignedPredicate()
llvm::CmpInst::Predicate getSignedPredicate()
Description
For example, ULT->SLT, ULE->SLE, UGT->SGT, UGE->SGE, SLT->Failed assert
Declared at: llvm/include/llvm/IR/InstrTypes.h:921
Returns
the signed version of the predicate for this instruction (which has to be an unsigned predicate). return the signed version of a predicate
¶static llvm::CmpInst::Predicate
getSignedPredicate(llvm::CmpInst::Predicate pred)
static llvm::CmpInst::Predicate
getSignedPredicate(llvm::CmpInst::Predicate pred)
Description
For example, ULT->SLT, ULE->SLE, UGT->SGT, UGE->SGE, SLT->Failed assert
Declared at: llvm/include/llvm/IR/InstrTypes.h:915
Parameters
- llvm::CmpInst::Predicate pred
Returns
the signed version of the unsigned predicate pred. return the signed version of a predicate
¶llvm::CmpInst::Predicate getSwappedPredicate()
const
llvm::CmpInst::Predicate getSwappedPredicate()
const
Description
For example, EQ->EQ, SLE->SGE, ULT->UGT, OEQ->OEQ, ULE->UGE, OLT->OGT, etc.
Declared at: llvm/include/llvm/IR/InstrTypes.h:847
Returns
the predicate that would be the result of exchanging the two operands of the CmpInst instruction without changing the result produced. Return the predicate as if the operands were swapped
¶static llvm::CmpInst::Predicate
getSwappedPredicate(llvm::CmpInst::Predicate pred)
static llvm::CmpInst::Predicate
getSwappedPredicate(llvm::CmpInst::Predicate pred)
Description
This is a static version that you can use without an instruction available. Return the predicate as if the operands were swapped.
Declared at: llvm/include/llvm/IR/InstrTypes.h:854
Parameters
- llvm::CmpInst::Predicate pred
¶bool isCommutative() const
bool isCommutative() const
Description
This is just a convenience that dispatches to the subclasses. Determine if this CmpInst is commutative.
Declared at: llvm/include/llvm/IR/InstrTypes.h:894
¶bool isEquality() const
bool isEquality() const
Description
This is just a convenience that dispatches to the subclasses. Determine if this is an equals/not equals predicate.
Declared at: llvm/include/llvm/IR/InstrTypes.h:898
¶static bool isFPPredicate(
llvm::CmpInst::Predicate P)
static bool isFPPredicate(
llvm::CmpInst::Predicate P)
Declared at: llvm/include/llvm/IR/InstrTypes.h:814
Parameters
- llvm::CmpInst::Predicate P
¶bool isFPPredicate() const
bool isFPPredicate() const
Declared at: llvm/include/llvm/IR/InstrTypes.h:824
¶bool isFalseWhenEqual() const
bool isFalseWhenEqual() const
Description
This is just a convenience. Determine if this is false when both operands are the same.
Declared at: llvm/include/llvm/IR/InstrTypes.h:933
¶static bool isFalseWhenEqual(
llvm::CmpInst::Predicate predicate)
static bool isFalseWhenEqual(
llvm::CmpInst::Predicate predicate)
Description
Determine if the predicate is false when comparing a value with itself.
Declared at: llvm/include/llvm/IR/InstrTypes.h:955
Parameters
- llvm::CmpInst::Predicate predicate
¶static bool isImpliedFalseByMatchingCmp(
llvm::CmpInst::Predicate Pred1,
llvm::CmpInst::Predicate Pred2)
static bool isImpliedFalseByMatchingCmp(
llvm::CmpInst::Predicate Pred1,
llvm::CmpInst::Predicate Pred2)
Description
Determine if Pred1 implies Pred2 is false when two compares have matching operands.
Declared at: llvm/include/llvm/IR/InstrTypes.h:963
Parameters
- llvm::CmpInst::Predicate Pred1
- llvm::CmpInst::Predicate Pred2
¶static bool isImpliedTrueByMatchingCmp(
llvm::CmpInst::Predicate Pred1,
llvm::CmpInst::Predicate Pred2)
static bool isImpliedTrueByMatchingCmp(
llvm::CmpInst::Predicate Pred1,
llvm::CmpInst::Predicate Pred2)
Description
Determine if Pred1 implies Pred2 is true when two compares have matching operands.
Declared at: llvm/include/llvm/IR/InstrTypes.h:959
Parameters
- llvm::CmpInst::Predicate Pred1
- llvm::CmpInst::Predicate Pred2
¶bool isIntPredicate() const
bool isIntPredicate() const
Declared at: llvm/include/llvm/IR/InstrTypes.h:825
¶static bool isIntPredicate(
llvm::CmpInst::Predicate P)
static bool isIntPredicate(
llvm::CmpInst::Predicate P)
Declared at: llvm/include/llvm/IR/InstrTypes.h:818
Parameters
- llvm::CmpInst::Predicate P
¶static bool isOrdered(
llvm::CmpInst::Predicate predicate)
static bool isOrdered(
llvm::CmpInst::Predicate predicate)
Description
Determine if the predicate is an ordered operation.
Declared at: llvm/include/llvm/IR/InstrTypes.h:946
Parameters
- llvm::CmpInst::Predicate predicate
¶bool isSigned() const
bool isSigned() const
Declared at: llvm/include/llvm/IR/InstrTypes.h:902
Returns
true if the comparison is signed, false otherwise. Determine if this instruction is using a signed comparison.
¶static bool isSigned(
llvm::CmpInst::Predicate predicate)
static bool isSigned(
llvm::CmpInst::Predicate predicate)
Declared at: llvm/include/llvm/IR/InstrTypes.h:943
Parameters
- llvm::CmpInst::Predicate predicate
Returns
true if the predicate is signed, false otherwise. Determine if the predicate is an signed operation.
¶bool isTrueWhenEqual() const
bool isTrueWhenEqual() const
Description
This is just a convenience. Determine if this is true when both operands are the same.
Declared at: llvm/include/llvm/IR/InstrTypes.h:927
¶static bool isTrueWhenEqual(
llvm::CmpInst::Predicate predicate)
static bool isTrueWhenEqual(
llvm::CmpInst::Predicate predicate)
Description
Determine if the predicate is true when comparing a value with itself.
Declared at: llvm/include/llvm/IR/InstrTypes.h:952
Parameters
- llvm::CmpInst::Predicate predicate
¶static bool isUnordered(
llvm::CmpInst::Predicate predicate)
static bool isUnordered(
llvm::CmpInst::Predicate predicate)
Description
Determine if the predicate is an unordered operation.
Declared at: llvm/include/llvm/IR/InstrTypes.h:949
Parameters
- llvm::CmpInst::Predicate predicate
¶bool isUnsigned() const
bool isUnsigned() const
Declared at: llvm/include/llvm/IR/InstrTypes.h:908
Returns
true if the comparison is unsigned, false otherwise. Determine if this instruction is using an unsigned comparison.
¶static bool isUnsigned(
llvm::CmpInst::Predicate predicate)
static bool isUnsigned(
llvm::CmpInst::Predicate predicate)
Declared at: llvm/include/llvm/IR/InstrTypes.h:939
Parameters
- llvm::CmpInst::Predicate predicate
Returns
true if the predicate is unsigned, false otherwise. Determine if the predicate is an unsigned operation.
¶static llvm::Type* makeCmpResultType(
llvm::Type* opnd_type)
static llvm::Type* makeCmpResultType(
llvm::Type* opnd_type)
Description
Create a result type for fcmp/icmp
Declared at: llvm/include/llvm/IR/InstrTypes.h:975
Parameters
- llvm::Type* opnd_type
¶void setPredicate(llvm::CmpInst::Predicate P)
void setPredicate(llvm::CmpInst::Predicate P)
Description
Set the predicate for this instruction to the specified value.
Declared at: llvm/include/llvm/IR/InstrTypes.h:812
Parameters
- llvm::CmpInst::Predicate P
¶void swapOperands()
void swapOperands()
Description
This is just a convenience that dispatches to the subclasses. Swap the operands and adjust predicate accordingly to retain the same comparison.
Declared at: llvm/include/llvm/IR/InstrTypes.h:890