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:

Inherited from Instruction:

Inherited from User:

Inherited from Value:

Methods

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 = "")

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 = "")

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)

Declared at: llvm/include/llvm/IR/Instructions.h:1284

Parameters

const llvm::Instruction* I

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

Description

Clone an identical ICmpInst

Declared at: llvm/include/llvm/IR/Instructions.h:1175

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)

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

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)

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

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)

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

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

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)

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()

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