diff options
Diffstat (limited to 'test/lit/passes')
-rw-r--r-- | test/lit/passes/emit-exnref.wast | 28 | ||||
-rw-r--r-- | test/lit/passes/experimental-new_eh.wast | 28 | ||||
-rw-r--r-- | test/lit/passes/translate-to-exnref.wast (renamed from test/lit/passes/translate-to-new-eh.wast) | 4 |
3 files changed, 30 insertions, 30 deletions
diff --git a/test/lit/passes/emit-exnref.wast b/test/lit/passes/emit-exnref.wast new file mode 100644 index 000000000..d203c2f10 --- /dev/null +++ b/test/lit/passes/emit-exnref.wast @@ -0,0 +1,28 @@ +;; When given alone, --emit-exnref just runs --translate-to-exnref +;; RUN: wasm-opt %s -all --translate-to-exnref -S -o %t1.wasm +;; RUN: wasm-opt %s -all --emit-exnref -S -o %t2.wasm +;; RUN: diff %t1.wasm %t2.wasm + +;; When given with other flags, --emit-exnref runs the translator after running +;; other passes. If --optimize-level >=3, --experimenal-new-eh also runs StackIR +;; (+ local2stack) optimization. So running '-O --emit-exnref' should be the +;; same as running all these passes separately. +;; RUN: wasm-opt %s -all -O --translate-to-exnref --optimize-level=3 --generate-stack-ir --optimize-stack-ir -o %t1.wasm +;; RUN: wasm-opt %s -all -O --emit-exnref -o %t2.wasm +;; RUN: diff %t1.wasm %t2.wasm + +(module + (import "env" "foo" (func $foo)) + (start $test) + (func $test + (try $l + (do + (call $foo) + ) + (catch_all + (call $foo) + (rethrow $l) + ) + ) + ) +) diff --git a/test/lit/passes/experimental-new_eh.wast b/test/lit/passes/experimental-new_eh.wast deleted file mode 100644 index 9ef847e58..000000000 --- a/test/lit/passes/experimental-new_eh.wast +++ /dev/null @@ -1,28 +0,0 @@ -;; When given alone, --experimental-new-eh just runs --translate-to-new-eh -;; RUN: wasm-opt %s -all --translate-to-new-eh -S -o %t1.wasm -;; RUN: wasm-opt %s -all --experimental-new-eh -S -o %t2.wasm -;; RUN: diff %t1.wasm %t2.wasm - -;; When given with other flags, --experimental-new-eh runs the translator after -;; running other passes. If --optimize-level >=3, --experimenal-new-eh also runs -;; StackIR (+ local2stack) optimization. So running '-O --experimental-new-eh' -;; should be the same as running all these passes separately. -;; RUN: wasm-opt %s -all -O --translate-to-new-eh --optimize-level=3 --generate-stack-ir --optimize-stack-ir -o %t1.wasm -;; RUN: wasm-opt %s -all -O --experimental-new-eh -o %t2.wasm -;; RUN: diff %t1.wasm %t2.wasm - -(module - (import "env" "foo" (func $foo)) - (start $test) - (func $test - (try $l - (do - (call $foo) - ) - (catch_all - (call $foo) - (rethrow $l) - ) - ) - ) -) diff --git a/test/lit/passes/translate-to-new-eh.wast b/test/lit/passes/translate-to-exnref.wast index 10de158d4..abba6b06e 100644 --- a/test/lit/passes/translate-to-new-eh.wast +++ b/test/lit/passes/translate-to-exnref.wast @@ -1,6 +1,6 @@ ;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. -;; RUN: wasm-opt %s -all --translate-to-new-eh -S -o - | filecheck %s -;; RUN: wasm-opt %s -all --translate-to-new-eh -S -o %t +;; RUN: wasm-opt %s -all --translate-to-exnref -S -o - | filecheck %s +;; RUN: wasm-opt %s -all --translate-to-exnref -S -o %t ;; RUN: wasm-opt %t -all --optimize-level=3 --generate-stack-ir --optimize-stack-ir --print-stack-ir | filecheck %s --check-prefix STACKIR-OPT (module |