summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-04-07 20:42:17 -0700
committerAlon Zakai <alonzakai@gmail.com>2016-04-07 20:42:17 -0700
commit1b6a1099f857d70005380cb4f980c9defeba4b22 (patch)
tree62a83cdc122d8973980ae8f54a4e82d9db24d419 /test
parentdb3d83e79532cd48fbd852f7ab1370d0218dfe91 (diff)
downloadbinaryen-1b6a1099f857d70005380cb4f980c9defeba4b22.tar.gz
binaryen-1b6a1099f857d70005380cb4f980c9defeba4b22.tar.bz2
binaryen-1b6a1099f857d70005380cb4f980c9defeba4b22.zip
add missing checks on nested blocks in SimplifyExpressions
Diffstat (limited to 'test')
-rw-r--r--test/passes/simplify-locals.txt13
-rw-r--r--test/passes/simplify-locals.wast13
2 files changed, 26 insertions, 0 deletions
diff --git a/test/passes/simplify-locals.txt b/test/passes/simplify-locals.txt
index 880639f79..95b714eb9 100644
--- a/test/passes/simplify-locals.txt
+++ b/test/passes/simplify-locals.txt
@@ -253,4 +253,17 @@
(get_local $a)
)
)
+ (func $Ia (param $a i32) (result i32)
+ (local $b i32)
+ (block $switch$0
+ (block $switch-default$6
+ (set_local $b
+ (i32.const 60)
+ )
+ )
+ )
+ (return
+ (get_local $b)
+ )
+ )
)
diff --git a/test/passes/simplify-locals.wast b/test/passes/simplify-locals.wast
index db17c5533..24f8476d2 100644
--- a/test/passes/simplify-locals.wast
+++ b/test/passes/simplify-locals.wast
@@ -145,5 +145,18 @@
(get_local $a)
)
)
+ (func $Ia (param $a i32) (result i32)
+ (local $b i32)
+ (block $switch$0
+ (block $switch-default$6
+ (set_local $b
+ (i32.const 60)
+ )
+ )
+ )
+ (return
+ (get_local $b)
+ )
+ )
)