Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit ea8e85d

Browse files
committed
Replace loop with std::equal. NFC intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239430 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 38f72d0 commit ea8e85d

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

lib/Analysis/PHITransAddr.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -244,13 +244,7 @@ Value *PHITransAddr::PHITranslateSubExpr(Value *V, BasicBlock *CurBB,
244244
GEPI->getNumOperands() == GEPOps.size() &&
245245
GEPI->getParent()->getParent() == CurBB->getParent() &&
246246
(!DT || DT->dominates(GEPI->getParent(), PredBB))) {
247-
bool Mismatch = false;
248-
for (unsigned i = 0, e = GEPOps.size(); i != e; ++i)
249-
if (GEPI->getOperand(i) != GEPOps[i]) {
250-
Mismatch = true;
251-
break;
252-
}
253-
if (!Mismatch)
247+
if (std::equal(GEPOps.begin(), GEPOps.end(), GEPI->op_begin()))
254248
return GEPI;
255249
}
256250
}

0 commit comments

Comments
 (0)