[llvm] r344731 - [llvm-exegesis] Fix off by one error
Guillaume Chatelet via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 18 01:20:50 PDT 2018
Author: gchatelet
Date: Thu Oct 18 01:20:50 2018
New Revision: 344731
URL: http://llvm.org/viewvc/llvm-project?rev=344731&view=rev
Log:
[llvm-exegesis] Fix off by one error
Modified:
llvm/trunk/tools/llvm-exegesis/llvm-exegesis.cpp
Modified: llvm/trunk/tools/llvm-exegesis/llvm-exegesis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-exegesis/llvm-exegesis.cpp?rev=344731&r1=344730&r2=344731&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-exegesis/llvm-exegesis.cpp (original)
+++ llvm/trunk/tools/llvm-exegesis/llvm-exegesis.cpp Thu Oct 18 01:20:50 2018
@@ -118,7 +118,7 @@ getOpcodesOrDie(const llvm::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;
}
More information about the llvm-commits
mailing list