/freebsd/contrib/llvm-project/llvm/lib/IR/ |
H A D | Instructions.cpp | 1864 bool ShuffleVectorInst::isSingleSourceMask(ArrayRef<int> Mask, int NumSrcElts) { in isSingleSourceMask() argument 1867 return isSingleSourceMaskImpl(Mask, NumSrcElts); in isSingleSourceMask() 1882 bool ShuffleVectorInst::isIdentityMask(ArrayRef<int> Mask, int NumSrcElts) { in isIdentityMask() argument 1883 if (Mask.size() != static_cast<unsigned>(NumSrcElts)) in isIdentityMask() 1887 return isIdentityMaskImpl(Mask, NumSrcElts); in isIdentityMask() 1890 bool ShuffleVectorInst::isReverseMask(ArrayRef<int> Mask, int NumSrcElts) { in isReverseMask() argument 1891 if (Mask.size() != static_cast<unsigned>(NumSrcElts)) in isReverseMask() 1893 if (!isSingleSourceMask(Mask, NumSrcElts)) in isReverseMask() 1897 if (NumSrcElts < 2) in isReverseMask() 1903 if (Mask[I] != (NumSrcElts - 1 - I) && in isReverseMask() [all …]
|
H A D | AutoUpgrade.cpp | 2817 unsigned NumSrcElts = 128 / EltTy->getPrimitiveSizeInBits(); in upgradeX86IntrinsicCall() local 2818 auto *VT = FixedVectorType::get(EltTy, NumSrcElts); in upgradeX86IntrinsicCall() 2822 if (NumSrcElts == 2) in upgradeX86IntrinsicCall() 2851 unsigned NumSrcElts = cast<FixedVectorType>(CI->getArgOperand(0)->getType()) in upgradeX86IntrinsicCall() local 2858 ShuffleMask[i] = i % NumSrcElts; in upgradeX86IntrinsicCall()
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Vectorize/ |
H A D | VectorCombine.cpp | 749 unsigned NumSrcElts = SrcTy->getPrimitiveSizeInBits() / DestEltSize; in foldBitcastShuffle() local 751 FixedVectorType::get(DestTy->getScalarType(), NumSrcElts); in foldBitcastShuffle() 1423 unsigned NumSrcElts = BinOpTy->getNumElements(); in foldShuffleOfBinops() local 1432 auto ConvertToUnary = [NumSrcElts](int &M) { in foldShuffleOfBinops() 1433 if (M >= (int)NumSrcElts) in foldShuffleOfBinops() 1434 M -= NumSrcElts; in foldShuffleOfBinops() 1520 unsigned NumSrcElts = CastSrcTy->getNumElements(); in foldShuffleOfCastops() local 1522 assert((NumDstElts == NumSrcElts || Opcode == Instruction::BitCast) && in foldShuffleOfCastops() 1527 if (NumDstElts != NumSrcElts && (NumSrcElts % NumDstElts) != 0 && in foldShuffleOfCastops() 1528 (NumDstElts % NumSrcElts) != 0) in foldShuffleOfCastops() [all …]
|
H A D | SLPVectorizer.cpp | 8052 int NumSrcElts = Tp->getElementCount().getKnownMinValue(); in getShuffleCost() local 8055 Mask, NumSrcElts, NumSubElts, Index)) { in getShuffleCost() 8056 if (Index + NumSubElts > NumSrcElts && in getShuffleCost() 8057 Index + NumSrcElts <= static_cast<int>(Mask.size())) in getShuffleCost()
|
/freebsd/contrib/llvm-project/llvm/include/llvm/IR/ |
H A D | Instructions.h | 1909 static bool isSingleSourceMask(ArrayRef<int> Mask, int NumSrcElts); 1910 static bool isSingleSourceMask(const Constant *Mask, int NumSrcElts) { 1914 return isSingleSourceMask(MaskAsInts, NumSrcElts); 1931 static bool isIdentityMask(ArrayRef<int> Mask, int NumSrcElts); 1932 static bool isIdentityMask(const Constant *Mask, int NumSrcElts) { 1942 return isIdentityMask(MaskAsInts, NumSrcElts); 1979 static bool isSelectMask(ArrayRef<int> Mask, int NumSrcElts); 1980 static bool isSelectMask(const Constant *Mask, int NumSrcElts) { 1984 return isSelectMask(MaskAsInts, NumSrcElts); 2004 static bool isReverseMask(ArrayRef<int> Mask, int NumSrcElts); [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Analysis/ |
H A D | VectorUtils.cpp | 423 unsigned NumSrcElts = Mask.size(); in scaleShuffleMaskElts() local 424 assert(NumSrcElts > 0 && NumDstElts > 0 && "Unexpected scaling factor"); in scaleShuffleMaskElts() 427 if (NumSrcElts == NumDstElts) { in scaleShuffleMaskElts() 433 assert(((NumSrcElts % NumDstElts) == 0 || (NumDstElts % NumSrcElts) == 0) && in scaleShuffleMaskElts() 436 if (NumSrcElts > NumDstElts) { in scaleShuffleMaskElts() 437 int Scale = NumSrcElts / NumDstElts; in scaleShuffleMaskElts() 441 int Scale = NumDstElts / NumSrcElts; in scaleShuffleMaskElts()
|
H A D | ConstantFolding.cpp | 73 unsigned NumSrcElts, in foldConstVectorToAPInt() argument 78 for (unsigned i = 0; i != NumSrcElts; ++i) { in foldConstVectorToAPInt() 81 Element = C->getAggregateElement(NumSrcElts - i - 1); in foldConstVectorToAPInt() 115 unsigned NumSrcElts = cast<FixedVectorType>(VTy)->getNumElements(); in FoldBitCast() local 123 IntegerType::get(C->getContext(), FPWidth), NumSrcElts); in FoldBitCast() 130 SrcEltTy, NumSrcElts, DL)) in FoldBitCast()
|
/freebsd/contrib/llvm-project/llvm/include/llvm/CodeGen/ |
H A D | BasicTTIImpl.h | 981 int NumSrcElts = Ty->getElementCount().getKnownMinValue(); in improveShuffleKindFromMask() local 984 if (ShuffleVectorInst::isReverseMask(Mask, NumSrcElts)) in improveShuffleKindFromMask() 986 if (ShuffleVectorInst::isZeroEltSplatMask(Mask, NumSrcElts)) in improveShuffleKindFromMask() 988 if (ShuffleVectorInst::isExtractSubvectorMask(Mask, NumSrcElts, Index) && in improveShuffleKindFromMask() 989 (Index + Mask.size()) <= (size_t)NumSrcElts) { in improveShuffleKindFromMask() 997 Mask, NumSrcElts, NumSubElts, Index)) { in improveShuffleKindFromMask() 998 if (Index + NumSubElts > NumSrcElts) in improveShuffleKindFromMask() 1003 if (ShuffleVectorInst::isSelectMask(Mask, NumSrcElts)) in improveShuffleKindFromMask() 1005 if (ShuffleVectorInst::isTransposeMask(Mask, NumSrcElts)) in improveShuffleKindFromMask() 1007 if (ShuffleVectorInst::isSpliceMask(Mask, NumSrcElts, Index)) in improveShuffleKindFromMask()
|
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/ |
H A D | TargetLowering.cpp | 711 unsigned NumSrcElts = SrcVT.getVectorNumElements(); in SimplifyMultipleUseDemandedBits() local 713 APInt DemandedSrcElts = APInt::getZero(NumSrcElts); in SimplifyMultipleUseDemandedBits() 734 unsigned NumSrcElts = SrcVT.isVector() ? SrcVT.getVectorNumElements() : 1; in SimplifyMultipleUseDemandedBits() local 736 APInt DemandedSrcElts = APInt::getZero(NumSrcElts); in SimplifyMultipleUseDemandedBits() 1306 unsigned NumSrcElts = Src.getValueType().getVectorNumElements(); in SimplifyDemandedBits() local 1307 APInt DemandedSrcElts = DemandedElts.zext(NumSrcElts).shl(Idx); in SimplifyDemandedBits() 2648 unsigned NumSrcElts = SrcEltCnt.getFixedValue(); in SimplifyDemandedBits() local 2649 APInt DemandedSrcElts = APInt::getAllOnes(NumSrcElts); in SimplifyDemandedBits() 2651 if (CIdx->getAPIntValue().ult(NumSrcElts)) in SimplifyDemandedBits() 2652 DemandedSrcElts = APInt::getOneBitSet(NumSrcElts, CIdx->getZExtValue()); in SimplifyDemandedBits() [all …]
|
H A D | SelectionDAG.cpp | 2864 unsigned NumSrcElts = Src.getValueType().getVectorNumElements(); in isSplatValue() local 2866 APInt DemandedSrcElts = DemandedElts.zext(NumSrcElts).shl(Idx); in isSplatValue() 2881 unsigned NumSrcElts = Src.getValueType().getVectorNumElements(); in isSplatValue() local 2883 APInt DemandedSrcElts = DemandedElts.zext(NumSrcElts); in isSplatValue() 2905 unsigned NumSrcElts = SrcVT.getVectorNumElements(); in isSplatValue() local 2907 APIntOps::ScaleBitMask(DemandedElts, NumSrcElts); in isSplatValue() 2911 APInt SubDemandedElts = APInt::getSplat(NumSrcElts, SubDemandedElt); in isSplatValue() 3336 unsigned NumSrcElts = Src.getValueType().getVectorNumElements(); in computeKnownBits() local 3337 APInt DemandedSrcElts = DemandedElts.zext(NumSrcElts).shl(Idx); in computeKnownBits() 4000 const unsigned NumSrcElts = VecVT.getVectorNumElements(); in computeKnownBits() local [all …]
|
H A D | DAGCombiner.cpp | 21935 unsigned NumSrcElts = SubVecVT.getVectorNumElements(); in combineInsertEltToShuffle() local 21938 if (NumSrcElts == 1) in combineInsertEltToShuffle() 21941 unsigned NumMaskVals = ExtendRatio * NumSrcElts; in combineInsertEltToShuffle() 21950 if (i / NumSrcElts == InsIndex) in combineInsertEltToShuffle() 21951 Mask[i] = (i % NumSrcElts) + NumMaskVals; in combineInsertEltToShuffle() 25347 for (unsigned SrcElt = 0, NumSrcElts = NumElts / Scale; in combineShuffleToZeroExtendVectorInReg() local 25348 SrcElt != NumSrcElts; ++SrcElt) { in combineShuffleToZeroExtendVectorInReg()
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/ |
H A D | InstCombineVectorOps.cpp | 229 ElementCount NumSrcElts = SrcTy->getElementCount(); in foldBitcastExtElt() local 230 if (NumSrcElts == NumElts) in foldBitcastExtElt() 234 assert(NumSrcElts.isScalable() == NumElts.isScalable() && in foldBitcastExtElt() 239 if (NumSrcElts.getKnownMinValue() < NumElts.getKnownMinValue()) { in foldBitcastExtElt() 252 NumElts.getKnownMinValue() / NumSrcElts.getKnownMinValue(); in foldBitcastExtElt()
|
/freebsd/contrib/llvm-project/llvm/lib/Target/X86/ |
H A D | X86ISelLowering.cpp | 3747 unsigned NumSrcElts = Mask.size(); in scaleShuffleElements() local 3748 assert(((NumSrcElts % NumDstElts) == 0 || (NumDstElts % NumSrcElts) == 0) && in scaleShuffleElements() 3752 if (NumDstElts >= NumSrcElts) { in scaleShuffleElements() 3753 int Scale = NumDstElts / NumSrcElts; in scaleShuffleElements() 4748 unsigned NumSrcElts = UndefSrcElts.getBitWidth(); in getTargetConstantBitsFromNode() local 4750 assert((NumSrcElts * SrcEltSizeInBits) == SizeInBits && in getTargetConstantBitsFromNode() 4759 if (NumSrcElts == NumElts) { in getTargetConstantBitsFromNode() 4769 for (unsigned i = 0; i != NumSrcElts; ++i) { in getTargetConstantBitsFromNode() 4882 unsigned NumSrcElts = SizeInBits / SrcEltSizeInBits; in getTargetConstantBitsFromNode() local 4886 APInt UndefSrcElts(NumSrcElts, 0); in getTargetConstantBitsFromNode() [all …]
|
H A D | X86InstCombineIntrinsic.cpp | 451 unsigned NumSrcElts = ArgTy->getNumElements(); in simplifyX86pack() local 452 assert(cast<FixedVectorType>(ResTy)->getNumElements() == (2 * NumSrcElts) && in simplifyX86pack() 455 unsigned NumSrcEltsPerLane = NumSrcElts / NumLanes; in simplifyX86pack() 497 PackMask.push_back(Elt + (Lane * NumSrcEltsPerLane) + NumSrcElts); in simplifyX86pack()
|
/freebsd/contrib/llvm-project/clang/lib/CodeGen/ |
H A D | CGExpr.cpp | 2587 unsigned NumSrcElts = VTy->getNumElements(); in EmitStoreThroughExtVectorComponentLValue() local 2590 if (NumDstElts == NumSrcElts) { in EmitStoreThroughExtVectorComponentLValue() 2595 for (unsigned i = 0; i != NumSrcElts; ++i) in EmitStoreThroughExtVectorComponentLValue() 2599 } else if (NumDstElts > NumSrcElts) { in EmitStoreThroughExtVectorComponentLValue() 2605 for (unsigned i = 0; i != NumSrcElts; ++i) in EmitStoreThroughExtVectorComponentLValue() 2617 if (getAccessedFieldNo(NumSrcElts - 1, Elts) == Mask.size()) in EmitStoreThroughExtVectorComponentLValue() 2618 NumSrcElts--; in EmitStoreThroughExtVectorComponentLValue() 2621 for (unsigned i = 0; i != NumSrcElts; ++i) in EmitStoreThroughExtVectorComponentLValue()
|
/freebsd/contrib/llvm-project/llvm/lib/Target/ARM/ |
H A D | ARMISelLowering.cpp | 8275 unsigned NumSrcElts = VTSize / EltVT.getFixedSizeInBits(); in ReconstructShuffle() local 8276 EVT DestVT = EVT::getVectorVT(*DAG.getContext(), EltVT, NumSrcElts); in ReconstructShuffle() 8292 if (Src.MaxElt - Src.MinElt >= NumSrcElts) { in ReconstructShuffle() 8297 if (Src.MinElt >= NumSrcElts) { in ReconstructShuffle() 8301 DAG.getConstant(NumSrcElts, dl, MVT::i32)); in ReconstructShuffle() 8302 Src.WindowBase = -NumSrcElts; in ReconstructShuffle() 8303 } else if (Src.MaxElt < NumSrcElts) { in ReconstructShuffle() 8315 DAG.getConstant(NumSrcElts, dl, MVT::i32)); in ReconstructShuffle() 20141 const unsigned NumSrcElts = VecVT.getVectorNumElements(); in computeKnownBitsForTargetNode() local 20143 assert(Pos->getAPIntValue().ult(NumSrcElts) && in computeKnownBitsForTargetNode() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/AArch64/ |
H A D | AArch64ISelLowering.cpp | 12203 unsigned NumSrcElts = VTSize / EltVT.getFixedSizeInBits(); in ReconstructShuffle() local 12204 EVT DestVT = EVT::getVectorVT(*DAG.getContext(), EltVT, NumSrcElts); in ReconstructShuffle() 12222 if (Src.MaxElt - Src.MinElt >= NumSrcElts) { in ReconstructShuffle() 12228 if (Src.MinElt >= NumSrcElts) { in ReconstructShuffle() 12232 DAG.getConstant(NumSrcElts, dl, MVT::i64)); in ReconstructShuffle() 12233 Src.WindowBase = -NumSrcElts; in ReconstructShuffle() 12234 } else if (Src.MaxElt < NumSrcElts) { in ReconstructShuffle() 12246 DAG.getConstant(NumSrcElts, dl, MVT::i64)); in ReconstructShuffle()
|
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/ |
H A D | LegalizerHelper.cpp | 4522 unsigned NumSrcElts = SrcTy.isVector() ? SrcTy.getNumElements() : 1; in fewerElementsVectorMerge() local 4523 unsigned NumElts = NarrowTy.getNumElements() / NumSrcElts; in fewerElementsVectorMerge()
|