[llvm-exegesis] Fix off by one error
authorGuillaume Chatelet <gchatelet@google.com>
Thu, 18 Oct 2018 08:20:50 +0000 (08:20 +0000)
committerGuillaume Chatelet <gchatelet@google.com>
Thu, 18 Oct 2018 08:20:50 +0000 (08:20 +0000)
llvm-svn: 344731

llvm/tools/llvm-exegesis/llvm-exegesis.cpp

index 39044d4..bbc1c9b 100644 (file)
@@ -118,7 +118,7 @@ getOpcodesOrDie(const llvm::MCInstrInfo &MCInstrInfo) {
     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;
   }