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

Ryan Buchner via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 11 12:54:19 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
----------------
bababuck wrote:

Thanks for the catch, this is meant to come after #220014. The test case is still evading me for that :/

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


More information about the llvm-commits mailing list