class FCmpInst

Declaration

class FCmpInst : public CmpInst { /* full declaration omitted */ };

Description

This instruction compares its operands according to the predicate given to the constructor. It only operates on floating point values or packed vectors of floating point values. The operands must be identical types. Represents a floating point comparison operator.

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

Inherits from: CmpInst

Member Variables

Inherited from Value:

protected SubclassOptionalData
protected NumUserOperands
protected IsUsedByMD
protected HasName
protected HasMetadata
protected HasHungOffUses
protected HasDescriptor
public static MaxAlignmentExponent = 32
public static MaximumAlignment = 1ULL << MaxAlignmentExponent

Method Overview

  • private void AssertOK()
  • public FCmpInst(llvm::Instruction * InsertBefore, llvm::CmpInst::Predicate pred, llvm::Value * LHS, llvm::Value * RHS, const llvm::Twine & NameStr = "")
  • public FCmpInst(llvm::BasicBlock & InsertAtEnd, llvm::CmpInst::Predicate pred, llvm::Value * LHS, llvm::Value * RHS, const llvm::Twine & NameStr = "")
  • public FCmpInst(llvm::CmpInst::Predicate Pred, llvm::Value * LHS, llvm::Value * RHS, const llvm::Twine & NameStr = "", llvm::Instruction * FlagsSource = nullptr)
  • public static bool classof(const llvm::Instruction * I)
  • public static bool classof(const llvm::Value * V)
  • protected llvm::FCmpInst * cloneImpl() const
  • public static bool compare(const llvm::APFloat & LHS, const llvm::APFloat & RHS, FCmpInst::Predicate Pred)
  • public bool isCommutative() const
  • public static bool isEquality(llvm::CmpInst::Predicate Pred)
  • public bool isEquality() const
  • public bool isRelational() const
  • public static iota_range<llvm::CmpInst::Predicate> predicates()
  • public void swapOperands()

Inherited from CmpInst:

Inherited from Instruction:

Inherited from User:

Inherited from Value:

Methods

void AssertOK()

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

FCmpInst(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:1379

Parameters

llvm::Instruction* InsertBefore
llvm::CmpInst::Predicate pred
llvm::Value* LHS
llvm::Value* RHS
const llvm::Twine& NameStr = ""

FCmpInst(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:1392

Parameters

llvm::BasicBlock& InsertAtEnd
llvm::CmpInst::Predicate pred
llvm::Value* LHS
llvm::Value* RHS
const llvm::Twine& NameStr = ""

FCmpInst(llvm::CmpInst::Predicate Pred,
         llvm::Value* LHS,
         llvm::Value* RHS,
         const llvm::Twine& NameStr = "",
         llvm::Instruction* FlagsSource = nullptr)

Description

Constructor with no-insertion semantics

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

Parameters

llvm::CmpInst::Predicate Pred
llvm::Value* LHS
llvm::Value* RHS
const llvm::Twine& NameStr = ""
llvm::Instruction* FlagsSource = nullptr

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/Instructions.h:1460

Parameters

const llvm::Instruction* I

static bool classof(const llvm::Value* V)

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

Parameters

const llvm::Value* V

llvm::FCmpInst* cloneImpl() const

Description

Clone an identical FCmpInst

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

static bool compare(const llvm::APFloat& LHS,
                    const llvm::APFloat& RHS,
                    FCmpInst::Predicate Pred)

Description

Return result of `LHS Pred RHS` comparison.

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

Parameters

const llvm::APFloat& LHS
const llvm::APFloat& RHS
FCmpInst::Predicate Pred

bool isCommutative() const

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

Returns

true if the predicate of this instruction is commutative. Determine if this is a commutative predicate.

static bool isEquality(
    llvm::CmpInst::Predicate Pred)

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

Parameters

llvm::CmpInst::Predicate Pred

Returns

true if the predicate of this instruction is EQ or NE. Determine if this is an equality predicate.

bool isEquality() const

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

Returns

true if the predicate of this instruction is EQ or NE. Determine if this is an equality predicate.

bool isRelational() const

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

Returns

true if the predicate is relational (not EQ or NE). Determine if this a relational predicate.

static iota_range<llvm::CmpInst::Predicate>
predicates()

Description

Returns the sequence of all FCmp predicates.

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

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:1446