mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
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:
parent
38f72d04ea
commit
ea8e85d925
@ -244,13 +244,7 @@ Value *PHITransAddr::PHITranslateSubExpr(Value *V, BasicBlock *CurBB,
|
|||||||
GEPI->getNumOperands() == GEPOps.size() &&
|
GEPI->getNumOperands() == GEPOps.size() &&
|
||||||
GEPI->getParent()->getParent() == CurBB->getParent() &&
|
GEPI->getParent()->getParent() == CurBB->getParent() &&
|
||||||
(!DT || DT->dominates(GEPI->getParent(), PredBB))) {
|
(!DT || DT->dominates(GEPI->getParent(), PredBB))) {
|
||||||
bool Mismatch = false;
|
if (std::equal(GEPOps.begin(), GEPOps.end(), GEPI->op_begin()))
|
||||||
for (unsigned i = 0, e = GEPOps.size(); i != e; ++i)
|
|
||||||
if (GEPI->getOperand(i) != GEPOps[i]) {
|
|
||||||
Mismatch = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (!Mismatch)
|
|
||||||
return GEPI;
|
return GEPI;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user