LLVM API Documentation
Represents a floating point comparison operator. More...
#include <Instructions.h>
Public Member Functions | |
FCmpInst (Instruction *InsertBefore, Predicate pred, Value *LHS, Value *RHS, const Twine &NameStr="") | |
Constructor with insert-before-instruction semantics. | |
FCmpInst (BasicBlock &InsertAtEnd, Predicate pred, Value *LHS, Value *RHS, const Twine &NameStr="") | |
Constructor with insert-at-end semantics. | |
FCmpInst (Predicate pred, Value *LHS, Value *RHS, const Twine &NameStr="") | |
Constructor with no-insertion semantics. | |
bool | isEquality () const |
Determine if this is an equality predicate. | |
bool | isCommutative () const |
Determine if this is a commutative predicate. | |
bool | isRelational () const |
Determine if this a relational predicate. | |
void | swapOperands () |
Swap operands and adjust predicate. | |
Static Public Member Functions | |
static bool | classof (const Instruction *I) |
Methods for support type inquiry through isa, cast, and dyn_cast: | |
static bool | classof (const Value *V) |
Methods for support type inquiry through isa, cast, and dyn_cast: | |
Protected Member Functions | |
FCmpInst * | clone_impl () const override |
Clone an identical FCmpInst. |
Represents a floating point comparison operator.
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.
Definition at line 1135 of file Instructions.h.
llvm::FCmpInst::FCmpInst | ( | Instruction * | InsertBefore, |
Predicate | pred, | ||
Value * | LHS, | ||
Value * | RHS, | ||
const Twine & | NameStr = "" |
||
) | [inline] |
Constructor with insert-before-instruction semantics.
InsertBefore | Where to insert |
pred | The predicate to use for the comparison |
LHS | The left-hand-side of the expression |
RHS | The right-hand-side of the expression |
NameStr | Name of the instruction |
Definition at line 1141 of file Instructions.h.
References llvm::User::getOperand(), llvm::Value::getType(), and llvm::CmpInst::LAST_FCMP_PREDICATE.
Referenced by clone_impl().
llvm::FCmpInst::FCmpInst | ( | BasicBlock & | InsertAtEnd, |
Predicate | pred, | ||
Value * | LHS, | ||
Value * | RHS, | ||
const Twine & | NameStr = "" |
||
) | [inline] |
Constructor with insert-at-end semantics.
InsertAtEnd | Block to insert into. |
pred | The predicate to use for the comparison |
LHS | The left-hand-side of the expression |
RHS | The right-hand-side of the expression |
NameStr | Name of the instruction |
Definition at line 1160 of file Instructions.h.
References llvm::User::getOperand(), llvm::Value::getType(), and llvm::CmpInst::LAST_FCMP_PREDICATE.
llvm::FCmpInst::FCmpInst | ( | Predicate | pred, |
Value * | LHS, | ||
Value * | RHS, | ||
const Twine & | NameStr = "" |
||
) | [inline] |
Constructor with no-insertion semantics.
pred | The predicate to use for the comparison |
LHS | The left-hand-side of the expression |
RHS | The right-hand-side of the expression |
NameStr | Name of the instruction |
Definition at line 1179 of file Instructions.h.
References llvm::User::getOperand(), llvm::Value::getType(), and llvm::CmpInst::LAST_FCMP_PREDICATE.
static bool llvm::FCmpInst::classof | ( | const Instruction * | I | ) | [inline, static] |
Methods for support type inquiry through isa, cast, and dyn_cast:
Reimplemented from llvm::CmpInst.
Definition at line 1227 of file Instructions.h.
References llvm::FCmp, and llvm::Instruction::getOpcode().
Referenced by classof().
static bool llvm::FCmpInst::classof | ( | const Value * | V | ) | [inline, static] |
Methods for support type inquiry through isa, cast, and dyn_cast:
Reimplemented from llvm::CmpInst.
Definition at line 1230 of file Instructions.h.
References classof().
FCmpInst * FCmpInst::clone_impl | ( | ) | const [override, protected, virtual] |
Clone an identical FCmpInst.
Implements llvm::Instruction.
Definition at line 3621 of file Instructions.cpp.
References FCmpInst(), and llvm::CmpInst::getPredicate().
bool llvm::FCmpInst::isCommutative | ( | ) | const [inline] |
Determine if this is a commutative predicate.
Reimplemented from llvm::CmpInst.
Definition at line 1204 of file Instructions.h.
References llvm::CmpInst::FCMP_FALSE, llvm::CmpInst::FCMP_ORD, llvm::CmpInst::FCMP_TRUE, llvm::CmpInst::FCMP_UNO, llvm::CmpInst::getPredicate(), and isEquality().
bool llvm::FCmpInst::isEquality | ( | ) | const [inline] |
Determine if this is an equality predicate.
Reimplemented from llvm::CmpInst.
Definition at line 1197 of file Instructions.h.
References llvm::CmpInst::FCMP_OEQ, llvm::CmpInst::FCMP_ONE, llvm::CmpInst::FCMP_UEQ, llvm::CmpInst::FCMP_UNE, and llvm::CmpInst::getPredicate().
Referenced by isCommutative(), and isRelational().
bool llvm::FCmpInst::isRelational | ( | ) | const [inline] |
Determine if this a relational predicate.
Definition at line 1214 of file Instructions.h.
References isEquality().
void llvm::FCmpInst::swapOperands | ( | ) | [inline] |
Swap operands and adjust predicate.
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).
Reimplemented from llvm::CmpInst.
Definition at line 1221 of file Instructions.h.
References llvm::CmpInst::getSwappedPredicate(), llvm::CmpInst::setPredicate(), and std::swap().
Referenced by llvm::InstCombiner::visitFCmpInst().