/external/llvm/lib/Analysis/ |
D | ConstantFolding.cpp | 106 if (isa<ConstantFP>(C) || isa<ConstantInt>(C)) { in FoldBitCast() 307 if (ConstantFP *CFP = dyn_cast<ConstantFP>(C)) { in ReadDataFromGlobal() 1317 return ConstantFP::get(Ty->getContext(), APF); in GetConstantFoldFPValue() 1320 return ConstantFP::get(Ty->getContext(), APFloat((float)V)); in GetConstantFoldFPValue() 1322 return ConstantFP::get(Ty->getContext(), APFloat(V)); in GetConstantFoldFPValue() 1399 static double getValueAsDouble(ConstantFP *Op) { in getValueAsDouble() 1418 if (ConstantFP *Op = dyn_cast<ConstantFP>(Operands[0])) { in ConstantFoldScalarCall() 1434 return ConstantFP::get(Ty->getContext(), V); in ConstantFoldScalarCall() 1440 return ConstantFP::get(Ty->getContext(), V); in ConstantFoldScalarCall() 1446 return ConstantFP::get(Ty->getContext(), V); in ConstantFoldScalarCall() [all …]
|
/external/llvm/lib/IR/ |
D | Constants.cpp | 47 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(this)) in isNegativeZeroValue() 52 if (ConstantFP *SplatCFP = dyn_cast_or_null<ConstantFP>(CV->getSplatValue())) in isNegativeZeroValue() 57 if (ConstantFP *SplatCFP = dyn_cast_or_null<ConstantFP>(CV->getSplatValue())) in isNegativeZeroValue() 73 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(this)) in isZeroValue() 78 if (ConstantFP *SplatCFP = dyn_cast_or_null<ConstantFP>(CV->getSplatValue())) in isZeroValue() 83 if (ConstantFP *SplatCFP = dyn_cast_or_null<ConstantFP>(CV->getSplatValue())) in isZeroValue() 97 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(this)) in isNullValue() 112 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(this)) in isAllOnesValue() 134 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(this)) in isOneValue() 156 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(this)) in isMinSignedValue() [all …]
|
D | ConstantFold.cpp | 157 if (isa<ConstantInt>(V) || isa<ConstantFP>(V)) in FoldBitCast() 175 return ConstantFP::get(DestTy->getContext(), in FoldBitCast() 184 if (ConstantFP *FP = dyn_cast<ConstantFP>(V)) { in FoldBitCast() 589 if (ConstantFP *FPC = dyn_cast<ConstantFP>(V)) { in ConstantFoldCastInstruction() 600 return ConstantFP::get(V->getContext(), Val); in ConstantFoldCastInstruction() 605 if (ConstantFP *FPC = dyn_cast<ConstantFP>(V)) { in ConstantFoldCastInstruction() 682 return ConstantFP::get(V->getContext(), apf); in ConstantFoldCastInstruction() 1169 } else if (ConstantFP *CFP1 = dyn_cast<ConstantFP>(C1)) { in ConstantFoldBinaryInstruction() 1170 if (ConstantFP *CFP2 = dyn_cast<ConstantFP>(C2)) { in ConstantFoldBinaryInstruction() 1179 return ConstantFP::get(C1->getContext(), C3V); in ConstantFoldBinaryInstruction() [all …]
|
/external/llvm/unittests/IR/ |
D | PatternMatch.cpp | 70 Value *L = ConstantFP::get(FltTy, 1.0); in TEST_F() 71 Value *R = ConstantFP::get(FltTy, 2.0); in TEST_F() 109 Value *L = ConstantFP::get(FltTy, 1.0); in TEST_F() 110 Value *R = ConstantFP::get(FltTy, 2.0); in TEST_F() 148 Value *L = ConstantFP::get(FltTy, 1.0); in TEST_F() 149 Value *R = ConstantFP::get(FltTy, 2.0); in TEST_F() 187 Value *L = ConstantFP::get(FltTy, 1.0); in TEST_F() 188 Value *R = ConstantFP::get(FltTy, 2.0); in TEST_F()
|
D | MDBuilderTest.cpp | 40 EXPECT_TRUE(mdconst::hasa<ConstantFP>(Op)); in TEST_F() 41 ConstantFP *Val = mdconst::extract<ConstantFP>(Op); in TEST_F()
|
D | ConstantsTest.cpp | 124 EXPECT_TRUE(isa<ConstantFP>(X)); in TEST() 409 Constant *Vals[] = {ConstantFP::get(T, 0), ConstantFP::get(T, 1)}; in TEST() 430 Constant *Vals[] = {ConstantFP::get(T, 0), ConstantFP::get(T, 1)}; in TEST()
|
/external/llvm/include/llvm/CodeGen/ |
D | MachineOperand.h | 23 class ConstantFP; variable 156 const ConstantFP *CFP; // For MO_FPImmediate. 420 const ConstantFP *getFPImm() const { in getFPImm() 513 void setFPImm(const ConstantFP *CFP) { in setFPImm() 560 void ChangeToFPImmediate(const ConstantFP *FPImm); 591 static MachineOperand CreateFPImm(const ConstantFP *CFP) { in CreateFPImm()
|
D | FastISel.h | 359 bool Op0IsKill, const ConstantFP *FPImm); 384 const ConstantFP *FPImm); 426 const ConstantFP *FPImm); 484 virtual unsigned fastMaterializeFloatZero(const ConstantFP *CF) { in fastMaterializeFloatZero()
|
/external/llvm/lib/CodeGen/AsmPrinter/ |
D | DebugLocEntry.h | 37 Value(const DIExpression *Expr, const ConstantFP *CFP) in Value() 60 const ConstantFP *CFP; 72 const ConstantFP *getConstantFP() const { return Constant.CFP; } in getConstantFP()
|
/external/llvm/lib/Transforms/InstCombine/ |
D | InstCombineAddSub.cpp | 129 void set(const ConstantFP* Coefficient, Value *V) in set() 337 ConstantFP::get(Ty, float(IntVal)) : in getValue() 338 ConstantFP::get(Ty->getContext(), getFpVal()); in getValue() 361 ConstantFP *C0, *C1; in drillValueDownOneStep() 364 if ((C0 = dyn_cast<ConstantFP>(Opnd0)) && C0->isZero()) in drillValueDownOneStep() 367 if ((C1 = dyn_cast<ConstantFP>(Opnd1)) && C1->isZero()) in drillValueDownOneStep() 398 if (ConstantFP *C = dyn_cast<ConstantFP>(V0)) { in drillValueDownOneStep() 403 if (ConstantFP *C = dyn_cast<ConstantFP>(V1)) { in drillValueDownOneStep() 498 if (ConstantFP *CFP = dyn_cast<ConstantFP>(NewAddSub)) { in performFactorization() 689 Result = ConstantFP::get(Instr->getType(), 0.0); in simplifyFAdd() [all …]
|
D | InstCombineSelect.cpp | 905 ConstantFP *CFPt, *CFPf; in visitSelectInst() 906 if (((CFPt = dyn_cast<ConstantFP>(TrueVal)) && in visitSelectInst() 908 ((CFPf = dyn_cast<ConstantFP>(FalseVal)) && in visitSelectInst() 917 ConstantFP *CFPt, *CFPf; in visitSelectInst() 918 if (((CFPt = dyn_cast<ConstantFP>(TrueVal)) && in visitSelectInst() 920 ((CFPf = dyn_cast<ConstantFP>(FalseVal)) && in visitSelectInst() 948 ConstantFP *CFPt, *CFPf; in visitSelectInst() 949 if (((CFPt = dyn_cast<ConstantFP>(TrueVal)) && in visitSelectInst() 951 ((CFPf = dyn_cast<ConstantFP>(FalseVal)) && in visitSelectInst() 960 ConstantFP *CFPt, *CFPf; in visitSelectInst() [all …]
|
D | InstCombineMulDivRem.cpp | 436 ConstantFP *CFP = dyn_cast_or_null<ConstantFP>(C->getAggregateElement(I)); in isFiniteNonZeroFp() 443 return isa<ConstantFP>(C) && in isFiniteNonZeroFp() 444 cast<ConstantFP>(C)->getValueAPF().isFiniteNonZero(); in isFiniteNonZeroFp() 451 ConstantFP *CFP = dyn_cast_or_null<ConstantFP>(C->getAggregateElement(I)); in isNormalFp() 458 return isa<ConstantFP>(C) && cast<ConstantFP>(C)->getValueAPF().isNormal(); in isNormalFp() 563 Constant *NegZero = ConstantFP::getNegativeZero(Op1->getType()); in visitFMul() 1192 if (!isa<ConstantFP>(Divisor)) // TODO: handle vectors. in CvtFDivConstToReciprocal() 1195 const APFloat &FpVal = cast<ConstantFP>(Divisor)->getValueAPF(); in CvtFDivConstToReciprocal() 1208 ConstantFP *R; in CvtFDivConstToReciprocal() 1209 R = ConstantFP::get(Dividend->getType()->getContext(), Reciprocal); in CvtFDivConstToReciprocal()
|
/external/llvm/lib/Transforms/Scalar/ |
D | Float2Int.cpp | 239 } else if (!isa<ConstantFP>(O)) { in walkBackwards() 311 } else if (ConstantFP *CF = dyn_cast<ConstantFP>(O)) { in walkForwards() 455 } else if (ConstantFP *CF = dyn_cast<ConstantFP>(V)) { in convert()
|
D | Reassociate.cpp | 357 ConstantInt::getAllOnesValue(Ty) : ConstantFP::get(Ty, -1.0); in LowerNegateToMultiply() 1128 } else if (ConstantFP *FC1 = dyn_cast<ConstantFP>(Factor)) { in RemoveFactorFromExpression() 1129 if (ConstantFP *FC2 = dyn_cast<ConstantFP>(Factors[i].Op)) { in RemoveFactorFromExpression() 1505 ConstantInt::get(Ty, NumFound) : ConstantFP::get(Ty, NumFound); in OptimizeAdd() 1618 } else if (ConstantFP *CF = dyn_cast<ConstantFP>(Factor)) { in OptimizeAdd() 1622 Factor = ConstantFP::get(CF->getContext(), F); in OptimizeAdd() 1963 auto *C0 = dyn_cast<ConstantFP>(I->getOperand(0)); in canonicalizeNegConstExpr() 1964 auto *C1 = dyn_cast<ConstantFP>(I->getOperand(1)); in canonicalizeNegConstExpr() 1970 ConstantFP *CF = C0 ? C0 : C1; in canonicalizeNegConstExpr() 1997 I->setOperand(C0 ? 0 : 1, ConstantFP::get(CF->getContext(), Val)); in canonicalizeNegConstExpr() [all …]
|
/external/llvm/unittests/AsmParser/ |
D | AsmParserTest.cpp | 80 ASSERT_TRUE(isa<ConstantFP>(V)); in TEST() 81 EXPECT_TRUE(cast<ConstantFP>(V)->isExactlyValue(3.5)); in TEST()
|
/external/llvm/tools/llvm-stress/ |
D | llvm-stress.cpp | 178 return ConstantFP::getAllOnesValue(Tp); in getRandomConstant() 179 return ConstantFP::getNullValue(Tp); in getRandomConstant() 200 return ConstantFP::getAllOnesValue(Tp); in getRandomValue() 201 return ConstantFP::getNullValue(Tp); in getRandomValue() 395 return PT->push_back(ConstantFP::getNullValue(Ty)); in Act() 396 return PT->push_back(ConstantFP::get(Ty->getContext(), RandomFloat)); in Act()
|
/external/llvm/examples/Kaleidoscope/MCJIT/lazy/ |
D | toy-jit.cpp | 627 return ConstantFP::get(getGlobalContext(), APFloat(Val)); in Codegen() 726 ConstantFP::get(getGlobalContext(), APFloat(0.0)), in Codegen() 832 StepVal = ConstantFP::get(getGlobalContext(), APFloat(1.0)); in Codegen() 847 ConstantFP::get(getGlobalContext(), APFloat(0.0)), in Codegen() 890 InitVal = ConstantFP::get(getGlobalContext(), APFloat(0.0)); in Codegen()
|
/external/llvm/examples/Kaleidoscope/MCJIT/cached/ |
D | toy-jit.cpp | 642 return ConstantFP::get(getGlobalContext(), APFloat(Val)); in Codegen() 744 ConstantFP::get(getGlobalContext(), APFloat(0.0)), in Codegen() 850 StepVal = ConstantFP::get(getGlobalContext(), APFloat(1.0)); in Codegen() 865 ConstantFP::get(getGlobalContext(), APFloat(0.0)), in Codegen() 908 InitVal = ConstantFP::get(getGlobalContext(), APFloat(0.0)); in Codegen()
|
/external/llvm/test/DebugInfo/Generic/ |
D | constantfp-sdnodes-have-dbg-location.ll | 4 ; CHECK: t{{[0-9]+}}: f64 = ConstantFP<1.500000e+00>test.c:3:5
|
/external/llvm/examples/Kaleidoscope/Chapter5/ |
D | toy.cpp | 541 return ConstantFP::get(getGlobalContext(), APFloat(Val)); in codegen() 602 CondV, ConstantFP::get(getGlobalContext(), APFloat(0.0)), "ifcond"); in codegen() 707 StepVal = ConstantFP::get(getGlobalContext(), APFloat(1.0)); in codegen() 719 EndCond, ConstantFP::get(getGlobalContext(), APFloat(0.0)), "loopcond"); in codegen()
|
/external/llvm/lib/Transforms/Utils/ |
D | SimplifyLibCalls.cpp | 960 if (ConstantFP *Const = dyn_cast<ConstantFP>(Val)) { in valueHasFloatPrecision() 966 return ConstantFP::get(Const->getContext(), F); in valueHasFloatPrecision() 1102 if (ConstantFP *Op1C = dyn_cast<ConstantFP>(Op1)) { in optimizePow() 1146 ConstantFP *Op2C = dyn_cast<ConstantFP>(Op2); in optimizePow() 1151 return ConstantFP::get(CI->getType(), 1.0); in optimizePow() 1168 Value *Inf = ConstantFP::getInfinity(CI->getType()); in optimizePow() 1169 Value *NegInf = ConstantFP::getInfinity(CI->getType(), true); in optimizePow() 1183 return B.CreateFDiv(ConstantFP::get(CI->getType(), 1.0), Op1, "powrecip"); in optimizePow() 1206 FMul = B.CreateFDiv(ConstantFP::get(CI->getType(), 1.0), FMul); in optimizePow() 1248 Constant *One = ConstantFP::get(CI->getContext(), APFloat(1.0f)); in optimizeExp2() [all …]
|
/external/llvm/examples/Kaleidoscope/Orc/lazy_codegen/ |
D | toy.cpp | 754 return ConstantFP::get(C.getLLVMContext(), APFloat(Val)); in IRGen() 849 ConstantFP *FPZero = in IRGen() 850 ConstantFP::get(C.getLLVMContext(), APFloat(0.0)); in IRGen() 956 StepVal = ConstantFP::get(getGlobalContext(), APFloat(1.0)); in IRGen() 971 ConstantFP::get(getGlobalContext(), APFloat(0.0)), in IRGen() 1013 InitVal = ConstantFP::get(getGlobalContext(), APFloat(0.0)); in IRGen()
|
/external/llvm/examples/Kaleidoscope/Orc/lazy_irgen/ |
D | toy.cpp | 754 return ConstantFP::get(C.getLLVMContext(), APFloat(Val)); in IRGen() 849 ConstantFP *FPZero = in IRGen() 850 ConstantFP::get(C.getLLVMContext(), APFloat(0.0)); in IRGen() 956 StepVal = ConstantFP::get(getGlobalContext(), APFloat(1.0)); in IRGen() 971 ConstantFP::get(getGlobalContext(), APFloat(0.0)), in IRGen() 1013 InitVal = ConstantFP::get(getGlobalContext(), APFloat(0.0)); in IRGen()
|
/external/llvm/examples/Kaleidoscope/Orc/initial/ |
D | toy.cpp | 754 return ConstantFP::get(C.getLLVMContext(), APFloat(Val)); in IRGen() 849 ConstantFP *FPZero = in IRGen() 850 ConstantFP::get(C.getLLVMContext(), APFloat(0.0)); in IRGen() 956 StepVal = ConstantFP::get(getGlobalContext(), APFloat(1.0)); in IRGen() 971 ConstantFP::get(getGlobalContext(), APFloat(0.0)), in IRGen() 1013 InitVal = ConstantFP::get(getGlobalContext(), APFloat(0.0)); in IRGen()
|
/external/llvm/examples/Kaleidoscope/Chapter7/ |
D | toy.cpp | 712 return ConstantFP::get(getGlobalContext(), APFloat(Val)); in codegen() 818 CondV, ConstantFP::get(getGlobalContext(), APFloat(0.0)), "ifcond"); in codegen() 928 StepVal = ConstantFP::get(getGlobalContext(), APFloat(1.0)); in codegen() 944 EndCond, ConstantFP::get(getGlobalContext(), APFloat(0.0)), "loopcond"); in codegen() 987 InitVal = ConstantFP::get(getGlobalContext(), APFloat(0.0)); in codegen()
|