Home
last modified time | relevance | path

Searched refs:getSplatValue (Results 1 – 25 of 61) sorted by relevance

123

/llvm-project-15.0.7/mlir/lib/CAPI/IR/
H A DBuiltinAttributes.cpp517 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 DCommonFolders.h57 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 DTosaCanonicalizations.cpp175 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 DInstructionsTest.cpp1349 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 DRISCVGatherScatterLowering.cpp149 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 DConstant.h147 Constant *getSplatValue(bool AllowUndefs = false) const;
H A DPatternMatch.h243 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 DConstants.h524 Constant *getSplatValue(bool AllowUndefs = false) const;
810 Constant *getSplatValue() const;
/llvm-project-15.0.7/mlir/include/mlir/IR/
H A DMatchers.h113 .match(splatAttr.getSplatValue<Attribute>()); in match()
150 .match(splatAttr.getSplatValue<Attribute>()); in match()
H A DBuiltinAttributes.h379 getSplatValue() const {
388 getSplatValue() const {
389 return getSplatValue<Attribute>().template cast<T>();
/llvm-project-15.0.7/mlir/lib/Dialect/Math/Transforms/
H A DAlgebraicSimplification.cpp58 return vectorExponent.getSplatValue<FloatAttr>() in matchAndRewrite()
/llvm-project-15.0.7/llvm/unittests/Analysis/
H A DVectorUtilsTest.cpp453 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 DConstants.cpp104 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 DConstantFold.cpp62 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 DType.cpp618 C = C->getSplatValue(); in indexValid()
/llvm-project-15.0.7/llvm/lib/Target/PowerPC/
H A DPPCLowerMASSVEntries.cpp111 if (ConstantFP *CFP = dyn_cast_or_null<ConstantFP>(Exp->getSplatValue())) { in handlePowSpecialCases()
/llvm-project-15.0.7/llvm/lib/Analysis/
H A DVectorUtils.cpp341 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 DSPIRVCanonicalization.cpp43 return attr.getSplatValue<bool>(); in getScalarOrSplatBoolAttr()
/llvm-project-15.0.7/mlir/lib/Conversion/VectorToGPU/
H A DVectorToGPU.cpp463 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 DVectorUtils.h359 Value *getSplatValue(const Value *V);
/llvm-project-15.0.7/llvm/lib/Target/AArch64/
H A DAArch64TargetTransformInfo.cpp709 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 DModuleTranslation.cpp216 innermostLLVMType, denseElementsAttr.getSplatValue<Attribute>(), loc, in convertDenseElementsAttr()
338 : splatAttr.getSplatValue<Attribute>(), in getLLVMConstant()
/llvm-project-15.0.7/llvm/lib/CodeGen/
H A DExpandVectorPredication.cpp86 if (Value *SplattedVal = getSplatValue(MaskVal)) in isAllTrueMask()
/llvm-project-15.0.7/llvm/lib/Target/AMDGPU/
H A DAMDGPULibCalls.cpp829 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 DInstCombineCalls.cpp391 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()

123