LLVM 22.0.0git
|
#include "llvm/ADT/APFloat.h"
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) |
|
inline |
llvm::APFloat::APFloat | ( | const fltSemantics & | Semantics, |
StringRef | S | ||
) |
Definition at line 5979 of file APFloat.cpp.
References assert(), llvm::consumeError(), convertFromString(), and llvm::APFloatBase::rmNearestTiesToEven.
|
inline |
|
delete |
|
inline |
|
inline |
|
default |
|
default |
|
inline |
Definition at line 1181 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().
|
inline |
Definition at line 1353 of file APFloat.h.
References APFLOAT_DISPATCH_ON_SEMANTICS, and bitcastToAPInt().
Referenced by llvm::DwarfExpression::addConstantFP(), llvm::DwarfUnit::addConstantFPValue(), llvm::detail::DoubleAPFloat::bitcastToAPInt(), bitcastToAPInt(), computeKnownBitsFromOperator(), computeKnownFPClass(), llvm::detail::DoubleAPFloat::convertFromString(), convertIntToDoubleImm(), llvm::convertToNonDenormSingle(), 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::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().
Definition at line 1414 of file APFloat.h.
References getSemantics(), llvm_unreachable, and RHS.
Referenced by llvm::detail::DoubleAPFloat::bitwiseIsEqual(), llvm::ConstantFPRange::getSingleElement(), llvm::ConstantFP::isExactlyValue(), isExactlyValue(), isInv2Pi(), and llvm::ConstantFPRange::operator==().
|
inline |
Definition at line 1297 of file APFloat.h.
References APFLOAT_DISPATCH_ON_SEMANTICS, and changeSign().
Referenced by llvm::detail::DoubleAPFloat::changeSign(), changeSign(), clearSign(), copySign(), llvm::PPCInstrInfo::finalizeInsInstrs(), llvm::SelectionDAG::getNeutralElement(), getOne(), llvm::isNeutralConstant(), llvm::detail::DoubleAPFloat::makeSmallestNormalized(), and llvm::X86TargetLowering::X86TargetLowering().
FPClassTest llvm::APFloat::classify | ( | ) | const |
Return the FPClassTest which will return true for the value.
Definition at line 5986 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::ConstantFPRange::classify(), llvm::GenericFloatingPointPredicateUtils< ContextT >::fcmpImpliesClass(), and llvm::InstCombinerImpl::foldICmpBitCast().
|
inline |
Definition at line 1298 of file APFloat.h.
References changeSign(), and isNegative().
Referenced by LowerFCOPYSIGN(), llvm::InstCombinerImpl::visitCallInst(), and llvm::InstCombinerImpl::visitFCmpInst().
Definition at line 1404 of file APFloat.h.
References assert(), getSemantics(), llvm_unreachable, and RHS.
Referenced by llvm::detail::DoubleAPFloat::compare(), fmed3AMDGCN(), operator!=(), operator<(), operator<=(), operator==(), operator>(), and operator>=().
APFloat::opStatus llvm::APFloat::convert | ( | const fltSemantics & | ToSemantics, |
roundingMode | RM, | ||
bool * | losesInfo | ||
) |
Definition at line 6057 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(), foldFCmpFpTrunc(), 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 1347 of file APFloat.h.
References APFLOAT_DISPATCH_ON_SEMANTICS, and convertFromAPInt().
Referenced by llvm::ConstantFoldCastInstruction(), llvm::ConstantFoldIntToFloat(), convertFromAPInt(), 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().
Expected< APFloat::opStatus > llvm::APFloat::convertFromString | ( | StringRef | Str, |
roundingMode | RM | ||
) |
Definition at line 5966 of file APFloat.cpp.
References APFLOAT_DISPATCH_ON_SEMANTICS, and convertFromString().
Referenced by APFloat(), llvm::detail::DoubleAPFloat::convertFromString(), and convertFromString().
double llvm::APFloat::convertToDouble | ( | ) | const |
Converts this APFloat to host double value.
Definition at line 6115 of file APFloat.cpp.
References assert(), convert(), llvm::detail::IEEEFloat::convertToDouble(), getSemantics(), llvm::APFloatBase::isRepresentableBy(), 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 6143 of file APFloat.cpp.
References assert(), convert(), llvm::detail::IEEEFloat::convertToFloat(), getSemantics(), llvm::APFloatBase::isRepresentableBy(), llvm::APFloatBase::opInexact, llvm::APFloatBase::rmNearestTiesToEven, and llvm::semIEEEsingle.
Referenced by llvm::FPMathOperator::getFPAccuracy(), insertSpirvDecorations(), and llvm::SPIRVMCInstLower::lower().
|
inline |
Definition at line 1439 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 6103 of file APFloat.cpp.
References convertToInteger(), llvm::APInt::getBitWidth(), llvm::APInt::getNumWords(), and llvm::APSInt::isSigned().
|
inline |
Definition at line 1332 of file APFloat.h.
References APFLOAT_DISPATCH_ON_SEMANTICS, and convertToInteger().
Referenced by checkCVTFixedPointOperandWithFBits(), convertToInteger(), ConvertToSInt(), llvm::BuildVectorSDNode::getConstantFPSplatPow2ToLog2Int(), llvm::ExecutionEngine::getConstantValue(), getExactInteger(), llvm::APFixedPoint::getFromFloatValue(), and PerformVMulVCTPCombine().
Definition at line 1302 of file APFloat.h.
References changeSign(), isNegative(), and RHS.
Referenced by llvm::ConstantFoldFPBinOp(), and llvm::SelectionDAG::foldConstantFPMath().
|
inline |
Definition at line 1208 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 6093 of file APFloat.cpp.
References llvm::dbgs(), and print().
|
inline |
Definition at line 1235 of file APFloat.h.
References assert(), getSemantics(), and llvm_unreachable.
Referenced by llvm::SelectionDAG::FoldConstantArithmetic(), llvm::detail::DoubleAPFloat::fusedMultiplyAdd(), 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 6082 of file APFloat.cpp.
References llvm::APInt::getAllOnes().
Referenced by llvm::Constant::getAllOnesValue(), and lowerShuffleAsBitMask().
|
inline |
Definition at line 1456 of file APFloat.h.
References llvm::detail::IEEEFloat::getCategory().
Referenced by llvm::detail::DoubleAPFloat::getCategory(), isInfinity(), isNaN(), and isZero().
If this value is normal and has an exact, normal, multiplicative inverse, store it in inv and return true.
Definition at line 5999 of file APFloat.cpp.
References assert(), getExactLog2Abs(), getOne(), getSemantics(), isDenormal(), isFiniteNonZero(), isNegative(), llvm::APFloatBase::rmTowardZero, and scalbn.
Referenced by checkCVTFixedPointOperandWithFBits(), and PerformVMulVCTPCombine().
|
inline |
Definition at line 1504 of file APFloat.h.
References getExactLog2Abs(), and isNegative().
|
inline |
Definition at line 1497 of file APFloat.h.
References APFLOAT_DISPATCH_ON_SEMANTICS, and getExactLog2Abs().
Referenced by getExactInverse(), getExactLog2(), llvm::detail::DoubleAPFloat::getExactLog2Abs(), and getExactLog2Abs().
|
inlinestatic |
Factory for Positive and Negative Infinity.
Negative | True iff the number should be negative. |
Definition at line 1098 of file APFloat.h.
References llvm::APFloatBase::uninitialized.
Referenced by canonicalizeRange(), computeKnownBitsFromOperator(), computeKnownFPClass(), 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(), and makeLessThan().
|
inlinestatic |
Returns the largest finite number in the given semantics.
Negative | - True iff the number should be negative |
Definition at line 1138 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(), 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 1109 of file APFloat.h.
References getQNaN().
Referenced by llvm::TargetLowering::expandFMINIMUM_FMAXIMUM(), llvm::SelectionDAG::foldConstantFPMath(), getIdentityValueForAtomicOp(), llvm::ConstantFP::getNaN(), and llvm::fuzzerop::makeConstantsWithType().
|
inlinestatic |
Factory for Positive and Negative One.
Negative | True iff the number should be negative. |
Definition at line 1088 of file APFloat.h.
References changeSign().
Referenced by getExactInverse(), getOneFP(), llvm::harrisonUlp(), llvm::isMathLibCallNoop(), and llvm::detail::DoubleAPFloat::roundToIntegral().
|
inlinestatic |
Factory for QNaN values.
Definition at line 1120 of file APFloat.h.
References llvm::APFloatBase::uninitialized.
Referenced by getNaN(), llvm::SelectionDAG::getNeutralElement(), llvm::ConstantFP::getQNaN(), llvm::harrisonUlp(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::isNeutralConstant(), and toString().
|
inline |
Definition at line 1457 of file APFloat.h.
Referenced by add(), bitwiseIsEqual(), llvm::MachineIRBuilder::buildFConstant(), compare(), constantFoldFpUnary(), llvm::ConstantFPRange::ConstantFPRange(), llvm::ConstantFPRange::contains(), convert(), convertToDouble(), convertToFloat(), divide(), flushDenormalConstant(), fusedMultiplyAdd(), getExactInverse(), llvm::RISCVLoadFPImm::getLoadFPImm(), llvm::GCNTTIImpl::instCombineIntrinsic(), isExactlyValue(), llvm::ConstantFP::isExactlyValue(), 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 1148 of file APFloat.h.
References llvm::APFloatBase::uninitialized.
Referenced by llvm::harrisonUlp(), and 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 1158 of file APFloat.h.
References llvm::APFloatBase::uninitialized.
Referenced by emitRsqIEEE1ULP(), llvm::TargetLowering::expandIS_FPCLASS(), llvm::AMDGPUTargetLowering::getIsLtSmallestNormal(), llvm::AMDGPULegalizerInfo::getScaledLogInput(), llvm::AMDGPUTargetLowering::getScaledLogInput(), llvm::TargetLowering::getSqrtInputTest(), and llvm::InstCombinerImpl::visitFCmpInst().
|
inlinestatic |
Factory for SNaN values.
Definition at line 1128 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 1079 of file APFloat.h.
References llvm::APFloatBase::uninitialized.
Referenced by computeKnownFPClass(), extendZeroIfEqual(), llvm::detail::fastTwoSum(), fixFuncEntryCount(), flushDenormalConstant(), llvm::generateReadImageInst(), llvm::ExecutionEngine::getConstantValue(), getIdentityValueForAtomicOp(), llvm::Constant::getNullValue(), llvm::ConstantFP::getZero(), getZeroFP(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::fuzzerop::makeConstantsWithType(), printConstant(), llvm::pdb::Variant::toAPFloat(), and llvm::X86TargetLowering::X86TargetLowering().
|
inlinestatic |
Returns true if the given semantics has actual significand.
Sem | - type float semantics |
Definition at line 1173 of file APFloat.h.
References llvm::APFloatBase::Float8E8M0FNU().
Referenced by llvm::detail::IEEEFloat::isLargest(), and llvm::detail::IEEEFloat::next().
|
inline |
Definition at line 1450 of file APFloat.h.
References APFLOAT_DISPATCH_ON_SEMANTICS, and isDenormal().
Referenced by llvm::checkConvertToNonDenormSingle(), classify(), llvm::convertToNonDenormSingle(), flushDenormalConstantFP(), llvm::FlushFPConstant(), getExactInverse(), llvm::detail::DoubleAPFloat::isDenormal(), 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 1432 of file APFloat.h.
References bitwiseIsEqual(), convert(), getSemantics(), ignored(), and llvm::APFloatBase::rmNearestTiesToEven.
Referenced by llvm::SelectionDAG::simplifyFPBinop().
|
inline |
Definition at line 1454 of file APFloat.h.
References isInfinity(), and isNaN().
Referenced by llvm::SelectionDAG::getNode(), isFiniteNonZero(), and matchFastFloatClamp().
|
inline |
Definition at line 1459 of file APFloat.h.
References isFinite(), and isZero().
Referenced by getExactInverse(), and isNormal().
|
inline |
Definition at line 1446 of file APFloat.h.
References llvm::APFloatBase::fcInfinity, and getCategory().
Referenced by classify(), foldFCmpFpTrunc(), llvm::GCNTTIImpl::instCombineIntrinsic(), isFinite(), llvm::ConstantFP::isInfinity(), llvm::isMathLibCallNoop(), isNegInfinity(), isPosInfinity(), llvm::detail::DoubleAPFloat::next(), llvm::SelectionDAG::simplifyFPBinop(), and WriteAPFloatInternal().
|
inline |
Definition at line 1466 of file APFloat.h.
References APFLOAT_DISPATCH_ON_SEMANTICS, and isInteger().
Referenced by llvm::detail::DoubleAPFloat::isInteger(), isInteger(), and isKnownIntegral().
|
inline |
Definition at line 1465 of file APFloat.h.
References APFLOAT_DISPATCH_ON_SEMANTICS, and isLargest().
Referenced by isLargest().
|
inline |
Definition at line 1447 of file APFloat.h.
References llvm::APFloatBase::fcNaN, and getCategory().
Referenced by classify(), computeKnownFPClass(), llvm::ConstantFPRange::contains(), foldFCmpFpTrunc(), llvm::GCNTTIImpl::instCombineIntrinsic(), isFinite(), llvm::isMathLibCallNoop(), llvm::ConstantFP::isNaN(), llvm::CombinerHelper::matchCombineFMinMaxNaN(), llvm::SelectionDAG::simplifyFPBinop(), and WriteAPFloatInternal().
|
inline |
Definition at line 1449 of file APFloat.h.
References llvm::detail::IEEEFloat::isNegative().
Referenced by classify(), clearSign(), llvm::detail::DoubleAPFloat::compareAbsoluteValue(), copySign(), llvm::GenericFloatingPointPredicateUtils< ContextT >::fcmpImpliesClass(), flushDenormalConstant(), llvm::detail::frexp(), getExactInverse(), getExactLog2(), llvm::RISCVLoadFPImm::getLoadFPImm(), llvm::ConstantFPRange::getSignBit(), llvm::detail::DoubleAPFloat::isNegative(), llvm::ConstantFP::isNegative(), isNegInfinity(), isNegZero(), isPosInfinity(), isPosZero(), llvm::detail::DoubleAPFloat::roundToIntegral(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitFMul(), and WriteAPFloatInternal().
|
inline |
Definition at line 1463 of file APFloat.h.
References isInfinity(), and isNegative().
Referenced by llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::ConstantFPRange::isEmptySet(), llvm::ConstantFPRange::isFullSet(), and llvm::ConstantFPRange::isNaNOnly().
|
inline |
Definition at line 1461 of file APFloat.h.
References isNegative(), and isZero().
Referenced by llvm::RISCVDAGToDAGISel::Select(), llvm::RISCVDAGToDAGISel::selectScalarFPAsInt(), and llvm::SelectionDAG::simplifyFPBinop().
|
inline |
|
inline |
Definition at line 1453 of file APFloat.h.
References isDenormal(), and isFiniteNonZero().
Referenced by classify().
|
inline |
Definition at line 1462 of file APFloat.h.
References isInfinity(), and isNegative().
Referenced by llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::ConstantFPRange::isEmptySet(), llvm::ConstantFPRange::isFullSet(), and llvm::ConstantFPRange::isNaNOnly().
|
inline |
Definition at line 1460 of file APFloat.h.
References isNegative(), and isZero().
Referenced by llvm::SPIRVGlobalRegistry::createConstFP(), llvm::RISCVDAGToDAGISel::Select(), llvm::RISCVDAGToDAGISel::selectScalarFPAsInt(), and llvm::SelectionDAG::simplifyFPBinop().
|
inline |
Definition at line 1451 of file APFloat.h.
References llvm::detail::IEEEFloat::isSignaling().
Referenced by classify(), llvm::ConstantFPRange::contains(), llvm::GCNTTIImpl::instCombineIntrinsic(), and WriteAPFloatInternal().
|
inline |
Definition at line 1464 of file APFloat.h.
References APFLOAT_DISPATCH_ON_SEMANTICS, and isSmallest().
Referenced by isSmallest().
|
inline |
Definition at line 1468 of file APFloat.h.
References APFLOAT_DISPATCH_ON_SEMANTICS, and isSmallestNormalized().
Referenced by llvm::GenericFloatingPointPredicateUtils< ContextT >::fcmpImpliesClass(), llvm::RISCVLoadFPImm::getLoadFPImm(), and isSmallestNormalized().
|
inline |
Definition at line 1445 of file APFloat.h.
References llvm::APFloatBase::fcZero, and getCategory().
Referenced by classify(), expandNormalizeIntrinsic(), llvm::detail::frexp(), isFiniteNonZero(), llvm::isMathLibCallNoop(), isNegZero(), isNonZero(), isPosZero(), llvm::ConstantFP::isZero(), llvm::detail::DoubleAPFloat::next(), llvm::RISCVDAGToDAGISel::Select(), llvm::SelectionDAG::simplifyFPBinop(), llvm::InstCombinerImpl::visitFCmpInst(), and llvm::InstCombinerImpl::visitFMul().
|
inline |
Assuming this is an IEEE-754 NaN value, quiet its signaling bit.
This preserves the sign and payload bits.
Definition at line 1316 of file APFloat.h.
Referenced by llvm::GCNTTIImpl::instCombineIntrinsic().
Definition at line 1226 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 1199 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::APFixedPoint::getFromFloatValue(), and llvm::AMDGPUTargetLowering::PerformDAGCombine().
|
inline |
Definition at line 1074 of file APFloat.h.
References APFLOAT_DISPATCH_ON_SEMANTICS, and needsCleanup().
Referenced by needsCleanup().
Definition at line 1254 of file APFloat.h.
References APFLOAT_DISPATCH_ON_SEMANTICS, and next().
Referenced by foldFCmpFpTrunc(), llvm::detail::frexp(), LowerFROUND(), llvm::detail::DoubleAPFloat::next(), and next().
Definition at line 1382 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 1283 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 1267 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 1275 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 1291 of file APFloat.h.
References RHS, and llvm::APFloatBase::rmNearestTiesToEven.
Definition at line 1384 of file APFloat.h.
References llvm::APFloatBase::cmpLessThan, compare(), and RHS.
Definition at line 1392 of file APFloat.h.
References llvm::APFloatBase::cmpEqual, llvm::APFloatBase::cmpLessThan, compare(), and RHS.
Definition at line 1380 of file APFloat.h.
References llvm::APFloatBase::cmpEqual, compare(), and RHS.
Definition at line 1388 of file APFloat.h.
References llvm::APFloatBase::cmpGreaterThan, compare(), and RHS.
Definition at line 1397 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 6099 of file APFloat.cpp.
References llvm::FoldingSetNodeID::Add(), and bitcastToAPInt().
Definition at line 1217 of file APFloat.h.
References assert(), getSemantics(), llvm_unreachable, and RHS.
Referenced by llvm::detail::DoubleAPFloat::remainder().
|
inline |
Definition at line 1248 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 1190 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 1478 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 5971 of file APFloat.cpp.
|
friend |
Referenced by getExactInverse().
friend llvm::APFloat::DoubleAPFloat |
friend llvm::APFloat::IEEEFloat |