[llvm-exegesis] Fix off by one error
llvm-svn: 344731
diff --git a/llvm/tools/llvm-exegesis/llvm-exegesis.cpp b/llvm/tools/llvm-exegesis/llvm-exegesis.cpp
index 39044d4..bbc1c9b 100644
--- a/llvm/tools/llvm-exegesis/llvm-exegesis.cpp
+++ b/llvm/tools/llvm-exegesis/llvm-exegesis.cpp
@@ -118,7 +118,7 @@
return {static_cast<unsigned>(OpcodeIndex)};
if (OpcodeIndex < 0) {
std::vector<unsigned> Result;
- for (unsigned I = 1, E = MCInstrInfo.getNumOpcodes(); I <= E; ++I)
+ for (unsigned I = 1, E = MCInstrInfo.getNumOpcodes(); I < E; ++I)
Result.push_back(I);
return Result;
}