[llvm] [SLP] Create SLP trees starting from constant stride stores (PR #185964)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 1 03:26:39 PDT 2026
================
@@ -12586,6 +12607,18 @@ void BoUpSLP::buildTreeRec(ArrayRef<Value *> VLRef, unsigned Depth,
return;
}
case Instruction::Store: {
+ if (State == TreeEntry::StridedVectorize) {
+ TreeEntry *TE =
+ newTreeEntry(VL, TreeEntry::StridedVectorize, Bundle, S,
+ UserTreeIdx, ReuseShuffleIndices, CurrentOrder);
+ TreeEntryToStridedPtrInfoMap[TE] = SPtrInfo;
+ LLVM_DEBUG(
+ dbgs() << "SLP: added a new TreeEntry (strided StoreInst).\n";
+ TE->dump());
+ TE->setOperands(Operands);
+ buildTreeRec(TE->getOperand(0), Depth + 1, {TE, 0});
+ return;
+ }
bool Consecutive = CurrentOrder.empty();
if (!Consecutive)
fixupOrderingIndices(CurrentOrder);
----------------
alexey-bataev wrote:
Potentially, on reordering. But here is the tree building, so it should be in direct order. Worth trying to remove it and replace it with an assertion
https://github.com/llvm/llvm-project/pull/185964
More information about the llvm-commits
mailing list