diff options
| author | Clement Courbet <courbet@google.com> | 2018-09-25 13:59:35 +0000 |
|---|---|---|
| committer | Clement Courbet <courbet@google.com> | 2018-09-25 13:59:35 +0000 |
| commit | 86baebc5fdfebb1fe62d2180bbbfa57edbd016d1 (patch) | |
| tree | 74d4543bec644abee958a3ffa87dff703a090b9f /llvm/tools | |
| parent | d041f8a9d0a23c9b4c03088dd650c651c8e7caf1 (diff) | |
| download | bcm5719-llvm-86baebc5fdfebb1fe62d2180bbbfa57edbd016d1.tar.gz bcm5719-llvm-86baebc5fdfebb1fe62d2180bbbfa57edbd016d1.zip | |
[llvm-exegesis] Add lit tests (v2).
Summary: This revisits rL342953 by adding detection of host support.
Reviewers: gchatelet, lebedev.ri, alexshap
Subscribers: mgorny, tschuett, llvm-commits
Differential Revision: https://reviews.llvm.org/D52464
llvm-svn: 342975
Diffstat (limited to 'llvm/tools')
| -rw-r--r-- | llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp b/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp index 1536e8a5624..c2e57819bb4 100644 --- a/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp +++ b/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp @@ -35,6 +35,8 @@ BenchmarkRunner::~BenchmarkRunner() = default; // code. static std::vector<llvm::MCInst> GenerateInstructions(const BenchmarkCode &BC, const size_t MinInstructions) { + if (BC.Instructions.empty()) + return {}; std::vector<llvm::MCInst> Code = BC.Instructions; for (int I = 0; Code.size() < MinInstructions; ++I) Code.push_back(BC.Instructions[I % BC.Instructions.size()]); @@ -53,10 +55,6 @@ BenchmarkRunner::runConfiguration(const BenchmarkCode &BC, InstrBenchmark.Info = BC.Info; const std::vector<llvm::MCInst> &Instructions = BC.Instructions; - if (Instructions.empty()) { - InstrBenchmark.Error = "Empty snippet"; - return InstrBenchmark; - } InstrBenchmark.Key.Instructions = Instructions; |

