summaryrefslogtreecommitdiff
path: root/test/passes/asyncify_mod-asyncify-always-and-only-unwind.txt
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2019-12-12 23:01:56 -0800
committerGitHub <noreply@github.com>2019-12-12 23:01:56 -0800
commitfbce98c6fdeb2a78ef58079ce1c2a385a17357d6 (patch)
treece3bcfcb7b9861fc82cdd545146aa19d143876ec /test/passes/asyncify_mod-asyncify-always-and-only-unwind.txt
parent16c6b44da64630cd6906433cf35edabcea93cffc (diff)
downloadbinaryen-fbce98c6fdeb2a78ef58079ce1c2a385a17357d6.tar.gz
binaryen-fbce98c6fdeb2a78ef58079ce1c2a385a17357d6.tar.bz2
binaryen-fbce98c6fdeb2a78ef58079ce1c2a385a17357d6.zip
Remove redundant instructions in Flatten (#2524)
When the expression type is none, it does not seem to be necessary to make it a prelude and insert a nop. This also results in unnecessary blocks that contains an expression with a nop, which can be reduced to just the expression. This also adds some newlines to improve readability.
Diffstat (limited to 'test/passes/asyncify_mod-asyncify-always-and-only-unwind.txt')
-rw-r--r--test/passes/asyncify_mod-asyncify-always-and-only-unwind.txt52
1 files changed, 18 insertions, 34 deletions
diff --git a/test/passes/asyncify_mod-asyncify-always-and-only-unwind.txt b/test/passes/asyncify_mod-asyncify-always-and-only-unwind.txt
index 49c3ed7ed..f5c1ed1c0 100644
--- a/test/passes/asyncify_mod-asyncify-always-and-only-unwind.txt
+++ b/test/passes/asyncify_mod-asyncify-always-and-only-unwind.txt
@@ -44,35 +44,26 @@
)
)
)
- (block
- (if
- (if (result i32)
- (i32.eq
- (global.get $__asyncify_state)
- (i32.const 0)
- )
- (i32.const 1)
- (i32.eq
- (local.get $1)
- (i32.const 0)
- )
- )
- (block
- (call $import)
- (if
- (i32.const 1)
- (br $__asyncify_unwind
- (i32.const 0)
- )
- )
- )
- )
- (if
+ (if
+ (if (result i32)
(i32.eq
(global.get $__asyncify_state)
(i32.const 0)
)
- (nop)
+ (i32.const 1)
+ (i32.eq
+ (local.get $1)
+ (i32.const 0)
+ )
+ )
+ (block
+ (call $import)
+ (if
+ (i32.const 1)
+ (br $__asyncify_unwind
+ (i32.const 0)
+ )
+ )
)
)
)
@@ -216,7 +207,6 @@
(local.set $temp
(local.get $1)
)
- (nop)
(local.set $2
(local.get $temp)
)
@@ -227,7 +217,6 @@
)
(nop)
(nop)
- (nop)
)
(unreachable)
)
@@ -379,14 +368,10 @@
(global.get $__asyncify_state)
(i32.const 0)
)
- (block
- (drop
- (local.get $0)
- )
- (nop)
+ (drop
+ (local.get $0)
)
)
- (nop)
)
)
(return)
@@ -441,7 +426,6 @@
(drop
(local.get $0)
)
- (nop)
)
(func $asyncify_start_unwind (; 7 ;) (param $0 i32)
(global.set $__asyncify_state