From c0bf51e3ad8e3785a4e44686dc17217c645fa8b4 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 31 May 2025 14:40:19 -0700 Subject: [PATCH] [Vectorize] Fix a warning This patch fixes: llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp:1865:17: error: unused variable 'Preds' [-Werror,-Wunused-variable] --- llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp index 5c8849be3d23..6ee7df5dd987 100644 --- a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp +++ b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp @@ -1862,8 +1862,7 @@ static void removeBranchOnConst(VPlan &Plan) { VPBasicBlock *RemovedSucc = cast(VPBB->getSuccessors()[RemovedIdx]); - const auto &Preds = RemovedSucc->getPredecessors(); - assert(count(Preds, VPBB) == 1 && + assert(count(RemovedSucc->getPredecessors(), VPBB) == 1 && "There must be a single edge between VPBB and its successor"); // Values coming from VPBB into phi recipes of RemoveSucc are removed from // these recipes.