[PATCH] D81055: [WebAssembly] Lower llvm.debugtrap properly

Thomas Lively via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 3 17:07:52 PDT 2020


tlively added a comment.

In D81055#2072399 <https://reviews.llvm.org/D81055#2072399>, @dschuff wrote:

> Binaryen doesn't assume an `unreachable` is actually unreachable, the way C compilers do, does it? (and remove code before the unreachable)? I think it just knows that instructions that come after it are unreachable and removes those. I think it's ok once it's lowered to wasm unreachable; it really won't be able to return (and so Binaryen can do DCE), but that seems like a legit behavior for @llvm.debugtrap according to the langref.


Agreed.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81055/new/

https://reviews.llvm.org/D81055





More information about the llvm-commits mailing list