Skip to content

Commit

Permalink
[llvm-exegesis] Do not silently fail on unknown instruction encoding …
Browse files Browse the repository at this point in the history
…formats.

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.

Differential Revision: https://reviews.llvm.org/D90289
  • Loading branch information
legrosbuffle committed Oct 28, 2020
1 parent 5ef8468 commit 7e2ffe7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/tools/llvm-exegesis/lib/X86/Target.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static cl::opt<unsigned> LbrSamplingPeriod(
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:
Expand Down

0 comments on commit 7e2ffe7

Please sign in to comment.