[llvm] [SLP]Enable interleaved stores support (PR #115354)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 15 05:36:16 PST 2024
================
@@ -9759,6 +9759,29 @@ void BoUpSLP::transformNodes() {
// Strided store is more profitable than reverse + consecutive store -
// transform the node to strided store.
E.State = TreeEntry::StridedVectorize;
+ } else if (!E.ReorderIndices.empty()) {
+ // Check for interleaved stores.
+ auto IsInterleaveMask = [&, &TTI = *TTI](ArrayRef<int> Mask) {
+ assert(Mask.size() > 1 && "Expected mask greater than 1 element.");
+ if (Mask.size() < 4)
+ return 0u;
+ for (unsigned Factor : seq<unsigned>(2, Mask.size() / 2 + 1)) {
+ if (ShuffleVectorInst::isInterleaveMask(
----------------
RKSimon wrote:
Pull out repeated cast:
`auto *SclStore = cast<StoreInst>(E.Scalars.front());`
https://github.com/llvm/llvm-project/pull/115354
More information about the llvm-commits
mailing list