[PATCH] D49391: [WebAssembly] Add missing -mattr=+exception-handling guards

Heejin Ahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 18 14:47:32 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL337425: [WebAssembly] Add missing -mattr=+exception-handling guards (authored by aheejin, committed by ).

Repository:
  rL LLVM

https://reviews.llvm.org/D49391

Files:
  llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrControl.td
  llvm/trunk/test/CodeGen/WebAssembly/exception.ll


Index: llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrControl.td
===================================================================
--- llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrControl.td
+++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrControl.td
@@ -140,6 +140,8 @@
 // Exception handling instructions
 //===----------------------------------------------------------------------===//
 
+let Predicates = [HasExceptionHandling] in {
+
 // Throwing an exception: throw / rethrow
 let isTerminator = 1, hasCtrlDep = 1, isBarrier = 1 in {
 defm THROW_I32 : I<(outs), (ins i32imm:$tag, I32:$val),
@@ -187,5 +189,6 @@
   defm CATCHRET : NRI<(outs), (ins bb_op:$dst, bb_op:$from),
                    [(catchret bb:$dst, bb:$from)], "", 0>;
 }
+}
 
 } // Defs = [ARGUMENTS]
Index: llvm/trunk/test/CodeGen/WebAssembly/exception.ll
===================================================================
--- llvm/trunk/test/CodeGen/WebAssembly/exception.ll
+++ llvm/trunk/test/CodeGen/WebAssembly/exception.ll
@@ -1,4 +1,5 @@
-; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -exception-model=wasm | FileCheck -allow-deprecated-dag-overlap %s
+; RUN: not llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -exception-model=wasm
+; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -exception-model=wasm -mattr=+exception-handling | FileCheck -allow-deprecated-dag-overlap %s
 
 target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
 target triple = "wasm32-unknown-unknown"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49391.156154.patch
Type: text/x-patch
Size: 1539 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180718/a1d20101/attachment.bin>


More information about the llvm-commits mailing list