[Vectorize] Fix a warning

This patch fixes:

  llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp:1865:17: error:
  unused variable 'Preds' [-Werror,-Wunused-variable]
This commit is contained in:
Kazu Hirata 2025-05-31 14:40:19 -07:00
parent 061ef3c6e2
commit c0bf51e3ad

View File

@ -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.