| /llvm-project-15.0.7/llvm/lib/Transforms/InstCombine/ |
| H A D | InstCombineVectorOps.cpp | 1247 if (!Shuf || !Shuf->isZeroEltSplat()) in foldInsEltIntoSplat() 1284 if (!Shuf || !match(Shuf->getOperand(1), m_Undef()) || in foldInsEltIntoIdentityShuffle() 1285 !(Shuf->isIdentityWithExtract() || Shuf->isIdentityWithPadding())) in foldInsEltIntoIdentityShuffle() 1608 return Shuf; in visitInsertElementInst() 1965 Value *Op0 = Shuf.getOperand(0), *Op1 = Shuf.getOperand(1); in foldSelectShuffleWith1Binop() 2018 Value *Op0 = Shuf.getOperand(0), *Op1 = Shuf.getOperand(1); in canonicalizeInsertSplat() 2060 Shuf.commute(); in foldSelectShuffle() 2061 return &Shuf; in foldSelectShuffle() 2202 assert(Shuf.changesLength() && !Shuf.increasesLength() && in foldTruncShuffle() 2341 Value *Op0 = Shuf.getOperand(0), *Op1 = Shuf.getOperand(1); in foldIdentityExtractShuffle() [all …]
|
| H A D | InstCombineCasts.cpp | 727 auto *Shuf = dyn_cast<ShuffleVectorInst>(Trunc.getOperand(0)); in shrinkSplatShuffle() local 728 if (Shuf && Shuf->hasOneUse() && match(Shuf->getOperand(1), m_Undef()) && in shrinkSplatShuffle() 729 is_splat(Shuf->getShuffleMask()) && in shrinkSplatShuffle() 730 Shuf->getType() == Shuf->getOperand(0)->getType()) { in shrinkSplatShuffle() 734 return new ShuffleVectorInst(NarrowOp, Shuf->getShuffleMask()); in shrinkSplatShuffle() 2839 if (auto *Shuf = dyn_cast<ShuffleVectorInst>(Src)) { in visitBitCast() local 2842 Value *ShufOp0 = Shuf->getOperand(0); in visitBitCast() 2843 Value *ShufOp1 = Shuf->getOperand(1); in visitBitCast() 2846 if (Shuf->hasOneUse() && DestTy->isVectorTy() && in visitBitCast() 2872 ShufElts.getKnownMinValue() % 2 == 0 && Shuf->hasOneUse() && in visitBitCast() [all …]
|
| H A D | InstCombineNegator.cpp | 340 auto *Shuf = cast<ShuffleVectorInst>(I); in visitImpl() local 347 return Builder.CreateShuffleVector(NegOp0, NegOp1, Shuf->getShuffleMask(), in visitImpl()
|
| H A D | InstCombineCalls.cpp | 397 Value *Shuf = in simplifyMaskedGather() local 399 return replaceInstUsesWith(II, cast<Instruction>(Shuf)); in simplifyMaskedGather() 2689 if (Instruction *Shuf = foldShuffledIntrinsicOperands(II, Builder)) in visitCallInst() local 2690 return Shuf; in visitCallInst()
|
| H A D | InstCombineInternal.h | 607 Instruction *foldSelectShuffle(ShuffleVectorInst &Shuf);
|
| /llvm-project-15.0.7/llvm/test/Transforms/CodeGenPrepare/X86/ |
| H A D | cgp_shuffle_crash-inseltpoison.ll | 8 %Shuf = shufflevector <2 x i8> zeroinitializer, <2 x i8> zeroinitializer, <2 x i32> poison 10 %B = mul <2 x i8> %Shuf, %Shuf 12 ret <2 x i8> %Shuf
|
| H A D | cgp_shuffle_crash.ll | 8 %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
|
| /llvm-project-15.0.7/llvm/lib/Target/ARM/ |
| H A D | MVELaneInterleavingPass.cpp | 360 Value *Shuf = Builder.CreateShuffleVector(I, TruncMask); in tryInterleave() local 361 I->replaceAllUsesWith(Shuf); in tryInterleave() 362 cast<Instruction>(Shuf)->setOperand(0, I); in tryInterleave() 364 LLVM_DEBUG(dbgs() << " with " << *Shuf << "\n"); in tryInterleave()
|
| /llvm-project-15.0.7/llvm/lib/Target/AMDGPU/ |
| H A D | AMDGPULowerKernelArguments.cpp | 225 Value *Shuf = Builder.CreateShuffleVector(Load, ArrayRef<int>{0, 1, 2}, in runOnFunction() local 227 Arg.replaceAllUsesWith(Shuf); in runOnFunction()
|
| /llvm-project-15.0.7/llvm/lib/Transforms/Vectorize/ |
| H A D | VectorCombine.cpp | 429 Value *Shuf = createShiftShuffle(X, cast<ConstantInt>(C)->getZExtValue(), in translateExtract() local 431 return cast<ExtractElementInst>(Builder.CreateExtractElement(Shuf, NewIndex)); in translateExtract() 586 Value *Shuf = Builder.CreateShuffleVector(CastV, NewMask); in foldBitcastShuf() local 587 replaceValue(I, *Shuf); in foldBitcastShuf() 794 Value *Shuf = createShiftShuffle(VCmp, ExpensiveIndex, CheapIndex, Builder); in foldExtractedCmps() local 796 VCmp, Shuf); in foldExtractedCmps()
|
| H A D | LoopVectorize.cpp | 2260 Value *Shuf = Builder.CreateVectorSplat(VF, V, "broadcast"); in getBroadcastInstrs() local 2262 return Shuf; in getBroadcastInstrs()
|
| /llvm-project-15.0.7/llvm/lib/Analysis/ |
| H A D | ValueTracking.cpp | 166 static bool getShuffleDemandedElts(const ShuffleVectorInst *Shuf, in getShuffleDemandedElts() argument 171 if (isa<ScalableVectorType>(Shuf->getType())) in getShuffleDemandedElts() 188 int M = Shuf->getMaskValue(i); in getShuffleDemandedElts() 1769 auto *Shuf = dyn_cast<ShuffleVectorInst>(I); in computeKnownBitsFromOperator() local 1771 if (!Shuf) { in computeKnownBitsFromOperator() 1785 const Value *LHS = Shuf->getOperand(0); in computeKnownBitsFromOperator() 1792 const Value *RHS = Shuf->getOperand(1); in computeKnownBitsFromOperator() 3318 auto *Shuf = dyn_cast<ShuffleVectorInst>(U); in ComputeNumSignBitsImpl() local 3319 if (!Shuf) { in ComputeNumSignBitsImpl() 3330 const Value *LHS = Shuf->getOperand(0); in ComputeNumSignBitsImpl() [all …]
|
| H A D | VectorUtils.cpp | 398 if (auto *Shuf = dyn_cast<ShuffleVectorInst>(V)) { in isSplatValue() local 401 if (!is_splat(Shuf->getShuffleMask())) in isSplatValue() 410 return Shuf->getMaskValue(Index) == Index; in isSplatValue()
|
| /llvm-project-15.0.7/llvm/lib/Transforms/Utils/ |
| H A D | LoopUtils.cpp | 971 Value *Shuf = Builder.CreateShuffleVector(TmpVec, ShuffleMask, "rdx.shuf"); in getShuffleReduction() local 974 TmpVec = Builder.CreateBinOp((Instruction::BinaryOps)Op, TmpVec, Shuf, in getShuffleReduction() 979 TmpVec = createMinMaxOp(Builder, RdxKind, TmpVec, Shuf); in getShuffleReduction()
|
| /llvm-project-15.0.7/llvm/lib/IR/ |
| H A D | Constants.cpp | 1636 const auto *Shuf = dyn_cast<ConstantExpr>(this); in getSplatValue() local 1637 if (Shuf && Shuf->getOpcode() == Instruction::ShuffleVector && in getSplatValue() 1638 isa<UndefValue>(Shuf->getOperand(1))) { in getSplatValue() 1640 const auto *IElt = dyn_cast<ConstantExpr>(Shuf->getOperand(0)); in getSplatValue() 1644 ArrayRef<int> Mask = Shuf->getShuffleMask(); in getSplatValue()
|
| /llvm-project-15.0.7/llvm/lib/CodeGen/SelectionDAG/ |
| H A D | DAGCombiner.cpp | 19493 AddToWorklist(Shuf.getNode()); in combineInsertEltToShuffle() 19494 return DAG.getBitcast(VT, Shuf); in combineInsertEltToShuffle() 19539 return Shuf; in visitINSERT_VECTOR_ELT() 20456 if (!Shuf) in reduceBuildVecToShuffleWithZero() 20458 return DAG.getBitcast(VT, Shuf); in reduceBuildVecToShuffleWithZero() 21876 SDValue N0 = Shuf->getOperand(0), N1 = Shuf->getOperand(1); in foldShuffleOfConcatUndefs() 21885 EVT VT = Shuf->getValueType(0); in foldShuffleOfConcatUndefs() 21914 SDLoc DL(Shuf); in foldShuffleOfConcatUndefs() 22210 return Shuf->getOperand(0); in combineShuffleOfSplatVal() 22245 return Shuf->getOperand(0); in combineShuffleOfSplatVal() [all …]
|
| /llvm-project-15.0.7/llvm/lib/Target/AArch64/ |
| H A D | AArch64ISelLowering.cpp | 12768 if (auto *Shuf = dyn_cast<ShuffleVectorInst>(V)) in isSplatShuffle() local 12769 return is_splat(Shuf->getShuffleMask()); in isSplatShuffle() 20039 auto *Shuf = dyn_cast<ShuffleVectorSDNode>(N->getOperand(1)); in ReplaceAddWithADDP() local 20040 if (!Shuf) { in ReplaceAddWithADDP() 20041 Shuf = dyn_cast<ShuffleVectorSDNode>(N->getOperand(0)); in ReplaceAddWithADDP() 20043 if (!Shuf) in ReplaceAddWithADDP() 20047 if (Shuf->getOperand(0) != X || !Shuf->getOperand(1)->isUndef()) in ReplaceAddWithADDP() 20051 ArrayRef<int> Mask = Shuf->getMask(); in ReplaceAddWithADDP()
|
| /llvm-project-15.0.7/llvm/lib/Target/X86/ |
| H A D | X86ISelLowering.cpp | 21841 if (auto *Shuf = dyn_cast<ShuffleVectorSDNode>(In)) in LowerAVXExtend() local 21842 if (hasIdenticalHalvesShuffleMask(Shuf->getMask())) in LowerAVXExtend() 34077 if (Shuf && getSplatIndex(Shuf->getShuffleMask()) >= 0 && in shouldSinkOperands() 40745 if (!Shuf->getValueType(0).isSimple()) in narrowShuffle() 40747 MVT VT = Shuf->getSimpleValueType(0); in narrowShuffle() 40752 ArrayRef<int> Mask = Shuf->getMask(); in narrowShuffle() 40769 return getShuffleHalfVectors(SDLoc(Shuf), Shuf->getOperand(0), in narrowShuffle() 40777 if (auto *Shuf = dyn_cast<ShuffleVectorSDNode>(N)) in combineShuffle() local 40778 if (SDValue V = narrowShuffle(Shuf, DAG)) in combineShuffle() 52742 {N->getOperand(0), Shuf}); in combineSIntToFP() [all …]
|
| /llvm-project-15.0.7/llvm/test/CodeGen/X86/ |
| H A D | vector-sext.ll | 3201 %Shuf = shufflevector <16 x i8> %A, <16 x i8> undef, <2 x i32> <i32 0, i32 1> 3202 %Ex = sext <2 x i8> %Shuf to <2 x i16>
|
| /llvm-project-15.0.7/llvm/lib/Target/SystemZ/ |
| H A D | SystemZISelLowering.cpp | 5596 SDValue Shuf = DAG.getVectorShuffle(InVT, DL, PackedOp, ZeroVec, Mask); in lowerZERO_EXTEND_VECTOR_INREG() local 5597 return DAG.getNode(ISD::BITCAST, DL, OutVT, Shuf); in lowerZERO_EXTEND_VECTOR_INREG()
|