[llvm] [SLP][NFC] Extract VectorizableTree into own ForestTree class (PR #222805)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 11 06:20:01 PDT 2026


================
@@ -10298,8 +10439,8 @@ bool BoUpSLP::canBuildSplitNode(ArrayRef<Value *> VL,
         TTI->getArithmeticInstrCost(Opcode1, Op2VecTy, CostKind);
     InstructionCost NewCost =
         NewVecOpsCost + InsertCost +
-        (!VectorizableTree.empty() && getRootNode().hasState() &&
-                 getRootNode().getOpcode() == Instruction::Store
+        (FT && !FT->VectorizableTree.empty() && getRootNode(*FT).hasState() &&
+                 getRootNode(*FT).getOpcode() == Instruction::Store
----------------
alexey-bataev wrote:

Become not NFC, always pass FT, and as a reference

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


More information about the llvm-commits mailing list