summaryrefslogtreecommitdiff
path: root/test/passes/remove-unused-names_optimize-instructions_all-features.txt
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2020-02-05 14:37:53 -0800
committerGitHub <noreply@github.com>2020-02-05 14:37:53 -0800
commit7be22c4d68270573ee010938aa8cd06be89e54d2 (patch)
treeef9607bef85aabb344234484818ffc29f2235919 /test/passes/remove-unused-names_optimize-instructions_all-features.txt
parent33f92aa06fe5de7bcf9f6b7fe2e74ba5e8e1e782 (diff)
downloadbinaryen-7be22c4d68270573ee010938aa8cd06be89e54d2.tar.gz
binaryen-7be22c4d68270573ee010938aa8cd06be89e54d2.tar.bz2
binaryen-7be22c4d68270573ee010938aa8cd06be89e54d2.zip
Add EH support for OptimizeInstructions (#2608)
- Adds support for `Try` in `optimizeBoolean` function - Adds support for `Try` in `getFallThrough` function - Adds approximate cost values for instructions in EH and reference types proposals.
Diffstat (limited to 'test/passes/remove-unused-names_optimize-instructions_all-features.txt')
-rw-r--r--test/passes/remove-unused-names_optimize-instructions_all-features.txt104
1 files changed, 104 insertions, 0 deletions
diff --git a/test/passes/remove-unused-names_optimize-instructions_all-features.txt b/test/passes/remove-unused-names_optimize-instructions_all-features.txt
new file mode 100644
index 000000000..03c30c6c3
--- /dev/null
+++ b/test/passes/remove-unused-names_optimize-instructions_all-features.txt
@@ -0,0 +1,104 @@
+(module
+ (type $none_=>_none (func))
+ (type $i32_=>_none (func (param i32)))
+ (event $e (attr 0) (param i32))
+ (func $dummy (; 0 ;)
+ (nop)
+ )
+ (func $getFallthrough (; 1 ;)
+ (local $x0 i32)
+ (local $x1 i32)
+ (local $x2 i32)
+ (local $x3 i32)
+ (local.set $x0
+ (try (result i32)
+ (i32.const 1)
+ (catch
+ (drop
+ (exnref.pop)
+ )
+ (i32.const 3)
+ )
+ )
+ )
+ (drop
+ (local.get $x0)
+ )
+ (local.set $x1
+ (try (result i32)
+ (block (result i32)
+ (call $dummy)
+ (i32.const 1)
+ )
+ (catch
+ (drop
+ (exnref.pop)
+ )
+ (i32.const 3)
+ )
+ )
+ )
+ (drop
+ (i32.and
+ (local.get $x1)
+ (i32.const 7)
+ )
+ )
+ (local.set $x2
+ (try (result i32)
+ (block (result i32)
+ (try
+ (throw $e
+ (i32.const 0)
+ )
+ (catch
+ (drop
+ (exnref.pop)
+ )
+ )
+ )
+ (i32.const 1)
+ )
+ (catch
+ (drop
+ (exnref.pop)
+ )
+ (i32.const 3)
+ )
+ )
+ )
+ (drop
+ (local.get $x2)
+ )
+ (local.set $x3
+ (try (result i32)
+ (block (result i32)
+ (try
+ (nop)
+ (catch
+ (drop
+ (exnref.pop)
+ )
+ (throw $e
+ (i32.const 0)
+ )
+ )
+ )
+ (i32.const 1)
+ )
+ (catch
+ (drop
+ (exnref.pop)
+ )
+ (i32.const 3)
+ )
+ )
+ )
+ (drop
+ (i32.and
+ (local.get $x3)
+ (i32.const 7)
+ )
+ )
+ )
+)