[llvm] [SLP][NFC] Remove unused local variable in lambda (PR #156835)

Garth Lei via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 4 02:27:32 PDT 2025


https://github.com/garthlei created https://github.com/llvm/llvm-project/pull/156835

None

>From 706476748949d14c03ff72963426c1a0e368f65f Mon Sep 17 00:00:00 2001
From: Bohan Lei <garthlei at linux.alibaba.com>
Date: Thu, 4 Sep 2025 16:54:40 +0800
Subject: [PATCH] [SLP][NFC] Remove unused local variable in lambda

---
 llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index 0929f04df49e4..8f16a688fdf4f 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -11271,9 +11271,6 @@ void BoUpSLP::buildTreeRec(ArrayRef<Value *> VLRef, unsigned Depth,
     if (!canBuildSplitNode(VL, LocalState, Op1, Op2, ReorderIndices))
       return false;
 
-    SmallVector<Value *> NewVL(VL.size());
-    copy(Op1, NewVL.begin());
-    copy(Op2, std::next(NewVL.begin(), Op1.size()));
     auto Invalid = ScheduleBundle::invalid();
     auto *TE = newTreeEntry(VL, TreeEntry::SplitVectorize, Invalid, LocalState,
                             UserTreeIdx, {}, ReorderIndices);



More information about the llvm-commits mailing list