diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/passes/coalesce-locals.txt | 31 | ||||
-rw-r--r-- | test/passes/coalesce-locals.wast | 30 |
2 files changed, 61 insertions, 0 deletions
diff --git a/test/passes/coalesce-locals.txt b/test/passes/coalesce-locals.txt index ed6838ae8..32da026ac 100644 --- a/test/passes/coalesce-locals.txt +++ b/test/passes/coalesce-locals.txt @@ -7,6 +7,7 @@ (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$vi (func (param i32))) (type $7 (func (param i32) (result i32))) + (type $8 (func (param f64 i32) (result i64))) (import "env" "_emscripten_autodebug_i32" (func $_emscripten_autodebug_i32 (param i32 i32) (result i32))) (import "env" "get" (func $get (result i32))) (import "env" "set" (func $set (param i32))) @@ -1122,4 +1123,34 @@ ) ) ) + (func $tee_if_with_unreachable_else (type $8) (param $0 f64) (param $1 i32) (result i64) + (call $tee_if_with_unreachable_else + (if (result f64) + (get_local $1) + (get_local $0) + (tee_local $0 + (unreachable) + ) + ) + (f64.lt + (f64.const -128) + (get_local $0) + ) + ) + ) + (func $tee_if_with_unreachable_true (type $8) (param $0 f64) (param $1 i32) (result i64) + (call $tee_if_with_unreachable_else + (if (result f64) + (get_local $1) + (tee_local $0 + (unreachable) + ) + (get_local $0) + ) + (f64.lt + (f64.const -128) + (get_local $0) + ) + ) + ) ) diff --git a/test/passes/coalesce-locals.wast b/test/passes/coalesce-locals.wast index d959cc820..ee92bb05e 100644 --- a/test/passes/coalesce-locals.wast +++ b/test/passes/coalesce-locals.wast @@ -1097,4 +1097,34 @@ ) ) ) + (func $tee_if_with_unreachable_else (param $0 f64) (param $1 i32) (result i64) + (call $tee_if_with_unreachable_else + (tee_local $0 + (if (result f64) + (get_local $1) + (get_local $0) + (unreachable) + ) + ) + (f64.lt + (f64.const -128) + (get_local $0) + ) + ) + ) + (func $tee_if_with_unreachable_true (param $0 f64) (param $1 i32) (result i64) + (call $tee_if_with_unreachable_else + (tee_local $0 + (if (result f64) + (get_local $1) + (unreachable) + (get_local $0) + ) + ) + (f64.lt + (f64.const -128) + (get_local $0) + ) + ) + ) ) |