mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
Replace some explicit compare loops with std::equal.
No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160501 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ee649839a2
commit
b26e2916c9
@ -4681,13 +4681,7 @@ SDVTList SelectionDAG::getVTList(const EVT *VTs, unsigned NumVTs) {
|
||||
if (I->NumVTs != NumVTs || VTs[0] != I->VTs[0] || VTs[1] != I->VTs[1])
|
||||
continue;
|
||||
|
||||
bool NoMatch = false;
|
||||
for (unsigned i = 2; i != NumVTs; ++i)
|
||||
if (VTs[i] != I->VTs[i]) {
|
||||
NoMatch = true;
|
||||
break;
|
||||
}
|
||||
if (!NoMatch)
|
||||
if (std::equal(&VTs[2], &VTs[NumVTs], &I->VTs[2]))
|
||||
return *I;
|
||||
}
|
||||
|
||||
|
@ -245,10 +245,7 @@ static bool IsPrefix(const ArgPromotion::IndicesVector &Prefix,
|
||||
const ArgPromotion::IndicesVector &Longer) {
|
||||
if (Prefix.size() > Longer.size())
|
||||
return false;
|
||||
for (unsigned i = 0, e = Prefix.size(); i != e; ++i)
|
||||
if (Prefix[i] != Longer[i])
|
||||
return false;
|
||||
return true;
|
||||
return std::equal(Prefix.begin(), Prefix.end(), Longer.begin());
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user