LLVM 22.0.0git
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()

void canonicalizeRange ( APFloat & Lower,
APFloat & Upper )
static

◆ extendZeroIfEqual()

◆ fcmpPredExcludesEqual()

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()

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

◆ makeGreaterThan()

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

◆ makeLessThan()

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

◆ setNaNField()

◆ strictCompare()