summaryrefslogtreecommitdiff
path: root/test/passes/simplify-locals-nostructure.wast
diff options
context:
space:
mode:
Diffstat (limited to 'test/passes/simplify-locals-nostructure.wast')
-rw-r--r--test/passes/simplify-locals-nostructure.wast40
1 files changed, 26 insertions, 14 deletions
diff --git a/test/passes/simplify-locals-nostructure.wast b/test/passes/simplify-locals-nostructure.wast
index 4dc6cfb82..e93a77ced 100644
--- a/test/passes/simplify-locals-nostructure.wast
+++ b/test/passes/simplify-locals-nostructure.wast
@@ -7,22 +7,28 @@
(local $a i32)
(local $b i32)
(local.set $x (i32.const 1))
- (if (local.get $x) (nop))
- (if (local.get $x) (nop))
- (local.set $y (if (result i32) (i32.const 2) (i32.const 3) (i32.const 4)))
+ (if (local.get $x) (then (nop)))
+ (if (local.get $x) (then (nop)))
+ (local.set $y (if (result i32) (i32.const 2) (then (i32.const 3) )(else (i32.const 4))))
(drop (local.get $y))
(local.set $z (block (result i32) (i32.const 5)))
(drop (local.get $z))
(if (i32.const 6)
- (local.set $a (i32.const 7))
- (local.set $a (i32.const 8))
+ (then
+ (local.set $a (i32.const 7))
+ )
+ (else
+ (local.set $a (i32.const 8))
+ )
)
(drop (local.get $a))
(block $val
(if (i32.const 10)
- (block
- (local.set $b (i32.const 11))
- (br $val)
+ (then
+ (block
+ (local.set $b (i32.const 11))
+ (br $val)
+ )
)
)
(local.set $b (i32.const 12))
@@ -65,8 +71,10 @@
(local.get $var$0)
)
(if (i32.const 1)
- (drop
- (local.get $other)
+ (then
+ (drop
+ (local.get $other)
+ )
)
)
)
@@ -88,10 +96,14 @@
(func $if-value-structure-equivalent (param $x i32) (result i32)
(local $y i32)
(if (i32.const 1)
- (local.set $x (i32.const 2))
- (block
- (local.set $y (local.get $x))
- (local.set $x (local.get $y))
+ (then
+ (local.set $x (i32.const 2))
+ )
+ (else
+ (block
+ (local.set $y (local.get $x))
+ (local.set $x (local.get $y))
+ )
)
)
(local.get $x)