/external/llvm/unittests/ADT/ |
D | APFloatTest.cpp | 23 llvm::APFloat F(0.0); in convertToDoubleFromString() 24 F.convertFromString(Str, llvm::APFloat::rmNearestTiesToEven); in convertToDoubleFromString() 30 llvm::APFloat F(d); in convertToString() 42 EXPECT_FALSE(APFloat::getQNaN(APFloat::IEEEsingle, false).isSignaling()); in TEST() 43 EXPECT_FALSE(APFloat::getQNaN(APFloat::IEEEsingle, true).isSignaling()); in TEST() 44 EXPECT_FALSE(APFloat::getQNaN(APFloat::IEEEsingle, false, &payload).isSignaling()); in TEST() 45 EXPECT_FALSE(APFloat::getQNaN(APFloat::IEEEsingle, true, &payload).isSignaling()); in TEST() 46 EXPECT_TRUE(APFloat::getSNaN(APFloat::IEEEsingle, false).isSignaling()); in TEST() 47 EXPECT_TRUE(APFloat::getSNaN(APFloat::IEEEsingle, true).isSignaling()); in TEST() 48 EXPECT_TRUE(APFloat::getSNaN(APFloat::IEEEsingle, false, &payload).isSignaling()); in TEST() [all …]
|
/external/llvm/include/llvm/ADT/ |
D | APFloat.h | 122 class APFloat { 194 APFloat(const fltSemantics &); // Default construct to 0.0 195 APFloat(const fltSemantics &, StringRef); 196 APFloat(const fltSemantics &, integerPart); 197 APFloat(const fltSemantics &, uninitializedTag); 198 APFloat(const fltSemantics &, const APInt &); 199 explicit APFloat(double d); 200 explicit APFloat(float f); 201 APFloat(const APFloat &); 202 APFloat(APFloat &&); [all …]
|
/external/llvm/lib/Support/ |
D | APFloat.cpp | 46 APFloat::ExponentType maxExponent; 50 APFloat::ExponentType minExponent; 60 const fltSemantics APFloat::IEEEhalf = { 15, -14, 11, 16 }; 61 const fltSemantics APFloat::IEEEsingle = { 127, -126, 24, 32 }; 62 const fltSemantics APFloat::IEEEdouble = { 1023, -1022, 53, 64 }; 63 const fltSemantics APFloat::IEEEquad = { 16383, -16382, 113, 128 }; 64 const fltSemantics APFloat::x87DoubleExtended = { 16383, -16382, 64, 80 }; 65 const fltSemantics APFloat::Bogus = { 0, 0, 0, 0 }; 78 const fltSemantics APFloat::PPCDoubleDouble = { 1023, -1022 + 53, 53 + 53, 128 }; 299 D->exponent += static_cast<APFloat::ExponentType>((dot - p) - (dot > p)); in interpretDecimal() [all …]
|
/external/llvm/lib/Target/NVPTX/ |
D | NVPTXMCExpr.cpp | 19 NVPTXFloatMCExpr::create(VariantKind Kind, APFloat Flt, MCContext &Ctx) { in create() 26 APFloat APF = getAPFloat(); in printImpl() 33 APF.convert(APFloat::IEEEsingle, APFloat::rmNearestTiesToEven, &Ignored); in printImpl() 38 APF.convert(APFloat::IEEEdouble, APFloat::rmNearestTiesToEven, &Ignored); in printImpl()
|
D | NVPTXMCExpr.h | 30 const APFloat Flt; 32 explicit NVPTXFloatMCExpr(VariantKind Kind, APFloat Flt) in NVPTXFloatMCExpr() 39 static const NVPTXFloatMCExpr *create(VariantKind Kind, APFloat Flt, 42 static const NVPTXFloatMCExpr *createConstantFPSingle(APFloat Flt, in createConstantFPSingle() 47 static const NVPTXFloatMCExpr *createConstantFPDouble(APFloat Flt, in createConstantFPDouble() 60 APFloat getAPFloat() const { return Flt; } in getAPFloat()
|
/external/clang/include/clang/AST/ |
D | APValue.h | 40 typedef llvm::APFloat APFloat; typedef 76 APFloat Real, Imag; 112 typedef llvm::AlignedCharArrayUnion<void *, APSInt, APFloat, ComplexAPSInt, 124 explicit APValue(APFloat F) : Kind(Uninitialized) { in APValue() 133 APValue(APFloat R, APFloat I) : Kind(Uninitialized) { in APValue() 208 APFloat &getFloat() { in getFloat() 210 return *(APFloat*)(char*)Data.buffer; in getFloat() 212 const APFloat &getFloat() const { in getFloat() 232 APFloat &getComplexFloatReal() { in getComplexFloatReal() 236 const APFloat &getComplexFloatReal() const { in getComplexFloatReal() [all …]
|
/external/llvm/lib/Analysis/ |
D | ConstantFolding.cpp | 1314 APFloat APF(V); in GetConstantFoldFPValue() 1316 APF.convert(APFloat::IEEEhalf, APFloat::rmNearestTiesToEven, &unused); in GetConstantFoldFPValue() 1320 return ConstantFP::get(Ty->getContext(), APFloat((float)V)); in GetConstantFoldFPValue() 1322 return ConstantFP::get(Ty->getContext(), APFloat(V)); in GetConstantFoldFPValue() 1380 static Constant *ConstantFoldConvertToInt(const APFloat &Val, in ConstantFoldConvertToInt() 1389 APFloat::roundingMode mode = roundTowardZero? APFloat::rmTowardZero in ConstantFoldConvertToInt() 1390 : APFloat::rmNearestTiesToEven; in ConstantFoldConvertToInt() 1391 APFloat::opStatus status = Val.convertToInteger(&UIntVal, ResultWidth, in ConstantFoldConvertToInt() 1394 if (status != APFloat::opOK && status != APFloat::opInexact) in ConstantFoldConvertToInt() 1409 APFloat APF = Op->getValueAPF(); in getValueAsDouble() [all …]
|
/external/clang/lib/Basic/ |
D | TargetInfo.cpp | 70 HalfFormat = &llvm::APFloat::IEEEhalf; in TargetInfo() 71 FloatFormat = &llvm::APFloat::IEEEsingle; in TargetInfo() 72 DoubleFormat = &llvm::APFloat::IEEEdouble; in TargetInfo() 73 LongDoubleFormat = &llvm::APFloat::IEEEdouble; in TargetInfo() 220 if (&getLongDoubleFormat() == &llvm::APFloat::x87DoubleExtended) in getRealTypeByWidth() 224 if (&getLongDoubleFormat() == &llvm::APFloat::PPCDoubleDouble || in getRealTypeByWidth() 225 &getLongDoubleFormat() == &llvm::APFloat::IEEEquad) in getRealTypeByWidth() 296 DoubleFormat = &llvm::APFloat::IEEEdouble; in adjust() 309 HalfFormat = &llvm::APFloat::IEEEhalf; in adjust() 310 FloatFormat = &llvm::APFloat::IEEEsingle; in adjust() [all …]
|
/external/llvm/lib/Target/WebAssembly/InstPrinter/ |
D | WebAssemblyInstPrinter.cpp | 64 static std::string toString(const APFloat &FP) { in toString() 68 assert((FP.bitwiseIsEqual(APFloat::getQNaN(FP.getSemantics())) || in toString() 70 APFloat::getQNaN(FP.getSemantics(), /*Negative=*/true))) && in toString() 74 buf, /*hexDigits=*/0, /*upperCase=*/false, APFloat::rmNearestTiesToEven); in toString() 109 O << toString(APFloat(Op.getFPImm())); in printOperand()
|
/external/llvm/lib/IR/ |
D | Constants.cpp | 202 APFloat::getZero(APFloat::IEEEhalf)); in getNullValue() 205 APFloat::getZero(APFloat::IEEEsingle)); in getNullValue() 208 APFloat::getZero(APFloat::IEEEdouble)); in getNullValue() 211 APFloat::getZero(APFloat::x87DoubleExtended)); in getNullValue() 214 APFloat::getZero(APFloat::IEEEquad)); in getNullValue() 217 APFloat(APFloat::PPCDoubleDouble, in getNullValue() 256 APFloat FL = APFloat::getAllOnesValue(Ty->getPrimitiveSizeInBits(), in getAllOnesValue() 632 return &APFloat::IEEEhalf; in TypeToFloatSemantics() 634 return &APFloat::IEEEsingle; in TypeToFloatSemantics() 636 return &APFloat::IEEEdouble; in TypeToFloatSemantics() [all …]
|
D | ConstantFold.cpp | 176 APFloat(DestTy->getFltSemantics(), in FoldBitCast() 591 APFloat Val = FPC->getValueAPF(); in ConstantFoldCastInstruction() 592 Val.convert(DestTy->isHalfTy() ? APFloat::IEEEhalf : in ConstantFoldCastInstruction() 593 DestTy->isFloatTy() ? APFloat::IEEEsingle : in ConstantFoldCastInstruction() 594 DestTy->isDoubleTy() ? APFloat::IEEEdouble : in ConstantFoldCastInstruction() 595 DestTy->isX86_FP80Ty() ? APFloat::x87DoubleExtended : in ConstantFoldCastInstruction() 596 DestTy->isFP128Ty() ? APFloat::IEEEquad : in ConstantFoldCastInstruction() 597 DestTy->isPPC_FP128Ty() ? APFloat::PPCDoubleDouble : in ConstantFoldCastInstruction() 598 APFloat::Bogus, in ConstantFoldCastInstruction() 599 APFloat::rmNearestTiesToEven, &ignored); in ConstantFoldCastInstruction() [all …]
|
/external/llvm/lib/AsmParser/ |
D | LLLexer.cpp | 854 APFloatVal = APFloat(BitsToDouble(HexIntToVal(TokStart+2, CurPtr))); in Lex0x() 855 return lltok::APFloat; in Lex0x() 864 APFloatVal = APFloat(APFloat::x87DoubleExtended, APInt(80, Pair)); in Lex0x() 865 return lltok::APFloat; in Lex0x() 869 APFloatVal = APFloat(APFloat::IEEEquad, APInt(128, Pair)); in Lex0x() 870 return lltok::APFloat; in Lex0x() 874 APFloatVal = APFloat(APFloat::PPCDoubleDouble, APInt(128, Pair)); in Lex0x() 875 return lltok::APFloat; in Lex0x() 877 APFloatVal = APFloat(APFloat::IEEEhalf, in Lex0x() 879 return lltok::APFloat; in Lex0x() [all …]
|
D | LLLexer.h | 42 APFloat APFloatVal; 60 const APFloat &getAPFloatVal() const { return APFloatVal; } in getAPFloatVal()
|
/external/llvm/lib/Transforms/InstCombine/ |
D | InstCombineAddSub.cpp | 50 void set(const APFloat& C); 71 APFloat *getFpValPtr() in getFpValPtr() 72 { return reinterpret_cast<APFloat*>(&FpValBuf.buffer[0]); } in getFpValPtr() 73 const APFloat *getFpValPtr() const in getFpValPtr() 74 { return reinterpret_cast<const APFloat*>(&FpValBuf.buffer[0]); } in getFpValPtr() 76 const APFloat &getFpVal() const { in getFpVal() 81 APFloat &getFpVal() { in getFpVal() 95 APFloat createAPFloatFromInt(const fltSemantics &Sem, int Val); 109 AlignedCharArrayUnion<APFloat> FpValBuf; 127 void set(const APFloat& Coefficient, Value *V) in set() [all …]
|
/external/clang/lib/AST/ |
D | ExprConstant.cpp | 53 using llvm::APFloat; 389 OptionalDiagnostic &operator<<(const APFloat &F) { in operator <<() 398 llvm::APFloat::semanticsPrecision(F.getSemantics()); in operator <<() 958 APFloat FloatReal, FloatImag; 960 ComplexValue() : FloatReal(APFloat::Bogus), FloatImag(APFloat::Bogus) {} in ComplexValue() 964 APFloat &getComplexFloatReal() { return FloatReal; } in getComplexFloatReal() 965 APFloat &getComplexFloatImag() { return FloatImag; } in getComplexFloatImag() 1186 static bool EvaluateFloat(const Expr *E, APFloat &Result, EvalInfo &Info); 1582 QualType SrcType, const APFloat &Value, in HandleFloatToIntCast() 1590 if (Value.convertToInteger(Result, llvm::APFloat::rmTowardZero, &ignored) in HandleFloatToIntCast() [all …]
|
D | APValue.cpp | 193 ((APFloat*)(char*)Data.buffer)->~APFloat(); in DestroyDataAndMakeUninit() 263 static double GetApproxValue(const llvm::APFloat &F) { in GetApproxValue() 264 llvm::APFloat V = F; in GetApproxValue() 266 V.convert(llvm::APFloat::IEEEdouble, llvm::APFloat::rmNearestTiesToEven, in GetApproxValue()
|
/external/llvm/include/llvm/IR/ |
D | Type.h | 158 case HalfTyID: return APFloat::IEEEhalf; in getFltSemantics() 159 case FloatTyID: return APFloat::IEEEsingle; in getFltSemantics() 160 case DoubleTyID: return APFloat::IEEEdouble; in getFltSemantics() 161 case X86_FP80TyID: return APFloat::x87DoubleExtended; in getFltSemantics() 162 case FP128TyID: return APFloat::IEEEquad; in getFltSemantics() 163 case PPC_FP128TyID: return APFloat::PPCDoubleDouble; in getFltSemantics()
|
/external/llvm/lib/ExecutionEngine/ |
D | ExecutionEngine.cpp | 696 APFloat apf = APFloat::getZero(APFloat::x87DoubleExtended); in getConstantValue() 699 APFloat::rmNearestTiesToEven); in getConstantValue() 711 APFloat apf = APFloat::getZero(APFloat::x87DoubleExtended); in getConstantValue() 714 APFloat::rmNearestTiesToEven); in getConstantValue() 728 APFloat apf = APFloat(APFloat::x87DoubleExtended, GV.IntVal); in getConstantValue() 733 APFloat::rmTowardZero, &ignored); in getConstantValue() 848 APFloat apfLHS = APFloat(Sem, LHS.IntVal); in getConstantValue() 852 apfLHS.add(APFloat(Sem, RHS.IntVal), APFloat::rmNearestTiesToEven); in getConstantValue() 856 apfLHS.subtract(APFloat(Sem, RHS.IntVal), in getConstantValue() 857 APFloat::rmNearestTiesToEven); in getConstantValue() [all …]
|
/external/llvm/lib/Transforms/Scalar/ |
D | Float2Int.cpp | 321 APFloat F = CF->getValueAPF(); in walkForwards() 334 APFloat NewF = F; in walkForwards() 335 auto Res = NewF.roundToIntegral(APFloat::rmNearestTiesToEven); in walkForwards() 336 if (Res != APFloat::opOK || NewF.compare(F) != APFloat::cmpEqual) { in walkForwards() 345 APFloat::rmNearestTiesToEven, in walkForwards() 419 = APFloat::semanticsPrecision(ConvertedToTy->getFltSemantics()) - 1; in validateAndTransform() 459 APFloat::rmNearestTiesToEven, in convert()
|
/external/llvm/lib/Target/ARM/ |
D | ARMMCInstLower.cpp | 105 APFloat Val = MO.getFPImm()->getValueAPF(); in lowerOperand() 107 Val.convert(APFloat::IEEEdouble, APFloat::rmTowardZero, &ignored); in lowerOperand()
|
/external/mesa3d/src/gallium/drivers/radeon/ |
D | AMDGPUMCInstLower.cpp | 41 const APFloat &FloatValue = MO.getFPImm()->getValueAPF(); in lower() 42 assert(&FloatValue.getSemantics() == &APFloat::IEEEsingle && in lower()
|
/external/llvm/lib/CodeGen/SelectionDAG/ |
D | SelectionDAG.cpp | 76 bool ConstantFPSDNode::isExactlyValue(const APFloat& V) const { in isExactlyValue() 81 const APFloat& Val) { in isValueValidForType() 85 APFloat Val2 = APFloat(Val); in isValueValidForType() 88 APFloat::rmNearestTiesToEven, in isValueValidForType() 1219 SDValue SelectionDAG::getConstantFP(const APFloat& V, SDLoc DL, EVT VT, in getConstantFP() 1263 return getConstantFP(APFloat((float)Val), DL, VT, isTarget); in getConstantFP() 1265 return getConstantFP(APFloat(Val), DL, VT, isTarget); in getConstantFP() 1269 APFloat apf = APFloat(Val); in getConstantFP() 1270 apf.convert(EVTToAPFloatSemantics(EltVT), APFloat::rmNearestTiesToEven, in getConstantFP() 1969 APFloat::cmpResult R = N1C->getValueAPF().compare(N2C->getValueAPF()); in FoldSetCC() [all …]
|
/external/clang/lib/CodeGen/ |
D | CodeGenTypes.cpp | 278 if (&format == &llvm::APFloat::IEEEhalf) { in getTypeForFormat() 284 if (&format == &llvm::APFloat::IEEEsingle) in getTypeForFormat() 286 if (&format == &llvm::APFloat::IEEEdouble) in getTypeForFormat() 288 if (&format == &llvm::APFloat::IEEEquad) in getTypeForFormat() 290 if (&format == &llvm::APFloat::PPCDoubleDouble) in getTypeForFormat() 292 if (&format == &llvm::APFloat::x87DoubleExtended) in getTypeForFormat()
|
/external/llvm/lib/Transforms/IPO/ |
D | MergeFunctions.cpp | 405 int cmpAPFloats(const APFloat &L, const APFloat &R) const; 488 int FunctionComparator::cmpAPFloats(const APFloat &L, const APFloat &R) const { in cmpAPFloats() 492 if (int Res = cmpNumbers(APFloat::semanticsPrecision(SL), in cmpAPFloats() 493 APFloat::semanticsPrecision(SR))) in cmpAPFloats() 495 if (int Res = cmpNumbers(APFloat::semanticsMaxExponent(SL), in cmpAPFloats() 496 APFloat::semanticsMaxExponent(SR))) in cmpAPFloats() 498 if (int Res = cmpNumbers(APFloat::semanticsMinExponent(SL), in cmpAPFloats() 499 APFloat::semanticsMinExponent(SR))) in cmpAPFloats() 501 if (int Res = cmpNumbers(APFloat::semanticsSizeInBits(SL), in cmpAPFloats() 502 APFloat::semanticsSizeInBits(SR))) in cmpAPFloats() [all …]
|
/external/llvm/lib/Target/Hexagon/ |
D | HexagonSplitConst32AndConst64.cpp | 114 APFloat Val = MI->getOperand(1).getFPImm()->getValueAPF(); in runOnMachineFunction() 133 APFloat Val = MI->getOperand(1).getFPImm()->getValueAPF(); in runOnMachineFunction()
|