From fc2931375d6ca8ab4d45cb820d91c7c88469f012 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Mon, 10 Sep 2018 10:45:04 +0000 Subject: [PATCH] [llvm-exegesis] Ignore double spaced separators in asm strings Some asm has double spaces between operands, the deserializer was keeping these empty split pieces, causing assertions later on: 'ADC16mi RDI i_0x1x i_0x0x i_0x1x' llvm-svn: 341799 --- llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp index 33ad65075d92..77adb2f1e38d 100644 --- a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp +++ b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp @@ -60,7 +60,7 @@ static llvm::StringRef deserialize(const exegesis::BenchmarkResultContext &Context, llvm::StringRef String, llvm::MCInst &Value) { llvm::SmallVector Pieces; - String.split(Pieces, " "); + String.split(Pieces, " ", /* MaxSplit */ -1, /* KeepEmpty */ false); if (Pieces.empty()) return "Invalid Instruction"; bool ProcessOpcode = true;