Replace loop with std::equal. NFC intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239430 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Benjamin Kramer 2015-06-09 20:41:21 +00:00
parent 38f72d04ea
commit ea8e85d925

View File

@ -244,13 +244,7 @@ Value *PHITransAddr::PHITranslateSubExpr(Value *V, BasicBlock *CurBB,
GEPI->getNumOperands() == GEPOps.size() &&
GEPI->getParent()->getParent() == CurBB->getParent() &&
(!DT || DT->dominates(GEPI->getParent(), PredBB))) {
bool Mismatch = false;
for (unsigned i = 0, e = GEPOps.size(); i != e; ++i)
if (GEPI->getOperand(i) != GEPOps[i]) {
Mismatch = true;
break;
}
if (!Mismatch)
if (std::equal(GEPOps.begin(), GEPOps.end(), GEPI->op_begin()))
return GEPI;
}
}