[WebAssembly] Set unreachable as canonical to permit disassembly

Currently, using llvm-objdump to disassemble a function containing
unreachable will trigger an assertion while decoding the opcode, since both
unreachable and debug_unreachable have the same encoding. To avoid this, set
unreachable as the canonical decoding.

Differential Revision: https://reviews.llvm.org/D87431
This commit is contained in:
Dominic Chen 2020-09-10 01:02:13 -04:00
parent 54fcea86b1
commit 4252f3009b
No known key found for this signature in database
GPG Key ID: 7661C15B1B8EC438
1 changed files with 1 additions and 1 deletions

View File

@ -103,7 +103,7 @@ defm FALLTHROUGH_RETURN : I<(outs), (ins variable_ops), (outs), (ins), []>;
} // isReturn = 1
let isTrap = 1 in
let IsCanonical = 1, isTrap = 1 in
defm UNREACHABLE : NRI<(outs), (ins), [(trap)], "unreachable", 0x00>;
} // isTerminator = 1