LLVM 22.0.0git
|
#include "llvm/IR/GenericFloatingPointPredicateUtils.h"
Static Public Member Functions | |
static std::pair< ValueRefT, FPClassTest > | fcmpToClassTest (FCmpInst::Predicate Pred, const FunctionT &F, ValueRefT LHS, ValueRefT RHS, bool LookThroughSrc) |
Returns a pair of values, which if passed to llvm.is.fpclass, returns the same result as an fcmp with the given operands. | |
static std::pair< ValueRefT, FPClassTest > | fcmpToClassTest (FCmpInst::Predicate Pred, const FunctionT &F, ValueRefT LHS, const APFloat &ConstRHS, bool LookThroughSrc) |
static std::tuple< ValueRefT, FPClassTest, FPClassTest > | fcmpImpliesClass (CmpInst::Predicate Pred, const FunctionT &F, ValueRefT LHS, FPClassTest RHSClass, bool LookThroughSrc) |
Compute the possible floating-point classes that LHS could be based on fcmp \Pred LHS , RHS . | |
static std::tuple< ValueRefT, FPClassTest, FPClassTest > | fcmpImpliesClass (CmpInst::Predicate Pred, const FunctionT &F, ValueRefT LHS, const APFloat &ConstRHS, bool LookThroughSrc) |
static std::tuple< ValueRefT, FPClassTest, FPClassTest > | fcmpImpliesClass (CmpInst::Predicate Pred, const FunctionT &F, ValueRefT LHS, ValueRefT RHS, bool LookThroughSrc) |
Definition at line 26 of file GenericFloatingPointPredicateUtils.h.
|
inlinestatic |
Definition at line 421 of file GenericFloatingPointPredicateUtils.h.
References llvm::APFloat::classify(), F, llvm::CmpInst::FCMP_OGE, llvm::CmpInst::FCMP_OLT, llvm::CmpInst::FCMP_UGE, llvm::CmpInst::FCMP_ULT, llvm::GenericFloatingPointPredicateUtils< ContextT >::fcmpImpliesClass(), llvm::fcNegInf, llvm::fcNegNormal, llvm::fcPosInf, llvm::fcPosNormal, llvm::fcSubnormal, llvm::fcZero, llvm::APFloat::isNegative(), llvm::APFloat::isSmallestNormalized(), llvm::CmpInst::isUnordered(), and LHS.
|
inlinestatic |
Compute the possible floating-point classes that LHS
could be based on fcmp \Pred LHS
, RHS
.
If the compare returns an exact class test, ClassesIfTrue == ~ClassesIfFalse
This is a less exact version of fcmpToClassTest (e.g. fcmpToClassTest will only succeed for a test of x > 0 implies positive, but not x > 1).
If LookThroughSrc
is true, consider the input value when computing the mask. This may look through sign bit operations.
If LookThroughSrc
is false, ignore the source value (i.e. the first pair element will always be LHS.
Definition at line 93 of file GenericFloatingPointPredicateUtils.h.
References assert(), F, llvm::fcAllFlags, llvm::fcFinite, llvm::fcInf, llvm::CmpInst::FCMP_FALSE, llvm::CmpInst::FCMP_OEQ, llvm::CmpInst::FCMP_OGE, llvm::CmpInst::FCMP_OGT, llvm::CmpInst::FCMP_OLE, llvm::CmpInst::FCMP_OLT, llvm::CmpInst::FCMP_ONE, llvm::CmpInst::FCMP_ORD, llvm::CmpInst::FCMP_TRUE, llvm::CmpInst::FCMP_UEQ, llvm::CmpInst::FCMP_UGE, llvm::CmpInst::FCMP_UGT, llvm::CmpInst::FCMP_ULE, llvm::CmpInst::FCMP_ULT, llvm::CmpInst::FCMP_UNE, llvm::CmpInst::FCMP_UNO, llvm::fcNan, llvm::fcNegative, llvm::fcNegInf, llvm::fcNegNormal, llvm::fcNegSubnormal, llvm::fcNegZero, llvm::fcNone, llvm::fcNormal, llvm::fcPosInf, llvm::fcPositive, llvm::fcPosNormal, llvm::fcPosSubnormal, llvm::fcPosZero, llvm::fcSubnormal, llvm::fcZero, llvm::DenormalMode::IEEE, llvm::Invalid, llvm::inverse_fabs(), llvm::CmpInst::isOrdered(), llvm::CmpInst::isUnordered(), LHS, llvm_unreachable, and Mode.
Referenced by llvm::fcmpImpliesClass(), llvm::GenericFloatingPointPredicateUtils< ContextT >::fcmpImpliesClass(), and llvm::GenericFloatingPointPredicateUtils< ContextT >::fcmpToClassTest().
|
inlinestatic |
Definition at line 472 of file GenericFloatingPointPredicateUtils.h.
References F, llvm::fcAllFlags, llvm::GenericFloatingPointPredicateUtils< ContextT >::fcmpImpliesClass(), llvm::Invalid, LHS, and RHS.
|
inlinestatic |
Definition at line 63 of file GenericFloatingPointPredicateUtils.h.
References F, llvm::fcAllFlags, llvm::GenericFloatingPointPredicateUtils< ContextT >::fcmpImpliesClass(), llvm::Invalid, and LHS.
|
inlinestatic |
Returns a pair of values, which if passed to llvm.is.fpclass, returns the same result as an fcmp with the given operands.
Definition at line 53 of file GenericFloatingPointPredicateUtils.h.
References F, llvm::fcAllFlags, llvm::GenericFloatingPointPredicateUtils< ContextT >::fcmpToClassTest(), llvm::Invalid, LHS, and RHS.
Referenced by llvm::fcmpToClassTest(), and llvm::GenericFloatingPointPredicateUtils< ContextT >::fcmpToClassTest().