[PATCH] D94045: [WebAssembly] Ensure terminate pads are a single BB

Thomas Lively via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 7 10:15:02 PST 2021


tlively added inline comments.


================
Comment at: llvm/test/CodeGen/WebAssembly/exception.ll:224
+; CHECK:      catch     $[[EXN:[0-9]+]]=, __cpp_exception
+; CHECK-NEXT: global.set  __stack_pointer
+; CHECK-NEXT: call  __clang_call_terminate, $[[EXN]]
----------------
Where does this `global.set` come from? If I understand the code correctly, the `call __clang_call_terminate` should have been directly after the `catch`.


================
Comment at: llvm/test/CodeGen/WebAssembly/exception.ll:238
+terminate.split2:
+  unreachable
+}
----------------
Is it possible for `call __clang_call_terminate` to have been duplicated as well so that it could appear in this basic block as well? If so, I don't think the code in this diff would handle deduplicating it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94045



More information about the llvm-commits mailing list