LLVM 22.0.0git
llvm::GenericFloatingPointPredicateUtils< ContextT > Class Template Reference

#include "llvm/IR/GenericFloatingPointPredicateUtils.h"

Inheritance diagram for llvm::GenericFloatingPointPredicateUtils< ContextT >:
[legend]

Static Public Member Functions

static std::pair< ValueRefT, FPClassTestfcmpToClassTest (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, FPClassTestfcmpToClassTest (FCmpInst::Predicate Pred, const FunctionT &F, ValueRefT LHS, const APFloat &ConstRHS, bool LookThroughSrc)
static std::tuple< ValueRefT, FPClassTest, FPClassTestfcmpImpliesClass (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, FPClassTestfcmpImpliesClass (CmpInst::Predicate Pred, const FunctionT &F, ValueRefT LHS, const APFloat &ConstRHS, bool LookThroughSrc)
static std::tuple< ValueRefT, FPClassTest, FPClassTestfcmpImpliesClass (CmpInst::Predicate Pred, const FunctionT &F, ValueRefT LHS, ValueRefT RHS, bool LookThroughSrc)

Detailed Description

template<typename ContextT>
class llvm::GenericFloatingPointPredicateUtils< ContextT >

Definition at line 26 of file GenericFloatingPointPredicateUtils.h.

Member Function Documentation

◆ fcmpImpliesClass() [1/3]

template<typename ContextT>
std::tuple< ValueRefT, FPClassTest, FPClassTest > llvm::GenericFloatingPointPredicateUtils< ContextT >::fcmpImpliesClass ( CmpInst::Predicate Pred,
const FunctionT & F,
ValueRefT LHS,
const APFloat & ConstRHS,
bool LookThroughSrc )
inlinestatic

Definition at line 421 of file GenericFloatingPointPredicateUtils.h.

◆ fcmpImpliesClass() [2/3]

template<typename ContextT>
std::tuple< ValueRefT, FPClassTest, FPClassTest > llvm::GenericFloatingPointPredicateUtils< ContextT >::fcmpImpliesClass ( CmpInst::Predicate Pred,
const FunctionT & F,
ValueRefT LHS,
FPClassTest RHSClass,
bool LookThroughSrc )
inlinestatic

Compute the possible floating-point classes that LHS could be based on fcmp \Pred LHS, RHS.

Returns
{ TestedValue, ClassesIfTrue, ClassesIfFalse }

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.

Referenced by llvm::GenericFloatingPointPredicateUtils< SSAContext >::fcmpImpliesClass(), llvm::GenericFloatingPointPredicateUtils< SSAContext >::fcmpImpliesClass(), and llvm::GenericFloatingPointPredicateUtils< SSAContext >::fcmpToClassTest().

◆ fcmpImpliesClass() [3/3]

template<typename ContextT>
std::tuple< ValueRefT, FPClassTest, FPClassTest > llvm::GenericFloatingPointPredicateUtils< ContextT >::fcmpImpliesClass ( CmpInst::Predicate Pred,
const FunctionT & F,
ValueRefT LHS,
ValueRefT RHS,
bool LookThroughSrc )
inlinestatic

Definition at line 472 of file GenericFloatingPointPredicateUtils.h.

◆ fcmpToClassTest() [1/2]

template<typename ContextT>
std::pair< ValueRefT, FPClassTest > llvm::GenericFloatingPointPredicateUtils< ContextT >::fcmpToClassTest ( FCmpInst::Predicate Pred,
const FunctionT & F,
ValueRefT LHS,
const APFloat & ConstRHS,
bool LookThroughSrc )
inlinestatic

Definition at line 63 of file GenericFloatingPointPredicateUtils.h.

◆ fcmpToClassTest() [2/2]

template<typename ContextT>
std::pair< ValueRefT, FPClassTest > llvm::GenericFloatingPointPredicateUtils< ContextT >::fcmpToClassTest ( FCmpInst::Predicate Pred,
const FunctionT & F,
ValueRefT LHS,
ValueRefT RHS,
bool LookThroughSrc )
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.

Referenced by llvm::GenericFloatingPointPredicateUtils< SSAContext >::fcmpToClassTest().


The documentation for this class was generated from the following file: