| /llvm-project-15.0.7/mlir/lib/CAPI/IR/ |
| H A D | BuiltinAttributes.cpp | 517 unwrap(attr).cast<DenseElementsAttr>().getSplatValue<Attribute>()); in mlirDenseElementsAttrGetSplatValue() 520 return unwrap(attr).cast<DenseElementsAttr>().getSplatValue<bool>(); in mlirDenseElementsAttrGetBoolSplatValue() 523 return unwrap(attr).cast<DenseElementsAttr>().getSplatValue<int8_t>(); in mlirDenseElementsAttrGetInt8SplatValue() 526 return unwrap(attr).cast<DenseElementsAttr>().getSplatValue<uint8_t>(); in mlirDenseElementsAttrGetUInt8SplatValue() 529 return unwrap(attr).cast<DenseElementsAttr>().getSplatValue<int32_t>(); in mlirDenseElementsAttrGetInt32SplatValue() 532 return unwrap(attr).cast<DenseElementsAttr>().getSplatValue<uint32_t>(); in mlirDenseElementsAttrGetUInt32SplatValue() 535 return unwrap(attr).cast<DenseElementsAttr>().getSplatValue<int64_t>(); in mlirDenseElementsAttrGetInt64SplatValue() 538 return unwrap(attr).cast<DenseElementsAttr>().getSplatValue<uint64_t>(); in mlirDenseElementsAttrGetUInt64SplatValue() 541 return unwrap(attr).cast<DenseElementsAttr>().getSplatValue<float>(); in mlirDenseElementsAttrGetFloatSplatValue() 544 return unwrap(attr).cast<DenseElementsAttr>().getSplatValue<double>(); in mlirDenseElementsAttrGetDoubleSplatValue() [all …]
|
| /llvm-project-15.0.7/mlir/include/mlir/Dialect/ |
| H A D | CommonFolders.h | 57 auto elementResult = calculate(lhs.getSplatValue<ElementValueT>(), in constFoldBinaryOpConditional() 58 rhs.getSplatValue<ElementValueT>()); in constFoldBinaryOpConditional() 123 auto elementResult = calculate(op.getSplatValue<ElementValueT>()); in constFoldUnaryOpConditional() 181 calculate(op.getSplatValue<ElementValueT>(), castStatus); in constFoldCastOp()
|
| /llvm-project-15.0.7/mlir/lib/Dialect/Tosa/IR/ |
| H A D | TosaCanonicalizations.cpp | 175 input1Attr.getSplatValue<APInt>().isZero()) { in matchAndRewrite() 185 input2Attr.getSplatValue<APInt>().isZero()) { in matchAndRewrite() 212 input1Attr.getSplatValue<APFloat>().isExactlyValue(1)) { in matchAndRewrite() 228 input2Attr.getSplatValue<APFloat>().isExactlyValue(1)) { in matchAndRewrite() 482 if (densePad.isSplat() && densePad.getSplatValue<APInt>().isZero()) { in fold() 512 return predicate.getSplatValue<APInt>().getBoolValue() ? getOnTrue() in fold()
|
| /llvm-project-15.0.7/llvm/unittests/IR/ |
| H A D | InstructionsTest.cpp | 1349 EXPECT_EQ(Splat0->getSplatValue(), C0); in TEST() 1350 EXPECT_EQ(Splat1->getSplatValue(), C1); in TEST() 1351 EXPECT_EQ(Splat0Undef->getSplatValue(), nullptr); in TEST() 1352 EXPECT_EQ(Splat1Undef->getSplatValue(), nullptr); in TEST() 1353 EXPECT_EQ(NotSplat->getSplatValue(), nullptr); in TEST() 1357 EXPECT_EQ(Splat0->getSplatValue(false), C0); in TEST() 1358 EXPECT_EQ(Splat1->getSplatValue(false), C1); in TEST() 1365 EXPECT_EQ(Splat0->getSplatValue(true), C0); in TEST() 1366 EXPECT_EQ(Splat1->getSplatValue(true), C1); in TEST() 1367 EXPECT_EQ(Splat0Undef->getSplatValue(true), C0); in TEST() [all …]
|
| /llvm-project-15.0.7/llvm/lib/Target/RISCV/ |
| H A D | RISCVGatherScatterLowering.cpp | 149 Value *Splat = getSplatValue(BO->getOperand(0)); in matchStridedStart() 151 Splat = getSplatValue(BO->getOperand(1)); in matchStridedStart() 200 Step = getSplatValue(Step); in matchStridedRecurrence() 261 Value *SplatOp = getSplatValue(OtherOp); in matchStridedRecurrence()
|
| /llvm-project-15.0.7/llvm/include/llvm/IR/ |
| H A D | Constant.h | 147 Constant *getSplatValue(bool AllowUndefs = false) const;
|
| H A D | PatternMatch.h | 243 dyn_cast_or_null<ConstantInt>(C->getSplatValue(AllowUndef))) { in match() 268 dyn_cast_or_null<ConstantFP>(C->getSplatValue(AllowUndef))) { in match() 340 if (const auto *CV = dyn_cast_or_null<ConstantVal>(C->getSplatValue())) in match() 393 if (auto *CI = dyn_cast_or_null<ConstantInt>(C->getSplatValue())) in match() 420 C->getSplatValue(/* AllowUndef */ true))) in match() 807 if (auto *CFP = dyn_cast_or_null<ConstantFP>(C->getSplatValue())) in match() 846 CI = dyn_cast_or_null<ConstantInt>(C->getSplatValue(AllowUndefs)); in match()
|
| H A D | Constants.h | 524 Constant *getSplatValue(bool AllowUndefs = false) const; 810 Constant *getSplatValue() const;
|
| /llvm-project-15.0.7/mlir/include/mlir/IR/ |
| H A D | Matchers.h | 113 .match(splatAttr.getSplatValue<Attribute>()); in match() 150 .match(splatAttr.getSplatValue<Attribute>()); in match()
|
| H A D | BuiltinAttributes.h | 379 getSplatValue() const { 388 getSplatValue() const { 389 return getSplatValue<Attribute>().template cast<T>();
|
| /llvm-project-15.0.7/mlir/lib/Dialect/Math/Transforms/ |
| H A D | AlgebraicSimplification.cpp | 58 return vectorExponent.getSplatValue<FloatAttr>() in matchAndRewrite()
|
| /llvm-project-15.0.7/llvm/unittests/Analysis/ |
| H A D | VectorUtilsTest.cpp | 453 EXPECT_EQ(getSplatValue(A)->getName(), "x"); in TEST_F() 463 EXPECT_EQ(getSplatValue(A), nullptr); in TEST_F() 475 EXPECT_EQ(getSplatValue(A), nullptr); in TEST_F()
|
| /llvm-project-15.0.7/llvm/lib/IR/ |
| H A D | Constants.cpp | 104 if (const auto *SplatVal = getSplatValue()) in isAllOnesValue() 121 if (const auto *SplatVal = getSplatValue()) in isOneValue() 148 if (const auto *SplatVal = getSplatValue()) in isNotOneValue() 166 if (const auto *SplatVal = getSplatValue()) in isMinSignedValue() 193 if (const auto *SplatVal = getSplatValue()) in isNotMinSignedValue() 1625 Constant *Constant::getSplatValue(bool AllowUndefs) const { in getSplatValue() function in Constant 1630 return CV->getSplatValue(); in getSplatValue() 1632 return CV->getSplatValue(AllowUndefs); in getSplatValue() 1657 Constant *ConstantVector::getSplatValue(bool AllowUndefs) const { in getSplatValue() function in ConstantVector 2506 Idx = Idx->getSplatValue(); in getGetElementPtr() [all …]
|
| H A D | ConstantFold.cpp | 62 if (Constant *Splat = CV->getSplatValue()) { in BitCastConstantVector() 411 if (Constant *Splat = V->getSplatValue()) { in ConstantFoldCastInstruction() 667 if (Constant *SplatVal = Val->getSplatValue()) in ConstantFoldExtractElementInstruction() 851 if (Constant *Splat = C->getSplatValue()) { in ConstantFoldUnaryInstruction() 1217 if (Constant *C2Splat = C2->getSplatValue()) { in ConstantFoldBinaryInstruction() 1220 if (Constant *C1Splat = C1->getSplatValue()) { in ConstantFoldBinaryInstruction() 1680 if (Constant *C1Splat = C1->getSplatValue()) in ConstantFoldCompareInstruction() 1681 if (Constant *C2Splat = C2->getSplatValue()) in ConstantFoldCompareInstruction() 1930 CI = dyn_cast_or_null<ConstantInt>(CV->getSplatValue()); in isInBoundsIndices()
|
| H A D | Type.cpp | 618 C = C->getSplatValue(); in indexValid()
|
| /llvm-project-15.0.7/llvm/lib/Target/PowerPC/ |
| H A D | PPCLowerMASSVEntries.cpp | 111 if (ConstantFP *CFP = dyn_cast_or_null<ConstantFP>(Exp->getSplatValue())) { in handlePowSpecialCases()
|
| /llvm-project-15.0.7/llvm/lib/Analysis/ |
| H A D | VectorUtils.cpp | 341 if (Value *Splat = getSplatValue(V)) in findScalarElement() 371 Value *llvm::getSplatValue(const Value *V) { in getSplatValue() function in llvm 374 return C->getSplatValue(); in getSplatValue() 395 return C->getSplatValue() != nullptr; in isSplatValue()
|
| /llvm-project-15.0.7/mlir/lib/Dialect/SPIRV/IR/ |
| H A D | SPIRVCanonicalization.cpp | 43 return attr.getSplatValue<bool>(); in getScalarOrSplatBoolAttr()
|
| /llvm-project-15.0.7/mlir/lib/Conversion/VectorToGPU/ |
| H A D | VectorToGPU.cpp | 463 DenseElementsAttr::get(vectorType, dense.getSplatValue<Attribute>())); in convertConstantOpMmaSync() 702 op.getValue().cast<SplatElementsAttr>().getSplatValue<Attribute>(); in convertConstantOp()
|
| /llvm-project-15.0.7/llvm/include/llvm/Analysis/ |
| H A D | VectorUtils.h | 359 Value *getSplatValue(const Value *V);
|
| /llvm-project-15.0.7/llvm/lib/Target/AArch64/ |
| H A D | AArch64TargetTransformInfo.cpp | 709 dyn_cast_or_null<ConstantInt>(getSplatValue(II.getArgOperand(2))); in instCombineSVECmpNE() 802 if (auto *SplatVal = getSplatValue(Vec)) in instCombineSVELast() 1116 auto *SplatValue = getSplatValue(I); in instCombineSVEVectorMul() 1163 if (auto *ScalarArg = getSplatValue(UnpackArg)) { in instCombineSVEUnpack() 1182 auto *SplatValue = dyn_cast_or_null<ConstantInt>(getSplatValue(OpIndices)); in instCombineSVETBL() 1315 Value *SplatValue = getSplatValue(DivVec); in instCombineSVESDIV()
|
| /llvm-project-15.0.7/mlir/lib/Target/LLVMIR/ |
| H A D | ModuleTranslation.cpp | 216 innermostLLVMType, denseElementsAttr.getSplatValue<Attribute>(), loc, in convertDenseElementsAttr() 338 : splatAttr.getSplatValue<Attribute>(), in getLLVMConstant()
|
| /llvm-project-15.0.7/llvm/lib/CodeGen/ |
| H A D | ExpandVectorPredication.cpp | 86 if (Value *SplattedVal = getSplatValue(MaskVal)) in isAllTrueMask()
|
| /llvm-project-15.0.7/llvm/lib/Target/AMDGPU/ |
| H A D | AMDGPULibCalls.cpp | 829 CF = CDV ? dyn_cast_or_null<ConstantFP>(CDV->getSplatValue()) : nullptr; in fold_pow() 830 CINT = CDV ? dyn_cast_or_null<ConstantInt>(CDV->getSplatValue()) : nullptr; in fold_pow()
|
| /llvm-project-15.0.7/llvm/lib/Transforms/InstCombine/ |
| H A D | InstCombineCalls.cpp | 391 if (auto *SplatPtr = getSplatValue(II.getArgOperand(0))) { in simplifyMaskedGather() 420 if (auto *SplatPtr = getSplatValue(II.getArgOperand(1))) { in simplifyMaskedScatter() 422 if (auto *SplatValue = getSplatValue(II.getArgOperand(0))) { in simplifyMaskedScatter() 2020 dyn_cast_or_null<ConstantInt>(CV1->getSplatValue())) in visitCallInst()
|