[llvm] [SLP]Reduce number of alternate instruction, where possible (PR #123360)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 30 03:52:34 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;
----------------
RKSimon wrote:

Where does the 16 magic number come from?

https://github.com/llvm/llvm-project/pull/123360


More information about the llvm-commits mailing list