summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlon Zakai (kripken) <alonzakai@gmail.com>2017-07-11 15:00:14 -0700
committerAlon Zakai (kripken) <alonzakai@gmail.com>2017-07-13 11:54:03 -0700
commit485166f4a184543fda936b8c458f0f4b74c0368f (patch)
tree547fd17d1207dd7191c8891c402b520cdc5dcc54 /test
parentcf6c4cff644b87b4c9688931e2924e2d73b9998f (diff)
downloadbinaryen-485166f4a184543fda936b8c458f0f4b74c0368f.tar.gz
binaryen-485166f4a184543fda936b8c458f0f4b74c0368f.tar.bz2
binaryen-485166f4a184543fda936b8c458f0f4b74c0368f.zip
fix handling of an if in a tee without an else, in coalesce-locals
Diffstat (limited to 'test')
-rw-r--r--test/passes/coalesce-locals.txt10
-rw-r--r--test/passes/coalesce-locals.wast12
2 files changed, 22 insertions, 0 deletions
diff --git a/test/passes/coalesce-locals.txt b/test/passes/coalesce-locals.txt
index f8dc3ef0f..ed6838ae8 100644
--- a/test/passes/coalesce-locals.txt
+++ b/test/passes/coalesce-locals.txt
@@ -1112,4 +1112,14 @@
)
(i32.const 1)
)
+ (func $unused-tee-with-child-if-no-else (type $4) (param $0 i32)
+ (loop $label$0
+ (drop
+ (if
+ (br $label$0)
+ (nop)
+ )
+ )
+ )
+ )
)
diff --git a/test/passes/coalesce-locals.wast b/test/passes/coalesce-locals.wast
index 336c75e0e..d959cc820 100644
--- a/test/passes/coalesce-locals.wast
+++ b/test/passes/coalesce-locals.wast
@@ -1085,4 +1085,16 @@
)
(i32.const 1)
)
+ (func $unused-tee-with-child-if-no-else (param $0 i32)
+ (loop $label$0
+ (drop
+ (tee_local $0
+ (if
+ (br $label$0)
+ (nop)
+ )
+ )
+ )
+ )
+ )
)