[X86] Use range-based for loops. NFC

llvm-svn: 254387
This commit is contained in:
Craig Topper 2015-12-01 06:13:15 +00:00
parent ba894c3c0d
commit 271f9ded44
1 changed files with 6 additions and 6 deletions

View File

@ -6715,16 +6715,16 @@ static const uint16_t ReplaceableInstrsAVX2[][3] = {
// domains, but they require a bit more work than just switching opcodes.
static const uint16_t *lookup(unsigned opcode, unsigned domain) {
for (unsigned i = 0, e = array_lengthof(ReplaceableInstrs); i != e; ++i)
if (ReplaceableInstrs[i][domain-1] == opcode)
return ReplaceableInstrs[i];
for (const uint16_t (&Row)[3] : ReplaceableInstrs)
if (Row[domain-1] == opcode)
return Row;
return nullptr;
}
static const uint16_t *lookupAVX2(unsigned opcode, unsigned domain) {
for (unsigned i = 0, e = array_lengthof(ReplaceableInstrsAVX2); i != e; ++i)
if (ReplaceableInstrsAVX2[i][domain-1] == opcode)
return ReplaceableInstrsAVX2[i];
for (const uint16_t (&Row)[3] : ReplaceableInstrsAVX2)
if (Row[domain-1] == opcode)
return Row;
return nullptr;
}