[llvm] [SLP]Reduce number of alternate instruction, where possible (PR #123360)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 30 07:27:40 PST 2025
================
@@ -9797,6 +10119,13 @@ void BoUpSLP::transformNodes() {
reorderGatherNode(E);
}
+ bool ForceLoadGather =
+ count_if(VectorizableTree, [](const std::unique_ptr<TreeEntry> &TE) {
+ return TE->isGather() && TE->hasState() &&
+ TE->getOpcode() == Instruction::Load &&
+ TE->getVectorFactor() < 16;
----------------
alexey-bataev wrote:
That's a simple estimation. If there is only 2 gather nodes with loads and they have 8 or less instructions, better to try to analyze all loads together rather than check them separately. It may allow better vectorization.
https://github.com/llvm/llvm-project/pull/123360
More information about the llvm-commits
mailing list