/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/llvm-project/llvm/lib/Target/AMDGPU/ |
D | AMDGPUInstCombineIntrinsic.cpp | 65 if (ConstantFP *ConstFloat = dyn_cast<ConstantFP>(&V)) { in canSafelyConvertTo16Bit() 197 auto *QNaN = ConstantFP::get(Ty, APFloat::getQNaN(Ty->getFltSemantics())); in instCombineIntrinsic() 204 if (const ConstantFP *C = dyn_cast<ConstantFP>(Src)) { in instCombineIntrinsic() 213 return IC.replaceInstUsesWith(II, ConstantFP::get(II.getContext(), Val)); in instCombineIntrinsic() 224 auto *QNaN = ConstantFP::get(Ty, APFloat::getQNaN(Ty->getFltSemantics())); in instCombineIntrinsic() 233 if (const ConstantFP *C = dyn_cast<ConstantFP>(Src)) { in instCombineIntrinsic() 240 II, ConstantFP::get(II.getContext(), Significand)); in instCombineIntrinsic() 310 IC.Builder.CreateFCmpOEQ(Src0, ConstantFP::get(Src0->getType(), 0.0)); in instCombineIntrinsic() 323 const ConstantFP *CVal = dyn_cast<ConstantFP>(Src0); in instCombineIntrinsic() 361 if (const ConstantFP *C0 = dyn_cast<ConstantFP>(Src0)) { in instCombineIntrinsic() [all …]
|
D | AMDGPULibCalls.cpp | 745 ConstantFP *eltval = dyn_cast<ConstantFP>( in TDOFold() 780 if (ConstantFP *CF = dyn_cast<ConstantFP>(opr0)) { in TDOFold() 783 Value *nval = ConstantFP::get(CF->getType(), ftbl[i].result); in TDOFold() 820 if (ConstantFP *CF = dyn_cast<ConstantFP>(opr0)) { in fold_recip() 824 Value *nval = B.CreateFDiv(ConstantFP::get(CF->getType(), 1.0), in fold_recip() 839 ConstantFP *CF0 = dyn_cast<ConstantFP>(opr0); in fold_divide() 840 ConstantFP *CF1 = dyn_cast<ConstantFP>(opr1); in fold_divide() 846 Value *nval1 = B.CreateFDiv(ConstantFP::get(opr1->getType(), 1.0), in fold_divide() 873 ConstantFP *CF; in fold_pow() 883 CF = dyn_cast<ConstantFP>(opr1); in fold_pow() [all …]
|
/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/llvm-project/llvm/lib/Analysis/ |
D | ConstantFolding.cpp | 139 return ConstantFP::get(DestTy->getContext(), FP); in FoldBitCast() 150 if (isa<ConstantFP>(C) || isa<ConstantInt>(C)) { in FoldBitCast() 449 if (auto *CFP = dyn_cast<ConstantFP>(C)) { in ReadDataFromGlobal() 1666 return ConstantFP::get(Ty->getContext(), APF); in GetConstantFoldFPValue() 1669 return ConstantFP::get(Ty->getContext(), APFloat(V)); in GetConstantFoldFPValue() 1790 double getValueAsDouble(ConstantFP *Op) { in getValueAsDouble() 1877 if (auto *Op = dyn_cast<ConstantFP>(Operands[0])) { in ConstantFoldScalarCall1() 1929 return ConstantFP::get(Ty->getContext(), U); in ConstantFoldScalarCall1() 1934 return ConstantFP::get(Ty->getContext(), U); in ConstantFoldScalarCall1() 1939 return ConstantFP::get(Ty->getContext(), U); in ConstantFoldScalarCall1() [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/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-project/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-project/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 …]
|
/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 …]
|
/external/llvm-project/llvm/test/CodeGen/ARM/ |
D | pow.75.ll | 11 ; CHECK: Combining: {{.*}}: f32 = fpow ninf nsz afn [[X:t[0-9]+]], ConstantFP:f32<7.500000e-01> 21 ; CHECK: Combining: {{.*}}: f64 = fpow ninf nsz afn t2, ConstantFP:f64<7.500000e-01> 32 …T]]: f32 = fpow nnan ninf nsz arcp contract afn reassoc [[X:t[0-9]+]], ConstantFP:f32<7.500000e-01> 37 …D]]: f32 = fpow nnan ninf nsz arcp contract afn reassoc [[X:t[0-9]+]], ConstantFP:f32<7.500000e-01> 42 …D]]: f32 = fpow nnan ninf nsz arcp contract afn reassoc [[X:t[0-9]+]], ConstantFP:f32<7.500000e-01> 47 …H]]: f32 = fpow nnan ninf nsz arcp contract afn reassoc [[X:t[0-9]+]], ConstantFP:f32<7.500000e-01> 58 …T]]: f64 = fpow nnan ninf nsz arcp contract afn reassoc [[X:t[0-9]+]], ConstantFP:f64<7.500000e-01> 63 …D]]: f64 = fpow nnan ninf nsz arcp contract afn reassoc [[X:t[0-9]+]], ConstantFP:f64<7.500000e-01>
|
/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/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/llvm-project/llvm/lib/Transforms/InstCombine/ |
D | InstCombineAtomicRMW.cpp | 26 if (auto CF = dyn_cast<ConstantFP>(RMWI.getValOperand())) in isIdempotentRMW() 64 if (auto CF = dyn_cast<ConstantFP>(RMWI.getValOperand())) in isSaturating() 147 return replaceOperand(RMWI, 1, ConstantFP::getNegativeZero(RMWI.getType())); in visitAtomicRMWInst()
|
/external/tensorflow/tensorflow/compiler/xla/service/ |
D | elemental_ir_emitter.cc | 191 x_is_nan, llvm::ConstantFP::getInfinity(float_type), result); in EmitReducePrecisionIR() 410 llvm::ConstantFP::get(operand_value->getType(), 0.0)), in EmitFloatUnaryOp() 486 auto zero = llvm::ConstantFP::get(type, 0.0); in EmitFloatUnaryOp() 502 auto infinity = llvm::ConstantFP::getInfinity(type); in EmitFloatUnaryOp() 512 return llvm::ConstantFP::get(operand_value->getType(), 0.0); in EmitFloatUnaryOp() 543 auto one = llvm::ConstantFP::get(llvm_ty, 1.0); in EmitComplexUnaryOp() 549 auto one_half = llvm::ConstantFP::get(llvm_ty, 0.5); in EmitComplexUnaryOp() 588 auto one = llvm::ConstantFP::get(exp_a->getType(), 1.0); in EmitComplexUnaryOp() 605 auto half_exp_b = FMul(llvm::ConstantFP::get(type, 0.5), exp_b); in EmitComplexUnaryOp() 606 auto half_exp_neg_b = FDiv(llvm::ConstantFP::get(type, 0.5), exp_b); in EmitComplexUnaryOp() [all …]
|
/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-project/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/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-project/llvm/unittests/IR/ |
D | MDBuilderTest.cpp | 39 EXPECT_TRUE(mdconst::hasa<ConstantFP>(Op)); in TEST_F() 40 ConstantFP *Val = mdconst::extract<ConstantFP>(Op); in TEST_F()
|
/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()
|
/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()
|