Home
last modified time | relevance | path

Searched refs:Shuf (Results 1 – 25 of 27) sorted by relevance

12

/external/llvm-project/llvm/lib/Transforms/InstCombine/
DInstCombineVectorOps.cpp1026 static bool isShuffleEquivalentToSelect(ShuffleVectorInst &Shuf) { in isShuffleEquivalentToSelect() argument
1029 if (isa<ScalableVectorType>(Shuf.getOperand(0)->getType())) in isShuffleEquivalentToSelect()
1032 int MaskSize = Shuf.getShuffleMask().size(); in isShuffleEquivalentToSelect()
1034 cast<FixedVectorType>(Shuf.getOperand(0)->getType())->getNumElements(); in isShuffleEquivalentToSelect()
1043 int Elt = Shuf.getMaskValue(i); in isShuffleEquivalentToSelect()
1129 auto *Shuf = dyn_cast<ShuffleVectorInst>(InsElt.getOperand(0)); in foldInsEltIntoSplat() local
1130 if (!Shuf || !Shuf->isZeroEltSplat()) in foldInsEltIntoSplat()
1135 if (isa<ScalableVectorType>(Shuf->getType())) in foldInsEltIntoSplat()
1145 Value *Op0 = Shuf->getOperand(0); in foldInsEltIntoSplat()
1154 cast<FixedVectorType>(Shuf->getType())->getNumElements(); in foldInsEltIntoSplat()
[all …]
DInstCombineCasts.cpp677 auto *Shuf = dyn_cast<ShuffleVectorInst>(Trunc.getOperand(0)); in shrinkSplatShuffle() local
678 if (Shuf && Shuf->hasOneUse() && isa<UndefValue>(Shuf->getOperand(1)) && in shrinkSplatShuffle()
679 is_splat(Shuf->getShuffleMask()) && in shrinkSplatShuffle()
680 Shuf->getType() == Shuf->getOperand(0)->getType()) { in shrinkSplatShuffle()
683 Value *NarrowOp = Builder.CreateTrunc(Shuf->getOperand(0), Trunc.getType()); in shrinkSplatShuffle()
684 return new ShuffleVectorInst(NarrowOp, NarrowUndef, Shuf->getShuffleMask()); in shrinkSplatShuffle()
2660 if (auto *Shuf = dyn_cast<ShuffleVectorInst>(Src)) { in visitBitCast() local
2663 Value *ShufOp0 = Shuf->getOperand(0); in visitBitCast()
2664 Value *ShufOp1 = Shuf->getOperand(1); in visitBitCast()
2666 cast<FixedVectorType>(Shuf->getType())->getNumElements(); in visitBitCast()
[all …]
DInstCombineNegator.cpp313 auto *Shuf = cast<ShuffleVectorInst>(I); in visitImpl() local
320 return Builder.CreateShuffleVector(NegOp0, NegOp1, Shuf->getShuffleMask(), in visitImpl()
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/InstCombine/
DInstCombineVectorOps.cpp725 static bool isShuffleEquivalentToSelect(ShuffleVectorInst &Shuf) { in isShuffleEquivalentToSelect() argument
726 int MaskSize = Shuf.getMask()->getType()->getVectorNumElements(); in isShuffleEquivalentToSelect()
727 int VecSize = Shuf.getOperand(0)->getType()->getVectorNumElements(); in isShuffleEquivalentToSelect()
736 int Elt = Shuf.getMaskValue(i); in isShuffleEquivalentToSelect()
818 auto *Shuf = dyn_cast<ShuffleVectorInst>(InsElt.getOperand(0)); in foldInsEltIntoSplat() local
819 if (!Shuf || !Shuf->isZeroEltSplat()) in foldInsEltIntoSplat()
829 Value *Op0 = Shuf->getOperand(0); in foldInsEltIntoSplat()
837 unsigned NumMaskElts = Shuf->getType()->getVectorNumElements(); in foldInsEltIntoSplat()
839 Type *I32Ty = IntegerType::getInt32Ty(Shuf->getContext()); in foldInsEltIntoSplat()
842 NewMaskVec[i] = i == IdxC ? Zero : Shuf->getMask()->getAggregateElement(i); in foldInsEltIntoSplat()
[all …]
DInstCombineCasts.cpp640 auto *Shuf = dyn_cast<ShuffleVectorInst>(Trunc.getOperand(0)); in shrinkSplatShuffle() local
641 if (Shuf && Shuf->hasOneUse() && isa<UndefValue>(Shuf->getOperand(1)) && in shrinkSplatShuffle()
642 Shuf->getMask()->getSplatValue() && in shrinkSplatShuffle()
643 Shuf->getType() == Shuf->getOperand(0)->getType()) { in shrinkSplatShuffle()
646 Value *NarrowOp = Builder.CreateTrunc(Shuf->getOperand(0), Trunc.getType()); in shrinkSplatShuffle()
647 return new ShuffleVectorInst(NarrowOp, NarrowUndef, Shuf->getMask()); in shrinkSplatShuffle()
2506 if (auto *Shuf = dyn_cast<ShuffleVectorInst>(Src)) { in visitBitCast() local
2509 Value *ShufOp0 = Shuf->getOperand(0); in visitBitCast()
2510 Value *ShufOp1 = Shuf->getOperand(1); in visitBitCast()
2511 unsigned NumShufElts = Shuf->getType()->getVectorNumElements(); in visitBitCast()
[all …]
/external/llvm-project/llvm/test/Transforms/CodeGenPrepare/X86/
Dcgp_shuffle_crash.ll8 %Shuf = shufflevector <2 x i8> zeroinitializer, <2 x i8> zeroinitializer, <2 x i32> undef
10 %B = mul <2 x i8> %Shuf, %Shuf
12 ret <2 x i8> %Shuf
/external/llvm-project/llvm/lib/Transforms/Vectorize/
DVectorCombine.cpp340 Value *Shuf = createShiftShuffle(X, cast<ConstantInt>(C)->getZExtValue(), in translateExtract() local
342 return cast<ExtractElementInst>(Builder.CreateExtractElement(Shuf, NewIndex)); in translateExtract()
492 Value *Shuf = Builder.CreateShuffleVector(CastV, NewMask); in foldBitcastShuf() local
493 replaceValue(I, *Shuf); in foldBitcastShuf()
689 Value *Shuf = createShiftShuffle(VCmp, ExpensiveIndex, CheapIndex, Builder); in foldExtractedCmps() local
691 VCmp, Shuf); in foldExtractedCmps()
DLoopVectorize.cpp1992 Value *Shuf = Builder.CreateVectorSplat(VF, V, "broadcast"); in getBroadcastInstrs() local
1994 return Shuf; in getBroadcastInstrs()
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Target/AMDGPU/
DAMDGPULowerKernelArguments.cpp212 Value *Shuf = Builder.CreateShuffleVector(Load, UndefValue::get(V4Ty), in runOnFunction() local
215 Arg.replaceAllUsesWith(Shuf); in runOnFunction()
/external/llvm-project/llvm/lib/Target/AMDGPU/
DAMDGPULowerKernelArguments.cpp244 Value *Shuf = Builder.CreateShuffleVector(Load, UndefValue::get(V4Ty), in runOnFunction() local
247 Arg.replaceAllUsesWith(Shuf); in runOnFunction()
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Utils/
DLoopUtils.cpp852 Value *Shuf = Builder.CreateShuffleVector( in getShuffleReduction() local
858 TmpVec = Builder.CreateBinOp((Instruction::BinaryOps)Op, TmpVec, Shuf, in getShuffleReduction()
863 TmpVec = createMinMaxOp(Builder, MinMaxKind, TmpVec, Shuf); in getShuffleReduction()
/external/llvm-project/llvm/lib/Analysis/
DVectorUtils.cpp376 if (auto *Shuf = dyn_cast<ShuffleVectorInst>(V)) { in isSplatValue() local
379 if (!is_splat(Shuf->getShuffleMask())) in isSplatValue()
388 return Shuf->getMaskValue(Index) == Index; in isSplatValue()
DValueTracking.cpp164 static bool getShuffleDemandedElts(const ShuffleVectorInst *Shuf, in getShuffleDemandedElts() argument
169 if (isa<ScalableVectorType>(Shuf->getType())) in getShuffleDemandedElts()
173 cast<FixedVectorType>(Shuf->getOperand(0)->getType())->getNumElements(); in getShuffleDemandedElts()
174 int NumMaskElts = cast<FixedVectorType>(Shuf->getType())->getNumElements(); in getShuffleDemandedElts()
179 if (all_of(Shuf->getShuffleMask(), [](int Elt) { return Elt == 0; })) { in getShuffleDemandedElts()
186 int M = Shuf->getMaskValue(i); in getShuffleDemandedElts()
1646 auto *Shuf = dyn_cast<ShuffleVectorInst>(I); in computeKnownBitsFromOperator() local
1648 if (!Shuf) { in computeKnownBitsFromOperator()
1655 if (!getShuffleDemandedElts(Shuf, DemandedElts, DemandedLHS, DemandedRHS)) { in computeKnownBitsFromOperator()
1662 const Value *LHS = Shuf->getOperand(0); in computeKnownBitsFromOperator()
[all …]
/external/llvm-project/llvm/lib/Transforms/Utils/
DLoopUtils.cpp961 Value *Shuf = Builder.CreateShuffleVector( in getShuffleReduction() local
966 TmpVec = Builder.CreateBinOp((Instruction::BinaryOps)Op, TmpVec, Shuf, in getShuffleReduction()
971 TmpVec = createMinMaxOp(Builder, MinMaxKind, TmpVec, Shuf); in getShuffleReduction()
/external/llvm-project/llvm/lib/IR/
DConstants.cpp1646 const auto *Shuf = dyn_cast<ConstantExpr>(this); in getSplatValue() local
1647 if (Shuf && Shuf->getOpcode() == Instruction::ShuffleVector && in getSplatValue()
1648 isa<UndefValue>(Shuf->getOperand(1))) { in getSplatValue()
1650 const auto *IElt = dyn_cast<ConstantExpr>(Shuf->getOperand(0)); in getSplatValue()
1654 ArrayRef<int> Mask = Shuf->getShuffleMask(); in getSplatValue()
/external/swiftshader/third_party/llvm-10.0/llvm/lib/CodeGen/SelectionDAG/
DDAGCombiner.cpp16842 SDValue Shuf = DAG.getVectorShuffle(ShufVT, DL, DestVecBC, PaddedSubV, Mask); in combineInsertEltToShuffle() local
16845 AddToWorklist(Shuf.getNode()); in combineInsertEltToShuffle()
16846 return DAG.getBitcast(VT, Shuf); in combineInsertEltToShuffle()
16882 if (SDValue Shuf = combineInsertEltToShuffle(N, Elt)) in visitINSERT_VECTOR_ELT() local
16883 return Shuf; in visitINSERT_VECTOR_ELT()
17157 auto *Shuf = cast<ShuffleVectorSDNode>(VecOp); in visitEXTRACT_VECTOR_ELT() local
17159 int OrigElt = Shuf->getMaskElt(IndexC->getZExtValue()); in visitEXTRACT_VECTOR_ELT()
17272 if (auto *Shuf = dyn_cast<ShuffleVectorSDNode>(VecOp)) { in visitEXTRACT_VECTOR_ELT() local
17287 int Idx = (Elt > (int)NumElts) ? -1 : Shuf->getMaskElt(Elt); in visitEXTRACT_VECTOR_ELT()
17615 SDValue Shuf = TLI.buildLegalVectorShuffle(VecVT, DL, Extract.getOperand(0), in reduceBuildVecToShuffleWithZero() local
[all …]
/external/llvm-project/llvm/lib/CodeGen/SelectionDAG/
DDAGCombiner.cpp17956 SDValue Shuf = DAG.getVectorShuffle(ShufVT, DL, DestVecBC, PaddedSubV, Mask); in combineInsertEltToShuffle() local
17959 AddToWorklist(Shuf.getNode()); in combineInsertEltToShuffle()
17960 return DAG.getBitcast(VT, Shuf); in combineInsertEltToShuffle()
18004 if (SDValue Shuf = combineInsertEltToShuffle(N, Elt)) in visitINSERT_VECTOR_ELT() local
18005 return Shuf; in visitINSERT_VECTOR_ELT()
18305 auto *Shuf = cast<ShuffleVectorSDNode>(VecOp); in visitEXTRACT_VECTOR_ELT() local
18307 int OrigElt = Shuf->getMaskElt(IndexC->getZExtValue()); in visitEXTRACT_VECTOR_ELT()
18427 if (auto *Shuf = dyn_cast<ShuffleVectorSDNode>(VecOp)) { in visitEXTRACT_VECTOR_ELT() local
18442 int Idx = (Elt > (int)NumElts) ? -1 : Shuf->getMaskElt(Elt); in visitEXTRACT_VECTOR_ELT()
18879 SDValue Shuf = TLI.buildLegalVectorShuffle(VecVT, DL, Extract.getOperand(0), in reduceBuildVecToShuffleWithZero() local
[all …]
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Analysis/
DValueTracking.cpp2711 auto *Shuf = cast<ShuffleVectorInst>(U); in ComputeNumSignBitsImpl() local
2712 int NumElts = Shuf->getOperand(0)->getType()->getVectorNumElements(); in ComputeNumSignBitsImpl()
2713 int NumMaskElts = Shuf->getMask()->getType()->getVectorNumElements(); in ComputeNumSignBitsImpl()
2716 int M = Shuf->getMaskValue(i); in ComputeNumSignBitsImpl()
2729 Tmp = ComputeNumSignBits(Shuf->getOperand(0), Depth + 1, Q); in ComputeNumSignBitsImpl()
2731 Tmp2 = ComputeNumSignBits(Shuf->getOperand(1), Depth + 1, Q); in ComputeNumSignBitsImpl()
/external/llvm/lib/Transforms/Vectorize/
DLoopVectorize.cpp1868 Value *Shuf = Builder.CreateVectorSplat(VF, V, "broadcast"); in getBroadcastInstrs() local
1870 return Shuf; in getBroadcastInstrs()
3648 Value *Shuf = Builder.CreateShuffleVector( in vectorizeLoop() local
3655 (Instruction::BinaryOps)Op, TmpVec, Shuf, "bin.rdx")); in vectorizeLoop()
3658 TmpVec, Shuf); in vectorizeLoop()
DSLPVectorizer.cpp4184 Value *Shuf = Builder.CreateShuffleVector( in emitReduction() local
4186 TmpVec = createBinOp(Builder, ReductionOpcode, TmpVec, Shuf, "bin.rdx"); in emitReduction()
/external/llvm-project/llvm/lib/Target/X86/
DX86ISelLowering.cpp13424 SDValue Shuf = DAG.getVectorShuffle(WideVT, DL, WideVec, DAG.getUNDEF(WideVT), in lowerShuffleOfExtractsAsVperm() local
13427 return DAG.getNode(ISD::EXTRACT_SUBVECTOR, DL, VT, Shuf, in lowerShuffleOfExtractsAsVperm()
20596 if (auto *Shuf = dyn_cast<ShuffleVectorSDNode>(In)) in LowerAVXExtend() local
20597 if (hasIdenticalHalvesShuffleMask(Shuf->getMask())) in LowerAVXExtend()
22977 SDValue Shuf = DAG.getVectorShuffle(MVT::v4i32, dl, Result, Result, Mask); in LowerVSETCC() local
22978 Result = DAG.getNode(ISD::AND, dl, MVT::v4i32, Result, Shuf); in LowerVSETCC()
31324 auto *Shuf = dyn_cast<ShuffleVectorInst>(I->getOperand(ShiftAmountOpNum)); in shouldSinkOperands() local
31325 if (Shuf && getSplatIndex(Shuf->getShuffleMask()) >= 0 && in shouldSinkOperands()
37542 static SDValue narrowShuffle(ShuffleVectorSDNode *Shuf, SelectionDAG &DAG) { in narrowShuffle() argument
37543 if (!Shuf->getValueType(0).isSimple()) in narrowShuffle()
[all …]
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Target/X86/
DX86ISelLowering.cpp12679 SDValue Shuf = DAG.getVectorShuffle(WideVT, DL, WideVec, DAG.getUNDEF(WideVT), in lowerShuffleOfExtractsAsVperm() local
12682 return DAG.getNode(ISD::EXTRACT_SUBVECTOR, DL, VT, Shuf, in lowerShuffleOfExtractsAsVperm()
19623 if (auto *Shuf = dyn_cast<ShuffleVectorSDNode>(In)) in LowerAVXExtend() local
19624 if (hasIdenticalHalvesShuffleMask(Shuf->getMask())) in LowerAVXExtend()
21726 SDValue Shuf = DAG.getVectorShuffle(MVT::v4i32, dl, Result, Result, Mask); in LowerVSETCC() local
21727 Result = DAG.getNode(ISD::AND, dl, MVT::v4i32, Result, Shuf); in LowerVSETCC()
35200 static SDValue narrowShuffle(ShuffleVectorSDNode *Shuf, SelectionDAG &DAG) { in narrowShuffle() argument
35201 if (!Shuf->getValueType(0).isSimple()) in narrowShuffle()
35203 MVT VT = Shuf->getSimpleValueType(0); in narrowShuffle()
35208 ArrayRef<int> Mask = Shuf->getMask(); in narrowShuffle()
[all …]
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Vectorize/
DLoopVectorize.cpp1680 Value *Shuf = Builder.CreateVectorSplat(VF, V, "broadcast"); in getBroadcastInstrs() local
1682 return Shuf; in getBroadcastInstrs()
/external/llvm-project/llvm/test/CodeGen/X86/
Dvector-sext.ll3155 %Shuf = shufflevector <16 x i8> %A, <16 x i8> undef, <2 x i32> <i32 0, i32 1>
3156 %Ex = sext <2 x i8> %Shuf to <2 x i16>
/external/llvm-project/llvm/lib/Target/SystemZ/
DSystemZISelLowering.cpp5285 SDValue Shuf = DAG.getVectorShuffle(InVT, DL, PackedOp, ZeroVec, Mask); in lowerZERO_EXTEND_VECTOR_INREG() local
5286 return DAG.getNode(ISD::BITCAST, DL, OutVT, Shuf); in lowerZERO_EXTEND_VECTOR_INREG()

12