diff options
-rw-r--r-- | test/unit.asm.js | 16 | ||||
-rw-r--r-- | test/unit.fromasm | 21 | ||||
-rw-r--r-- | test/unit.fromasm.imprecise | 21 | ||||
-rw-r--r-- | test/unit.fromasm.imprecise.no-opts | 25 | ||||
-rw-r--r-- | test/unit.fromasm.no-opts | 25 |
5 files changed, 108 insertions, 0 deletions
diff --git a/test/unit.asm.js b/test/unit.asm.js index cf2060030..b4c10b1d2 100644 --- a/test/unit.asm.js +++ b/test/unit.asm.js @@ -292,6 +292,22 @@ function asm(global, env, buffer) { return (Int = 40, 50) | 0; } + function breakThroughMany($s) { + $s = $s|0; + L1: do { + if ($s) { + while(1) { + if (!($s)) { + break L1; + } + zeroInit(0); + } + } else { + 1337; + } + } while(0); + } + function z() { } function w() { diff --git a/test/unit.fromasm b/test/unit.fromasm index 31c1d5b3d..cecbeef22 100644 --- a/test/unit.fromasm +++ b/test/unit.fromasm @@ -537,4 +537,25 @@ ) (i32.const 50) ) + (func $breakThroughMany (param $0 i32) + (block $label$break$L1 + (drop + (if + (get_local $0) + (loop $while-in$2 + (br_if $label$break$L1 + (i32.eqz + (get_local $0) + ) + ) + (call $zeroInit + (i32.const 0) + ) + (br $while-in$2) + ) + (i32.const 1337) + ) + ) + ) + ) ) diff --git a/test/unit.fromasm.imprecise b/test/unit.fromasm.imprecise index 2e9ea8243..ba1af7916 100644 --- a/test/unit.fromasm.imprecise +++ b/test/unit.fromasm.imprecise @@ -519,4 +519,25 @@ ) (i32.const 50) ) + (func $breakThroughMany (param $0 i32) + (block $label$break$L1 + (drop + (if + (get_local $0) + (loop $while-in$2 + (br_if $label$break$L1 + (i32.eqz + (get_local $0) + ) + ) + (call $zeroInit + (i32.const 0) + ) + (br $while-in$2) + ) + (i32.const 1337) + ) + ) + ) + ) ) diff --git a/test/unit.fromasm.imprecise.no-opts b/test/unit.fromasm.imprecise.no-opts index bec8a4f58..0c02680da 100644 --- a/test/unit.fromasm.imprecise.no-opts +++ b/test/unit.fromasm.imprecise.no-opts @@ -907,6 +907,31 @@ ) ) ) + (func $breakThroughMany (param $$s i32) + (block $label$break$L1 + (drop + (if + (get_local $$s) + (loop $while-in$2 + (block $while-out$1 + (if + (i32.eqz + (get_local $$s) + ) + (br $label$break$L1) + ) + (call $zeroInit + (i32.const 0) + ) + (br $while-in$2) + ) + ) + (i32.const 1337) + ) + ) + (nop) + ) + ) (func $z (nop) ) diff --git a/test/unit.fromasm.no-opts b/test/unit.fromasm.no-opts index 936601995..fbbc6e7ff 100644 --- a/test/unit.fromasm.no-opts +++ b/test/unit.fromasm.no-opts @@ -913,6 +913,31 @@ ) ) ) + (func $breakThroughMany (param $$s i32) + (block $label$break$L1 + (drop + (if + (get_local $$s) + (loop $while-in$2 + (block $while-out$1 + (if + (i32.eqz + (get_local $$s) + ) + (br $label$break$L1) + ) + (call $zeroInit + (i32.const 0) + ) + (br $while-in$2) + ) + ) + (i32.const 1337) + ) + ) + (nop) + ) + ) (func $z (nop) ) |