diff --git a/llvm/include/llvm/Analysis/TargetTransformInfo.h b/llvm/include/llvm/Analysis/TargetTransformInfo.h --- a/llvm/include/llvm/Analysis/TargetTransformInfo.h +++ b/llvm/include/llvm/Analysis/TargetTransformInfo.h @@ -1123,6 +1123,9 @@ const APInt &DemandedSrcElts, const APInt &DemandedReplicatedElts, TTI::TargetCostKind CostKind); + InstructionCost getReplicationShuffleCost(Type *EltTy, int ReplicationFactor, + int VF, ArrayRef Mask, + TTI::TargetCostKind CostKind); /// \return The cost of Load and Store instructions. InstructionCost @@ -1651,6 +1654,10 @@ virtual InstructionCost getReplicationShuffleCost( Type *EltTy, int ReplicationFactor, int VF, const APInt &DemandedSrcElts, const APInt &DemandedReplicatedElts, TTI::TargetCostKind CostKind) = 0; + virtual InstructionCost + getReplicationShuffleCost(Type *EltTy, int ReplicationFactor, int VF, + ArrayRef Mask, + TTI::TargetCostKind CostKind) = 0; virtual InstructionCost getMemoryOpCost(unsigned Opcode, Type *Src, Align Alignment, @@ -2162,6 +2169,13 @@ DemandedSrcElts, DemandedReplicatedElts, CostKind); } + InstructionCost + getReplicationShuffleCost(Type *EltTy, int ReplicationFactor, int VF, + ArrayRef Mask, + TTI::TargetCostKind CostKind) override { + return Impl.getReplicationShuffleCost(EltTy, ReplicationFactor, VF, Mask, + CostKind); + } InstructionCost getMemoryOpCost(unsigned Opcode, Type *Src, Align Alignment, unsigned AddressSpace, TTI::TargetCostKind CostKind, diff --git a/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h b/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h --- a/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h +++ b/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h @@ -550,6 +550,11 @@ TTI::TargetCostKind CostKind) { return 1; } + unsigned getReplicationShuffleCost(Type *EltTy, int ReplicationFactor, int VF, + ArrayRef Mask, + TTI::TargetCostKind CostKind) { + return 1; + } InstructionCost getMemoryOpCost(unsigned Opcode, Type *Src, Align Alignment, unsigned AddressSpace, @@ -1106,6 +1111,12 @@ SubIndex, FixedVectorType::get(VecTy->getScalarType(), NumSubElts)); + int ReplicationFactor, VF; + if (Shuffle->isReplicationMask(ReplicationFactor, VF)) + return TargetTTI->getReplicationShuffleCost( + VecSrcTy->getElementType(), ReplicationFactor, VF, + Shuffle->getShuffleMask(), CostKind); + return CostKind == TTI::TCK_RecipThroughput ? -1 : 1; } diff --git a/llvm/include/llvm/CodeGen/BasicTTIImpl.h b/llvm/include/llvm/CodeGen/BasicTTIImpl.h --- a/llvm/include/llvm/CodeGen/BasicTTIImpl.h +++ b/llvm/include/llvm/CodeGen/BasicTTIImpl.h @@ -1143,6 +1143,41 @@ return Cost; } + InstructionCost getReplicationShuffleCost(Type *EltTy, int ReplicationFactor, + int VF, ArrayRef Mask, + TTI::TargetCostKind CostKind) { + assert(Mask.size() == (unsigned)VF * ReplicationFactor && "Bad mask size."); + + APInt DemandedSrcElts = APInt::getNullValue(VF); + + ArrayRef RemainingMask = Mask; + for (int i = 0; i < VF; i++) { + ArrayRef CurrSubMask = RemainingMask.take_front(ReplicationFactor); + RemainingMask = RemainingMask.drop_front(CurrSubMask.size()); + + assert(all_of(CurrSubMask, + [i](int MaskElt) { + return MaskElt == UndefMaskElem || MaskElt == i; + }) && + "Not a replication mask."); + + if (any_of(CurrSubMask, + [](int MaskElt) { return MaskElt != UndefMaskElem; })) + DemandedSrcElts.setBit(i); + } + assert(RemainingMask.empty() && "Did not consume the entire mask?"); + + APInt DemandedReplicatedElts = APInt::getNullValue(Mask.size()); + for (auto I : enumerate(Mask)) { + if (I.value() != UndefMaskElem) + DemandedReplicatedElts.setBit(I.index()); + } + + return thisT()->getReplicationShuffleCost(EltTy, ReplicationFactor, VF, + DemandedSrcElts, + DemandedReplicatedElts, CostKind); + } + InstructionCost getMemoryOpCost(unsigned Opcode, Type *Src, MaybeAlign Alignment, unsigned AddressSpace, TTI::TargetCostKind CostKind, diff --git a/llvm/lib/Analysis/TargetTransformInfo.cpp b/llvm/lib/Analysis/TargetTransformInfo.cpp --- a/llvm/lib/Analysis/TargetTransformInfo.cpp +++ b/llvm/lib/Analysis/TargetTransformInfo.cpp @@ -833,6 +833,15 @@ assert(Cost >= 0 && "TTI should not produce negative costs!"); return Cost; } +InstructionCost TargetTransformInfo::getReplicationShuffleCost( + Type *EltTy, int ReplicationFactor, int VF, ArrayRef Mask, + TTI::TargetCostKind CostKind) { + InstructionCost Cost = TTIImpl->getReplicationShuffleCost( + EltTy, ReplicationFactor, VF, Mask, CostKind); + assert(Cost >= 0 && "TTI should not produce negative costs!"); + return Cost; +} + InstructionCost TargetTransformInfo::getMemoryOpCost( unsigned Opcode, Type *Src, Align Alignment, unsigned AddressSpace, TTI::TargetCostKind CostKind, const Instruction *I) const { diff --git a/llvm/test/Analysis/CostModel/X86/shuffle-replication-i8.ll b/llvm/test/Analysis/CostModel/X86/shuffle-replication-i8.ll --- a/llvm/test/Analysis/CostModel/X86/shuffle-replication-i8.ll +++ b/llvm/test/Analysis/CostModel/X86/shuffle-replication-i8.ll @@ -13,73 +13,73 @@ define void @replication_i8_stride2() nounwind { ; SSE2-LABEL: 'replication_i8_stride2' -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <4 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <8 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <16 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <32 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <64 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <128 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <256 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <4 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <8 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 46 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <16 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 93 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <32 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 186 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <64 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 372 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <128 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 744 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <256 x i32> ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; SSE3-LABEL: 'replication_i8_stride2' -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <4 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <8 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <16 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <32 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <64 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <128 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <256 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <4 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <8 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 46 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <16 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 93 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <32 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 186 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <64 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 372 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <128 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 744 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <256 x i32> ; SSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; SSSE3-LABEL: 'replication_i8_stride2' -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <4 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <8 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <16 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <32 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <64 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <128 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <256 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <4 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <8 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 46 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <16 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 93 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <32 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 186 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <64 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 372 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <128 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 744 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <256 x i32> ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; SSE41-LABEL: 'replication_i8_stride2' -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <4 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <8 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <16 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <32 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <64 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <128 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <256 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <4 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <8 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <16 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <32 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 96 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <64 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 192 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <128 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 384 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <256 x i32> ; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; SSE42-LABEL: 'replication_i8_stride2' -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <4 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <8 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <16 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <32 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <64 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <128 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <256 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <4 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <8 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <16 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <32 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 96 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <64 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 192 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <128 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 384 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <256 x i32> ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; AVX-LABEL: 'replication_i8_stride2' -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <4 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <8 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <16 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <32 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <64 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <128 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <256 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <4 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <8 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <16 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 50 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <32 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 116 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <64 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 232 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <128 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 464 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <256 x i32> ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; AVX512-LABEL: 'replication_i8_stride2' -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <4 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <8 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <16 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <32 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <64 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <128 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <256 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <4 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <8 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <16 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 50 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <32 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 116 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <64 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 248 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <128 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 496 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <256 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <4 x i32> @@ -94,73 +94,73 @@ define void @replication_i8_stride3() nounwind { ; SSE2-LABEL: 'replication_i8_stride3' -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <6 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <12 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <24 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <48 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <96 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <192 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <384 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <6 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 34 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <12 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 69 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <24 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 139 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <48 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 278 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <96 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 556 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <192 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 1112 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <384 x i32> ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; SSE3-LABEL: 'replication_i8_stride3' -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <6 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <12 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <24 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <48 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <96 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <192 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <384 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <6 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 34 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <12 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 69 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <24 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 139 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <48 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 278 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <96 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 556 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <192 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 1112 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <384 x i32> ; SSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; SSSE3-LABEL: 'replication_i8_stride3' -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <6 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <12 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <24 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <48 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <96 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <192 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <384 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <6 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 34 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <12 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 69 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <24 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 139 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <48 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 278 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <96 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 556 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <192 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 1112 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <384 x i32> ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; SSE41-LABEL: 'replication_i8_stride3' -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <6 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <12 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <24 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <48 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <96 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <192 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <384 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <6 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <12 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <24 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <48 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <96 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 256 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <192 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 512 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <384 x i32> ; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; SSE42-LABEL: 'replication_i8_stride3' -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <6 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <12 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <24 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <48 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <96 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <192 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <384 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <6 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <12 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <24 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <48 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <96 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 256 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <192 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 512 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <384 x i32> ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; AVX-LABEL: 'replication_i8_stride3' -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <6 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <12 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <24 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <48 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <96 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <192 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <384 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <6 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <12 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 35 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <24 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 67 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <48 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 150 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <96 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 300 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <192 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 600 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <384 x i32> ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; AVX512-LABEL: 'replication_i8_stride3' -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <6 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <12 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <24 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <48 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <96 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <192 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <384 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <6 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <12 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 35 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <24 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 67 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <48 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 150 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <96 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 316 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <192 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 632 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <384 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <6 x i32> @@ -175,73 +175,73 @@ define void @replication_i8_stride4() nounwind { ; SSE2-LABEL: 'replication_i8_stride4' -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <8 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <16 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <32 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <64 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <128 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <256 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <512 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <8 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 38 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <16 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 77 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <32 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 155 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <64 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 310 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <128 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 620 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <256 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 1240 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <512 x i32> ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; SSE3-LABEL: 'replication_i8_stride4' -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <8 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <16 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <32 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <64 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <128 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <256 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <512 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <8 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 38 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <16 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 77 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <32 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 155 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <64 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 310 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <128 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 620 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <256 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 1240 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <512 x i32> ; SSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; SSSE3-LABEL: 'replication_i8_stride4' -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <8 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <16 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <32 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <64 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <128 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <256 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <512 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <8 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 38 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <16 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 77 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <32 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 155 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <64 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 310 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <128 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 620 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <256 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 1240 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <512 x i32> ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; SSE41-LABEL: 'replication_i8_stride4' -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <8 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <16 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <32 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <64 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <128 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <256 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <512 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <8 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <16 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <32 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <64 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <128 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <256 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 640 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <512 x i32> ; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; SSE42-LABEL: 'replication_i8_stride4' -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <8 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <16 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <32 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <64 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <128 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <256 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <512 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <8 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <16 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <32 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <64 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 160 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <128 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <256 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 640 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <512 x i32> ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; AVX-LABEL: 'replication_i8_stride4' -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <8 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <16 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <32 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <64 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <128 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <256 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <512 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <8 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <16 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 42 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <32 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 84 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <64 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 184 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <128 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 368 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <256 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 736 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <512 x i32> ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; AVX512-LABEL: 'replication_i8_stride4' -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <8 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <16 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <32 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <64 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <128 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <256 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <512 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <8 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <16 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 42 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <32 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 84 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <64 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 184 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <128 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 384 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <256 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 768 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <512 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <8 x i32> @@ -256,73 +256,73 @@ define void @replication_i8_stride5() nounwind { ; SSE2-LABEL: 'replication_i8_stride5' -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <10 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <20 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <40 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <80 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <160 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <320 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <640 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <10 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 57 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <20 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 115 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <40 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 231 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <80 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 462 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <160 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 924 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <320 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 1848 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <640 x i32> ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; SSE3-LABEL: 'replication_i8_stride5' -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <10 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <20 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <40 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <80 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <160 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <320 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <640 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <10 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 57 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <20 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 115 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <40 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 231 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <80 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 462 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <160 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 924 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <320 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 1848 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <640 x i32> ; SSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; SSSE3-LABEL: 'replication_i8_stride5' -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <10 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <20 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <40 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <80 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <160 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <320 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <640 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <10 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 57 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <20 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 115 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <40 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 231 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <80 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 462 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <160 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 924 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <320 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 1848 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <640 x i32> ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; SSE41-LABEL: 'replication_i8_stride5' -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <10 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <20 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <40 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <80 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <160 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <320 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <640 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <10 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <20 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <40 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 96 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <80 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 192 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <160 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 384 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <320 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 768 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <640 x i32> ; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; SSE42-LABEL: 'replication_i8_stride5' -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <10 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <20 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <40 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <80 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <160 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <320 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <640 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <10 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <20 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <40 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 96 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <80 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 192 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <160 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 384 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <320 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 768 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <640 x i32> ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; AVX-LABEL: 'replication_i8_stride5' -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <10 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <20 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <40 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <80 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <160 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <320 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <640 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <10 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <20 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 51 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <40 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 101 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <80 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 218 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <160 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 436 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <320 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 872 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <640 x i32> ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; AVX512-LABEL: 'replication_i8_stride5' -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <10 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <20 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <40 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <80 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <160 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <320 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <640 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <10 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <20 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 52 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <40 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 101 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <80 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 218 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <160 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 452 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <320 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 904 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <640 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <10 x i32> @@ -337,73 +337,73 @@ define void @replication_i8_stride6() nounwind { ; SSE2-LABEL: 'replication_i8_stride6' -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <12 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <24 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <48 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <96 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <192 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <384 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <768 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <12 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 61 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <24 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 123 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <48 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 247 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <96 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 494 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <192 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 988 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <384 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 1976 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <768 x i32> ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; SSE3-LABEL: 'replication_i8_stride6' -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <12 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <24 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <48 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <96 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <192 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <384 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <768 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <12 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 61 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <24 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 123 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <48 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 247 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <96 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 494 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <192 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 988 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <384 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 1976 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <768 x i32> ; SSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; SSSE3-LABEL: 'replication_i8_stride6' -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <12 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <24 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <48 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <96 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <192 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <384 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <768 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <12 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 61 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <24 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 123 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <48 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 247 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <96 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 494 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <192 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 988 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <384 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 1976 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <768 x i32> ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; SSE41-LABEL: 'replication_i8_stride6' -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <12 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <24 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <48 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <96 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <192 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <384 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <768 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <12 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <24 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <48 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 112 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <96 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 224 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <192 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 448 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <384 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 896 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <768 x i32> ; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; SSE42-LABEL: 'replication_i8_stride6' -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <12 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <24 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <48 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <96 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <192 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <384 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <768 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <12 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <24 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <48 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 112 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <96 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 224 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <192 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 448 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <384 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 896 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <768 x i32> ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; AVX-LABEL: 'replication_i8_stride6' -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <12 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <24 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <48 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <96 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <192 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <384 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <768 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <12 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 31 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <24 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 59 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <48 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 118 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <96 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 252 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <192 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 504 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <384 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 1008 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <768 x i32> ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; AVX512-LABEL: 'replication_i8_stride6' -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <12 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <24 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <48 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <96 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <192 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <384 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <768 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <12 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 31 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <24 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 59 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <48 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 118 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <96 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 252 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <192 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 520 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <384 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 1040 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <768 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <12 x i32> @@ -418,73 +418,73 @@ define void @replication_i8_stride7() nounwind { ; SSE2-LABEL: 'replication_i8_stride7' -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <14 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <28 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <56 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <112 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <224 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <448 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <896 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <14 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 65 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <28 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 131 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <56 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 263 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <112 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 526 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <224 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 1052 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <448 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 2104 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <896 x i32> ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; SSE3-LABEL: 'replication_i8_stride7' -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <14 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <28 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <56 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <112 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <224 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <448 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <896 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <14 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 65 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <28 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 131 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <56 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 263 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <112 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 526 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <224 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 1052 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <448 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 2104 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <896 x i32> ; SSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; SSSE3-LABEL: 'replication_i8_stride7' -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <14 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <28 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <56 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <112 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <224 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <448 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <896 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <14 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 65 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <28 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 131 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <56 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 263 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <112 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 526 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <224 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 1052 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <448 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 2104 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <896 x i32> ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; SSE41-LABEL: 'replication_i8_stride7' -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <14 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <28 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <56 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <112 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <224 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <448 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <896 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <14 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <28 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <56 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <112 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 256 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <224 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 512 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <448 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 1024 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <896 x i32> ; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; SSE42-LABEL: 'replication_i8_stride7' -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <14 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <28 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <56 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <112 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <224 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <448 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <896 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <14 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <28 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <56 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <112 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 256 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <224 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 512 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <448 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 1024 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <896 x i32> ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; AVX-LABEL: 'replication_i8_stride7' -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <14 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <28 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <56 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <112 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <224 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <448 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <896 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <14 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 35 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <28 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 69 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <56 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 135 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <112 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 286 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <224 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 572 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <448 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 1144 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <896 x i32> ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; AVX512-LABEL: 'replication_i8_stride7' -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <14 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <28 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <56 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <112 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <224 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <448 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <896 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <14 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 35 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <28 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 69 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <56 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 135 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <112 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 286 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <224 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 588 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <448 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 1176 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <896 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <14 x i32> @@ -499,73 +499,73 @@ define void @replication_i8_stride8() nounwind { ; SSE2-LABEL: 'replication_i8_stride8' -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <16 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <32 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <64 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <128 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <256 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <512 x i32> -; SSE2-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <1024 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 34 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <16 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 69 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <32 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 139 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <64 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 279 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <128 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 558 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <256 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 1116 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <512 x i32> +; SSE2-NEXT: Cost Model: Found an estimated cost of 2232 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <1024 x i32> ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; SSE3-LABEL: 'replication_i8_stride8' -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <16 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <32 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <64 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <128 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <256 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <512 x i32> -; SSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <1024 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 34 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <16 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 69 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <32 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 139 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <64 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 279 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <128 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 558 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <256 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 1116 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <512 x i32> +; SSE3-NEXT: Cost Model: Found an estimated cost of 2232 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <1024 x i32> ; SSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; SSSE3-LABEL: 'replication_i8_stride8' -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <16 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <32 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <64 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <128 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <256 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <512 x i32> -; SSSE3-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <1024 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 34 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <16 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 69 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <32 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 139 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <64 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 279 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <128 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 558 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <256 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 1116 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <512 x i32> +; SSSE3-NEXT: Cost Model: Found an estimated cost of 2232 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <1024 x i32> ; SSSE3-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; SSE41-LABEL: 'replication_i8_stride8' -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <16 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <32 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <64 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <128 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <256 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <512 x i32> -; SSE41-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <1024 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <16 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 36 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <32 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 72 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <64 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 144 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <128 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 288 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <256 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 576 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <512 x i32> +; SSE41-NEXT: Cost Model: Found an estimated cost of 1152 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <1024 x i32> ; SSE41-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; SSE42-LABEL: 'replication_i8_stride8' -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <16 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <32 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <64 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <128 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <256 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <512 x i32> -; SSE42-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <1024 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <16 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 36 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <32 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 72 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <64 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 144 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <128 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 288 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <256 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 576 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <512 x i32> +; SSE42-NEXT: Cost Model: Found an estimated cost of 1152 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <1024 x i32> ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; AVX-LABEL: 'replication_i8_stride8' -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <16 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <32 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <64 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <128 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <256 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <512 x i32> -; AVX-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <1024 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <16 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 38 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <32 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 76 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <64 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 152 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <128 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <256 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 640 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <512 x i32> +; AVX-NEXT: Cost Model: Found an estimated cost of 1280 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <1024 x i32> ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; ; AVX512-LABEL: 'replication_i8_stride8' -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <16 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <32 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <64 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <128 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <256 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <512 x i32> -; AVX512-NEXT: Cost Model: Found an estimated cost of -1 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <1024 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <16 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 38 for instruction: %vf4 = shufflevector <4 x i8> undef, <4 x i8> poison, <32 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 76 for instruction: %vf8 = shufflevector <8 x i8> undef, <8 x i8> poison, <64 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 152 for instruction: %vf16 = shufflevector <16 x i8> undef, <16 x i8> poison, <128 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %vf32 = shufflevector <32 x i8> undef, <32 x i8> poison, <256 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 656 for instruction: %vf64 = shufflevector <64 x i8> undef, <64 x i8> poison, <512 x i32> +; AVX512-NEXT: Cost Model: Found an estimated cost of 1312 for instruction: %vf128 = shufflevector <128 x i8> undef, <128 x i8> poison, <1024 x i32> ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void ; %vf2 = shufflevector <2 x i8> undef, <2 x i8> poison, <16 x i32>