[PATCH] D14515: [WebAssembly] Support 'unreachable' expression

Dan Gohman via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 9 16:13:56 PST 2015


sunfish added inline comments.

================
Comment at: lib/Target/WebAssembly/WebAssemblyInstrControl.td:63
@@ -62,2 +62,3 @@
   def RETURN_VOID : I<(outs), (ins), [(WebAssemblyreturn)], "return">;
+  def UNREACHABLE : I<(outs), (ins), [(trap)], "unreachable">;
 } // isReturn = 1, isTerminator = 1, hasCtrlDep = 1, isBarrier = 1
----------------
Trap-like instructions are not considered "Return" instructions in the LLVM CodeGen sense, so we should rearrange the settings here so that UNREACHABLE is outside the isReturn = 1 block.


http://reviews.llvm.org/D14515





More information about the llvm-commits mailing list