LLVM 19.0.0git
|
#include "llvm/ADT/APFloat.h"
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 APFloat | getAllOnesValue (const fltSemantics &Semantics) |
Returns a float which is bitcasted from an all one value int. | |
static bool | hasNanOrInf (const fltSemantics &Sem) |
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 unsigned int | semanticsPrecision (const fltSemantics &) |
static ExponentType | semanticsMinExponent (const fltSemantics &) |
static ExponentType | semanticsMaxExponent (const fltSemantics &) |
static unsigned int | semanticsSizeInBits (const fltSemantics &) |
static unsigned int | semanticsIntSizeInBits (const fltSemantics &, bool) |
static bool | isRepresentableAsNormalIn (const fltSemantics &Src, const fltSemantics &Dst) |
static unsigned | getSizeInBits (const fltSemantics &Sem) |
Returns the size of the floating point number (in bits) in the given semantics. | |
static const llvm::fltSemantics & | EnumToSemantics (Semantics S) |
static Semantics | SemanticsToEnum (const llvm::fltSemantics &Sem) |
static const fltSemantics & | IEEEhalf () LLVM_READNONE |
static const fltSemantics & | BFloat () LLVM_READNONE |
static const fltSemantics & | IEEEsingle () LLVM_READNONE |
static const fltSemantics & | IEEEdouble () LLVM_READNONE |
static const fltSemantics & | IEEEquad () LLVM_READNONE |
static const fltSemantics & | PPCDoubleDouble () LLVM_READNONE |
static const fltSemantics & | Float8E5M2 () LLVM_READNONE |
static const fltSemantics & | Float8E5M2FNUZ () LLVM_READNONE |
static const fltSemantics & | Float8E4M3FN () LLVM_READNONE |
static const fltSemantics & | Float8E4M3FNUZ () LLVM_READNONE |
static const fltSemantics & | Float8E4M3B11FNUZ () LLVM_READNONE |
static const fltSemantics & | FloatTF32 () LLVM_READNONE |
static const fltSemantics & | Float6E3M2FN () LLVM_READNONE |
static const fltSemantics & | Float6E2M3FN () LLVM_READNONE |
static const fltSemantics & | Float4E2M1FN () LLVM_READNONE |
static const fltSemantics & | x87DoubleExtended () LLVM_READNONE |
static const fltSemantics & | Bogus () LLVM_READNONE |
A Pseudo fltsemantic used to construct APFloats that cannot conflict with anything real. | |
Public Attributes | |
friend | IEEEFloat |
friend | DoubleAPFloat |
Friends | |
hash_code | hash_value (const APFloat &Arg) |
See friend declarations above. | |
int | ilogb (const APFloat &Arg) |
APFloat | scalbn (APFloat X, int Exp, roundingMode RM) |
APFloat | frexp (const APFloat &X, int &Exp, roundingMode RM) |
|
inline |
llvm::APFloat::APFloat | ( | const fltSemantics & | Semantics, |
StringRef | S | ||
) |
Definition at line 5262 of file APFloat.cpp.
References assert(), llvm::consumeError(), convertFromString(), and llvm::APFloatBase::rmNearestTiesToEven.
|
inline |
|
delete |
|
inline |
|
inline |
|
default |
|
default |
|
inline |
Definition at line 1086 of file APFloat.h.
References assert(), getSemantics(), llvm_unreachable, and RHS.
Referenced by llvm::ConstantFoldBinaryInstruction(), llvm::ConstantFoldFPBinOp(), llvm::SelectionDAG::foldConstantFPMath(), llvm::ExecutionEngine::getConstantValue(), llvm::SelectionDAG::getNode(), llvm::detail::DoubleAPFloat::multiply(), and llvm::AMDGPUTargetLowering::PerformDAGCombine().
|
inline |
Definition at line 1254 of file APFloat.h.
References APFLOAT_DISPATCH_ON_SEMANTICS, and bitcastToAPInt().
Referenced by llvm::DwarfExpression::addConstantFP(), llvm::DwarfUnit::addConstantFPValue(), bitcastToAPInt(), computeKnownBitsFromOperator(), llvm::detail::DoubleAPFloat::convertFromAPInt(), llvm::detail::DoubleAPFloat::convertFromSignExtendedInteger(), llvm::detail::DoubleAPFloat::convertFromString(), llvm::detail::DoubleAPFloat::convertFromZeroExtendedInteger(), convertIntToDoubleImm(), llvm::convertToNonDenormSingle(), llvm::detail::DoubleAPFloat::divide(), emitGlobalConstantFP(), llvm::TargetLowering::expandIS_FPCLASS(), llvm::InstCombinerImpl::foldICmpAndConstConst(), llvm::detail::DoubleAPFloat::fusedMultiplyAdd(), llvm::generateSpecConstantInst(), llvm::ExecutionEngine::getConstantValue(), llvm::detail::DoubleAPFloat::getExactInverse(), 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::SPIRVGlobalRegistry::getOrCreateConstFP(), llvm::HexagonLowerToMC(), llvm::LegalizerHelper::lowerISFPCLASS(), llvm::CombinerHelper::matchCombineUnmergeConstant(), llvm::detail::DoubleAPFloat::mod(), llvm::detail::DoubleAPFloat::next(), llvm::NVPTXFloatMCExpr::printImpl(), Profile(), llvm::detail::DoubleAPFloat::remainder(), llvm::detail::DoubleAPFloat::roundToIntegral(), llvm::RISCVDAGToDAGISel::Select(), llvm::RISCVDAGToDAGISel::selectFPImm(), llvm::stableHashValue(), llvm::LegalizerHelper::widenScalar(), and WriteAPFloatInternal().
Definition at line 1313 of file APFloat.h.
References getSemantics(), llvm_unreachable, and RHS.
Referenced by llvm::ConstantFP::isExactlyValue(), isExactlyValue(), and isInv2Pi().
|
inline |
Definition at line 1202 of file APFloat.h.
References APFLOAT_DISPATCH_ON_SEMANTICS, and changeSign().
Referenced by changeSign(), clearSign(), copySign(), llvm::PPCInstrInfo::finalizeInsInstrs(), llvm::SelectionDAG::getNeutralElement(), llvm::isNeutralConstant(), and llvm::X86TargetLowering::X86TargetLowering().
FPClassTest llvm::APFloat::classify | ( | ) | const |
Return the FPClassTest which will return true for the value.
Definition at line 5269 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::fcmpImpliesClass(), and llvm::InstCombinerImpl::foldICmpBitCast().
|
inline |
Definition at line 1203 of file APFloat.h.
References changeSign(), and isNegative().
Referenced by LowerFCOPYSIGN(), llvm::InstCombinerImpl::visitCallInst(), and llvm::InstCombinerImpl::visitFCmpInst().
Definition at line 1303 of file APFloat.h.
References assert(), getSemantics(), llvm_unreachable, and RHS.
Referenced by fmed3AMDGCN(), operator!=(), operator<(), operator<=(), operator==(), operator>(), and operator>=().
APFloat::opStatus llvm::APFloat::convert | ( | const fltSemantics & | ToSemantics, |
roundingMode | RM, | ||
bool * | losesInfo | ||
) |
Definition at line 5282 of file APFloat.cpp.
References assert(), llvm::detail::IEEEFloat::convert(), getSemantics(), llvm_unreachable, llvm::APFloatBase::opOK, llvm::semPPCDoubleDouble, and llvm::semPPCDoubleDoubleLegacy.
Referenced by canLosslesslyConvertToFPType(), canSafelyConvertTo16Bit(), llvm::checkConvertToNonDenormSingle(), llvm::ConstantFoldCastInstruction(), convertToDouble(), convertToFloat(), llvm::APFixedPoint::convertToFloat(), llvm::convertToNonDenormSingle(), emitDebugValueComment(), llvm::SelectionDAG::FoldConstantArithmetic(), llvm::SelectionDAG::foldConstantFPMath(), llvm::ConstantFP::get(), llvm::getAPFloatFromSize(), llvm::SelectionDAG::getConstantFP(), llvm::APFixedPoint::getFromFloatValue(), llvm::RISCVLoadFPImm::getLoadFPImm(), llvm::GCNTTIImpl::instCombineIntrinsic(), isExactlyValue(), llvm::ConstantFP::isExactlyValue(), isFPExtFromF16OrConst(), llvm::ConstantFPSDNode::isValueValidForType(), llvm::ConstantFP::isValueValidForType(), LLVMConstRealGetDouble(), LowerFROUND(), llvm::ARMAsmPrinter::lowerOperand(), matchFPExtFromF16(), llvm::NVPTXFloatMCExpr::printImpl(), strictFPExtFromF16(), llvm::InstCombinerImpl::visitFCmpInst(), WriteAPFloatInternal(), and llvm::X86TargetLowering::X86TargetLowering().
|
inline |
Definition at line 1237 of file APFloat.h.
References APFLOAT_DISPATCH_ON_SEMANTICS, and convertFromAPInt().
Referenced by llvm::ConstantFoldCastInstruction(), llvm::ConstantFoldIntToFloat(), llvm::detail::DoubleAPFloat::convertFromAPInt(), convertFromAPInt(), llvm::TargetLowering::expandFP_TO_INT_SAT(), llvm::TargetLowering::expandFP_TO_UINT(), llvm::SelectionDAG::FoldConstantArithmetic(), llvm::ExecutionEngine::getConstantValue(), llvm::LegalizerHelper::lowerFPTOUI(), lowerFTRUNC_FCEIL_FFLOOR_FROUND(), lowerVectorFTRUNC_FCEIL_FFLOOR_FROUND(), and lowerVectorStrictFTRUNC_FCEIL_FFLOOR_FROUND().
|
inline |
Definition at line 1241 of file APFloat.h.
References APFLOAT_DISPATCH_ON_SEMANTICS, and convertFromSignExtendedInteger().
Referenced by llvm::detail::DoubleAPFloat::convertFromSignExtendedInteger(), and convertFromSignExtendedInteger().
Expected< APFloat::opStatus > llvm::APFloat::convertFromString | ( | StringRef | Str, |
roundingMode | RM | ||
) |
Definition at line 5249 of file APFloat.cpp.
References APFLOAT_DISPATCH_ON_SEMANTICS, and convertFromString().
Referenced by APFloat(), llvm::detail::DoubleAPFloat::convertFromString(), and convertFromString().
|
inline |
Definition at line 1247 of file APFloat.h.
References APFLOAT_DISPATCH_ON_SEMANTICS, and convertFromZeroExtendedInteger().
Referenced by llvm::detail::DoubleAPFloat::convertFromZeroExtendedInteger(), and convertFromZeroExtendedInteger().
double llvm::APFloat::convertToDouble | ( | ) | const |
Converts this APFloat to host double value.
Definition at line 5341 of file APFloat.cpp.
References assert(), convert(), llvm::detail::IEEEFloat::convertToDouble(), getSemantics(), llvm::APFloatBase::opInexact, llvm::APFloatBase::rmNearestTiesToEven, and llvm::semIEEEdouble.
Referenced by emitDebugValueComment(), LLVMConstRealGetDouble(), llvm::ARMAsmPrinter::lowerOperand(), and WriteAPFloatInternal().
float llvm::APFloat::convertToFloat | ( | ) | const |
Converts this APFloat to host float value.
Definition at line 5369 of file APFloat.cpp.
References assert(), convert(), llvm::detail::IEEEFloat::convertToFloat(), getSemantics(), llvm::APFloatBase::opInexact, llvm::APFloatBase::rmNearestTiesToEven, and llvm::semIEEEsingle.
Referenced by llvm::FPMathOperator::getFPAccuracy(), and llvm::SPIRVMCInstLower::lower().
|
inline |
Definition at line 1338 of file APFloat.h.
References APFLOAT_DISPATCH_ON_SEMANTICS, and convertToHexString().
Referenced by llvm::detail::DoubleAPFloat::convertToHexString(), and convertToHexString().
APFloat::opStatus llvm::APFloat::convertToInteger | ( | APSInt & | Result, |
roundingMode | RM, | ||
bool * | IsExact | ||
) | const |
Definition at line 5329 of file APFloat.cpp.
References convertToInteger(), llvm::APInt::getBitWidth(), llvm::APInt::getNumWords(), and llvm::APSInt::isSigned().
|
inline |
Definition at line 1229 of file APFloat.h.
References APFLOAT_DISPATCH_ON_SEMANTICS, and convertToInteger().
Referenced by checkCVTFixedPointOperandWithFBits(), llvm::detail::DoubleAPFloat::convertToInteger(), convertToInteger(), ConvertToSInt(), llvm::BuildVectorSDNode::getConstantFPSplatPow2ToLog2Int(), llvm::ExecutionEngine::getConstantValue(), getExactInteger(), llvm::APFixedPoint::getFromFloatValue(), and PerformVMulVCTPCombine().
Definition at line 1207 of file APFloat.h.
References changeSign(), isNegative(), and RHS.
Referenced by llvm::ConstantFoldFPBinOp(), and llvm::SelectionDAG::foldConstantFPMath().
|
inline |
Definition at line 1113 of file APFloat.h.
References assert(), getSemantics(), llvm_unreachable, and RHS.
Referenced by llvm::ConstantFoldBinaryInstruction(), llvm::ConstantFoldFPBinOp(), llvm::detail::DoubleAPFloat::divide(), llvm::SelectionDAG::foldConstantFPMath(), llvm::ExecutionEngine::getConstantValue(), and llvm::GCNTTIImpl::instCombineIntrinsic().
LLVM_DUMP_METHOD void llvm::APFloat::dump | ( | ) | const |
Definition at line 5318 of file APFloat.cpp.
References llvm::dbgs(), and print().
|
inline |
Definition at line 1140 of file APFloat.h.
References assert(), getSemantics(), and llvm_unreachable.
Referenced by llvm::detail::DoubleAPFloat::fusedMultiplyAdd(), llvm::SelectionDAG::getNode(), llvm::CombinerHelper::matchConstantFoldFMA(), and llvm::detail::DoubleAPFloat::multiply().
|
static |
Returns a float which is bitcasted from an all one value int.
Semantics | - type float semantics |
Definition at line 5307 of file APFloat.cpp.
References llvm::APInt::getAllOnes().
Referenced by llvm::Constant::getAllOnesValue(), and lowerShuffleAsBitMask().
|
inline |
Definition at line 1355 of file APFloat.h.
References llvm::detail::IEEEFloat::getCategory().
Referenced by isInfinity(), isNaN(), and isZero().
Definition at line 1387 of file APFloat.h.
References APFLOAT_DISPATCH_ON_SEMANTICS, and getExactInverse().
Referenced by checkCVTFixedPointOperandWithFBits(), llvm::detail::DoubleAPFloat::getExactInverse(), getExactInverse(), and PerformVMulVCTPCombine().
|
inline |
Definition at line 1397 of file APFloat.h.
References APFLOAT_DISPATCH_ON_SEMANTICS, and getExactLog2().
Referenced by getExactLog2().
|
inline |
Definition at line 1392 of file APFloat.h.
References APFLOAT_DISPATCH_ON_SEMANTICS, and getExactLog2Abs().
Referenced by getExactLog2Abs().
|
inlinestatic |
Factory for Positive and Negative Infinity.
Negative | True iff the number should be negative. |
Definition at line 998 of file APFloat.h.
References llvm::APFloatBase::uninitialized.
Referenced by computeKnownBitsFromOperator(), llvm::TargetLowering::expandIS_FPCLASS(), llvm::InstCombinerImpl::foldICmpAndConstConst(), getIdentityValueForAtomicOp(), llvm::ConstantFP::getInfinity(), llvm::AMDGPUTargetLowering::getIsFinite(), llvm::SelectionDAG::getNeutralElement(), llvm::isNeutralConstant(), llvm::AMDGPULegalizerInfo::legalizeFExp(), llvm::AMDGPULegalizerInfo::legalizeFFREXP(), llvm::AMDGPULegalizerInfo::legalizeFlogCommon(), llvm::AMDGPUTargetLowering::lowerFEXP(), llvm::LegalizerHelper::lowerISFPCLASS(), and llvm::fuzzerop::makeConstantsWithType().
|
inlinestatic |
Returns the largest finite number in the given semantics.
Negative | - True iff the number should be negative |
Definition at line 1038 of file APFloat.h.
References llvm::APFloatBase::uninitialized.
Referenced by computeKnownFPClass(), llvm::TargetLowering::expandIS_FPCLASS(), llvm::InstCombinerImpl::foldFCmpIntToFPConst(), llvm::SelectionDAG::getNeutralElement(), llvm::isNeutralConstant(), llvm::AMDGPULegalizerInfo::legalizeRsqClampIntrinsic(), llvm::LegalizerHelper::lowerISFPCLASS(), and llvm::fuzzerop::makeConstantsWithType().
|
inlinestatic |
Factory for NaN values.
Negative | - True iff the NaN generated should be negative. |
payload | - The unspecified fill bits for creating the NaN, 0 by default. The value is truncated as necessary. |
Definition at line 1009 of file APFloat.h.
References getQNaN().
Referenced by llvm::TargetLowering::expandFMINIMUM_FMAXIMUM(), llvm::SelectionDAG::foldConstantFPMath(), llvm::ConstantFP::getNaN(), and llvm::fuzzerop::makeConstantsWithType().
|
inlinestatic |
|
inlinestatic |
Factory for QNaN values.
Definition at line 1020 of file APFloat.h.
References llvm::APFloatBase::uninitialized.
Referenced by getNaN(), llvm::SelectionDAG::getNeutralElement(), llvm::ConstantFP::getQNaN(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::isNeutralConstant(), and toString().
|
inline |
Definition at line 1356 of file APFloat.h.
Referenced by add(), bitwiseIsEqual(), llvm::MachineIRBuilder::buildFConstant(), compare(), constantFoldFpUnary(), convert(), convertToDouble(), convertToFloat(), divide(), fusedMultiplyAdd(), llvm::RISCVLoadFPImm::getLoadFPImm(), llvm::GCNTTIImpl::instCombineIntrinsic(), isExactlyValue(), llvm::ConstantFP::isExactlyValue(), isIEEE(), llvm::ConstantFP::isValueValidForType(), mod(), multiply(), llvm::AMDGPUTargetLowering::performRcpCombine(), remainder(), subtract(), llvm::SystemZVectorConstantInfo::SystemZVectorConstantInfo(), and WriteAPFloatInternal().
|
inlinestatic |
Returns the smallest (by magnitude) finite number in the given semantics.
Might be denormalized, which implies a relative loss of precision.
Negative | - True iff the number should be negative |
Definition at line 1048 of file APFloat.h.
References llvm::APFloatBase::uninitialized.
Referenced by llvm::fuzzerop::makeConstantsWithType().
|
inlinestatic |
Returns the smallest (by magnitude) normalized finite number in the given semantics.
Negative | - True iff the number should be negative |
Definition at line 1058 of file APFloat.h.
References llvm::APFloatBase::uninitialized.
Referenced by emitRsqIEEE1ULP(), llvm::AMDGPUTargetLowering::getIsLtSmallestNormal(), llvm::AMDGPULegalizerInfo::getScaledLogInput(), llvm::AMDGPUTargetLowering::getScaledLogInput(), llvm::TargetLowering::getSqrtInputTest(), and llvm::InstCombinerImpl::visitFCmpInst().
|
inlinestatic |
Factory for SNaN values.
Definition at line 1028 of file APFloat.h.
References llvm::APFloatBase::uninitialized.
Referenced by llvm::ConstantFP::getSNaN(), and WriteAPFloatInternal().
|
inlinestatic |
Factory for Positive and Negative Zero.
Negative | True iff the number should be negative. |
Definition at line 982 of file APFloat.h.
References llvm::APFloatBase::uninitialized.
Referenced by fixFuncEntryCount(), llvm::FlushFPConstant(), llvm::generateReadImageInst(), llvm::ExecutionEngine::getConstantValue(), getIdentityValueForAtomicOp(), llvm::Constant::getNullValue(), llvm::ConstantFP::getZero(), getZeroFP(), llvm::fuzzerop::makeConstantsWithType(), printConstant(), llvm::pdb::Variant::toAPFloat(), and llvm::X86TargetLowering::X86TargetLowering().
|
inlinestatic |
Definition at line 1070 of file APFloat.h.
References llvm::APFloatBase::S_Float4E2M1FN, llvm::APFloatBase::S_Float6E2M3FN, llvm::APFloatBase::S_Float6E3M2FN, and llvm::APFloatBase::SemanticsToEnum().
|
inline |
Definition at line 1349 of file APFloat.h.
References APFLOAT_DISPATCH_ON_SEMANTICS, and isDenormal().
Referenced by llvm::checkConvertToNonDenormSingle(), classify(), llvm::convertToNonDenormSingle(), llvm::FlushFPConstant(), isDenormal(), and isNormal().
|
inline |
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.
As such, this method can be used to do an exact bit-for-bit comparison of two floating point values.
We leave the version with the double argument here because it's just so convenient to write "2.0" and the like. Without this function we'd have to duplicate its logic everywhere it's called.
Definition at line 1331 of file APFloat.h.
References bitwiseIsEqual(), convert(), getSemantics(), ignored(), and llvm::APFloatBase::rmNearestTiesToEven.
Referenced by llvm::SelectionDAG::simplifyFPBinop().
|
inline |
Definition at line 1353 of file APFloat.h.
References isInfinity(), and isNaN().
Referenced by llvm::SelectionDAG::getNode(), isFiniteNonZero(), and matchFastFloatClamp().
|
inline |
Definition at line 1358 of file APFloat.h.
References isFinite(), and isZero().
Referenced by isNormal().
|
inline |
Definition at line 1366 of file APFloat.h.
References getSemantics().
|
inline |
Definition at line 1345 of file APFloat.h.
References llvm::APFloatBase::fcInfinity, and getCategory().
Referenced by classify(), isFinite(), llvm::ConstantFP::isInfinity(), llvm::isMathLibCallNoop(), isNegInfinity(), isPosInfinity(), llvm::SelectionDAG::simplifyFPBinop(), and WriteAPFloatInternal().
|
inline |
Definition at line 1365 of file APFloat.h.
References APFLOAT_DISPATCH_ON_SEMANTICS, and isInteger().
Referenced by isInteger(), and isKnownIntegral().
|
inline |
Definition at line 1364 of file APFloat.h.
References APFLOAT_DISPATCH_ON_SEMANTICS, and isLargest().
Referenced by isLargest().
|
inline |
Definition at line 1346 of file APFloat.h.
References llvm::APFloatBase::fcNaN, and getCategory().
Referenced by classify(), isFinite(), llvm::isMathLibCallNoop(), llvm::ConstantFP::isNaN(), llvm::CombinerHelper::matchCombineFMinMaxNaN(), llvm::SelectionDAG::simplifyFPBinop(), and WriteAPFloatInternal().
|
inline |
Definition at line 1348 of file APFloat.h.
References llvm::detail::IEEEFloat::isNegative().
Referenced by classify(), clearSign(), copySign(), llvm::fcmpImpliesClass(), llvm::FlushFPConstant(), llvm::RISCVLoadFPImm::getLoadFPImm(), llvm::ConstantFP::isNegative(), isNegInfinity(), isNegZero(), isPosInfinity(), isPosZero(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitFMul(), and WriteAPFloatInternal().
|
inline |
Definition at line 1362 of file APFloat.h.
References isInfinity(), and isNegative().
|
inline |
Definition at line 1360 of file APFloat.h.
References isNegative(), and isZero().
Referenced by llvm::RISCVDAGToDAGISel::Select(), llvm::RISCVDAGToDAGISel::selectFPImm(), and llvm::SelectionDAG::simplifyFPBinop().
|
inline |
|
inline |
Definition at line 1352 of file APFloat.h.
References isDenormal(), and isFiniteNonZero().
Referenced by classify().
|
inline |
Definition at line 1361 of file APFloat.h.
References isInfinity(), and isNegative().
|
inline |
Definition at line 1359 of file APFloat.h.
References isNegative(), and isZero().
Referenced by llvm::SPIRVGlobalRegistry::getOrCreateConstFP(), llvm::RISCVDAGToDAGISel::Select(), llvm::RISCVDAGToDAGISel::selectFPImm(), and llvm::SelectionDAG::simplifyFPBinop().
|
inline |
Definition at line 1350 of file APFloat.h.
References llvm::detail::IEEEFloat::isSignaling().
Referenced by classify(), and WriteAPFloatInternal().
|
inline |
Definition at line 1363 of file APFloat.h.
References APFLOAT_DISPATCH_ON_SEMANTICS, and isSmallest().
Referenced by isSmallest().
|
inline |
Definition at line 1368 of file APFloat.h.
References APFLOAT_DISPATCH_ON_SEMANTICS, and isSmallestNormalized().
Referenced by llvm::fcmpImpliesClass(), llvm::RISCVLoadFPImm::getLoadFPImm(), and isSmallestNormalized().
|
inline |
Definition at line 1344 of file APFloat.h.
References llvm::APFloatBase::fcZero, and getCategory().
Referenced by classify(), isFiniteNonZero(), llvm::isMathLibCallNoop(), isNegZero(), isNonZero(), isPosZero(), llvm::ConstantFP::isZero(), llvm::RISCVDAGToDAGISel::Select(), llvm::SelectionDAG::simplifyFPBinop(), llvm::InstCombinerImpl::visitFCmpInst(), and llvm::InstCombinerImpl::visitFMul().
|
inline |
Definition at line 1131 of file APFloat.h.
References assert(), getSemantics(), llvm_unreachable, and RHS.
Referenced by llvm::ConstantFoldBinaryInstruction(), llvm::ConstantFoldFPBinOp(), llvm::SelectionDAG::foldConstantFPMath(), llvm::ExecutionEngine::getConstantValue(), and llvm::detail::DoubleAPFloat::mod().
|
inline |
Definition at line 1104 of file APFloat.h.
References assert(), getSemantics(), llvm_unreachable, and RHS.
Referenced by llvm::ConstantFoldBinaryInstruction(), llvm::ConstantFoldFPBinOp(), llvm::SelectionDAG::foldConstantFPMath(), llvm::ExecutionEngine::getConstantValue(), llvm::APFixedPoint::getFromFloatValue(), llvm::SelectionDAG::getNode(), and llvm::AMDGPUTargetLowering::PerformDAGCombine().
|
inline |
Definition at line 977 of file APFloat.h.
References APFLOAT_DISPATCH_ON_SEMANTICS, and needsCleanup().
Referenced by needsCleanup().
Definition at line 1159 of file APFloat.h.
References APFLOAT_DISPATCH_ON_SEMANTICS, and next().
Referenced by LowerFROUND(), llvm::detail::DoubleAPFloat::next(), and next().
Definition at line 1283 of file APFloat.h.
References llvm::APFloatBase::cmpEqual, compare(), and RHS.
Multiply two APFloats, rounding ties to the nearest even.
No error checking.
Definition at line 1188 of file APFloat.h.
References RHS, and llvm::APFloatBase::rmNearestTiesToEven.
Add two APFloats, rounding ties to the nearest even.
No error checking.
Definition at line 1172 of file APFloat.h.
References RHS, and llvm::APFloatBase::rmNearestTiesToEven.
|
inline |
Subtract two APFloats, rounding ties to the nearest even.
No error checking.
Definition at line 1180 of file APFloat.h.
References RHS, and llvm::APFloatBase::rmNearestTiesToEven.
Divide the first APFloat by the second, rounding ties to the nearest even.
No error checking.
Definition at line 1196 of file APFloat.h.
References RHS, and llvm::APFloatBase::rmNearestTiesToEven.
Definition at line 1285 of file APFloat.h.
References llvm::APFloatBase::cmpLessThan, compare(), and RHS.
Definition at line 1293 of file APFloat.h.
References llvm::APFloatBase::cmpEqual, llvm::APFloatBase::cmpLessThan, compare(), and RHS.
Definition at line 1281 of file APFloat.h.
References llvm::APFloatBase::cmpEqual, compare(), and RHS.
Definition at line 1289 of file APFloat.h.
References llvm::APFloatBase::cmpGreaterThan, compare(), and RHS.
Definition at line 1298 of file APFloat.h.
References llvm::APFloatBase::cmpEqual, llvm::APFloatBase::cmpGreaterThan, compare(), and RHS.
void llvm::APFloat::print | ( | raw_ostream & | OS | ) | const |
void llvm::APFloat::Profile | ( | FoldingSetNodeID & | NID | ) | const |
Used to insert APFloat objects, or objects that contain APFloat objects, into FoldingSets.
Definition at line 5321 of file APFloat.cpp.
References llvm::FoldingSetNodeID::Add(), and bitcastToAPInt().
Definition at line 1122 of file APFloat.h.
References assert(), getSemantics(), llvm_unreachable, and RHS.
Referenced by llvm::detail::DoubleAPFloat::remainder().
|
inline |
Definition at line 1153 of file APFloat.h.
References APFLOAT_DISPATCH_ON_SEMANTICS, and roundToIntegral().
Referenced by llvm::InstCombinerImpl::foldFCmpIntToFPConst(), llvm::APFixedPoint::getFromFloatValue(), llvm::detail::DoubleAPFloat::roundToIntegral(), and roundToIntegral().
|
inline |
Definition at line 1095 of file APFloat.h.
References assert(), getSemantics(), llvm_unreachable, and RHS.
Referenced by llvm::ConstantFoldBinaryInstruction(), llvm::ConstantFoldFPBinOp(), llvm::SelectionDAG::foldConstantFPMath(), and llvm::ExecutionEngine::getConstantValue().
|
inline |
Definition at line 1378 of file APFloat.h.
References APFLOAT_DISPATCH_ON_SEMANTICS, and toString().
Referenced by emitGlobalConstantFP(), print(), printConstant(), llvm::detail::DoubleAPFloat::toString(), toString(), and WriteAPFloatInternal().
|
friend |
See friend declarations above.
These additional declarations are required in order to compile LLVM with IBM xlC compiler.
Definition at line 5254 of file APFloat.cpp.
|
friend |
friend llvm::APFloat::DoubleAPFloat |
friend llvm::APFloat::IEEEFloat |