diff options
author | Alexey Bataev <a.bataev@outlook.com> | 2025-04-16 06:20:34 -0700 |
---|---|---|
committer | Alexey Bataev <a.bataev@outlook.com> | 2025-04-16 06:23:44 -0700 |
commit | af28c9c65a23806a09d7929792df5ed2e9bdf946 (patch) | |
tree | 7b1073352854bd3114e79a45db21e845a870071f /llvm/lib | |
parent | d3153ad66c539ad146062b6e65741901e5b5e1cc (diff) | |
download | llvm-af28c9c65a23806a09d7929792df5ed2e9bdf946.zip llvm-af28c9c65a23806a09d7929792df5ed2e9bdf946.tar.gz llvm-af28c9c65a23806a09d7929792df5ed2e9bdf946.tar.bz2 |
[SLP]Do not reorder split node operand with reuses, if not possible
Need to check if the operand node of the split vectorize node has reuses
and check if it is possible to build the order for this node to reorder
it correctly.
Fixes #135912
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp index f9acc27..f973861 100644 --- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp +++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp @@ -7479,8 +7479,8 @@ void BoUpSLP::reorderBottomToTop(bool IgnoreReorder) { for (const auto &P : Data.first->CombinedEntriesWithIndices) { TreeEntry &OpTE = *VectorizableTree[P.first].get(); OrdersType Order = OpTE.ReorderIndices; - if (Order.empty()) { - if (!OpTE.isGather()) + if (Order.empty() || !OpTE.ReuseShuffleIndices.empty()) { + if (!OpTE.isGather() && OpTE.ReuseShuffleIndices.empty()) continue; const auto BestOrder = getReorderingData(OpTE, /*TopToBottom=*/false, IgnoreReorder); |