[PATCH] D90289: [llvm-exegesis] Do not silently fail on unknown instruction encoding formats.
Clement Courbet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 28 01:30:03 PDT 2020
courbet created this revision.
courbet added a reviewer: gchatelet.
Herald added a subscriber: mstojanovic.
Herald added a project: LLVM.
courbet requested review of this revision.
The addition of TILELOADD instructions with a new encoding format
triggered a hard abort instead of proper error reporting due to the use
of `llvm_unreachable` for actually reachable code.
Properly report an error when the encoding format is unknown.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D90289
Files:
llvm/tools/llvm-exegesis/lib/X86/Target.cpp
Index: llvm/tools/llvm-exegesis/lib/X86/Target.cpp
===================================================================
--- llvm/tools/llvm-exegesis/lib/X86/Target.cpp
+++ llvm/tools/llvm-exegesis/lib/X86/Target.cpp
@@ -53,7 +53,7 @@
static const char *isInvalidMemoryInstr(const Instruction &Instr) {
switch (Instr.Description.TSFlags & X86II::FormMask) {
default:
- llvm_unreachable("Unknown FormMask value");
+ return "Unknown FormMask value";
// These have no memory access.
case X86II::Pseudo:
case X86II::RawFrm:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90289.301196.patch
Type: text/x-patch
Size: 540 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201028/4c7a33c7/attachment.bin>
More information about the llvm-commits
mailing list