diff options
author | Craig Topper <craig.topper@gmail.com> | 2015-12-01 06:13:15 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2015-12-01 06:13:15 +0000 |
commit | 271f9ded449cdb31152db41f3de5c72bd23e96b6 (patch) | |
tree | 1eec6ab5b57bb7c50e56c518226bc2c4bc4b0708 | |
parent | ba894c3c0d769cb3de7ec861616b6ae92e366b02 (diff) | |
download | bcm5719-llvm-271f9ded449cdb31152db41f3de5c72bd23e96b6.tar.gz bcm5719-llvm-271f9ded449cdb31152db41f3de5c72bd23e96b6.zip |
[X86] Use range-based for loops. NFC
llvm-svn: 254387
-rw-r--r-- | llvm/lib/Target/X86/X86InstrInfo.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Target/X86/X86InstrInfo.cpp b/llvm/lib/Target/X86/X86InstrInfo.cpp index 04b68cd509f..12da3a9319e 100644 --- a/llvm/lib/Target/X86/X86InstrInfo.cpp +++ b/llvm/lib/Target/X86/X86InstrInfo.cpp @@ -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; } |