|
LLVM 24.0.0git
|
#include "llvm/Support/KnownFPClass.h"
Public Types | |
| enum class | MinMaxKind { minimum , maximum , minimumnum , maximumnum , minnum , maxnum } |
Public Member Functions | |
| FPClassTest | getKnownFPClasses () const |
| Floating-point classes the value could be one of. | |
| void | setKnownFPClasses (FPClassTest Classes) |
| std::optional< bool > | getSignBit () const |
| std::nullopt if the sign bit is unknown, true if the sign bit is definitely set or false if the sign bit is definitely unset. | |
| void | setSignBit (std::optional< bool > Sign) |
| KnownFPClass (FPClassMask Known=FPClassMask::kfcAllFlags) | |
| KnownFPClass (FPClassTest Known) | |
| KnownFPClass (FPClassTest Known, bool Sign) | |
| LLVM_ABI | KnownFPClass (const APFloat &C) |
| bool | operator== (KnownFPClass Other) const |
| bool | isKnownNever (FPClassMask Mask) const |
| Return true if it's known this can never be one of the mask entries. | |
| bool | isKnownNever (FPClassTest Mask) const |
| Return true if it's known this can never be one of the mask entries. | |
| bool | isKnownAlways (FPClassMask Mask) const |
| bool | isKnownAlways (FPClassTest Mask) const |
| bool | isUnknown () const |
| bool | isKnownNeverNaN () const |
| Return true if it's known this can never be a nan. | |
| bool | isKnownAlwaysNaN () const |
| Return true if it's known this must always be a nan. | |
| bool | isKnownNeverInfinity () const |
| Return true if it's known this can never be an infinity. | |
| bool | isKnownNeverInfOrNaN () const |
| Return true if it's known this can never be an infinity or nan. | |
| bool | isKnownNeverPosInfinity () const |
| Return true if it's known this can never be +infinity. | |
| bool | isKnownNeverNegInfinity () const |
| Return true if it's known this can never be -infinity. | |
| bool | isKnownNeverSubnormal () const |
| Return true if it's known this can never be a subnormal. | |
| bool | isKnownNeverPosSubnormal () const |
| Return true if it's known this can never be a positive subnormal. | |
| bool | isKnownNeverNegSubnormal () const |
| Return true if it's known this can never be a negative subnormal. | |
| LLVM_ABI bool | isKnownNeverLogicalZero (DenormalMode Mode) const |
| Return true if it's known this can never be interpreted as a zero. | |
| LLVM_ABI bool | isKnownNeverLogicalNegZero (DenormalMode Mode) const |
| Return true if it's known this can never be interpreted as a negative zero. | |
| LLVM_ABI bool | isKnownNeverLogicalPosZero (DenormalMode Mode) const |
| Return true if it's known this can never be interpreted as a positive zero. | |
| bool | cannotBeOrderedLessThanZero () const |
| Return true if we can prove that the analyzed floating-point value is either NaN or never less than -0.0. | |
| bool | cannotBeOrderedGreaterThanZero () const |
| Return true if we can prove that the analyzed floating-point value is either NaN or never greater than -0.0. | |
| bool | cannotBeOrderedLessEqZero (DenormalMode Mode) const |
| Return true if it's known this can never be a positive value or a logical 0. | |
| bool | cannotBeOrderedGreaterEqZero (DenormalMode Mode) const |
| Return true if it's know this can never be a negative value or a logical 0. | |
| KnownFPClass | intersectWith (const KnownFPClass &RHS) const |
| KnownFPClass | unionWith (const KnownFPClass &RHS) const |
| KnownFPClass & | operator|= (const KnownFPClass &RHS) |
| void | knownNot (FPClassMask RuleOut) |
| void | knownNot (FPClassTest RuleOut) |
| void | fneg () |
| void | fabs () |
| LLVM_ABI KnownBits | toKnownBits (const fltSemantics &FltSemantics) const |
| Report known bits for a float with provided semantics. | |
| bool | signBitIsZeroOrNaN () const |
| Return true if the sign bit must be 0, ignoring the sign of nans. | |
| void | signBitMustBeZero () |
| Assume the sign bit is zero. | |
| void | signBitMustBeOne () |
| Assume the sign bit is one. | |
| void | copysign (const KnownFPClass &Sign) |
| void | propagateNonSNaN (const KnownFPClass &Src) |
| void | propagateNonSNaN (const KnownFPClass &LHS, const KnownFPClass &RHS) |
| void | propagateNonNaN (const KnownFPClass &Src) |
| void | propagateNonNaN (const KnownFPClass &LHS, const KnownFPClass &RHS) |
| void | resetAll () |
Static Public Member Functions | |
| static KnownFPClass | getEmpty () |
| static LLVM_ABI KnownFPClass | applyInputDenormalMode (const KnownFPClass &Src, DenormalMode Mode) |
Return the known classes of Src after passing through an input that may flush subnormals to zero according to Mode. | |
| static LLVM_ABI KnownFPClass | applyInputSemantics (const KnownFPClass &Src, DenormalMode Mode, bool MayBeNSZ=true) |
Return the known classes of Src after passing through an input that may flush subnormals to zero according to Mode. | |
| static LLVM_ABI KnownFPClass | applyOutputDenormalMode (const KnownFPClass &Src, DenormalMode Mode) |
Return the known classes of Src after producing an output that may flush subnormals to zero according to Mode. | |
| static KnownFPClass | fneg (const KnownFPClass &Src) |
| static KnownFPClass | fabs (const KnownFPClass &Src) |
| static LLVM_ABI KnownFPClass | minMaxLike (const KnownFPClass &LHS, const KnownFPClass &RHS, MinMaxKind Kind, DenormalMode Mode) |
| static LLVM_ABI KnownFPClass | canonicalize (const KnownFPClass &Src, const fltSemantics &Flt, DenormalMode Mode) |
| Apply the canonicalize intrinsic to this value. | |
| static LLVM_ABI KnownFPClass | bitcast (const fltSemantics &FltSemantics, const KnownBits &Bits) |
| Report known values for a bitcast into a float with provided semantics. | |
| static LLVM_ABI KnownFPClass | fadd (const KnownFPClass &LHS, const KnownFPClass &RHS, RoundingMode RM, DenormalMode Mode) |
| Report known values for fadd. | |
| static LLVM_ABI KnownFPClass | fadd_self (const KnownFPClass &Src, RoundingMode RM, DenormalMode Mode) |
| Report known values for fadd x, x. | |
| static LLVM_ABI KnownFPClass | fsub (const KnownFPClass &LHS, const KnownFPClass &RHS, RoundingMode RM, DenormalMode Mode) |
| Report known values for fsub. | |
| static LLVM_ABI KnownFPClass | fmul (const KnownFPClass &LHS, const KnownFPClass &RHS, DenormalMode Mode) |
| Report known values for fmul. | |
| static LLVM_ABI KnownFPClass | square (const KnownFPClass &Src, DenormalMode Mode) |
| static LLVM_ABI KnownFPClass | fmul (const KnownFPClass &LHS, const APFloat &RHS, DenormalMode Mode) |
| static LLVM_ABI KnownFPClass | fdiv (const KnownFPClass &LHS, const KnownFPClass &RHS, DenormalMode Mode) |
| Report known values for fdiv. | |
| static LLVM_ABI KnownFPClass | fdiv_self (const KnownFPClass &Src, DenormalMode Mode) |
| Report known values for fdiv x, x. | |
| static LLVM_ABI KnownFPClass | frem (const KnownFPClass &LHS, const KnownFPClass &RHS, DenormalMode Mode) |
| Report known values for frem. | |
| static LLVM_ABI KnownFPClass | frem_self (const KnownFPClass &Src, DenormalMode Mode) |
| Report known values for frem x, x. Valid for all rounding modes. | |
| static LLVM_ABI KnownFPClass | fma (const KnownFPClass &LHS, const KnownFPClass &RHS, const KnownFPClass &Addend, DenormalMode Mode) |
| Report known values for fma. | |
| static LLVM_ABI KnownFPClass | fmuladd (const KnownFPClass &LHS, const KnownFPClass &RHS, const KnownFPClass &Addend, DenormalMode Mode) |
| Report known values for fmuladd. | |
| static LLVM_ABI KnownFPClass | fma_square (const KnownFPClass &Squared, const KnownFPClass &Addend, DenormalMode Mode) |
| Report known values for fma squared, squared, addend. | |
| static LLVM_ABI KnownFPClass | fmuladd_square (const KnownFPClass &Squared, const KnownFPClass &Addend, DenormalMode Mode) |
| Report known values for fmuladd squared, squared, addend. | |
| static LLVM_ABI KnownFPClass | sqrt (const KnownFPClass &Src, DenormalMode Mode=DenormalMode::getDynamic()) |
| Propagate known class for sqrt. | |
| static LLVM_ABI KnownFPClass | log (const KnownFPClass &Src, DenormalMode Mode, bool IsMultiUnitFPType) |
| Propagate known class for log/log2/log10. | |
| static LLVM_ABI KnownFPClass | exp (const KnownFPClass &Src) |
| Report known values for exp, exp2 and exp10. | |
| static LLVM_ABI KnownFPClass | sin (const KnownFPClass &Src) |
| Report known values for sin. | |
| static LLVM_ABI KnownFPClass | cos (const KnownFPClass &Src) |
| Report known values for cos. | |
| static LLVM_ABI KnownFPClass | tan (const KnownFPClass &Src) |
| Report known values for tan. | |
| static LLVM_ABI KnownFPClass | sinh (const KnownFPClass &Src) |
| Report known values for sinh. | |
| static LLVM_ABI KnownFPClass | cosh (const KnownFPClass &Src) |
| Report known values for cosh. | |
| static LLVM_ABI KnownFPClass | tanh (const KnownFPClass &Src) |
| Report known values for tanh. | |
| static LLVM_ABI KnownFPClass | asin (const KnownFPClass &Src) |
| Report known values for asin. | |
| static LLVM_ABI KnownFPClass | acos (const KnownFPClass &Src) |
| Report known values for acos. | |
| static LLVM_ABI KnownFPClass | atan (const KnownFPClass &Src) |
| Report known values for atan. | |
| static LLVM_ABI KnownFPClass | atan2 (const KnownFPClass &LHS, const KnownFPClass &RHS, DenormalMode Mode) |
| Report known values for atan2. | |
| static KnownFPClass | copysign (const KnownFPClass &KnownMag, const KnownFPClass &KnownSign) |
| static LLVM_ABI KnownFPClass | fpext (const KnownFPClass &KnownSrc, const fltSemantics &DstTy, const fltSemantics &SrcTy, DenormalMode DstMode, DenormalMode SrcMode) |
| Propagate known class for fpext. | |
| static LLVM_ABI KnownFPClass | fptrunc (const KnownFPClass &KnownSrc, const fltSemantics &DstTy, const fltSemantics &SrcTy, DenormalMode DstMode, DenormalMode SrcMode) |
| Propagate known class for fptrunc and fptrunc_round. | |
| static LLVM_ABI KnownFPClass | roundToIntegral (const KnownFPClass &Src, bool IsMultiUnitFPType, DenormalMode Mode) |
| Propagate known class for rounding intrinsics (rint, nearbyint, round, roundeven). | |
| static LLVM_ABI KnownFPClass | trunc (const KnownFPClass &Src, DenormalMode Mode) |
| Propagate known class for trunc. | |
| static LLVM_ABI KnownFPClass | floor (const KnownFPClass &Src, bool IsMultiUnitFPType, DenormalMode Mode) |
| Propagate known class for floor. | |
| static LLVM_ABI KnownFPClass | ceil (const KnownFPClass &Src, bool IsMultiUnitFPType, DenormalMode Mode) |
| Propagate known class for ceil. | |
| static LLVM_ABI KnownFPClass | frexp_mant (const KnownFPClass &Src, DenormalMode Mode) |
| Propagate known class for mantissa component of frexp. | |
| static LLVM_ABI KnownFPClass | ldexp (const KnownFPClass &Src, const APInt &ConstantRangeMin, const APInt &ConstantRangeMax, const fltSemantics &Flt, DenormalMode Mode) |
Propagate known class for ldexp, assuming the exponent is known to be within [ConstantRangeMin, ConstantRangeMax]. | |
| static LLVM_ABI KnownFPClass | ldexp (const KnownFPClass &Src, const KnownBits &ExpBits, const fltSemantics &Flt, DenormalMode Mode) |
| static LLVM_ABI KnownFPClass | pow (const KnownFPClass &LHS, const KnownFPClass &RHS) |
| Propagate known class for pow. | |
| static LLVM_ABI KnownFPClass | powi (const KnownFPClass &Src, const KnownBits &N) |
| Propagate known class for powi. | |
Static Public Attributes | |
| static constexpr FPClassTest | OrderedLessThanZeroMask |
| static constexpr FPClassTest | OrderedGreaterThanZeroMask |
Definition at line 66 of file KnownFPClass.h.
|
strong |
| Enumerator | |
|---|---|
| minimum | |
| maximum | |
| minimumnum | |
| maximumnum | |
| minnum | |
| maxnum | |
Definition at line 427 of file KnownFPClass.h.
|
inline |
Definition at line 208 of file KnownFPClass.h.
References llvm::kfcAllFlags, and llvm::Known.
Referenced by acos(), applyInputDenormalMode(), applyInputSemantics(), applyOutputDenormalMode(), asin(), atan(), atan2(), bitcast(), canonicalize(), ceil(), copysign(), copysign(), cos(), cosh(), exp(), fabs(), fadd(), fadd_self(), fdiv(), fdiv_self(), floor(), fma(), fma_square(), fmul(), fmul(), fmuladd(), fmuladd_square(), fneg(), fpext(), fptrunc(), frem(), frem_self(), frexp_mant(), fsub(), getEmpty(), intersectWith(), KnownFPClass(), ldexp(), ldexp(), log(), minMaxLike(), operator==(), operator|=(), pow(), powi(), propagateNonNaN(), propagateNonNaN(), propagateNonSNaN(), propagateNonSNaN(), resetAll(), roundToIntegral(), sin(), sinh(), sqrt(), square(), tan(), tanh(), trunc(), and unionWith().
|
inline |
Definition at line 210 of file KnownFPClass.h.
References llvm::Known.
|
inline |
Definition at line 211 of file KnownFPClass.h.
References llvm::Known, and Sign.
Definition at line 21 of file KnownFPClass.cpp.
References C(), and KnownFPClass().
|
static |
Report known values for acos.
Definition at line 1228 of file KnownFPClass.cpp.
References llvm::fcInf, llvm::fcNegative, llvm::fcPosNormal, llvm::fcSubnormal, llvm::fcZero, isKnownNever(), llvm::Known, and KnownFPClass().
Referenced by computeKnownFPClass().
|
static |
Return the known classes of Src after passing through an input that may flush subnormals to zero according to Mode.
Definition at line 24 of file KnownFPClass.cpp.
References llvm::fcNegSubnormal, llvm::fcNegZero, llvm::fcPosSubnormal, llvm::fcPosZero, llvm::fcSubnormal, llvm::DenormalMode::IEEE, isKnownNever(), llvm::Known, KnownFPClass(), llvm_unreachable, llvm::DenormalMode::PositiveZero, and llvm::DenormalMode::PreserveSign.
Referenced by applyInputSemantics(), atan2(), ceil(), fadd(), fadd_self(), fdiv(), fdiv_self(), floor(), fma(), fma_square(), fmul(), fpconvert(), frem(), frem_self(), frexp_mant(), fsub(), isKnownNeverLogicalNegZero(), isKnownNeverLogicalPosZero(), isKnownNeverLogicalZero(), ldexp(), log(), minMaxLike(), roundToIntegral(), square(), and trunc().
|
static |
Return the known classes of Src after passing through an input that may flush subnormals to zero according to Mode.
If the input may have NSZ, then +0.0 and -0.0 (along with subnormals flushed to zero) may be treated as a zero of either sign.
Definition at line 51 of file KnownFPClass.cpp.
References applyInputDenormalMode(), llvm::fcZero, llvm::Known, and KnownFPClass().
|
static |
Return the known classes of Src after producing an output that may flush subnormals to zero according to Mode.
Definition at line 65 of file KnownFPClass.cpp.
References llvm::fcNegSubnormal, llvm::fcNegZero, llvm::fcPosSubnormal, llvm::fcPosZero, llvm::fcSubnormal, llvm::DenormalMode::IEEE, isKnownNever(), llvm::Known, KnownFPClass(), llvm_unreachable, llvm::DenormalMode::PositiveZero, and llvm::DenormalMode::PreserveSign.
Referenced by atan2(), fadd(), fadd_self(), fdiv(), fma(), fma_square(), fmul(), fpconvert(), frem(), fsub(), ldexp(), log(), minMaxLike(), and square().
|
static |
Report known values for asin.
Definition at line 1208 of file KnownFPClass.cpp.
References llvm::fcInf, llvm::fcNegFinite, llvm::fcPosNormal, llvm::fcPosSubnormal, isKnownNever(), llvm::Known, and KnownFPClass().
Referenced by computeKnownFPClass().
|
static |
Report known values for atan.
Definition at line 1249 of file KnownFPClass.cpp.
References llvm::fcInf, llvm::fcNegInf, llvm::fcNegNormal, llvm::fcNegSubnormal, llvm::fcNegZero, llvm::fcPosInf, llvm::fcPosNormal, llvm::fcPosSubnormal, isKnownNever(), llvm::Known, and KnownFPClass().
Referenced by computeKnownFPClass().
|
static |
Report known values for atan2.
Definition at line 1274 of file KnownFPClass.cpp.
References applyInputDenormalMode(), applyOutputDenormalMode(), llvm::fcInf, llvm::fcNegative, llvm::fcPositive, llvm::fcSubnormal, llvm::fcZero, isKnownNever(), llvm::Known, and KnownFPClass().
Referenced by computeKnownFPClass().
|
static |
Report known values for a bitcast into a float with provided semantics.
Definition at line 237 of file KnownFPClass.cpp.
References assert(), llvm::BitWidth, llvm::fcInf, llvm::fcNan, llvm::fcNormal, llvm::fcQNan, llvm::fcSNan, llvm::fcSubnormal, llvm::fcZero, llvm::APInt::getBitsSet(), llvm::APInt::getLowBitsSet(), isZero(), llvm::Known, KnownFPClass(), llvm_unreachable, llvm::fltSemantics::precision, llvm::APFloatBase::S_BFloat, llvm::APFloatBase::S_IEEEdouble, llvm::APFloatBase::S_IEEEhalf, llvm::APFloatBase::S_IEEEquad, llvm::APFloatBase::S_IEEEsingle, llvm::APFloatBase::S_x87DoubleExtended, llvm::APFloatBase::SemanticsToEnum(), and llvm::fltSemantics::sizeInBits.
Referenced by computeKnownFPClass(), llvm::SelectionDAG::computeKnownFPClass(), and tryReduceF64CompareToHiHalf().
|
inline |
Return true if it's know this can never be a negative value or a logical 0.
NaN --> true
x >= -0 --> false nsub --> true if mode is ieee, false otherwise. x < -0 --> true
Definition at line 325 of file KnownFPClass.h.
References llvm::fcPositive, isKnownNever(), isKnownNeverLogicalNegZero(), and Mode.
Referenced by llvm::InstCombinerImpl::SimplifyDemandedUseFPClass().
|
inline |
Return true if we can prove that the analyzed floating-point value is either NaN or never greater than -0.0.
NaN --> true +0 --> true -0 --> true x > +0 --> false x < -0 --> true
Definition at line 303 of file KnownFPClass.h.
References isKnownNever(), and OrderedGreaterThanZeroMask.
Referenced by fma_impl(), and ldexp().
|
inline |
Return true if it's known this can never be a positive value or a logical 0.
NaN --> true
x <= +0 --> false psub --> true if mode is ieee, false otherwise. x > +0 --> true
Definition at line 314 of file KnownFPClass.h.
References llvm::fcNegative, isKnownNever(), isKnownNeverLogicalPosZero(), and Mode.
|
inline |
Return true if we can prove that the analyzed floating-point value is either NaN or never less than -0.0.
NaN --> true +0 --> true -0 --> true
x > +0 --> true x < -0 --> false
Definition at line 292 of file KnownFPClass.h.
References isKnownNever(), and OrderedLessThanZeroMask.
Referenced by computeKnownFPClass(), computeKnownFPClassForFAddSub(), fma_impl(), ldexp(), log(), simplifyFCmpInst(), simplifyUnaryIntrinsic(), and sqrt().
|
static |
Apply the canonicalize intrinsic to this value.
Definition at line 182 of file KnownFPClass.cpp.
References llvm::fcNan, llvm::fcNegSubnormal, llvm::fcNegZero, llvm::fcPosSubnormal, llvm::fcPosZero, llvm::fcQNan, llvm::fcSNan, llvm::fcSubnormal, llvm::fcZero, llvm::DenormalMode::getIEEE(), getKnownFPClasses(), llvm::DenormalMode::getPreserveSign(), llvm::DenormalMode::IEEE, llvm::APFloatBase::isIEEELikeFP(), isKnownNever(), isKnownNeverNaN(), llvm::Known, KnownFPClass(), and llvm::DenormalMode::PositiveZero.
Referenced by computeKnownFPClass(), and llvm::InstCombinerImpl::SimplifyDemandedUseFPClass().
|
static |
Propagate known class for ceil.
IsMultiUnitFPType if this is for a multi-unit floating-point type.
Definition at line 1556 of file KnownFPClass.cpp.
References applyInputDenormalMode(), llvm::fcNegFinite, llvm::fcNegInf, llvm::fcNegNormal, llvm::fcNegZero, llvm::fcPosInf, llvm::fcPosNormal, llvm::fcPosSubnormal, llvm::fcPosZero, llvm::fcSubnormal, isKnownNever(), isKnownNeverNegInfinity(), isKnownNeverPosInfinity(), llvm::Known, and KnownFPClass().
Referenced by computeKnownFPClass(), and llvm::InstCombinerImpl::SimplifyDemandedUseFPClass().
|
inlinestatic |
Definition at line 595 of file KnownFPClass.h.
References llvm::Known, and KnownFPClass().
|
inline |
Definition at line 572 of file KnownFPClass.h.
References llvm::kfcInf, llvm::kfcNegSignBit, llvm::kfcNone, llvm::kfcNormal, llvm::kfcPosSignBit, llvm::kfcQNan, llvm::kfcSNan, llvm::kfcSubnormal, llvm::kfcZero, KnownFPClass(), and Sign.
Referenced by llvm::InstCombinerImpl::SimplifyDemandedUseFPClass(), and llvm::InstCombinerImpl::SimplifyMultipleUseDemandedFPClass().
|
static |
Report known values for cos.
Definition at line 1134 of file KnownFPClass.cpp.
References KnownFPClass(), and sin().
Referenced by computeKnownFPClass().
|
static |
Report known values for cosh.
Definition at line 1171 of file KnownFPClass.cpp.
References llvm::fcNegative, llvm::fcSubnormal, llvm::fcZero, llvm::Known, and KnownFPClass().
Referenced by computeKnownFPClass().
|
static |
Report known values for exp, exp2 and exp10.
This function assumes that exp10(-1.0) = +0.1 and exp10(+1.0) = +10.0 are both finite normal values, which holds for formats with a corresponding LLVM IR type (e.g. does not hold for Float4E2M1FN).
Definition at line 1047 of file KnownFPClass.cpp.
References llvm::fcNegative, llvm::fcNegInf, llvm::fcNegNormal, llvm::fcPosInf, llvm::fcPosNormal, llvm::fcPosSubnormal, llvm::fcPosZero, isKnownNever(), llvm::Known, and KnownFPClass().
Referenced by computeKnownFPClass(), and llvm::InstCombinerImpl::SimplifyDemandedUseFPClass().
|
inline |
Definition at line 401 of file KnownFPClass.h.
References llvm::kfcInf, llvm::kfcNone, llvm::kfcNormal, llvm::kfcPosInf, llvm::kfcPosNormal, llvm::kfcPosQNan, llvm::kfcPosSNan, llvm::kfcPosSubnormal, llvm::kfcPosZero, llvm::kfcQNan, llvm::kfcSNan, llvm::kfcSubnormal, llvm::kfcZero, and llvm::Known.
Referenced by simplifyDemandedFPClassFabs(), and simplifyDemandedFPClassFnegFabs().
|
inlinestatic |
Definition at line 420 of file KnownFPClass.h.
References llvm::Known, and KnownFPClass().
|
static |
Report known values for fadd.
Definition at line 623 of file KnownFPClass.cpp.
References applyInputDenormalMode(), applyOutputDenormalMode(), fadd_impl(), llvm::Known, and KnownFPClass().
Referenced by computeKnownFPClassForFAddSub(), fmuladd(), fmuladd_square(), and llvm::InstCombinerImpl::SimplifyDemandedUseFPClass().
|
static |
Report known values for fadd x, x.
Definition at line 634 of file KnownFPClass.cpp.
References applyInputDenormalMode(), applyOutputDenormalMode(), llvm::fcNegInf, llvm::fcNegNormal, llvm::fcNegSubnormal, llvm::fcNegZero, llvm::fcPosInf, llvm::fcPosNormal, llvm::fcPosSubnormal, llvm::fcPosZero, isKnownNever(), llvm::Known, and KnownFPClass().
Referenced by computeKnownFPClassForFAddSub(), and llvm::InstCombinerImpl::SimplifyDemandedUseFPClass().
|
static |
Report known values for fdiv.
Definition at line 786 of file KnownFPClass.cpp.
References applyInputDenormalMode(), applyOutputDenormalMode(), llvm::fcNan, llvm::fcNegFinite, llvm::fcNegInf, llvm::fcNegNormal, llvm::fcNegSubnormal, llvm::fcNegZero, llvm::fcPosFinite, llvm::fcPosInf, llvm::fcPosNormal, llvm::fcPosSubnormal, llvm::fcPosZero, llvm::fcZero, isKnownNever(), isKnownNeverInfinity(), isKnownNeverNaN(), llvm::Known, and KnownFPClass().
Referenced by computeKnownFPClass(), and llvm::InstCombinerImpl::SimplifyDemandedUseFPClass().
|
static |
Report known values for fdiv x, x.
Definition at line 845 of file KnownFPClass.cpp.
References applyInputDenormalMode(), llvm::fcNan, llvm::fcPosNormal, llvm::fcZero, isKnownNever(), isKnownNeverInfOrNaN(), llvm::Known, and KnownFPClass().
Referenced by computeKnownFPClass().
|
static |
Propagate known class for floor.
IsMultiUnitFPType if this is for a multi-unit floating-point type.
Definition at line 1521 of file KnownFPClass.cpp.
References applyInputDenormalMode(), llvm::fcNegInf, llvm::fcNegNormal, llvm::fcNegSubnormal, llvm::fcNegZero, llvm::fcPosFinite, llvm::fcPosInf, llvm::fcPosNormal, llvm::fcPosZero, llvm::fcSubnormal, isKnownNever(), isKnownNeverNegInfinity(), isKnownNeverPosInfinity(), llvm::Known, and KnownFPClass().
Referenced by computeKnownFPClass(), and llvm::InstCombinerImpl::SimplifyDemandedUseFPClass().
|
static |
Report known values for fma.
Definition at line 946 of file KnownFPClass.cpp.
References applyInputDenormalMode(), applyOutputDenormalMode(), llvm::fcInf, llvm::fcNan, llvm::fcNegInf, llvm::fcNegNormal, llvm::fcNegSubnormal, llvm::fcPosInf, llvm::fcPosNormal, llvm::fcPosSubnormal, llvm::fcSNan, llvm::fcZero, fma_impl(), fmul(), llvm::DenormalMode::getIEEE(), isKnownNever(), isKnownNeverNaN(), llvm::Known, KnownFPClass(), and llvm::Mul.
Referenced by computeKnownFPClass(), fmuladd(), and llvm::InstCombinerImpl::SimplifyDemandedUseFPClass().
|
static |
Report known values for fma squared, squared, addend.
Definition at line 1018 of file KnownFPClass.cpp.
References applyInputDenormalMode(), applyOutputDenormalMode(), llvm::fcInf, llvm::fcNan, llvm::fcNegInf, fma_impl(), llvm::DenormalMode::getIEEE(), isKnownNever(), isKnownNeverNaN(), llvm::Known, KnownFPClass(), and square().
Referenced by computeKnownFPClass(), fmuladd_square(), and llvm::InstCombinerImpl::SimplifyDemandedUseFPClass().
|
static |
Definition at line 743 of file KnownFPClass.cpp.
References llvm::APFloatBase::cmpEqual, llvm::APFloat::compareAbsoluteValue(), llvm::fcInf, llvm::fcSubnormal, fmul(), llvm::APFloat::getOne(), llvm::APFloat::getSemantics(), llvm::ilogb(), isKnownNever(), llvm::Known, KnownFPClass(), and llvm::APFloatBase::semanticsPrecision().
|
static |
Report known values for fmul.
Definition at line 683 of file KnownFPClass.cpp.
References applyInputDenormalMode(), applyOutputDenormalMode(), llvm::fcNan, llvm::fcNegFinite, llvm::fcNegInf, llvm::fcNegNormal, llvm::fcNegSubnormal, llvm::fcNegZero, llvm::fcPosFinite, llvm::fcPosInf, llvm::fcPosNormal, llvm::fcPosSubnormal, llvm::fcPosZero, llvm::fcZero, isKnownNever(), isKnownNeverInfinity(), isKnownNeverNaN(), llvm::Known, and KnownFPClass().
Referenced by computeKnownFPClass(), fma(), fmul(), fmuladd(), llvm::InstCombinerImpl::SimplifyDemandedUseFPClass(), and square().
|
static |
Report known values for fmuladd.
Definition at line 1006 of file KnownFPClass.cpp.
References fadd(), fma(), fmul(), KnownFPClass(), and llvm::NearestTiesToEven.
Referenced by computeKnownFPClass(), and llvm::InstCombinerImpl::SimplifyDemandedUseFPClass().
|
static |
Report known values for fmuladd squared, squared, addend.
Definition at line 1038 of file KnownFPClass.cpp.
References fadd(), fma_square(), KnownFPClass(), llvm::NearestTiesToEven, and square().
Referenced by computeKnownFPClass(), and llvm::InstCombinerImpl::SimplifyDemandedUseFPClass().
|
inline |
Definition at line 364 of file KnownFPClass.h.
References llvm::kfcNegInf, llvm::kfcNegNormal, llvm::kfcNegQNan, llvm::kfcNegSNan, llvm::kfcNegSubnormal, llvm::kfcNegZero, llvm::kfcNone, llvm::kfcPosInf, llvm::kfcPosNormal, llvm::kfcPosQNan, llvm::kfcPosSNan, llvm::kfcPosSubnormal, llvm::kfcPosZero, and llvm::Known.
Referenced by fsub(), and simplifyDemandedFPClassFnegFabs().
|
inlinestatic |
Definition at line 395 of file KnownFPClass.h.
References llvm::Known, and KnownFPClass().
|
static |
Propagate known class for fpext.
DstMode and SrcMode are the denormal modes of the destination and source types.
Definition at line 1422 of file KnownFPClass.cpp.
References fpconvert(), getConvertDenormalMode(), and KnownFPClass().
Referenced by computeKnownFPClass(), and llvm::InstCombinerImpl::SimplifyDemandedUseFPClass().
|
static |
Propagate known class for fptrunc and fptrunc_round.
DstMode and SrcMode are the denormal modes of the destination and source types.
Definition at line 1435 of file KnownFPClass.cpp.
References fpconvert(), getConvertDenormalMode(), and KnownFPClass().
Referenced by computeKnownFPClassForFPTrunc(), and simplifyDemandedUseFPClassFPTrunc().
|
static |
Report known values for frem.
Valid for all rounding modes, since frem is always exact.
Definition at line 861 of file KnownFPClass.cpp.
References applyInputDenormalMode(), applyOutputDenormalMode(), llvm::fcInf, llvm::fcNan, llvm::fcNegFinite, llvm::fcNegNormal, llvm::fcNegSubnormal, llvm::fcNegZero, llvm::fcPosFinite, llvm::fcPosNormal, llvm::fcPosSubnormal, llvm::fcPosZero, llvm::fcZero, isKnownNever(), isKnownNeverInfOrNaN(), isKnownNeverNaN(), llvm::Known, and KnownFPClass().
Referenced by computeKnownFPClassForFRem().
|
static |
Report known values for frem x, x. Valid for all rounding modes.
Definition at line 897 of file KnownFPClass.cpp.
References applyInputDenormalMode(), llvm::fcNan, llvm::fcNegNormal, llvm::fcNegSubnormal, llvm::fcNegZero, llvm::fcPosNormal, llvm::fcPosSubnormal, llvm::fcPosZero, llvm::fcZero, isKnownNever(), isKnownNeverInfOrNaN(), llvm::Known, and KnownFPClass().
Referenced by computeKnownFPClassForFRem().
|
static |
Propagate known class for mantissa component of frexp.
Definition at line 1591 of file KnownFPClass.cpp.
References applyInputDenormalMode(), llvm::fcNegInf, llvm::fcNegNormal, llvm::fcNegSubnormal, llvm::fcNegZero, llvm::fcPosInf, llvm::fcPosNormal, llvm::fcPosSubnormal, llvm::fcPosZero, llvm::fcSubnormal, isKnownNever(), isKnownNeverNegInfinity(), isKnownNeverPosInfinity(), llvm::Known, and KnownFPClass().
Referenced by computeKnownFPClass(), and llvm::InstCombinerImpl::SimplifyDemandedUseFPClass().
|
static |
Report known values for fsub.
Definition at line 668 of file KnownFPClass.cpp.
References applyInputDenormalMode(), applyOutputDenormalMode(), fadd_impl(), fneg(), llvm::Known, and KnownFPClass().
Referenced by computeKnownFPClassForFAddSub(), and llvm::InstCombinerImpl::SimplifyDemandedUseFPClass().
|
inlinestatic |
Definition at line 215 of file KnownFPClass.h.
References llvm::kfcNone, and KnownFPClass().
Referenced by computeKnownFPClass(), and llvm::SelectionDAG::computeKnownFPClass().
|
inline |
Floating-point classes the value could be one of.
Definition at line 163 of file KnownFPClass.h.
Referenced by canonicalize(), computeKnownFPClass(), ldexp(), minMaxLike(), printGISelValueTracking(), simplifyDemandedFPClassMinMax(), and toKnownBits().
|
inline |
std::nullopt if the sign bit is unknown, true if the sign bit is definitely set or false if the sign bit is definitely unset.
By convention, returns false for kfcNone/poison.
Definition at line 172 of file KnownFPClass.h.
References llvm::kfcNegSignBit, llvm::kfcNone, and llvm::kfcPosSignBit.
Referenced by computeKnownFPClass(), printGISelValueTracking(), simplifyDemandedFPClassCopysignMag(), simplifyDemandedFPClassFabs(), simplifyDemandedFPClassFnegFabs(), llvm::InstCombinerImpl::SimplifyDemandedUseFPClass(), llvm::InstCombinerImpl::SimplifyMultipleUseDemandedFPClass(), simplifyUnaryIntrinsic(), and toKnownBits().
|
inline |
Definition at line 347 of file KnownFPClass.h.
References KnownFPClass(), and RHS.
Referenced by llvm::SelectionDAG::computeKnownFPClass(), llvm::InstCombinerImpl::SimplifyDemandedUseFPClass(), and llvm::InstCombinerImpl::SimplifyMultipleUseDemandedFPClass().
|
inline |
Definition at line 231 of file KnownFPClass.h.
References isKnownNever().
Referenced by isKnownAlways(), isKnownAlwaysNaN(), simplifyDemandedFPClassCopysignMag(), and llvm::InstCombinerImpl::SimplifyDemandedUseFPClass().
|
inline |
Definition at line 233 of file KnownFPClass.h.
References isKnownAlways().
|
inline |
Return true if it's known this must always be a nan.
Definition at line 243 of file KnownFPClass.h.
References llvm::fcNan, and isKnownAlways().
Referenced by simplifyFCmpInst().
|
inline |
Return true if it's known this can never be one of the mask entries.
Definition at line 222 of file KnownFPClass.h.
References llvm::kfcNone.
Referenced by acos(), addNoUndefAttrs(), applyInputDenormalMode(), applyOutputDenormalMode(), asin(), atan(), atan2(), cannotBeOrderedGreaterEqZero(), cannotBeOrderedGreaterThanZero(), cannotBeOrderedLessEqZero(), cannotBeOrderedLessThanZero(), canonicalize(), ceil(), computeKnownBitsFromOperator(), computeKnownFPClass(), computeKnownFPClassForFRem(), exp(), fadd_impl(), fadd_self(), fdiv(), fdiv_self(), floor(), fma(), fma_impl(), fma_square(), fmul(), fmul(), foldFPtoI(), fpconvert(), frem(), frem_self(), frexp_mant(), isKnownAlways(), isKnownNever(), isKnownNeverInfinity(), isKnownNeverInfOrNaN(), isKnownNeverLogicalNegZero(), isKnownNeverLogicalPosZero(), isKnownNeverLogicalZero(), llvm::GISelValueTracking::isKnownNeverNaN(), isKnownNeverNaN(), isKnownNeverNegInfinity(), isKnownNeverNegSubnormal(), isKnownNeverPosInfinity(), isKnownNeverPosSubnormal(), isKnownNeverSubnormal(), ldexp(), log(), llvm::LegalizerHelper::lowerFMinimumMaximum(), pow(), powi(), roundToIntegral(), signBitIsZeroOrNaN(), simplifyDemandedFPClassFabs(), simplifyDemandedFPClassFnegFabs(), simplifyDemandedFPClassMinMax(), llvm::InstCombinerImpl::SimplifyDemandedUseFPClass(), llvm::InstCombinerImpl::SimplifyMultipleUseDemandedFPClass(), simplifyX86FPMaxMin(), sinh(), tanh(), toKnownBits(), and trunc().
|
inline |
Return true if it's known this can never be one of the mask entries.
Definition at line 227 of file KnownFPClass.h.
References isKnownNever().
|
inline |
Return true if it's known this can never be an infinity.
Definition at line 246 of file KnownFPClass.h.
References llvm::fcInf, and isKnownNever().
Referenced by fdiv(), fmul(), inferFastMathValueFlags(), sin(), and tan().
|
inline |
Return true if it's known this can never be an infinity or nan.
Definition at line 249 of file KnownFPClass.h.
References llvm::fcInf, llvm::fcNan, and isKnownNever().
Referenced by llvm::GCNTTIImpl::canSimplifyLegacyMulToMul(), llvm::computeConstantRange(), computeKnownFPClass(), fdiv_self(), frem(), frem_self(), and llvm::InstCombinerImpl::SimplifyDemandedUseFPClass().
| bool KnownFPClass::isKnownNeverLogicalNegZero | ( | DenormalMode | Mode | ) | const |
Return true if it's known this can never be interpreted as a negative zero.
Definition at line 96 of file KnownFPClass.cpp.
References applyInputDenormalMode(), llvm::fcNegZero, and isKnownNever().
Referenced by cannotBeOrderedGreaterEqZero(), computeKnownFPClass(), llvm::InstCombinerImpl::SimplifyDemandedUseFPClass(), and sqrt().
| bool KnownFPClass::isKnownNeverLogicalPosZero | ( | DenormalMode | Mode | ) | const |
Return true if it's known this can never be interpreted as a positive zero.
Definition at line 100 of file KnownFPClass.cpp.
References applyInputDenormalMode(), llvm::fcPosZero, and isKnownNever().
Referenced by cannotBeOrderedLessEqZero(), computeKnownFPClass(), and llvm::InstCombinerImpl::SimplifyDemandedUseFPClass().
| bool KnownFPClass::isKnownNeverLogicalZero | ( | DenormalMode | Mode | ) | const |
Return true if it's known this can never be interpreted as a zero.
This extends isKnownNever(fcZero) to cover the case where the assumed floating-point mode for the function interprets denormals as zero.
Definition at line 92 of file KnownFPClass.cpp.
References applyInputDenormalMode(), llvm::fcZero, and isKnownNever().
Referenced by llvm::GCNTTIImpl::canSimplifyLegacyMulToMul(), llvm::computeConstantRange(), and llvm::InstCombinerImpl::SimplifyDemandedUseFPClass().
|
inline |
Return true if it's known this can never be a nan.
Definition at line 240 of file KnownFPClass.h.
References llvm::fcNan, and isKnownNever().
Referenced by canonicalize(), computeKnownFPClass(), computeKnownFPClassForFAddSub(), fadd_impl(), fdiv(), fma(), fma_square(), fmul(), llvm::InstCombinerImpl::foldSelectIntoOp(), frem(), inferFastMathValueFlags(), llvm::GISelValueTracking::isKnownNeverNaN(), log(), minMaxLike(), pow(), llvm::InstCombinerImpl::SimplifyDemandedUseFPClass(), simplifyFCmpInst(), simplifyUnaryIntrinsic(), sin(), sqrt(), tan(), and tryReduceF64CompareToHiHalf().
|
inline |
Return true if it's known this can never be -infinity.
Definition at line 255 of file KnownFPClass.h.
References llvm::fcNegInf, and isKnownNever().
Referenced by ceil(), floor(), frexp_mant(), ldexp(), roundToIntegral(), and trunc().
|
inline |
Return true if it's known this can never be a negative subnormal.
Definition at line 264 of file KnownFPClass.h.
References llvm::fcNegSubnormal, and isKnownNever().
Referenced by ldexp().
|
inline |
Return true if it's known this can never be +infinity.
Definition at line 252 of file KnownFPClass.h.
References llvm::fcPosInf, and isKnownNever().
Referenced by ceil(), computeKnownFPClass(), floor(), frexp_mant(), ldexp(), log(), roundToIntegral(), sqrt(), and trunc().
|
inline |
Return true if it's known this can never be a positive subnormal.
Definition at line 261 of file KnownFPClass.h.
References llvm::fcPosSubnormal, and isKnownNever().
Referenced by ldexp().
|
inline |
Return true if it's known this can never be a subnormal.
Definition at line 258 of file KnownFPClass.h.
References llvm::fcSubnormal, and isKnownNever().
Referenced by llvm::computeConstantRange(), and llvm::InstCombinerImpl::SimplifyDemandedUseFPClass().
|
inline |
Definition at line 237 of file KnownFPClass.h.
References llvm::kfcAllFlags.
Referenced by llvm::adjustKnownFPClassForSelectArm(), computeKnownFPClass(), llvm::SelectionDAG::computeKnownFPClass(), and llvm::InstCombinerImpl::SimplifyMultipleUseDemandedFPClass().
|
inline |
Definition at line 360 of file KnownFPClass.h.
Referenced by computeKnownFPClass(), computeKnownFPClassFromCond(), propagateNonNaN(), propagateNonNaN(), propagateNonSNaN(), propagateNonSNaN(), simplifyDemandedFPClassFabs(), simplifyDemandedFPClassFnegFabs(), llvm::InstCombinerImpl::SimplifyDemandedUseFPClass(), and llvm::InstCombinerImpl::SimplifyMultipleUseDemandedFPClass().
|
inline |
|
static |
Propagate known class for ldexp, assuming the exponent is known to be within [ConstantRangeMin, ConstantRangeMax].
Definition at line 1618 of file KnownFPClass.cpp.
References applyInputDenormalMode(), applyOutputDenormalMode(), cannotBeOrderedGreaterThanZero(), cannotBeOrderedLessThanZero(), llvm::fcNan, llvm::fcNegative, llvm::fcNegInf, llvm::fcNegSubnormal, llvm::fcNegZero, llvm::fcPosInf, llvm::fcPositive, llvm::fcPosSubnormal, llvm::fcPosZero, llvm::fcSubnormal, getKnownFPClasses(), isKnownNever(), isKnownNeverNegInfinity(), isKnownNeverNegSubnormal(), isKnownNeverPosInfinity(), isKnownNeverPosSubnormal(), llvm::APInt::isNonNegative(), llvm::APInt::isNonPositive(), llvm::APInt::isZero(), llvm::Known, KnownFPClass(), OrderedGreaterThanZeroMask, OrderedLessThanZeroMask, llvm::APFloatBase::PPCDoubleDouble(), llvm::APFloatBase::semanticsPrecision(), and llvm::APInt::sge().
Referenced by computeKnownFPClass(), ldexp(), and llvm::InstCombinerImpl::SimplifyDemandedUseFPClass().
|
static |
Definition at line 1676 of file KnownFPClass.cpp.
References llvm::KnownBits::getSignedMaxValue(), llvm::KnownBits::getSignedMinValue(), KnownFPClass(), and ldexp().
|
static |
Propagate known class for log/log2/log10.
IsMultiUnitFPType if this is for a multi-unit floating-point type.
Definition at line 1071 of file KnownFPClass.cpp.
References applyInputDenormalMode(), applyOutputDenormalMode(), cannotBeOrderedLessThanZero(), llvm::fcNan, llvm::fcNegInf, llvm::fcNegZero, llvm::fcPosInf, llvm::fcSubnormal, llvm::fcZero, isKnownNever(), isKnownNeverNaN(), isKnownNeverPosInfinity(), llvm::Known, and KnownFPClass().
Referenced by computeKnownFPClass(), and llvm::InstCombinerImpl::SimplifyDemandedUseFPClass().
|
static |
Definition at line 104 of file KnownFPClass.cpp.
References applyInputDenormalMode(), applyOutputDenormalMode(), llvm::fcNan, getKnownFPClasses(), isKnownNeverNaN(), llvm::Known, KnownFPClass(), maximum, maximumnum, maxnum, minimum, minimumnum, minnum, llvm::orderedStrictlyGreater(), and llvm::orderedStrictlyLess().
Referenced by computeKnownFPClass(), and simplifyDemandedFPClassMinMax().
|
inline |
Definition at line 217 of file KnownFPClass.h.
References KnownFPClass(), and llvm::Other.
|
inline |
Definition at line 355 of file KnownFPClass.h.
References KnownFPClass(), and RHS.
|
static |
Propagate known class for pow.
Definition at line 1683 of file KnownFPClass.cpp.
References llvm::fcNan, llvm::fcNegative, llvm::fcNegInf, llvm::fcNegNormal, llvm::fcNegSubnormal, llvm::fcNegZero, llvm::fcPosNormal, isKnownNever(), isKnownNeverNaN(), llvm::Known, and KnownFPClass().
Referenced by computeKnownFPClass().
|
static |
Propagate known class for powi.
Definition at line 1725 of file KnownFPClass.cpp.
References llvm::fcInf, llvm::fcNan, llvm::fcNegative, llvm::fcNegInf, llvm::fcNegNormal, llvm::fcNegSubnormal, llvm::fcNegZero, llvm::fcNormal, llvm::fcPosNormal, llvm::fcSNan, llvm::fcSubnormal, llvm::fcZero, llvm::KnownBits::getSignedMaxValue(), llvm::KnownBits::getSignedMinValue(), llvm::KnownBits::isEven(), isKnownNever(), llvm::APInt::isNegative(), llvm::KnownBits::isNegative(), llvm::KnownBits::isNonNegative(), llvm::APInt::isStrictlyPositive(), llvm::APInt::isZero(), llvm::KnownBits::isZero(), llvm::Known, KnownFPClass(), llvm::APInt::sgt(), llvm::APInt::slt(), and llvm::KnownBits::Zero.
Referenced by computeKnownFPClass().
|
inline |
Definition at line 623 of file KnownFPClass.h.
References llvm::fcNan, KnownFPClass(), knownNot(), LHS, propagateNonSNaN(), and RHS.
|
inline |
Definition at line 617 of file KnownFPClass.h.
References llvm::fcNan, KnownFPClass(), knownNot(), and propagateNonSNaN().
|
inline |
Definition at line 609 of file KnownFPClass.h.
References llvm::fcSNan, KnownFPClass(), knownNot(), LHS, and RHS.
|
inline |
Definition at line 603 of file KnownFPClass.h.
References llvm::fcSNan, KnownFPClass(), and knownNot().
Referenced by propagateNonNaN(), and propagateNonNaN().
|
inline |
Definition at line 690 of file KnownFPClass.h.
References KnownFPClass().
|
static |
Propagate known class for rounding intrinsics (rint, nearbyint, round, roundeven).
IsMultiUnitFPType if this is for a multi-unit floating-point type.
Definition at line 1444 of file KnownFPClass.cpp.
References applyInputDenormalMode(), llvm::fcNegFinite, llvm::fcNegInf, llvm::fcNegNormal, llvm::fcNegSubnormal, llvm::fcNegZero, llvm::fcPosFinite, llvm::fcPosInf, llvm::fcPosNormal, llvm::fcPosSubnormal, llvm::fcPosZero, llvm::fcSubnormal, isKnownNever(), isKnownNeverNegInfinity(), isKnownNeverPosInfinity(), llvm::Known, and KnownFPClass().
Referenced by computeKnownFPClass(), and llvm::InstCombinerImpl::SimplifyDemandedUseFPClass().
|
inline |
Definition at line 165 of file KnownFPClass.h.
|
inline |
Definition at line 184 of file KnownFPClass.h.
References llvm::kfcInf, llvm::kfcNegSignBit, llvm::kfcNone, llvm::kfcNormal, llvm::kfcPosSignBit, llvm::kfcQNan, llvm::kfcSNan, llvm::kfcSubnormal, llvm::kfcZero, and Sign.
|
inline |
Return true if the sign bit must be 0, ignoring the sign of nans.
Definition at line 564 of file KnownFPClass.h.
References llvm::fcNegative, and isKnownNever().
Referenced by llvm::AMDGPUTargetLowering::lowerFPOW().
|
inline |
Assume the sign bit is one.
Definition at line 570 of file KnownFPClass.h.
References llvm::kfcNegSignBit.
Referenced by computeKnownFPClassFromCond().
|
inline |
Assume the sign bit is zero.
Definition at line 567 of file KnownFPClass.h.
References llvm::kfcPosSignBit.
Referenced by computeKnownFPClassFromCond().
|
static |
Report known values for sin.
Definition at line 1121 of file KnownFPClass.cpp.
References llvm::fcInf, llvm::fcNan, isKnownNeverInfinity(), isKnownNeverNaN(), llvm::Known, and KnownFPClass().
Referenced by computeKnownFPClass(), and cos().
|
static |
Report known values for sinh.
Definition at line 1153 of file KnownFPClass.cpp.
References llvm::fcNegative, llvm::fcPosInf, llvm::fcPosNormal, llvm::fcPosSubnormal, isKnownNever(), llvm::Known, and KnownFPClass().
Referenced by computeKnownFPClass().
|
static |
Propagate known class for sqrt.
Definition at line 1096 of file KnownFPClass.cpp.
References cannotBeOrderedLessThanZero(), llvm::fcNan, llvm::fcNegInf, llvm::fcNegNormal, llvm::fcNegSubnormal, llvm::fcNegZero, llvm::fcPosInf, llvm::fcPosSubnormal, isKnownNeverLogicalNegZero(), isKnownNeverNaN(), isKnownNeverPosInfinity(), llvm::Known, and KnownFPClass().
Referenced by computeKnownFPClass(), and llvm::InstCombinerImpl::SimplifyDemandedUseFPClass().
|
static |
Definition at line 771 of file KnownFPClass.cpp.
References applyInputDenormalMode(), applyOutputDenormalMode(), llvm::fcNegative, fmul(), llvm::DenormalMode::getIEEE(), llvm::Known, and KnownFPClass().
Referenced by computeKnownFPClass(), fma_square(), fmuladd_square(), and llvm::InstCombinerImpl::SimplifyDemandedUseFPClass().
|
static |
Report known values for tan.
Definition at line 1138 of file KnownFPClass.cpp.
References llvm::fcInf, llvm::fcNan, isKnownNeverInfinity(), isKnownNeverNaN(), llvm::Known, and KnownFPClass().
Referenced by computeKnownFPClass().
|
static |
Report known values for tanh.
Definition at line 1183 of file KnownFPClass.cpp.
References llvm::fcInf, llvm::fcNegInf, llvm::fcNegNormal, llvm::fcNegSubnormal, llvm::fcNegZero, llvm::fcPosInf, llvm::fcPosNormal, llvm::fcPosSubnormal, isKnownNever(), llvm::Known, and KnownFPClass().
Referenced by computeKnownFPClass().
| KnownBits KnownFPClass::toKnownBits | ( | const fltSemantics & | FltSemantics | ) | const |
Report known bits for a float with provided semantics.
Definition at line 406 of file KnownFPClass.cpp.
References llvm::BitWidth, llvm::APInt::clearBit(), llvm::fcInf, llvm::fcNan, llvm::fcNone, llvm::fcNormal, llvm::fcQNan, llvm::fcSNan, llvm::fcSubnormal, llvm::fcZero, llvm::APInt::getBitsSet(), llvm::APFloat::getInf(), getKnownFPClasses(), llvm::APInt::getLowBitsSet(), getSignBit(), llvm::APInt::getZero(), isKnownNever(), llvm::Known, llvm_unreachable, llvm::KnownBits::makeConstant(), llvm::fltSemantics::precision, llvm::APFloatBase::S_BFloat, llvm::APFloatBase::S_IEEEdouble, llvm::APFloatBase::S_IEEEhalf, llvm::APFloatBase::S_IEEEquad, llvm::APFloatBase::S_IEEEsingle, llvm::APFloatBase::S_x87DoubleExtended, llvm::APFloatBase::SemanticsToEnum(), Sign, and llvm::fltSemantics::sizeInBits.
|
static |
Propagate known class for trunc.
Definition at line 1484 of file KnownFPClass.cpp.
References applyInputDenormalMode(), llvm::fcNegFinite, llvm::fcNegInf, llvm::fcNegNormal, llvm::fcNegZero, llvm::fcPosFinite, llvm::fcPosInf, llvm::fcPosNormal, llvm::fcPosZero, llvm::fcSubnormal, isKnownNever(), isKnownNeverNegInfinity(), isKnownNeverPosInfinity(), llvm::Known, and KnownFPClass().
Referenced by computeKnownFPClass(), and llvm::InstCombinerImpl::SimplifyDemandedUseFPClass().
|
inline |
Definition at line 351 of file KnownFPClass.h.
References KnownFPClass(), and RHS.
Referenced by llvm::adjustKnownFPClassForSelectArm().
|
staticconstexpr |
Definition at line 281 of file KnownFPClass.h.
Referenced by cannotBeOrderedGreaterThanZero(), fma_impl(), ldexp(), and simplifyDemandedFPClassFnegFabs().
|
staticconstexpr |
Definition at line 279 of file KnownFPClass.h.
Referenced by llvm::cannotBeOrderedLessThanZero(), cannotBeOrderedLessThanZero(), computeKnownFPClass(), computeKnownFPClassForFAddSub(), computeKnownFPClassForFPTrunc(), fma_impl(), ldexp(), simplifyDemandedFPClassFabs(), llvm::InstCombinerImpl::SimplifyDemandedUseFPClass(), and simplifyFCmpInst().