LLVM: llvm::APFloat Class Reference (original) (raw)

#include "[llvm/ADT/APFloat.h](APFloat%5F8h%5Fsource.html)"

Public Member Functions
APFloat (const fltSemantics &Semantics)
LLVM_ABI APFloat (const fltSemantics &Semantics, StringRef S)
APFloat (const fltSemantics &Semantics, integerPart I)
template<typename T, typename = std::enable_if_t<std::is_floating_point::value>>
APFloat (const fltSemantics &Semantics, T V)=delete
APFloat (const fltSemantics &Semantics, uninitializedTag)
APFloat (const fltSemantics &Semantics, const APInt &I)
APFloat (double d)
APFloat (float f)
APFloat (const APFloat &RHS)=default
APFloat (APFloat &&RHS)=default
~APFloat ()=default
bool needsCleanup () const
LLVM_ABI void Profile (FoldingSetNodeID &NID) const
Used to insert APFloat objects, or objects that contain APFloat objects, into FoldingSets.
opStatus add (const APFloat &RHS, roundingMode RM)
opStatus subtract (const APFloat &RHS, roundingMode RM)
opStatus multiply (const APFloat &RHS, roundingMode RM)
opStatus divide (const APFloat &RHS, roundingMode RM)
opStatus remainder (const APFloat &RHS)
opStatus mod (const APFloat &RHS)
opStatus fusedMultiplyAdd (const APFloat &Multiplicand, const APFloat &Addend, roundingMode RM)
opStatus roundToIntegral (roundingMode RM)
opStatus next (bool nextDown)
APFloat operator- () const
Negate an APFloat.
APFloat operator+ (const APFloat &RHS) const
Add two APFloats, rounding ties to the nearest even.
APFloat operator- (const APFloat &RHS) const
Subtract two APFloats, rounding ties to the nearest even.
APFloat operator* (const APFloat &RHS) const
Multiply two APFloats, rounding ties to the nearest even.
APFloat operator/ (const APFloat &RHS) const
Divide the first APFloat by the second, rounding ties to the nearest even.
void changeSign ()
void clearSign ()
void copySign (const APFloat &RHS)
APFloat makeQuiet () const
Assuming this is an IEEE-754 NaN value, quiet its signaling bit.
LLVM_ABI opStatus convert (const fltSemantics &ToSemantics, roundingMode RM, bool *losesInfo)
opStatus convertToInteger (MutableArrayRef< integerPart > Input, unsigned int Width, bool IsSigned, roundingMode RM, bool *IsExact) const
LLVM_ABI opStatus convertToInteger (APSInt &Result, roundingMode RM, bool *IsExact) const
opStatus convertFromAPInt (const APInt &Input, bool IsSigned, roundingMode RM)
LLVM_ABI Expected< opStatus > convertFromString (StringRef, roundingMode)
APInt bitcastToAPInt () const
LLVM_ABI double convertToDouble () const
Converts this APFloat to host double value.
LLVM_ABI float convertToFloat () const
Converts this APFloat to host float value.
bool operator== (const APFloat &RHS) const
bool operator!= (const APFloat &RHS) const
bool operator< (const APFloat &RHS) const
bool operator> (const APFloat &RHS) const
bool operator<= (const APFloat &RHS) const
bool operator>= (const APFloat &RHS) const
cmpResult compare (const APFloat &RHS) const
bool bitwiseIsEqual (const APFloat &RHS) const
bool isExactlyValue (double V) const
We don't rely on operator== working on double values, as it returns true for things that are clearly not equal, like -0.0 and 0.0.
unsigned int convertToHexString (char *DST, unsigned int HexDigits, bool UpperCase, roundingMode RM) const
bool isZero () const
bool isInfinity () const
bool isNaN () const
bool isNegative () const
bool isDenormal () const
bool isSignaling () const
bool isNormal () const
bool isFinite () const
fltCategory getCategory () const
const fltSemantics & getSemantics () const
bool isNonZero () const
bool isFiniteNonZero () const
bool isPosZero () const
bool isNegZero () const
bool isPosInfinity () const
bool isNegInfinity () const
bool isSmallest () const
bool isLargest () const
bool isInteger () const
bool isSmallestNormalized () const
LLVM_ABI FPClassTest classify () const
Return the FPClassTest which will return true for the value.
APFloat & operator= (const APFloat &RHS)=default
APFloat & operator= (APFloat &&RHS)=default
void toString (SmallVectorImpl< char > &Str, unsigned FormatPrecision=0, unsigned FormatMaxPadding=3, bool TruncateZero=true) const
LLVM_ABI void print (raw_ostream &) const
LLVM_DUMP_METHOD void dump () const
LLVM_ABI bool getExactInverse (APFloat *Inv) const
If this value is normal and has an exact, normal, multiplicative inverse, store it in inv and return true.
LLVM_READONLY int getExactLog2Abs () const
LLVM_READONLY int getExactLog2 () const
Static Public Member Functions
static APFloat getZero (const fltSemantics &Sem, bool Negative=false)
Factory for Positive and Negative Zero.
static APFloat getOne (const fltSemantics &Sem, bool Negative=false)
Factory for Positive and Negative One.
static APFloat getInf (const fltSemantics &Sem, bool Negative=false)
Factory for Positive and Negative Infinity.
static APFloat getNaN (const fltSemantics &Sem, bool Negative=false, uint64_t payload=0)
Factory for NaN values.
static APFloat getQNaN (const fltSemantics &Sem, bool Negative=false, const APInt *payload=nullptr)
Factory for QNaN values.
static APFloat getSNaN (const fltSemantics &Sem, bool Negative=false, const APInt *payload=nullptr)
Factory for SNaN values.
static APFloat getLargest (const fltSemantics &Sem, bool Negative=false)
Returns the largest finite number in the given semantics.
static APFloat getSmallest (const fltSemantics &Sem, bool Negative=false)
Returns the smallest (by magnitude) finite number in the given semantics.
static APFloat getSmallestNormalized (const fltSemantics &Sem, bool Negative=false)
Returns the smallest (by magnitude) normalized finite number in the given semantics.
static LLVM_ABI APFloat getAllOnesValue (const fltSemantics &Semantics)
Returns a float which is bitcasted from an all one value int.
static bool hasSignificand (const fltSemantics &Sem)
Returns true if the given semantics has actual significand.
static APFloat copySign (APFloat Value, const APFloat &Sign)
A static helper to produce a copy of an APFloat value with its sign copied from some other APFloat.
Static Public Member Functions inherited from llvm::APFloatBase
static LLVM_ABI unsigned int semanticsPrecision (const fltSemantics &)
static LLVM_ABI ExponentType semanticsMinExponent (const fltSemantics &)
static LLVM_ABI ExponentType semanticsMaxExponent (const fltSemantics &)
static LLVM_ABI unsigned int semanticsSizeInBits (const fltSemantics &)
static LLVM_ABI unsigned int semanticsIntSizeInBits (const fltSemantics &, bool)
static LLVM_ABI bool semanticsHasZero (const fltSemantics &)
static LLVM_ABI bool semanticsHasSignedRepr (const fltSemantics &)
static LLVM_ABI bool semanticsHasInf (const fltSemantics &)
static LLVM_ABI bool semanticsHasNaN (const fltSemantics &)
static LLVM_ABI bool isIEEELikeFP (const fltSemantics &)
static LLVM_ABI bool hasSignBitInMSB (const fltSemantics &)
static LLVM_ABI bool isRepresentableAsNormalIn (const fltSemantics &Src, const fltSemantics &Dst)
static LLVM_ABI unsigned getSizeInBits (const fltSemantics &Sem)
Returns the size of the floating point number (in bits) in the given semantics.
static LLVM_ABI const llvm::fltSemantics & EnumToSemantics (Semantics S)
static LLVM_ABI Semantics SemanticsToEnum (const llvm::fltSemantics &Sem)
static const fltSemantics & IEEEhalf ()
static const fltSemantics & BFloat ()
static const fltSemantics & IEEEsingle ()
static const fltSemantics & IEEEdouble ()
static const fltSemantics & IEEEquad ()
static const fltSemantics & PPCDoubleDouble ()
static const fltSemantics & PPCDoubleDoubleLegacy ()
static const fltSemantics & Float8E5M2 ()
static const fltSemantics & Float8E5M2FNUZ ()
static const fltSemantics & Float8E4M3 ()
static const fltSemantics & Float8E4M3FN ()
static const fltSemantics & Float8E4M3FNUZ ()
static const fltSemantics & Float8E4M3B11FNUZ ()
static const fltSemantics & Float8E3M4 ()
static const fltSemantics & FloatTF32 ()
static const fltSemantics & Float8E8M0FNU ()
static const fltSemantics & Float6E3M2FN ()
static const fltSemantics & Float6E2M3FN ()
static const fltSemantics & Float4E2M1FN ()
static const fltSemantics & x87DoubleExtended ()
static const fltSemantics & Bogus ()
A Pseudo fltsemantic used to construct APFloats that cannot conflict with anything real.
static LLVM_ABI bool isRepresentableBy (const fltSemantics &A, const fltSemantics &B)
Public Attributes
friend IEEEFloat
friend DoubleAPFloat
Friends
LLVM_ABI friend hash_code hash_value (const APFloat &Arg)
See friend declarations above.
int ilogb (const APFloat &Arg)
Returns the exponent of the internal representation of the APFloat.
APFloat scalbn (APFloat X, int Exp, roundingMode RM)
APFloat frexp (const APFloat &X, int &Exp, roundingMode RM)
Additional Inherited Members
Public Types inherited from llvm::APFloatBase
enum cmpResult { cmpLessThan, cmpEqual, cmpGreaterThan, cmpUnordered }
IEEE-754R 5.11: Floating Point Comparison Relations. More...
enum opStatus { opOK = 0x00 , opInvalidOp = 0x01 , opDivByZero = 0x02 , opOverflow = 0x04 , opUnderflow = 0x08 , opInexact = 0x10 }
IEEE-754R 7: Default exception handling. More...
enum fltCategory { fcInfinity, fcNaN, fcNormal, fcZero }
Category of internally-represented number. More...
enum uninitializedTag { uninitialized }
Convenience enum used to construct an uninitialized APFloat. More...
enum IlogbErrorKinds { IEK_Zero = INT_MIN + 1 , IEK_NaN = INT_MIN , IEK_Inf = INT_MAX }
Enumeration of ilogb error results. More...
typedef APInt::WordType integerPart
using ExponentType = int32_t
A signed type to represent a floating point numbers unbiased exponent.
using roundingMode = llvm::RoundingMode
IEEE-754R 4.3: Rounding-direction attributes.
enum Semantics { S_IEEEhalf, S_BFloat, S_IEEEsingle, S_IEEEdouble, S_IEEEquad, S_PPCDoubleDouble, S_PPCDoubleDoubleLegacy, S_Float8E5M2, S_Float8E5M2FNUZ, S_Float8E4M3, S_Float8E4M3FN, S_Float8E4M3FNUZ, S_Float8E4M3B11FNUZ, S_Float8E3M4, S_FloatTF32, S_Float8E8M0FNU, S_Float6E3M2FN, S_Float6E2M3FN, S_Float4E2M1FN, S_x87DoubleExtended, S_MaxSemantics = S_x87DoubleExtended }
Static Public Attributes inherited from llvm::APFloatBase
static constexpr unsigned integerPartWidth = APInt::APINT_BITS_PER_WORD
static constexpr roundingMode rmNearestTiesToEven
static constexpr roundingMode rmTowardPositive = RoundingMode::TowardPositive
static constexpr roundingMode rmTowardNegative = RoundingMode::TowardNegative
static constexpr roundingMode rmTowardZero = RoundingMode::TowardZero
static constexpr roundingMode rmNearestTiesToAway

Definition at line 940 of file APFloat.h.

APFloat() [1/10]

APFloat() [2/10]

APFloat() [3/10]

APFloat() [4/10]

template<typename T, typename = std::enable_if_t<std::is_floating_point::value>>

References T.

APFloat() [5/10]

APFloat() [6/10]

APFloat() [7/10]

llvm::APFloat::APFloat ( double d) inlineexplicit

APFloat() [8/10]

llvm::APFloat::APFloat ( float f) inlineexplicit

APFloat() [9/10]

APFloat() [10/10]

llvm::APFloat::APFloat ( APFloat && RHS) default

References RHS.

llvm::APFloat::~APFloat ( ) default

add()

Definition at line 1163 of file APFloat.h.

References assert(), getSemantics(), llvm_unreachable, and RHS.

Referenced by llvm::ConstantFoldBinaryInstruction(), llvm::ConstantFoldFPBinOp(), llvm::SelectionDAG::FoldConstantArithmetic(), llvm::SelectionDAG::foldConstantFPMath(), llvm::ExecutionEngine::getConstantValue(), llvm::detail::DoubleAPFloat::multiply(), llvm::AMDGPUTargetLowering::PerformDAGCombine(), and llvm::detail::DoubleAPFloat::roundToIntegral().

bitcastToAPInt()

APInt llvm::APFloat::bitcastToAPInt ( ) const inline

Definition at line 1335 of file APFloat.h.

References APFLOAT_DISPATCH_ON_SEMANTICS, and bitcastToAPInt().

Referenced by llvm::DwarfExpression::addConstantFP(), llvm::DwarfUnit::addConstantFPValue(), bitcastToAPInt(), llvm::detail::DoubleAPFloat::convertFromString(), convertIntToDoubleImm(), llvm::convertToNonDenormSingle(), llvm::SPIRVGlobalRegistry::createConstFP(), llvm::detail::DoubleAPFloat::divide(), emitGlobalConstantFP(), llvm::TargetLowering::expandIS_FPCLASS(), llvm::InstCombinerImpl::foldICmpAndConstConst(), foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed(), llvm::detail::DoubleAPFloat::fusedMultiplyAdd(), llvm::generateSpecConstantInst(), llvm::ExecutionEngine::getConstantValue(), llvm::getExpressionForConstant(), llvm::AArch64_AM::getFP16Imm(), llvm::ARM_AM::getFP16Imm(), llvm::ARM_AM::getFP32FP16Imm(), llvm::AArch64_AM::getFP32Imm(), llvm::ARM_AM::getFP32Imm(), llvm::AArch64_AM::getFP64Imm(), llvm::ARM_AM::getFP64Imm(), llvm::RISCVLoadFPImm::getLoadFPImm(), llvm::HexagonLowerToMC(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::RISCVLegalizerInfo::legalizeCustom(), llvm::LegalizerHelper::lowerISFPCLASS(), llvm::CombinerHelper::matchCombineUnmergeConstant(), llvm::detail::DoubleAPFloat::mod(), llvm::NVPTXFloatMCExpr::printImpl(), Profile(), llvm::detail::DoubleAPFloat::remainder(), llvm::RISCVDAGToDAGISel::Select(), llvm::RISCVDAGToDAGISel::selectScalarFPAsInt(), llvm::stableHashValue(), llvm::LegalizerHelper::widenScalar(), and writeAPFloatInternal().

bitwiseIsEqual()

changeSign()

void llvm::APFloat::changeSign ( ) inline

Definition at line 1279 of file APFloat.h.

References APFLOAT_DISPATCH_ON_SEMANTICS, and changeSign().

Referenced by changeSign(), clearSign(), copySign(), llvm::PPCInstrInfo::finalizeInsInstrs(), llvm::TargetLowering::getNegatedExpression(), llvm::SelectionDAG::getNeutralElement(), getOne(), llvm::isNeutralConstant(), llvm::SPIRVCombinerHelper::matchSelectToFaceForward(), and llvm::X86TargetLowering::X86TargetLowering().

classify()

Return the FPClassTest which will return true for the value.

Definition at line 5982 of file APFloat.cpp.

References assert(), llvm::fcNegInf, llvm::fcNegNormal, llvm::fcNegSubnormal, llvm::fcNegZero, llvm::fcPosInf, llvm::fcPosNormal, llvm::fcPosSubnormal, llvm::fcPosZero, llvm::fcQNan, llvm::fcSNan, isDenormal(), isInfinity(), isNaN(), isNegative(), isNormal(), isSignaling(), and isZero().

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

clearSign()

void llvm::APFloat::clearSign ( ) inline

compare()

convert()

Definition at line 6053 of file APFloat.cpp.

References llvm::APFloatBase::APFloat, assert(), getSemantics(), llvm_unreachable, and llvm::APFloatBase::opOK.

Referenced by canLosslesslyConvertToFPType(), canSafelyConvertTo16Bit(), llvm::ConstantFPRange::cast(), llvm::checkConvertToNonDenormSingle(), llvm::ConstantFoldCastInstruction(), convertToDouble(), llvm::APFixedPoint::convertToFloat(), convertToFloat(), llvm::convertToNonDenormSingle(), emitDebugValueComment(), llvm::SelectionDAG::FoldConstantArithmetic(), llvm::SelectionDAG::foldConstantFPMath(), foldFCmpFpTrunc(), llvm::ConstantFP::get(), llvm::getAPFloatFromSize(), llvm::SelectionDAG::getConstantFP(), llvm::APFixedPoint::getFromFloatValue(), llvm::RISCVLoadFPImm::getLoadFPImm(), llvm::GCNTTIImpl::instCombineIntrinsic(), isExactlyValue(), llvm::ConstantFP::isExactlyValue(), isFPExtFromF16OrConst(), llvm::ConstantFP::isValueValidForType(), llvm::ConstantFPSDNode::isValueValidForType(), LLVMConstRealGetDouble(), LowerFROUND(), llvm::ARMAsmPrinter::lowerOperand(), matchFPExtFromF16(), llvm::NVPTXFloatMCExpr::printImpl(), strictFPExtFromF16(), llvm::InstCombinerImpl::visitFCmpInst(), writeAPFloatInternal(), and llvm::X86TargetLowering::X86TargetLowering().

convertFromAPInt()

Definition at line 1329 of file APFloat.h.

References APFLOAT_DISPATCH_ON_SEMANTICS, and convertFromAPInt().

Referenced by llvm::ConstantFoldCastInstruction(), llvm::ConstantFoldIntToFloat(), convertFromAPInt(), llvm::APFixedPoint::convertToFloat(), llvm::TargetLowering::expandFP_TO_INT_SAT(), llvm::TargetLowering::expandFP_TO_UINT(), llvm::SelectionDAG::FoldConstantArithmetic(), llvm::ExecutionEngine::getConstantValue(), llvm::LegalizerHelper::lowerFPTOINT_SAT(), llvm::LegalizerHelper::lowerFPTOUI(), lowerFTRUNC_FCEIL_FFLOOR_FROUND(), lowerVectorFTRUNC_FCEIL_FFLOOR_FROUND(), and lowerVectorStrictFTRUNC_FCEIL_FFLOOR_FROUND().

convertFromString()

convertToDouble()

double llvm::APFloat::convertToDouble ( ) const

Converts this APFloat to host double value.

Precondition

The APFloat must be built using semantics, that can be represented by the host double type without loss of precision. It can be IEEEdouble and shorter semantics, like IEEEsingle and others.

Definition at line 6112 of file APFloat.cpp.

References assert(), convert(), llvm::detail::IEEEFloat::convertToDouble(), getSemantics(), llvm::APFloatBase::isRepresentableBy(), llvm::APFloatBase::opInexact, and llvm::APFloatBase::rmNearestTiesToEven.

Referenced by emitDebugValueComment(), LLVMConstRealGetDouble(), llvm::ARMAsmPrinter::lowerOperand(), and writeAPFloatInternal().

convertToFloat()

float llvm::APFloat::convertToFloat ( ) const

Converts this APFloat to host float value.

Precondition

The APFloat must be built using semantics, that can be represented by the host float type without loss of precision. It can be IEEEquad and shorter semantics, like IEEEdouble and others. Converts this APFloat to host float value.

The APFloat must be built using semantics, that can be represented by the host float type without loss of precision. It can be IEEEsingle and shorter semantics, like IEEEhalf.

Definition at line 6143 of file APFloat.cpp.

References assert(), convert(), llvm::detail::IEEEFloat::convertToFloat(), getSemantics(), llvm::APFloatBase::isRepresentableBy(), llvm::APFloatBase::opInexact, and llvm::APFloatBase::rmNearestTiesToEven.

Referenced by llvm::FPMathOperator::getFPAccuracy(), insertSpirvDecorations(), and llvm::SPIRVMCInstLower::lower().

convertToHexString()

convertToInteger() [1/2]

convertToInteger() [2/2]

copySign() [1/2]

A static helper to produce a copy of an APFloat value with its sign copied from some other APFloat.

Definition at line 1291 of file APFloat.h.

copySign() [2/2]

divide()

dump()

fusedMultiplyAdd()

getAllOnesValue()

getCategory()

fltCategory llvm::APFloat::getCategory ( ) const inline

getExactInverse()

bool llvm::APFloat::getExactInverse ( APFloat * Inv ) const

If this value is normal and has an exact, normal, multiplicative inverse, store it in inv and return true.

Definition at line 5995 of file APFloat.cpp.

References assert(), getExactLog2Abs(), getOne(), getSemantics(), isDenormal(), isFiniteNonZero(), isNegative(), llvm::APFloatBase::rmTowardZero, and scalbn.

Referenced by checkCVTFixedPointOperandWithFBits(), and PerformVMulVCTPCombine().

getExactLog2()

getExactLog2Abs()

LLVM_READONLY int llvm::APFloat::getExactLog2Abs ( ) const inline

getInf()

Factory for Positive and Negative Infinity.

Parameters

Negative True iff the number should be negative.

Definition at line 1080 of file APFloat.h.

References llvm::APFloatBase::uninitialized.

Referenced by llvm::ConstantFPRange::add(), canonicalizeRange(), computeKnownBitsFromOperator(), computeKnownFPClass(), llvm::ConstantFPRange::div(), llvm::TargetLowering::expandIS_FPCLASS(), llvm::InstCombinerImpl::foldICmpAndConstConst(), foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed(), llvm::ConstantFP::getInfinity(), llvm::AMDGPUTargetLowering::getIsFinite(), llvm::ConstantFPRange::getNaNOnly(), llvm::SelectionDAG::getNeutralElement(), llvm::ConstantFPRange::getNonNaN(), llvm::harrisonUlp(), llvm::isNeutralConstant(), llvm::AMDGPULegalizerInfo::legalizeFExp(), llvm::AMDGPULegalizerInfo::legalizeFFREXP(), llvm::AMDGPULegalizerInfo::legalizeFlogCommon(), llvm::AMDGPUTargetLowering::lowerFEXP(), lowerFREM(), llvm::LegalizerHelper::lowerISFPCLASS(), llvm::ConstantFPRange::makeAllowedFCmpRegion(), llvm::fuzzerop::makeConstantsWithType(), makeGreaterThan(), makeLessThan(), and llvm::ConstantFPRange::mul().

getLargest()

Returns the largest finite number in the given semantics.

Parameters

Negative - True iff the number should be negative

Definition at line 1120 of file APFloat.h.

References llvm::APFloatBase::uninitialized.

Referenced by computeKnownFPClass(), llvm::TargetLowering::expandIS_FPCLASS(), llvm::InstCombinerImpl::foldFCmpIntToFPConst(), llvm::ConstantFPRange::getFinite(), llvm::SelectionDAG::getNeutralElement(), llvm::getReductionIdentity(), llvm::isNeutralConstant(), llvm::AMDGPULegalizerInfo::legalizeRsqClampIntrinsic(), llvm::LegalizerHelper::lowerISFPCLASS(), llvm::ConstantFPRange::makeAllowedFCmpRegion(), llvm::fuzzerop::makeConstantsWithType(), removeInf(), and SameSignRange::SameSignRange().

getNaN()

getOne()

getQNaN()

getSemantics()

Definition at line 1439 of file APFloat.h.

Referenced by add(), llvm::ConstantFPRange::add(), bitwiseIsEqual(), llvm::MachineIRBuilder::buildFConstant(), compare(), constantFoldFpUnary(), llvm::ConstantFPRange::contains(), convert(), convertToDouble(), convertToFloat(), divide(), flushDenormalConstant(), fusedMultiplyAdd(), getExactInverse(), llvm::RISCVLoadFPImm::getLoadFPImm(), hash_value, ilogb, llvm::GCNTTIImpl::instCombineIntrinsic(), isExactlyValue(), isRepresentableAsExactInteger(), llvm::ConstantFP::isValueValidForType(), mod(), multiply(), llvm::AMDGPUTargetLowering::performRcpCombine(), printConstant(), remainder(), subtract(), llvm::SystemZVectorConstantInfo::SystemZVectorConstantInfo(), and writeAPFloatInternal().

getSmallest()

getSmallestNormalized()

getSNaN()

getZero()

Factory for Positive and Negative Zero.

Parameters

Negative True iff the number should be negative.

Definition at line 1061 of file APFloat.h.

References llvm::APFloatBase::uninitialized.

Referenced by llvm::ConstantFPRange::abs(), computeKnownFPClass(), llvm::ConstantFPRange::div(), extendZeroIfEqual(), llvm::detail::fastTwoSum(), fixFuncEntryCount(), flushDenormalConstant(), llvm::ConstantFPRange::flushDenormals(), llvm::generateReadImageInst(), llvm::ExecutionEngine::getConstantValue(), getIdentityValueForAtomicOp(), llvm::Constant::getNullValue(), llvm::ConstantFP::getZero(), getZeroFP(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::fuzzerop::makeConstantsWithType(), printConstant(), splitPosNeg(), llvm::pdb::Variant::toAPFloat(), and llvm::X86TargetLowering::X86TargetLowering().

hasSignificand()

isDenormal()

bool llvm::APFloat::isDenormal ( ) const inline

isExactlyValue()

bool llvm::APFloat::isExactlyValue ( double V) const inline

isFinite()

bool llvm::APFloat::isFinite ( ) const inline

isFiniteNonZero()

bool llvm::APFloat::isFiniteNonZero ( ) const inline

isInfinity()

bool llvm::APFloat::isInfinity ( ) const inline

Definition at line 1428 of file APFloat.h.

References llvm::APFloatBase::fcInfinity, and getCategory().

Referenced by classify(), foldFCmpFpTrunc(), llvm::GCNTTIImpl::instCombineIntrinsic(), isFinite(), llvm::isMathLibCallNoop(), isNegInfinity(), isPosInfinity(), llvm::detail::DoubleAPFloat::next(), OptimizeConstMinMax(), and writeAPFloatInternal().

isInteger()

bool llvm::APFloat::isInteger ( ) const inline

isLargest()

bool llvm::APFloat::isLargest ( ) const inline

isNaN()

bool llvm::APFloat::isNaN ( ) const inline

Definition at line 1429 of file APFloat.h.

References llvm::APFloatBase::fcNaN, and getCategory().

Referenced by llvm::ConstantFPRange::cast(), classify(), computeKnownFPClass(), llvm::ConstantFPRange::contains(), foldFCmpFpTrunc(), llvm::GCNTTIImpl::instCombineIntrinsic(), isFinite(), llvm::isMathLibCallNoop(), llvm::CombinerHelper::matchCombineFMinMaxNaN(), OptimizeConstMinMax(), and writeAPFloatInternal().

isNegative()

bool llvm::APFloat::isNegative ( ) const inline

Definition at line 1431 of file APFloat.h.

Referenced by classify(), clearSign(), copySign(), llvm::GenericFloatingPointPredicateUtils< SSAContext >::fcmpImpliesClass(), flushDenormalConstant(), llvm::detail::frexp(), getExactInverse(), getExactLog2(), llvm::RISCVLoadFPImm::getLoadFPImm(), isNegInfinity(), isNegZero(), isPosInfinity(), isPosZero(), OptimizeConstMinMax(), llvm::detail::DoubleAPFloat::roundToIntegral(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitFMul(), and writeAPFloatInternal().

isNegInfinity()

bool llvm::APFloat::isNegInfinity ( ) const inline

isNegZero()

bool llvm::APFloat::isNegZero ( ) const inline

isNonZero()

bool llvm::APFloat::isNonZero ( ) const inline

isNormal()

bool llvm::APFloat::isNormal ( ) const inline

isPosInfinity()

bool llvm::APFloat::isPosInfinity ( ) const inline

isPosZero()

bool llvm::APFloat::isPosZero ( ) const inline

isSignaling()

bool llvm::APFloat::isSignaling ( ) const inline

isSmallest()

bool llvm::APFloat::isSmallest ( ) const inline

isSmallestNormalized()

bool llvm::APFloat::isSmallestNormalized ( ) const inline

isZero()

bool llvm::APFloat::isZero ( ) const inline

Definition at line 1427 of file APFloat.h.

References llvm::APFloatBase::fcZero, and getCategory().

Referenced by classify(), expandNormalizeIntrinsic(), llvm::detail::frexp(), isFiniteNonZero(), llvm::isMathLibCallNoop(), isNegZero(), isNonZero(), isPosZero(), llvm::detail::DoubleAPFloat::next(), llvm::RISCVDAGToDAGISel::Select(), llvm::SelectionDAG::simplifyFPBinop(), llvm::InstCombinerImpl::visitFCmpInst(), and llvm::InstCombinerImpl::visitFMul().

makeQuiet()

APFloat llvm::APFloat::makeQuiet ( ) const inlinenodiscard

mod()

multiply()

needsCleanup()

bool llvm::APFloat::needsCleanup ( ) const inline

next()

operator!=()

operator*()

operator+()

operator-() [1/2]

APFloat llvm::APFloat::operator- ( ) const inline

operator-() [2/2]

operator/()

operator<()

operator<=()

operator=() [1/2]

operator=() [2/2]

operator==()

operator>()

operator>=()

print()

Profile()

remainder()

roundToIntegral()

subtract()

toString()

frexp

hash_value

ilogb

scalbn

DoubleAPFloat

IEEEFloat


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