LLVM 20.0.0git
Functions
ConstantFPRange.cpp File Reference
#include "llvm/IR/ConstantFPRange.h"
#include "llvm/ADT/APFloat.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>

Go to the source code of this file.

Functions

static APFloat::cmpResult strictCompare (const APFloat &LHS, const APFloat &RHS)
 
static bool isNonCanonicalEmptySet (const APFloat &Lower, const APFloat &Upper)
 
static void canonicalizeRange (APFloat &Lower, APFloat &Upper)
 
static bool fcmpPredExcludesEqual (FCmpInst::Predicate Pred)
 Return true for ULT/UGT/OLT/OGT.
 
static ConstantFPRange makeLessThan (APFloat V, FCmpInst::Predicate Pred)
 Return [-inf, V) or [-inf, V].
 
static ConstantFPRange makeGreaterThan (APFloat V, FCmpInst::Predicate Pred)
 Return (V, +inf] or [V, +inf].
 
static ConstantFPRange extendZeroIfEqual (const ConstantFPRange &CR, FCmpInst::Predicate Pred)
 Make sure that +0/-0 are both included in the range.
 
static ConstantFPRange setNaNField (const ConstantFPRange &CR, FCmpInst::Predicate Pred)
 

Function Documentation

◆ canonicalizeRange()

static void canonicalizeRange ( APFloat Lower,
APFloat Upper 
)
static

◆ extendZeroIfEqual()

static ConstantFPRange extendZeroIfEqual ( const ConstantFPRange CR,
FCmpInst::Predicate  Pred 
)
static

◆ fcmpPredExcludesEqual()

static bool fcmpPredExcludesEqual ( FCmpInst::Predicate  Pred)
static

Return true for ULT/UGT/OLT/OGT.

Definition at line 112 of file ConstantFPRange.cpp.

References llvm::CmpInst::FCMP_OEQ.

Referenced by extendZeroIfEqual(), makeGreaterThan(), and makeLessThan().

◆ isNonCanonicalEmptySet()

static bool isNonCanonicalEmptySet ( const APFloat Lower,
const APFloat Upper 
)
static

◆ makeGreaterThan()

static ConstantFPRange makeGreaterThan ( APFloat  V,
FCmpInst::Predicate  Pred 
)
static

◆ makeLessThan()

static ConstantFPRange makeLessThan ( APFloat  V,
FCmpInst::Predicate  Pred 
)
static

◆ setNaNField()

static ConstantFPRange setNaNField ( const ConstantFPRange CR,
FCmpInst::Predicate  Pred 
)
static

◆ strictCompare()

static APFloat::cmpResult strictCompare ( const APFloat LHS,
const APFloat RHS 
)
static