[WebAssembly] Set unreachable as canonical to permit disassembly
authorDominic Chen <d.c.ddcc@gmail.com>
Thu, 10 Sep 2020 05:02:13 +0000 (01:02 -0400)
committerDominic Chen <d.c.ddcc@gmail.com>
Thu, 10 Sep 2020 19:04:16 +0000 (15:04 -0400)
commit4252f3009b169db250559d6a197b399375f89b27
tree39d4aedfce4d7048ff360866e406688b5c6492db
parent54fcea86b1658f5fc70f4f1e7a763f87742d79bc
[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
llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td