Skip to content

Commit 8876790

Browse files
[Scalar] Use llvm::count (NFC) (#141445)
1 parent f8f2e65 commit 8876790

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

llvm/lib/Transforms/Scalar/LoopInterchange.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1524,11 +1524,8 @@ static void updateSuccessor(BranchInst *BI, BasicBlock *OldBB,
15241524
BasicBlock *NewBB,
15251525
std::vector<DominatorTree::UpdateType> &DTUpdates,
15261526
bool MustUpdateOnce = true) {
1527-
assert((!MustUpdateOnce ||
1528-
llvm::count_if(successors(BI),
1529-
[OldBB](BasicBlock *BB) {
1530-
return BB == OldBB;
1531-
}) == 1) && "BI must jump to OldBB exactly once.");
1527+
assert((!MustUpdateOnce || llvm::count(successors(BI), OldBB) == 1) &&
1528+
"BI must jump to OldBB exactly once.");
15321529
bool Changed = false;
15331530
for (Use &Op : BI->operands())
15341531
if (Op == OldBB) {

0 commit comments

Comments
 (0)