diff options
| author | Kazu Hirata <kazu@google.com> | 2025-05-31 14:40:19 -0700 |
|---|---|---|
| committer | Kazu Hirata <kazu@google.com> | 2025-05-31 14:40:19 -0700 |
| commit | c0bf51e3ad8e3785a4e44686dc17217c645fa8b4 (patch) | |
| tree | 723a643473292cbec2c320aa19f52906b25e25a1 | |
| parent | 061ef3c6e22722c31986182e14a5b9c0a117c661 (diff) | |
[Vectorize] Fix a warning
This patch fixes:
llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp:1865:17: error:
unused variable 'Preds' [-Werror,-Wunused-variable]
| -rw-r--r-- | llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp | 3 |
1 files changed, 1 insertions, 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<VPBasicBlock>(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. |
