Go to the documentation of this file.
15 #ifndef LLVM_ADT_APFLOAT_H
16 #define LLVM_ADT_APFLOAT_H
24 #define APFLOAT_DISPATCH_ON_SEMANTICS(METHOD_CALL) \
26 if (usesLayout<IEEEFloat>(getSemantics())) \
27 return U.IEEE.METHOD_CALL; \
28 if (usesLayout<DoubleAPFloat>(getSemantics())) \
29 return U.Double.METHOD_CALL; \
30 llvm_unreachable("Unexpected semantics"); \
436 unsigned FormatMaxPadding = 3,
bool TruncateZero =
true)
const;
463 void makeNaN(
bool SNaN =
false,
bool Neg =
false,
464 const APInt *fill =
nullptr);
465 void makeInf(
bool Neg =
false);
485 unsigned int partCount()
const;
498 void incrementSignificand();
500 void shiftSignificandLeft(
unsigned int);
502 unsigned int significandLSB()
const;
503 unsigned int significandMSB()
const;
504 void zeroSignificand();
506 bool isSignificandAllOnes()
const;
508 bool isSignificandAllZeros()
const;
526 bool convertFromStringSpecials(
StringRef str);
538 char *convertNormalToHexString(
char *,
unsigned int,
bool,
548 APInt convertHalfAPFloatToAPInt()
const;
549 APInt convertBFloatAPFloatToAPInt()
const;
550 APInt convertFloatAPFloatToAPInt()
const;
551 APInt convertDoubleAPFloatToAPInt()
const;
552 APInt convertQuadrupleAPFloatToAPInt()
const;
553 APInt convertF80LongDoubleAPFloatToAPInt()
const;
554 APInt convertPPCDoubleDoubleAPFloatToAPInt()
const;
556 void initFromHalfAPInt(
const APInt &api);
557 void initFromBFloatAPInt(
const APInt &api);
558 void initFromFloatAPInt(
const APInt &api);
559 void initFromDoubleAPInt(
const APInt &api);
560 void initFromQuadrupleAPInt(
const APInt &api);
561 void initFromF80LongDoubleAPInt(
const APInt &api);
562 void initFromPPCDoubleDoubleAPInt(
const APInt &api);
566 void freeSignificand();
590 unsigned int sign : 1;
605 std::unique_ptr<APFloat[]> Floats;
669 bool *IsExact)
const;
672 unsigned int InputSize,
bool IsSigned,
675 unsigned int InputSize,
bool IsSigned,
686 unsigned FormatMaxPadding,
bool TruncateZero =
true)
const;
705 static_assert(std::is_standard_layout<IEEEFloat>::value,
"");
718 template <
typename... ArgTypes>
724 if (usesLayout<DoubleAPFloat>(
Semantics)) {
736 if (usesLayout<DoubleAPFloat>(*
semantics)) {
737 Double.~DoubleAPFloat();
743 Storage(
const Storage &
RHS) {
744 if (usesLayout<IEEEFloat>(*
RHS.semantics)) {
748 if (usesLayout<DoubleAPFloat>(*
RHS.semantics)) {
755 Storage(Storage &&
RHS) {
756 if (usesLayout<IEEEFloat>(*
RHS.semantics)) {
760 if (usesLayout<DoubleAPFloat>(*
RHS.semantics)) {
769 usesLayout<IEEEFloat>(*
RHS.semantics)) {
771 }
else if (usesLayout<DoubleAPFloat>(*
semantics) &&
772 usesLayout<DoubleAPFloat>(*
RHS.semantics)) {
774 }
else if (
this != &
RHS) {
776 new (
this) Storage(
RHS);
783 usesLayout<IEEEFloat>(*
RHS.semantics)) {
785 }
else if (usesLayout<DoubleAPFloat>(*
semantics) &&
786 usesLayout<DoubleAPFloat>(*
RHS.semantics)) {
788 }
else if (
this != &
RHS) {
797 static_assert(std::is_same<T, IEEEFloat>::value ||
798 std::is_same<T, DoubleAPFloat>::value,
"");
799 if (std::is_same<T, DoubleAPFloat>::value) {
806 if (usesLayout<IEEEFloat>(*U.semantics))
808 if (usesLayout<DoubleAPFloat>(*U.semantics))
809 return U.Double.getFirst().U.IEEE;
814 if (usesLayout<IEEEFloat>(*U.semantics))
816 if (usesLayout<DoubleAPFloat>(*U.semantics))
817 return U.Double.getFirst().U.IEEE;
825 void makeNaN(
bool SNaN,
bool Neg,
const APInt *fill) {
829 void makeLargest(
bool Neg) {
833 void makeSmallest(
bool Neg) {
837 void makeSmallestNormalized(
bool Neg) {
854 "Should only compare APFloats with the same semantics");
856 return U.IEEE.compareAbsoluteValue(
RHS.U.IEEE);
858 return U.Double.compareAbsoluteValue(
RHS.U.Double);
866 template <
typename T,
867 typename = std::enable_if_t<std::is_floating_point<T>::value>>
887 Val.makeZero(Negative);
896 Val.makeInf(Negative);
908 APInt intPayload(64, payload);
909 return getQNaN(Sem, Negative, &intPayload);
911 return getQNaN(Sem, Negative,
nullptr);
917 const APInt *payload =
nullptr) {
919 Val.makeNaN(
false, Negative, payload);
925 const APInt *payload =
nullptr) {
927 Val.makeNaN(
true, Negative, payload);
936 Val.makeLargest(Negative);
946 Val.makeSmallest(Negative);
955 bool Negative =
false) {
957 Val.makeSmallestNormalized(Negative);
972 "Should only call on two APFloats with the same semantics");
974 return U.IEEE.add(
RHS.U.IEEE,
RM);
976 return U.Double.add(
RHS.U.Double,
RM);
981 "Should only call on two APFloats with the same semantics");
983 return U.IEEE.subtract(
RHS.U.IEEE,
RM);
985 return U.Double.subtract(
RHS.U.Double,
RM);
990 "Should only call on two APFloats with the same semantics");
992 return U.IEEE.multiply(
RHS.U.IEEE,
RM);
994 return U.Double.multiply(
RHS.U.Double,
RM);
999 "Should only call on two APFloats with the same semantics");
1001 return U.IEEE.divide(
RHS.U.IEEE,
RM);
1003 return U.Double.divide(
RHS.U.Double,
RM);
1008 "Should only call on two APFloats with the same semantics");
1010 return U.IEEE.remainder(
RHS.U.IEEE);
1012 return U.Double.remainder(
RHS.U.Double);
1017 "Should only call on two APFloats with the same semantics");
1019 return U.IEEE.mod(
RHS.U.IEEE);
1021 return U.Double.mod(
RHS.U.Double);
1027 "Should only call on APFloats with the same semantics");
1029 "Should only call on APFloats with the same semantics");
1031 return U.IEEE.fusedMultiplyAdd(Multiplicand.U.IEEE, Addend.U.IEEE,
RM);
1033 return U.Double.fusedMultiplyAdd(Multiplicand.U.Double, Addend.U.Double,
1050 Result.changeSign();
1099 Value.copySign(Sign);
1107 bool *IsExact)
const {
1112 bool *IsExact)
const;
1118 unsigned int InputSize,
bool IsSigned,
1124 unsigned int InputSize,
bool IsSigned,
1172 "Should only compare APFloats with the same semantics");
1174 return U.IEEE.compare(
RHS.U.IEEE);
1176 return U.Double.compare(
RHS.U.Double);
1184 return U.IEEE.bitwiseIsEqual(
RHS.U.IEEE);
1186 return U.Double.bitwiseIsEqual(
RHS.U.Double);
1237 unsigned FormatMaxPadding = 3,
bool TruncateZero =
true)
const {
1239 toString(Str, FormatPrecision, FormatMaxPadding, TruncateZero));
1263 if (APFloat::usesLayout<detail::IEEEFloat>(
X.getSemantics()))
1265 if (APFloat::usesLayout<detail::DoubleAPFloat>(
X.getSemantics()))
1275 if (APFloat::usesLayout<detail::IEEEFloat>(
X.getSemantics()))
1277 if (APFloat::usesLayout<detail::DoubleAPFloat>(
X.getSemantics()))
1301 return B < A ?
B : A;
1312 return A <
B ?
B : A;
1323 if (A.isZero() &&
B.isZero() && (A.isNegative() !=
B.isNegative()))
1324 return A.isNegative() ? A :
B;
1325 return B < A ?
B : A;
1336 if (A.isZero() &&
B.isZero() && (A.isNegative() !=
B.isNegative()))
1337 return A.isNegative() ?
B : A;
1338 return A <
B ?
B : A;
1343 #undef APFLOAT_DISPATCH_ON_SEMANTICS
1344 #endif // LLVM_ADT_APFLOAT_H
Expected< opStatus > convertFromString(StringRef, roundingMode)
opStatus add(const IEEEFloat &, roundingMode)
float convertToFloat() const
Converts this APFloat to host float value.
bool isInfinity() const
IEEE-754R isInfinite(): Returns true if and only if the float is infinity.
opStatus
IEEE-754R 7: Default exception handling.
bool getExactInverse(APFloat *inv) const
static unsigned int semanticsSizeInBits(const fltSemantics &)
opStatus add(const DoubleAPFloat &RHS, roundingMode RM)
This is an optimization pass for GlobalISel generic memory operations.
opStatus divide(const IEEEFloat &, roundingMode)
bool isSmallest() const
Returns true if and only if the number has the smallest possible non-zero magnitude in the current se...
friend DoubleAPFloat frexp(const DoubleAPFloat &X, int &Exp, roundingMode)
friend hash_code hash_value(const DoubleAPFloat &Arg)
bool operator==(const APFloat &RHS) const
opStatus add(const APFloat &RHS, roundingMode RM)
static const fltSemantics & IEEEsingle() LLVM_READNONE
opStatus next(bool nextDown)
opStatus roundToIntegral(roundingMode)
opStatus convertFromAPInt(const APInt &Input, bool IsSigned, roundingMode RM)
opStatus multiply(const IEEEFloat &, roundingMode)
bool needsCleanup() const
bool isLargest() const
Returns true if and only if the number has the largest possible finite magnitude in the current seman...
void makeLargest(bool Neg)
APInt::WordType integerPart
void makeSmallest(bool Neg=false)
Make this number the smallest magnitude denormal number in the given semantics.
bool bitwiseIsEqual(const IEEEFloat &) const
Bitwise comparison for equality (QNaNs compare equal, 0!=-0).
void makeNaN(bool SNaN=false, bool Neg=false, const APInt *fill=nullptr)
LLVM_READONLY APFloat minimum(const APFloat &A, const APFloat &B)
Implements IEEE 754-2018 minimum semantics.
static const fltSemantics & x87DoubleExtended() LLVM_READNONE
opStatus mod(const DoubleAPFloat &RHS)
friend APFloat frexp(const APFloat &X, int &Exp, roundingMode RM)
opStatus divide(const APFloat &RHS, roundingMode RM)
cmpResult compareAbsoluteValue(const IEEEFloat &) const
bool isFiniteNonZero() const
static const fltSemantics & BFloat() LLVM_READNONE
bool isInteger() const
Returns true if and only if the number is an exact integer.
const APFloat & getSecond() const
opStatus fusedMultiplyAdd(const APFloat &Multiplicand, const APFloat &Addend, roundingMode RM)
void toString(SmallVectorImpl< char > &Str, unsigned FormatPrecision, unsigned FormatMaxPadding, bool TruncateZero=true) const
friend DoubleAPFloat scalbn(const DoubleAPFloat &X, int Exp, roundingMode)
lostFraction
Enum that represents what fraction of the LSB truncated bits of an fp number represent.
static APFloat getSNaN(const fltSemantics &Sem, bool Negative=false, const APInt *payload=nullptr)
Factory for SNaN values.
Tagged union holding either a T or a Error.
int ilogb(const IEEEFloat &Arg)
APFloat operator+(const APFloat &RHS) const
Add two APFloats, rounding ties to the nearest even.
hash_code hash_value(const APFloat &Arg)
See friend declarations above.
cmpResult compareAbsoluteValue(const DoubleAPFloat &RHS) const
opStatus mod(const APFloat &RHS)
const fltSemantics & getSemantics() const
static constexpr roundingMode rmTowardNegative
unsigned int convertToHexString(char *DST, unsigned int HexDigits, bool UpperCase, roundingMode RM) const
void makeLargest(bool Neg=false)
Make this number the largest magnitude normal number in the given semantics.
void makeZero(bool Neg=false)
DoubleAPFloat(const fltSemantics &S)
static const fltSemantics & IEEEquad() LLVM_READNONE
=0.0 ? 0.0 :(a > 0.0 ? 1.0 :-1.0) a
amdgpu Simplify well known AMD library false FunctionCallee Value * Arg
opStatus convert(const fltSemantics &, roundingMode, bool *)
IEEEFloat::convert - convert a value of one floating point type to another.
static APFloat getZero(const fltSemantics &Sem, bool Negative=false)
Factory for Positive and Negative Zero.
DoubleAPFloat & operator=(DoubleAPFloat &&RHS)
static unsigned getSizeInBits(const fltSemantics &Sem)
Returns the size of the floating point number (in bits) in the given semantics.
opStatus convertToInteger(MutableArrayRef< integerPart > Input, unsigned int Width, bool IsSigned, roundingMode RM, bool *IsExact) const
MutableArrayRef - Represent a mutable reference to an array (0 or more elements consecutively in memo...
LLVM_READONLY APFloat maximum(const APFloat &A, const APFloat &B)
Implements IEEE 754-2018 maximum semantics.
Itanium Name Demangler i e convert the string _Z1fv into f()". You can also use the CRTP base ManglingParser to perform some simple analysis on the mangled name
static const fltSemantics & IEEEhalf() LLVM_READNONE
void makeNaN(bool SNaN, bool Neg, const APInt *fill)
RoundingMode
Rounding mode.
DoubleAPFloat & operator=(const DoubleAPFloat &RHS)
opStatus remainder(const IEEEFloat &)
IEEE remainder.
opStatus remainder(const DoubleAPFloat &RHS)
opStatus fusedMultiplyAdd(const IEEEFloat &, const IEEEFloat &, roundingMode)
static const fltSemantics & Bogus() LLVM_READNONE
A Pseudo fltsemantic used to construct APFloats that cannot conflict with anything real.
void makeSmallest(bool Neg)
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
into llvm powi allowing the code generator to produce balanced multiplication trees First
double convertToDouble() const
Converts this APFloat to host double value.
fltCategory
Category of internally-represented number.
bool bitwiseIsEqual(const APFloat &RHS) const
void makeInf(bool Neg=false)
An arbitrary precision integer that knows its signedness.
bool isDenormal() const
IEEE-754R isSubnormal(): Returns true if and only if the float is a denormal.
This class implements an extremely fast bulk output stream that can only output to a stream.
APInt bitcastToAPInt() const
APInt bitcastToAPInt() const
opStatus convertFromZeroExtendedInteger(const integerPart *, unsigned int, bool, roundingMode)
void makeSmallestNormalized(bool Neg)
the resulting code requires compare and branches when and if the revised code is with conditional branches instead of More there is a byte word extend before each where there should be only and the condition codes are not remembered when the same two values are compared twice More LSR enhancements i8 and i32 load store addressing modes are identical int int c
bool operator>(const APFloat &RHS) const
friend APFloat scalbn(APFloat X, int Exp, roundingMode RM)
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
opStatus subtract(const APFloat &RHS, roundingMode RM)
fltCategory getCategory() const
LLVM_READONLY APFloat maxnum(const APFloat &A, const APFloat &B)
Implements IEEE maxNum semantics.
APFloat(const fltSemantics &Semantics, integerPart I)
friend IEEEFloat scalbn(IEEEFloat X, int Exp, roundingMode)
Returns: X * 2^Exp for integral exponents.
opStatus multiply(const APFloat &RHS, roundingMode RM)
static APFloat getQNaN(const fltSemantics &Sem, bool Negative=false, const APInt *payload=nullptr)
Factory for QNaN values.
opStatus divide(const DoubleAPFloat &RHS, roundingMode RM)
void copySign(const APFloat &RHS)
Expected< opStatus > convertFromString(StringRef, roundingMode)
friend int ilogb(const APFloat &Arg)
opStatus roundToIntegral(roundingMode RM)
cmpResult
IEEE-754R 5.11: Floating Point Comparison Relations.
APFloat operator-() const
Negate an APFloat.
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
APFloat neg(APFloat X)
Returns the negated value of the argument.
bool operator!=(const APFloat &RHS) const
Vector Shift Left don t map to llvm shl and because they have different semantics
unsigned int convertToHexString(char *DST, unsigned int HexDigits, bool UpperCase, roundingMode RM) const
opStatus convertFromAPInt(const APInt &, bool, roundingMode)
void Profile(FoldingSetNodeID &NID) const
Used to insert APFloat objects, or objects that contain APFloat objects, into FoldingSets.
Expected< opStatus > convertFromString(StringRef, roundingMode)
opStatus fusedMultiplyAdd(const DoubleAPFloat &Multiplicand, const DoubleAPFloat &Addend, roundingMode RM)
static const fltSemantics & PPCDoubleDouble() LLVM_READNONE
bool getExactInverse(APFloat *inv) const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
opStatus convertFromSignExtendedInteger(const integerPart *Input, unsigned int InputSize, bool IsSigned, roundingMode RM)
fltCategory getCategory() const
APFloat operator-(const APFloat &RHS) const
Subtract two APFloats, rounding ties to the nearest even.
@ TowardNegative
roundTowardNegative.
void toString(SmallVectorImpl< char > &Str, unsigned FormatPrecision=0, unsigned FormatMaxPadding=3, bool TruncateZero=true) const
Converts this value into a decimal string.
opStatus roundToIntegral(roundingMode RM)
Class for arbitrary precision integers.
bool isFinite() const
Returns true if and only if the current value is zero, subnormal, or normal.
opStatus convertFromSignExtendedInteger(const integerPart *, unsigned int, bool, roundingMode)
APFloat scalbn(APFloat X, int Exp, APFloat::roundingMode RM)
APFloat operator/(const APFloat &RHS) const
Divide the first APFloat by the second, rounding ties to the nearest even.
static constexpr roundingMode rmNearestTiesToAway
static const fltSemantics & IEEEdouble() LLVM_READNONE
StringRef - Represent a constant reference to a string, i.e.
bool isZero() const
Returns true if and only if the float is plus or minus zero.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
static Semantics SemanticsToEnum(const llvm::fltSemantics &Sem)
opStatus convertFromZeroExtendedInteger(const integerPart *Input, unsigned int InputSize, bool IsSigned, roundingMode RM)
FoldingSetNodeID - This class is used to gather all the unique data bits of a node.
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
hash_code hash_value(const IEEEFloat &Arg)
bool bitwiseIsEqual(const DoubleAPFloat &RHS) const
bool operator==(const IEEEFloat &) const =delete
The definition of equality is not straightforward for floating point, so we won't use operator==.
bool needsCleanup() const
APFloat(const fltSemantics &Semantics, const APInt &I)
static const llvm::fltSemantics & EnumToSemantics(Semantics S)
A self-contained host- and target-independent arbitrary-precision floating-point software implementat...
opStatus mod(const IEEEFloat &)
C fmod, or llvm frem.
opStatus multiply(const DoubleAPFloat &RHS, roundingMode RM)
@ NearestTiesToAway
roundTiesToAway.
#define APFLOAT_DISPATCH_ON_SEMANTICS(METHOD_CALL)
opStatus convertFromSignExtendedInteger(const integerPart *Input, unsigned int InputSize, bool IsSigned, roundingMode RM)
@ TowardZero
roundTowardZero.
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.
opStatus subtract(const DoubleAPFloat &RHS, roundingMode RM)
static APFloat getSmallest(const fltSemantics &Sem, bool Negative=false)
Returns the smallest (by magnitude) finite number in the given semantics.
static constexpr roundingMode rmTowardPositive
opStatus next(bool nextDown)
IEEE-754R 5.3.1: nextUp/nextDown.
static constexpr roundingMode rmTowardZero
LLVM_READONLY APFloat minnum(const APFloat &A, const APFloat &B)
Implements IEEE minNum semantics.
friend hash_code hash_value(const APFloat &Arg)
See friend declarations above.
bool getExactInverse(APFloat *inv) const
If this value has an exact multiplicative inverse, store it in inv and return true.
void print(raw_ostream &) const
opStatus convertToInteger(MutableArrayRef< integerPart > Input, unsigned int Width, bool IsSigned, roundingMode RM, bool *IsExact) const
const APFloat & getFirst() const
bool isNegative() const
IEEE-754R isSignMinus: Returns true if and only if the current value is negative.
APFloat operator*(const APFloat &RHS) const
Multiply two APFloats, rounding ties to the nearest even.
APFloat & operator=(const APFloat &RHS)=default
bool isNormal() const
IEEE-754R isNormal: Returns true if and only if the current value is normal.
void makeSmallestNormalized(bool Negative=false)
Returns the smallest (by magnitude) normalized finite number in the given semantics.
double convertToDouble() const
opStatus remainder(const APFloat &RHS)
float convertToFloat() const
IEEEFloat frexp(const IEEEFloat &Val, int &Exp, IEEEFloat::roundingMode RM)
friend IEEEFloat frexp(const IEEEFloat &X, int &Exp, roundingMode)
static constexpr unsigned integerPartWidth
APFloat frexp(const APFloat &X, int &Exp, APFloat::roundingMode RM)
Equivalent of C standard library function.
bool isSignaling() const
Returns true if and only if the float is a signaling NaN.
bool isExactlyValue(double V) const
We don't rely on operator== working on double values, as it returns true for things that are clearly ...
static APFloat getAllOnesValue(const fltSemantics &Semantics)
Returns a float which is bitcasted from an all one value int.
bool operator>=(const APFloat &RHS) const
static constexpr roundingMode rmNearestTiesToEven
opStatus convert(const fltSemantics &ToSemantics, roundingMode RM, bool *losesInfo)
void toString(SmallVectorImpl< char > &Str, unsigned FormatPrecision=0, unsigned FormatMaxPadding=3, bool TruncateZero=true) const
@ APINT_BITS_PER_WORD
Bits in a word.
opStatus convertFromZeroExtendedInteger(const integerPart *Input, unsigned int InputSize, bool IsSigned, roundingMode RM)
@ TowardPositive
roundTowardPositive.
bool needsCleanup() const
Returns whether this instance allocated memory.
static unsigned int semanticsPrecision(const fltSemantics &)
cmpResult compare(const DoubleAPFloat &RHS) const
static APFloat getNaN(const fltSemantics &Sem, bool Negative=false, uint64_t payload=0)
Factory for NaN values.
friend hash_code hash_value(const IEEEFloat &Arg)
Overload to compute a hash code for an APFloat value.
const fltSemantics & getSemantics() const
APInt bitcastToAPInt() const
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
IEEEFloat(const fltSemantics &)
bool isFiniteNonZero() const
fltCategory getCategory() const
APFloat(const fltSemantics &Semantics, uninitializedTag)
int32_t ExponentType
A signed type to represent a floating point numbers unbiased exponent.
static APFloat getInf(const fltSemantics &Sem, bool Negative=false)
Factory for Positive and Negative Infinity.
opStatus next(bool nextDown)
cmpResult compare(const APFloat &RHS) const
opStatus convertFromAPInt(const APInt &Input, bool IsSigned, roundingMode RM)
cmpResult compare(const IEEEFloat &) const
IEEE comparison with another floating point number (NaNs compare unordered, 0==-0).
IlogbErrorKinds
Enumeration of ilogb error results.
constexpr char Args[]
Key for Kernel::Metadata::mArgs.
IEEEFloat scalbn(IEEEFloat X, int Exp, IEEEFloat::roundingMode)
opStatus subtract(const IEEEFloat &, roundingMode)
friend int ilogb(const IEEEFloat &Arg)
Returns the exponent of the internal representation of the APFloat.
the resulting code requires compare and branches when and if the revised code is with conditional branches instead of More there is a byte word extend before each where there should be only and the condition codes are not remembered when the same two values are compared twice More LSR enhancements i8 and i32 load store addressing modes are identical int int int d
uninitializedTag
Convenience enum used to construct an uninitialized APFloat.
bool operator<(const APFloat &RHS) const
APFloat abs(APFloat X)
Returns the absolute value of the argument.
llvm::RoundingMode roundingMode
IEEE-754R 4.3: Rounding-direction attributes.
@ NearestTiesToEven
roundTiesToEven.
static APFloat getLargest(const fltSemantics &Sem, bool Negative=false)
Returns the largest finite number in the given semantics.
LLVM Value Representation.
static APFloat getSmallestNormalized(const fltSemantics &Sem, bool Negative=false)
Returns the smallest (by magnitude) normalized finite number in the given semantics.
IEEEFloat & operator=(const IEEEFloat &)
static ExponentType semanticsMaxExponent(const fltSemantics &)
APFloat(const fltSemantics &Semantics)
unsigned int convertToHexString(char *dst, unsigned int hexDigits, bool upperCase, roundingMode) const
Write out a hexadecimal representation of the floating point value to DST, which must be of sufficien...
bool isNaN() const
Returns true if and only if the float is a quiet or signaling NaN.
An opaque object representing a hash code.
opStatus convertToInteger(MutableArrayRef< integerPart >, unsigned int, bool, roundingMode, bool *) const
static ExponentType semanticsMinExponent(const fltSemantics &)
bool operator<=(const APFloat &RHS) const