/external/tensorflow/tensorflow/compiler/xla/service/llvm_ir/ |
D | math_ops.cc | 31 b->CreateFCmpOLT(abs_x, llvm::ConstantFP::get(type, kCanUseApprox)); in EmitFastTanh() 38 llvm_ir::EmitFloatMax(input, llvm::ConstantFP::get(type, -9.0), b, in EmitFastTanh() 40 llvm::ConstantFP::get(type, 9.0), b, /*enable_fast_min_max=*/true); in EmitFastTanh() 52 llvm::Value* numerator = llvm::ConstantFP::get(type, numerator_coeffs[0]); in EmitFastTanh() 55 llvm::ConstantFP::get(type, numerator_coeffs[i])); in EmitFastTanh() 60 llvm::Value* denominator = llvm::ConstantFP::get(type, denominator_coeffs[0]); in EmitFastTanh() 64 llvm::ConstantFP::get(type, denominator_coeffs[i])); in EmitFastTanh()
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Analysis/ |
D | ConstantFolding.cpp | 133 return ConstantFP::get(DestTy->getContext(), FP); in FoldBitCast() 144 if (isa<ConstantFP>(C) || isa<ConstantInt>(C)) { in FoldBitCast() 408 if (auto *CFP = dyn_cast<ConstantFP>(C)) { in ReadDataFromGlobal() 1569 return ConstantFP::get(Ty->getContext(), APF); in GetConstantFoldFPValue() 1572 return ConstantFP::get(Ty->getContext(), APFloat(V)); in GetConstantFoldFPValue() 1646 double getValueAsDouble(ConstantFP *Op) { in getValueAsDouble() 1733 if (auto *Op = dyn_cast<ConstantFP>(Operands[0])) { in ConstantFoldScalarCall1() 1751 return ConstantFP::get(Ty->getContext(), U); in ConstantFoldScalarCall1() 1756 return ConstantFP::get(Ty->getContext(), U); in ConstantFoldScalarCall1() 1761 return ConstantFP::get(Ty->getContext(), U); in ConstantFoldScalarCall1() [all …]
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Target/AMDGPU/ |
D | AMDGPULibCalls.cpp | 750 ConstantFP *eltval = dyn_cast<ConstantFP>( in TDOFold() 785 if (ConstantFP *CF = dyn_cast<ConstantFP>(opr0)) { in TDOFold() 788 Value *nval = ConstantFP::get(CF->getType(), ftbl[i].result); in TDOFold() 825 if (ConstantFP *CF = dyn_cast<ConstantFP>(opr0)) { in fold_recip() 829 Value *nval = B.CreateFDiv(ConstantFP::get(CF->getType(), 1.0), in fold_recip() 844 ConstantFP *CF0 = dyn_cast<ConstantFP>(opr0); in fold_divide() 845 ConstantFP *CF1 = dyn_cast<ConstantFP>(opr1); in fold_divide() 851 Value *nval1 = B.CreateFDiv(ConstantFP::get(opr1->getType(), 1.0), in fold_divide() 878 ConstantFP *CF; in fold_pow() 888 CF = dyn_cast<ConstantFP>(opr1); in fold_pow() [all …]
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/IR/ |
D | Constants.cpp | 42 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(this)) in isNegativeZeroValue() 52 if (ConstantFP *SplatCFP = dyn_cast_or_null<ConstantFP>(CV->getSplatValue())) in isNegativeZeroValue() 68 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(this)) in isZeroValue() 78 if (ConstantFP *SplatCFP = dyn_cast_or_null<ConstantFP>(CV->getSplatValue())) in isZeroValue() 92 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(this)) in isNullValue() 107 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(this)) in isAllOnesValue() 133 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(this)) in isOneValue() 159 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(this)) in isNotOneValue() 183 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(this)) in isMinSignedValue() 209 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(this)) in isNotMinSignedValue() [all …]
|
D | ConstantFold.cpp | 155 if (isa<ConstantInt>(V) || isa<ConstantFP>(V)) in FoldBitCast() 173 return ConstantFP::get(DestTy->getContext(), in FoldBitCast() 182 if (ConstantFP *FP = dyn_cast<ConstantFP>(V)) { in FoldBitCast() 594 if (ConstantFP *FPC = dyn_cast<ConstantFP>(V)) { in ConstantFoldCastInstruction() 605 return ConstantFP::get(V->getContext(), Val); in ConstantFoldCastInstruction() 610 if (ConstantFP *FPC = dyn_cast<ConstantFP>(V)) { in ConstantFoldCastInstruction() 689 return ConstantFP::get(V->getContext(), apf); in ConstantFoldCastInstruction() 973 if (ConstantFP *CFP = dyn_cast<ConstantFP>(C)) { in ConstantFoldUnaryInstruction() 979 return ConstantFP::get(C->getContext(), neg(CV)); in ConstantFoldUnaryInstruction() 1115 return ConstantFP::getNaN(C1->getType()); in ConstantFoldBinaryInstruction() [all …]
|
/external/llvm/lib/IR/ |
D | Constants.cpp | 46 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(this)) in isNegativeZeroValue() 51 if (ConstantFP *SplatCFP = dyn_cast_or_null<ConstantFP>(CV->getSplatValue())) in isNegativeZeroValue() 56 if (ConstantFP *SplatCFP = dyn_cast_or_null<ConstantFP>(CV->getSplatValue())) in isNegativeZeroValue() 72 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(this)) in isZeroValue() 77 if (ConstantFP *SplatCFP = dyn_cast_or_null<ConstantFP>(CV->getSplatValue())) in isZeroValue() 82 if (ConstantFP *SplatCFP = dyn_cast_or_null<ConstantFP>(CV->getSplatValue())) in isZeroValue() 96 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(this)) in isNullValue() 111 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(this)) in isAllOnesValue() 133 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(this)) in isOneValue() 155 if (const ConstantFP *CFP = dyn_cast<ConstantFP>(this)) in isMinSignedValue() [all …]
|
D | ConstantFold.cpp | 155 if (isa<ConstantInt>(V) || isa<ConstantFP>(V)) in FoldBitCast() 173 return ConstantFP::get(DestTy->getContext(), in FoldBitCast() 182 if (ConstantFP *FP = dyn_cast<ConstantFP>(V)) { in FoldBitCast() 588 if (ConstantFP *FPC = dyn_cast<ConstantFP>(V)) { in ConstantFoldCastInstruction() 599 return ConstantFP::get(V->getContext(), Val); in ConstantFoldCastInstruction() 604 if (ConstantFP *FPC = dyn_cast<ConstantFP>(V)) { in ConstantFoldCastInstruction() 681 return ConstantFP::get(V->getContext(), apf); in ConstantFoldCastInstruction() 1182 } else if (ConstantFP *CFP1 = dyn_cast<ConstantFP>(C1)) { in ConstantFoldBinaryInstruction() 1183 if (ConstantFP *CFP2 = dyn_cast<ConstantFP>(C2)) { in ConstantFoldBinaryInstruction() 1192 return ConstantFP::get(C1->getContext(), C3V); in ConstantFoldBinaryInstruction() [all …]
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/FuzzMutate/ |
D | OpDescriptor.cpp | 26 Cs.push_back(ConstantFP::get(Ctx, APFloat::getZero(Sem))); in makeConstantsWithType() 27 Cs.push_back(ConstantFP::get(Ctx, APFloat::getLargest(Sem))); in makeConstantsWithType() 28 Cs.push_back(ConstantFP::get(Ctx, APFloat::getSmallest(Sem))); in makeConstantsWithType()
|
/external/llvm/lib/Analysis/ |
D | ConstantFolding.cpp | 111 if (isa<ConstantFP>(C) || isa<ConstantInt>(C)) { in FoldBitCast() 314 if (auto *CFP = dyn_cast<ConstantFP>(C)) { in ReadDataFromGlobal() 1368 return ConstantFP::get(Ty->getContext(), APF); in GetConstantFoldFPValue() 1371 return ConstantFP::get(Ty->getContext(), APFloat((float)V)); in GetConstantFoldFPValue() 1373 return ConstantFP::get(Ty->getContext(), APFloat(V)); in GetConstantFoldFPValue() 1446 double getValueAsDouble(ConstantFP *Op) { in getValueAsDouble() 1470 if (auto *Op = dyn_cast<ConstantFP>(Operands[0])) { in ConstantFoldScalarCall() 1486 return ConstantFP::get(Ty->getContext(), V); in ConstantFoldScalarCall() 1492 return ConstantFP::get(Ty->getContext(), V); in ConstantFoldScalarCall() 1498 return ConstantFP::get(Ty->getContext(), V); in ConstantFoldScalarCall() [all …]
|
/external/tensorflow/tensorflow/compiler/xla/service/ |
D | elemental_ir_emitter.cc | 197 llvm::ConstantFP::getInfinity(float_type), result); in EmitReducePrecisionIR() 416 llvm::ConstantFP::get(operand_value->getType(), 0.0)), in EmitFloatUnaryOp() 431 auto min_value_float = llvm::ConstantFP::get(from_ir_type, min_int); in EmitFloatUnaryOp() 432 auto max_value_float = llvm::ConstantFP::get(from_ir_type, max_int); in EmitFloatUnaryOp() 451 auto min_value_float = llvm::ConstantFP::get(from_ir_type, min_int); in EmitFloatUnaryOp() 452 auto max_value_float = llvm::ConstantFP::get(from_ir_type, max_int); in EmitFloatUnaryOp() 531 auto zero = llvm::ConstantFP::get(type, 0.0); in EmitFloatUnaryOp() 547 auto infinity = llvm::ConstantFP::getInfinity(type); in EmitFloatUnaryOp() 557 return llvm::ConstantFP::get(operand_value->getType(), 0.0); in EmitFloatUnaryOp() 582 auto one = llvm::ConstantFP::get(llvm_ty, 1.0); in EmitComplexUnaryOp() [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()
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/InstCombine/ |
D | InstCombineAtomicRMW.cpp | 24 if (auto CF = dyn_cast<ConstantFP>(RMWI.getValOperand())) in isIdempotentRMW() 62 if (auto CF = dyn_cast<ConstantFP>(RMWI.getValOperand())) in isSaturating() 146 RMWI.setOperand(1, ConstantFP::getNegativeZero(RMWI.getType())); in visitAtomicRMWInst()
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Utils/ |
D | LibCallsShrinkWrap.cpp | 116 Constant *V = ConstantFP::get(BBBuilder.getContext(), APFloat(Val)); in createCond() 433 if (ConstantFP *CF = dyn_cast<ConstantFP>(Base)) { in generateCondForPow() 441 Constant *V = ConstantFP::get(CI->getContext(), APFloat(127.0f)); in generateCondForPow() 469 Constant *V = ConstantFP::get(CI->getContext(), APFloat(UpperV)); in generateCondForPow() 470 Constant *V0 = ConstantFP::get(CI->getContext(), APFloat(0.0f)); in generateCondForPow()
|
/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() 569 void ChangeToFPImmediate(const ConstantFP *FPImm); 600 static MachineOperand CreateFPImm(const ConstantFP *CFP) { in CreateFPImm()
|
D | FastISel.h | 363 bool Op0IsKill, const ConstantFP *FPImm); 388 const ConstantFP *FPImm); 430 const ConstantFP *FPImm); 488 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/swiftshader/third_party/llvm-10.0/llvm/lib/CodeGen/AsmPrinter/ |
D | DebugLocEntry.h | 55 const ConstantFP *CFP; 71 DbgValueLoc(const DIExpression *Expr, const ConstantFP *CFP) in DbgValueLoc() 94 const ConstantFP *getConstantFP() const { return Constant.CFP; } in getConstantFP()
|
/external/llvm/lib/Transforms/InstCombine/ |
D | InstCombineAddSub.cpp | 133 void set(const ConstantFP *Coefficient, Value *V) { in set() 320 ConstantFP::get(Ty, float(IntVal)) : in getValue() 321 ConstantFP::get(Ty->getContext(), getFpVal()); in getValue() 344 ConstantFP *C0, *C1; in drillValueDownOneStep() 347 if ((C0 = dyn_cast<ConstantFP>(Opnd0)) && C0->isZero()) in drillValueDownOneStep() 350 if ((C1 = dyn_cast<ConstantFP>(Opnd1)) && C1->isZero()) in drillValueDownOneStep() 381 if (ConstantFP *C = dyn_cast<ConstantFP>(V0)) { in drillValueDownOneStep() 386 if (ConstantFP *C = dyn_cast<ConstantFP>(V1)) { in drillValueDownOneStep() 481 if (ConstantFP *CFP = dyn_cast<ConstantFP>(NewAddSub)) { in performFactorization() 672 Result = ConstantFP::get(Instr->getType(), 0.0); in simplifyFAdd() [all …]
|
D | InstCombineSelect.cpp | 999 ConstantFP *CFPt, *CFPf; in visitSelectInst() 1000 if (((CFPt = dyn_cast<ConstantFP>(TrueVal)) && in visitSelectInst() 1002 ((CFPf = dyn_cast<ConstantFP>(FalseVal)) && in visitSelectInst() 1011 ConstantFP *CFPt, *CFPf; in visitSelectInst() 1012 if (((CFPt = dyn_cast<ConstantFP>(TrueVal)) && in visitSelectInst() 1014 ((CFPf = dyn_cast<ConstantFP>(FalseVal)) && in visitSelectInst() 1042 ConstantFP *CFPt, *CFPf; in visitSelectInst() 1043 if (((CFPt = dyn_cast<ConstantFP>(TrueVal)) && in visitSelectInst() 1045 ((CFPf = dyn_cast<ConstantFP>(FalseVal)) && in visitSelectInst() 1054 ConstantFP *CFPt, *CFPf; in visitSelectInst() [all …]
|
/external/llvm/lib/Transforms/Scalar/ |
D | Float2Int.cpp | 227 } else if (!isa<ConstantFP>(O)) { in walkBackwards() 299 } else if (ConstantFP *CF = dyn_cast<ConstantFP>(O)) { in walkForwards() 443 } else if (ConstantFP *CF = dyn_cast<ConstantFP>(V)) { in convert()
|
D | Reassociate.cpp | 256 ConstantInt::getAllOnesValue(Ty) : ConstantFP::get(Ty, -1.0); in LowerNegateToMultiply() 1027 } else if (ConstantFP *FC1 = dyn_cast<ConstantFP>(Factor)) { in RemoveFactorFromExpression() 1028 if (ConstantFP *FC2 = dyn_cast<ConstantFP>(Factors[i].Op)) { in RemoveFactorFromExpression() 1417 ConstantInt::get(Ty, NumFound) : ConstantFP::get(Ty, NumFound); in OptimizeAdd() 1530 } else if (ConstantFP *CF = dyn_cast<ConstantFP>(Factor)) { in OptimizeAdd() 1534 Factor = ConstantFP::get(CF->getContext(), F); in OptimizeAdd() 1897 auto *C0 = dyn_cast<ConstantFP>(I->getOperand(0)); in canonicalizeNegConstExpr() 1898 auto *C1 = dyn_cast<ConstantFP>(I->getOperand(1)); in canonicalizeNegConstExpr() 1904 ConstantFP *CF = C0 ? C0 : C1; in canonicalizeNegConstExpr() 1931 I->setOperand(C0 ? 0 : 1, ConstantFP::get(CF->getContext(), Val)); in canonicalizeNegConstExpr() [all …]
|
/external/swiftshader/third_party/llvm-10.0/llvm/include/llvm/CodeGen/ |
D | MachineOperand.h | 27 class ConstantFP; variable 169 const ConstantFP *CFP; // For MO_FPImmediate. 545 const ConstantFP *getFPImm() const { in getFPImm() 663 void setFPImm(const ConstantFP *CFP) { in setFPImm() 731 void ChangeToFPImmediate(const ConstantFP *FPImm); 773 static MachineOperand CreateFPImm(const ConstantFP *CFP) { in CreateFPImm()
|
/external/swiftshader/third_party/llvm-10.0/llvm/include/llvm/CodeGen/GlobalISel/ |
D | Utils.h | 38 class ConstantFP; variable 132 const ConstantFP* getConstantFPVRegVal(unsigned VReg,
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Scalar/ |
D | Float2Int.cpp | 232 } else if (!isa<ConstantFP>(O)) { in walkBackwards() 305 } else if (ConstantFP *CF = dyn_cast<ConstantFP>(O)) { in walkForwards() 450 } else if (ConstantFP *CF = dyn_cast<ConstantFP>(V)) { in convert()
|