diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/passes/O.bin.txt | 13 | ||||
-rw-r--r-- | test/passes/optimize-instructions_enable-threads.txt | 16 | ||||
-rw-r--r-- | test/passes/optimize-instructions_enable-threads.wast | 18 |
3 files changed, 40 insertions, 7 deletions
diff --git a/test/passes/O.bin.txt b/test/passes/O.bin.txt index 89a24046c..7af8de37e 100644 --- a/test/passes/O.bin.txt +++ b/test/passes/O.bin.txt @@ -7,9 +7,8 @@ (export "fac-opt" (func $4)) (func $0 (; 0 ;) (; has Stack IR ;) (type $0) (param $0 i64) (result i64) (if (result i64) - (i64.eq + (i64.eqz (local.get $0) - (i64.const 0) ) (i64.const 1) (i64.mul @@ -25,9 +24,8 @@ ) (func $1 (; 1 ;) (; has Stack IR ;) (type $0) (param $0 i64) (result i64) (if (result i64) - (i64.eq + (i64.eqz (local.get $0) - (i64.const 0) ) (i64.const 1) (i64.mul @@ -51,9 +49,10 @@ ) (loop $label$3 (if - (i64.ne - (local.get $0) - (i64.const 0) + (i32.eqz + (i64.eqz + (local.get $0) + ) ) (block (local.set $1 diff --git a/test/passes/optimize-instructions_enable-threads.txt b/test/passes/optimize-instructions_enable-threads.txt index f54b6ae99..ef3122a89 100644 --- a/test/passes/optimize-instructions_enable-threads.txt +++ b/test/passes/optimize-instructions_enable-threads.txt @@ -196,6 +196,22 @@ (i32.const 0) ) ) + (drop + (i64.eqz + (i64.const 100) + ) + ) + (drop + (i64.eq + (i64.const 0) + (i64.const 100) + ) + ) + (drop + (i64.eqz + (i64.const 0) + ) + ) (if (i32.const 123) (nop) diff --git a/test/passes/optimize-instructions_enable-threads.wast b/test/passes/optimize-instructions_enable-threads.wast index dfcaea597..243cb79d7 100644 --- a/test/passes/optimize-instructions_enable-threads.wast +++ b/test/passes/optimize-instructions_enable-threads.wast @@ -212,6 +212,24 @@ (i32.const 0) ) ) + (drop + (i64.eq + (i64.const 100) + (i64.const 0) + ) + ) + (drop + (i64.eq + (i64.const 0) + (i64.const 100) + ) + ) + (drop + (i64.eq + (i64.const 0) + (i64.const 0) + ) + ) (if (i32.eqz (i32.eqz |