summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/passes/coalesce-locals-learning.txt8
-rw-r--r--test/passes/coalesce-locals.txt49
-rw-r--r--test/passes/coalesce-locals.wast10
3 files changed, 55 insertions, 12 deletions
diff --git a/test/passes/coalesce-locals-learning.txt b/test/passes/coalesce-locals-learning.txt
index 3bd04680d..2377c4051 100644
--- a/test/passes/coalesce-locals-learning.txt
+++ b/test/passes/coalesce-locals-learning.txt
@@ -108,11 +108,15 @@
)
(block $block
(br $block)
- (nop)
(drop
(i32.const 0)
)
- (nop)
+ (drop
+ (i32.const 0)
+ )
+ (drop
+ (i32.const -1)
+ )
)
(drop
(get_local $0)
diff --git a/test/passes/coalesce-locals.txt b/test/passes/coalesce-locals.txt
index 8f2908153..f8dc3ef0f 100644
--- a/test/passes/coalesce-locals.txt
+++ b/test/passes/coalesce-locals.txt
@@ -6,6 +6,7 @@
(type $4 (func (param i32)))
(type $FUNCSIG$i (func (result i32)))
(type $FUNCSIG$vi (func (param i32)))
+ (type $7 (func (param i32) (result i32)))
(import "env" "_emscripten_autodebug_i32" (func $_emscripten_autodebug_i32 (param i32 i32) (result i32)))
(import "env" "get" (func $get (result i32)))
(import "env" "set" (func $set (param i32)))
@@ -112,11 +113,15 @@
)
(block $block
(br $block)
- (nop)
(drop
(i32.const 0)
)
- (nop)
+ (drop
+ (i32.const 0)
+ )
+ (drop
+ (i32.const -1)
+ )
)
(drop
(get_local $0)
@@ -902,37 +907,53 @@
(local $0 i32)
(block $x
(return)
- (nop)
+ (drop
+ (i32.const 1)
+ )
+ (drop
+ (i32.const 0)
+ )
(drop
(i32.const 0)
)
- (nop)
)
(block $y
(unreachable)
- (nop)
+ (drop
+ (i32.const 1)
+ )
+ (drop
+ (i32.const 0)
+ )
(drop
(i32.const 0)
)
- (nop)
)
(block $z
(br $z)
- (nop)
+ (drop
+ (i32.const 1)
+ )
+ (drop
+ (i32.const 0)
+ )
(drop
(i32.const 0)
)
- (nop)
)
(block $z14
(br_table $z14 $z14
(i32.const 100)
)
- (nop)
+ (drop
+ (i32.const 1)
+ )
+ (drop
+ (i32.const 0)
+ )
(drop
(i32.const 0)
)
- (nop)
)
)
(func $nop-in-unreachable (type $2)
@@ -1083,4 +1104,12 @@
(br $top)
)
)
+ (func $tee_br (type $7) (param $0 i32) (result i32)
+ (block $b
+ (return
+ (br $b)
+ )
+ )
+ (i32.const 1)
+ )
)
diff --git a/test/passes/coalesce-locals.wast b/test/passes/coalesce-locals.wast
index d6d499d36..336c75e0e 100644
--- a/test/passes/coalesce-locals.wast
+++ b/test/passes/coalesce-locals.wast
@@ -1075,4 +1075,14 @@
(br $top)
)
)
+ (func $tee_br (param $x i32) (result i32)
+ (block $b
+ (return
+ (tee_local $x
+ (br $b)
+ )
+ )
+ )
+ (i32.const 1)
+ )
)