Lines Matching refs:APFloat

53 using llvm::APFloat;
370 OptionalDiagnostic &operator<<(const APFloat &F) { in operator <<()
379 llvm::APFloat::semanticsPrecision(F.getSemantics()); in operator <<()
883 APFloat FloatReal, FloatImag;
885 ComplexValue() : FloatReal(APFloat::Bogus), FloatImag(APFloat::Bogus) {} in ComplexValue()
889 APFloat &getComplexFloatReal() { return FloatReal; } in getComplexFloatReal()
890 APFloat &getComplexFloatImag() { return FloatImag; } in getComplexFloatImag()
1108 static bool EvaluateFloat(const Expr *E, APFloat &Result, EvalInfo &Info);
1502 QualType SrcType, const APFloat &Value, in HandleFloatToIntCast()
1510 if (Value.convertToInteger(Result, llvm::APFloat::rmTowardZero, &ignored) in HandleFloatToIntCast()
1511 & APFloat::opInvalidOp) in HandleFloatToIntCast()
1518 APFloat &Result) { in HandleFloatToFloatCast()
1519 APFloat Value = Result; in HandleFloatToFloatCast()
1522 APFloat::rmNearestTiesToEven, &ignored) in HandleFloatToFloatCast()
1523 & APFloat::opOverflow) in HandleFloatToFloatCast()
1542 QualType DestType, APFloat &Result) { in HandleIntToFloatCast()
1543 Result = APFloat(Info.Ctx.getFloatTypeSemantics(DestType), 1); in HandleIntToFloatCast()
1545 APFloat::rmNearestTiesToEven) in HandleIntToFloatCast()
1546 & APFloat::opOverflow) in HandleIntToFloatCast()
1743 APFloat &LHS, BinaryOperatorKind Opcode, in handleFloatFloatBinOp()
1744 const APFloat &RHS) { in handleFloatFloatBinOp()
1750 LHS.multiply(RHS, APFloat::rmNearestTiesToEven); in handleFloatFloatBinOp()
1753 LHS.add(RHS, APFloat::rmNearestTiesToEven); in handleFloatFloatBinOp()
1756 LHS.subtract(RHS, APFloat::rmNearestTiesToEven); in handleFloatFloatBinOp()
1759 LHS.divide(RHS, APFloat::rmNearestTiesToEven); in handleFloatFloatBinOp()
2364 bool found(APFloat &Value, QualType SubobjType) { in found()
2424 bool found(APFloat &Value, QualType SubobjType) { in found()
2825 bool found(APFloat &Value, QualType SubobjType) { in found()
2977 bool found(APFloat &Value, QualType SubobjType) { in found()
2983 APFloat One(Value.getSemantics(), 1); in found()
2985 Value.add(One, APFloat::rmNearestTiesToEven); in found()
2987 Value.subtract(One, APFloat::rmNearestTiesToEven); in found()
5548 APFloat F(0.0); in VisitCastExpr()
5573 if (&Sem == &APFloat::x87DoubleExtended) in VisitCastExpr()
5581 Elts.push_back(APValue(APFloat(Sem, Elt))); in VisitCastExpr()
5637 llvm::APFloat f(0.0); in VisitInitListExpr()
5642 f = APFloat::getZero(Info.Ctx.getFloatTypeSemantics(EltTy)); in VisitInitListExpr()
5660 APValue(APFloat::getZero(Info.Ctx.getFloatTypeSemantics(EltTy))); in ZeroInitialization()
6327 APFloat Val(0.0); in VisitCallExpr()
6332 case APFloat::fcNaN: Arg = 0; break; in VisitCallExpr()
6333 case APFloat::fcInfinity: Arg = 1; break; in VisitCallExpr()
6334 case APFloat::fcNormal: Arg = Val.isDenormal() ? 3 : 2; break; in VisitCallExpr()
6335 case APFloat::fcZero: Arg = 4; break; in VisitCallExpr()
6341 APFloat Val(0.0); in VisitCallExpr()
6347 APFloat Val(0.0); in VisitCallExpr()
6353 APFloat Val(0.0); in VisitCallExpr()
6359 APFloat Val(0.0); in VisitCallExpr()
6365 APFloat Val(0.0); in VisitCallExpr()
6858 LHS.FloatImag = APFloat(LHS.FloatReal.getSemantics()); in VisitBinaryOperator()
6870 RHS.FloatImag = APFloat(RHS.FloatReal.getSemantics()); in VisitBinaryOperator()
6875 APFloat::cmpResult CR_r = in VisitBinaryOperator()
6877 APFloat::cmpResult CR_i = in VisitBinaryOperator()
6881 return Success((CR_r == APFloat::cmpEqual && in VisitBinaryOperator()
6882 CR_i == APFloat::cmpEqual), E); in VisitBinaryOperator()
6886 return Success(((CR_r == APFloat::cmpGreaterThan || in VisitBinaryOperator()
6887 CR_r == APFloat::cmpLessThan || in VisitBinaryOperator()
6888 CR_r == APFloat::cmpUnordered) || in VisitBinaryOperator()
6889 (CR_i == APFloat::cmpGreaterThan || in VisitBinaryOperator()
6890 CR_i == APFloat::cmpLessThan || in VisitBinaryOperator()
6891 CR_i == APFloat::cmpUnordered)), E); in VisitBinaryOperator()
6908 APFloat RHS(0.0), LHS(0.0); in VisitBinaryOperator()
6917 APFloat::cmpResult CR = LHS.compare(RHS); in VisitBinaryOperator()
6923 return Success(CR == APFloat::cmpLessThan, E); in VisitBinaryOperator()
6925 return Success(CR == APFloat::cmpGreaterThan, E); in VisitBinaryOperator()
6927 return Success(CR == APFloat::cmpLessThan || CR == APFloat::cmpEqual, E); in VisitBinaryOperator()
6929 return Success(CR == APFloat::cmpGreaterThan || CR == APFloat::cmpEqual, in VisitBinaryOperator()
6932 return Success(CR == APFloat::cmpEqual, E); in VisitBinaryOperator()
6934 return Success(CR == APFloat::cmpGreaterThan in VisitBinaryOperator()
6935 || CR == APFloat::cmpLessThan in VisitBinaryOperator()
6936 || CR == APFloat::cmpUnordered, E); in VisitBinaryOperator()
7486 APFloat F(0.0); in VisitCastExpr()
7542 APFloat &Result;
7544 FloatExprEvaluator(EvalInfo &info, APFloat &result) in FloatExprEvaluator()
7553 Result = APFloat::getZero(Info.Ctx.getFloatTypeSemantics(E->getType())); in ZeroInitialization()
7571 static bool EvaluateFloat(const Expr* E, APFloat& Result, EvalInfo &Info) { in EvaluateFloat()
7580 llvm::APFloat &Result) { in TryEvaluateBuiltinNaN()
7596 Result = llvm::APFloat::getSNaN(Sem, false, &fill); in TryEvaluateBuiltinNaN()
7598 Result = llvm::APFloat::getQNaN(Sem, false, &fill); in TryEvaluateBuiltinNaN()
7606 Result = llvm::APFloat::getQNaN(Sem, false, &fill); in TryEvaluateBuiltinNaN()
7608 Result = llvm::APFloat::getSNaN(Sem, false, &fill); in TryEvaluateBuiltinNaN()
7627 Result = llvm::APFloat::getInf(Sem); in VisitCallExpr()
7666 APFloat RHS(0.); in VisitCallExpr()
7699 Result = llvm::APFloat::getZero(Sem); in VisitUnaryImag()
7720 APFloat RHS(0.0); in VisitBinaryOperator()
7806 APFloat Zero = APFloat::getZero(Info.Ctx.getFloatTypeSemantics(ElemTy)); in ZeroInitialization()
7823 APFloat &Imag = Result.FloatImag; in VisitImaginaryLiteral()
7827 Result.FloatReal = APFloat(Imag.getSemantics()); in VisitImaginaryLiteral()
7902 APFloat &Real = Result.FloatReal; in VisitCastExpr()
7907 Result.FloatImag = APFloat(Real.getSemantics()); in VisitCastExpr()
7989 APFloat &Real = Result.FloatReal; in VisitBinaryOperator()
7993 Result.FloatImag = APFloat(Real.getSemantics()); in VisitBinaryOperator()
8004 APFloat &Real = RHS.FloatReal; in VisitBinaryOperator()
8008 RHS.FloatImag = APFloat(Real.getSemantics()); in VisitBinaryOperator()
8019 APFloat::rmNearestTiesToEven); in VisitBinaryOperator()
8024 APFloat::rmNearestTiesToEven); in VisitBinaryOperator()
8033 APFloat::rmNearestTiesToEven); in VisitBinaryOperator()
8039 APFloat::rmNearestTiesToEven); in VisitBinaryOperator()
8053 APFloat &A = LHS.getComplexFloatReal(); in VisitBinaryOperator()
8054 APFloat &B = LHS.getComplexFloatImag(); in VisitBinaryOperator()
8055 APFloat &C = RHS.getComplexFloatReal(); in VisitBinaryOperator()
8056 APFloat &D = RHS.getComplexFloatImag(); in VisitBinaryOperator()
8057 APFloat &ResR = Result.getComplexFloatReal(); in VisitBinaryOperator()
8058 APFloat &ResI = Result.getComplexFloatImag(); in VisitBinaryOperator()
8069 APFloat AC = A * C; in VisitBinaryOperator()
8070 APFloat BD = B * D; in VisitBinaryOperator()
8071 APFloat AD = A * D; in VisitBinaryOperator()
8072 APFloat BC = B * C; in VisitBinaryOperator()
8078 A = APFloat::copySign( in VisitBinaryOperator()
8079 APFloat(A.getSemantics(), A.isInfinity() ? 1 : 0), A); in VisitBinaryOperator()
8080 B = APFloat::copySign( in VisitBinaryOperator()
8081 APFloat(B.getSemantics(), B.isInfinity() ? 1 : 0), B); in VisitBinaryOperator()
8083 C = APFloat::copySign(APFloat(C.getSemantics()), C); in VisitBinaryOperator()
8085 D = APFloat::copySign(APFloat(D.getSemantics()), D); in VisitBinaryOperator()
8089 C = APFloat::copySign( in VisitBinaryOperator()
8090 APFloat(C.getSemantics(), C.isInfinity() ? 1 : 0), C); in VisitBinaryOperator()
8091 D = APFloat::copySign( in VisitBinaryOperator()
8092 APFloat(D.getSemantics(), D.isInfinity() ? 1 : 0), D); in VisitBinaryOperator()
8094 A = APFloat::copySign(APFloat(A.getSemantics()), A); in VisitBinaryOperator()
8096 B = APFloat::copySign(APFloat(B.getSemantics()), B); in VisitBinaryOperator()
8102 A = APFloat::copySign(APFloat(A.getSemantics()), A); in VisitBinaryOperator()
8104 B = APFloat::copySign(APFloat(B.getSemantics()), B); in VisitBinaryOperator()
8106 C = APFloat::copySign(APFloat(C.getSemantics()), C); in VisitBinaryOperator()
8108 D = APFloat::copySign(APFloat(D.getSemantics()), D); in VisitBinaryOperator()
8112 ResR = APFloat::getInf(A.getSemantics()) * (A * C - B * D); in VisitBinaryOperator()
8113 ResI = APFloat::getInf(A.getSemantics()) * (A * D + B * C); in VisitBinaryOperator()
8134 APFloat &A = LHS.getComplexFloatReal(); in VisitBinaryOperator()
8135 APFloat &B = LHS.getComplexFloatImag(); in VisitBinaryOperator()
8136 APFloat &C = RHS.getComplexFloatReal(); in VisitBinaryOperator()
8137 APFloat &D = RHS.getComplexFloatImag(); in VisitBinaryOperator()
8138 APFloat &ResR = Result.getComplexFloatReal(); in VisitBinaryOperator()
8139 APFloat &ResI = Result.getComplexFloatImag(); in VisitBinaryOperator()
8146 B = APFloat::getZero(A.getSemantics()); in VisitBinaryOperator()
8149 APFloat MaxCD = maxnum(abs(C), abs(D)); in VisitBinaryOperator()
8155 APFloat Denom = C * C + D * D; in VisitBinaryOperator()
8160 ResR = APFloat::getInf(ResR.getSemantics(), C.isNegative()) * A; in VisitBinaryOperator()
8161 ResI = APFloat::getInf(ResR.getSemantics(), C.isNegative()) * B; in VisitBinaryOperator()
8164 A = APFloat::copySign( in VisitBinaryOperator()
8165 APFloat(A.getSemantics(), A.isInfinity() ? 1 : 0), A); in VisitBinaryOperator()
8166 B = APFloat::copySign( in VisitBinaryOperator()
8167 APFloat(B.getSemantics(), B.isInfinity() ? 1 : 0), B); in VisitBinaryOperator()
8168 ResR = APFloat::getInf(ResR.getSemantics()) * (A * C + B * D); in VisitBinaryOperator()
8169 ResI = APFloat::getInf(ResI.getSemantics()) * (B * C - A * D); in VisitBinaryOperator()
8171 C = APFloat::copySign( in VisitBinaryOperator()
8172 APFloat(C.getSemantics(), C.isInfinity() ? 1 : 0), C); in VisitBinaryOperator()
8173 D = APFloat::copySign( in VisitBinaryOperator()
8174 APFloat(D.getSemantics(), D.isInfinity() ? 1 : 0), D); in VisitBinaryOperator()
8175 ResR = APFloat::getZero(ResR.getSemantics()) * (A * C + B * D); in VisitBinaryOperator()
8176 ResI = APFloat::getZero(ResI.getSemantics()) * (B * C - A * D); in VisitBinaryOperator()
8358 llvm::APFloat F(0.0); in Evaluate()
8952 llvm::APFloat::rmTowardZero, in CheckICE()
8953 &Ignored) & APFloat::opInvalidOp) in CheckICE()