diff options
Diffstat (limited to 'test/passes/simplify-locals_all-features.txt')
-rw-r--r-- | test/passes/simplify-locals_all-features.txt | 316 |
1 files changed, 209 insertions, 107 deletions
diff --git a/test/passes/simplify-locals_all-features.txt b/test/passes/simplify-locals_all-features.txt index 4225a7033..36a635e29 100644 --- a/test/passes/simplify-locals_all-features.txt +++ b/test/passes/simplify-locals_all-features.txt @@ -31,18 +31,26 @@ (local.tee $x (i32.const 1) ) - (nop) + (then + (nop) + ) ) (if (local.get $x) - (nop) + (then + (nop) + ) ) (nop) (drop (if (result i32) (i32.const 2) - (i32.const 3) - (i32.const 4) + (then + (i32.const 3) + ) + (else + (i32.const 4) + ) ) ) (nop) @@ -55,11 +63,11 @@ (drop (if (result i32) (i32.const 6) - (block (result i32) + (then (nop) (i32.const 7) ) - (block (result i32) + (else (nop) (i32.const 8) ) @@ -70,7 +78,7 @@ (block $val (result i32) (if (i32.const 10) - (block + (then (nop) (br $val (i32.const 11) @@ -488,8 +496,12 @@ (local.get $$a$1) (i32.const 0) ) - (i32.const -1) - (i32.const 0) + (then + (i32.const -1) + ) + (else + (i32.const 0) + ) ) (i32.const 1) ) @@ -503,8 +515,12 @@ (local.get $$a$1) (i32.const 0) ) - (i32.const -1) - (i32.const 0) + (then + (i32.const -1) + ) + (else + (i32.const 0) + ) ) (i32.const 31) ) @@ -514,8 +530,12 @@ (local.get $$a$1) (i32.const 0) ) - (i32.const -1) - (i32.const 0) + (then + (i32.const -1) + ) + (else + (i32.const 0) + ) ) (i32.const 1) ) @@ -533,8 +553,12 @@ (local.get $$b$1) (i32.const 0) ) - (i32.const -1) - (i32.const 0) + (then + (i32.const -1) + ) + (else + (i32.const 0) + ) ) (i32.const 1) ) @@ -548,8 +572,12 @@ (local.get $$b$1) (i32.const 0) ) - (i32.const -1) - (i32.const 0) + (then + (i32.const -1) + ) + (else + (i32.const 0) + ) ) (i32.const 31) ) @@ -559,8 +587,12 @@ (local.get $$b$1) (i32.const 0) ) - (i32.const -1) - (i32.const 0) + (then + (i32.const -1) + ) + (else + (i32.const 0) + ) ) (i32.const 1) ) @@ -672,11 +704,11 @@ (local.set $x (if (result i32) (i32.const 1) - (block (result i32) + (then (nop) (i32.const 13) ) - (block (result i32) + (else (nop) (i32.const 24) ) @@ -689,13 +721,13 @@ (local.tee $x (if (result i32) (i32.const 1) - (block (result i32) + (then (block $block3 (nop) ) (i32.const 14) ) - (block (result i32) + (else (block $block5 (nop) ) @@ -820,19 +852,23 @@ (drop (if (result i32) (local.get $x) - (block $block53 (result i32) - (nop) - (local.set $temp - (local.get $y) + (then + (block $block53 (result i32) + (nop) + (local.set $temp + (local.get $y) + ) + (local.get $z) ) - (local.get $z) ) - (block $block54 (result i32) - (nop) - (local.set $temp - (local.get $y) + (else + (block $block54 (result i32) + (nop) + (local.set $temp + (local.get $y) + ) + (local.get $z) ) - (local.get $z) ) ) ) @@ -852,19 +888,21 @@ (local.get $label) (i32.const 15) ) - (block $block - (nop) - (nop) - (drop - (br_if $label$break$L4 - (local.tee $label - (i32.const 0) - ) - (i32.eqz - (i32.eq - (local.get $$$0151) + (then + (block $block + (nop) + (nop) + (drop + (br_if $label$break$L4 + (local.tee $label (i32.const 0) ) + (i32.eqz + (i32.eq + (local.get $$$0151) + (i32.const 0) + ) + ) ) ) ) @@ -887,11 +925,15 @@ (func $if-return-but-unreachable (type $11) (param $var$0 i64) (if (unreachable) - (drop - (local.get $var$0) + (then + (drop + (local.get $var$0) + ) ) - (local.set $var$0 - (i64.const 1) + (else + (local.set $var$0 + (i64.const 1) + ) ) ) ) @@ -901,11 +943,13 @@ (local.tee $x (if (result i32) (i32.const 1) - (block (result i32) + (then (nop) (i32.const 2) ) - (local.get $x) + (else + (local.get $x) + ) ) ) ) @@ -918,11 +962,13 @@ (local.set $x (if (result i32) (i32.const 1) - (block (result i32) + (then (nop) (i32.const 2) ) - (local.get $x) + (else + (local.get $x) + ) ) ) (local.get $y) @@ -935,22 +981,24 @@ (local.get $0) (i32.const -1073741824) ) - (block (result i32) + (then (nop) (i32.const -1073741824) ) - (block (result i32) + (else (nop) (if (result i32) (i32.gt_s (local.get $0) (i32.const 1073741823) ) - (block (result i32) + (then (nop) (i32.const 1073741823) ) - (local.get $0) + (else + (local.get $0) + ) ) ) ) @@ -967,8 +1015,12 @@ (local.set $x (if (result i32) (i32.const -1) - (i32.const -2) - (local.get $x) + (then + (i32.const -2) + ) + (else + (local.get $x) + ) ) ) (drop @@ -976,8 +1028,12 @@ (local.tee $x (if (result i32) (i32.const -3) - (i32.const -4) - (local.get $x) + (then + (i32.const -4) + ) + (else + (local.get $x) + ) ) ) ) @@ -988,8 +1044,12 @@ (local.tee $y (if (result i32) (i32.const -5) - (i32.const -6) - (local.get $y) + (then + (i32.const -6) + ) + (else + (local.get $y) + ) ) ) ) @@ -1000,8 +1060,12 @@ (local.tee $z (if (result i32) (i32.const -7) - (i32.const -8) - (local.get $z) + (then + (i32.const -8) + ) + (else + (local.get $z) + ) ) ) (local.get $z) @@ -1016,22 +1080,28 @@ (local.tee $4 (if (result i32) (i32.const 1) - (block (result i32) + (then (nop) (i32.const 2) ) - (local.get $4) + (else + (local.get $4) + ) ) ) - (block (result i32) + (then (nop) (i32.const 0) ) - (local.get $4) + (else + (local.get $4) + ) ) ) ) - (unreachable) + (then + (unreachable) + ) ) (i32.const 0) ) @@ -1040,16 +1110,28 @@ (local.tee $20 (if (result i32) (i32.const 1) - (if (result i32) - (i32.const 2) + (then (if (result i32) - (i32.const 3) - (i32.const 4) - (local.get $20) + (i32.const 2) + (then + (if (result i32) + (i32.const 3) + (then + (i32.const 4) + ) + (else + (local.get $20) + ) + ) + ) + (else + (local.get $20) + ) ) + ) + (else (local.get $20) ) - (local.get $20) ) ) ) @@ -1085,8 +1167,12 @@ (i32.eqz (local.get $0) ) - (f32.const 4623408228068004207103214e13) - (local.get $3) + (then + (f32.const 4623408228068004207103214e13) + ) + (else + (local.get $3) + ) ) ) ) @@ -1098,7 +1184,7 @@ ) (if (result f64) (global.get $global$0) - (block + (then (global.set $global$0 (i32.sub (global.get $global$0) @@ -1116,7 +1202,9 @@ ) (br $label$1) ) - (f64.const -70) + (else + (f64.const -70) + ) ) ) ) @@ -1319,11 +1407,11 @@ (drop (if (result i32) (i32.const 1) - (block + (then (br $out) (nop) ) - (block (result i32) + (else (nop) (i32.const 2) ) @@ -1332,11 +1420,11 @@ (drop (if (result i32) (i32.const 3) - (block (result i32) + (then (nop) (i32.const 4) ) - (block + (else (br $out) (nop) ) @@ -1344,8 +1432,12 @@ ) (if (i32.const 5) - (br $out) - (br $out) + (then + (br $out) + ) + (else + (br $out) + ) ) ) ) @@ -1356,13 +1448,13 @@ (drop (if (result i32) (i32.const 1) - (block + (then (nop) (nop) (br $out) (nop) ) - (block (result i32) + (else (nop) (nop) (i32.const 4) @@ -1372,12 +1464,12 @@ (drop (if (result i32) (i32.const 6) - (block (result i32) + (then (nop) (nop) (i32.const 7) ) - (block + (else (nop) (nop) (br $out) @@ -1387,12 +1479,12 @@ ) (if (i32.const 11) - (block + (then (nop) (nop) (br $out) ) - (block + (else (nop) (nop) (br $out) @@ -1428,11 +1520,11 @@ (nop) (if (result i32) (i32.const 0) - (block (result i32) + (then (nop) (i32.const 0) ) - (block + (else (loop $label$4 (br $label$4) ) @@ -1453,11 +1545,13 @@ (drop (if (result i32) (i32.const 1) - (block (result i32) + (then (nop) (i32.const 1) ) - (local.get $x) + (else + (local.get $x) + ) ) ) (drop @@ -1476,11 +1570,13 @@ (drop (if (result i32) (i32.const 1) - (block (result i32) + (then (nop) (i32.const 1) ) - (local.get $y) + (else + (local.get $y) + ) ) ) (drop @@ -1508,11 +1604,13 @@ (local.set $y (if (result i32) (i32.const 1) - (block (result i32) + (then (nop) (i32.const 1) ) - (local.get $y) + (else + (local.get $y) + ) ) ) (local.set $x @@ -1521,11 +1619,13 @@ (drop (if (result i32) (i32.const 1) - (block (result i32) + (then (nop) (i32.const 1) ) - (local.get $y) + (else + (local.get $y) + ) ) ) (nop) @@ -1542,11 +1642,13 @@ (drop (if (result i32) (i32.const 1) - (block (result i32) + (then (nop) (i32.const 1) ) - (local.get $y) + (else + (local.get $y) + ) ) ) (nop) @@ -1603,11 +1705,11 @@ (local.tee $x (if (result i32) (i32.const 1) - (block (result i32) + (then (nop) (i32.const 2) ) - (block (result i32) + (else (nop) (nop) (local.get $x) @@ -1660,11 +1762,11 @@ (nop) (if (result f32) (call $fimport$0) - (block (result f32) + (then (nop) (f32.const -2048) ) - (block + (else (call $fimport$1 (i32.const -25732) ) |