diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/emcc_hello_world.fromasm | 30 | ||||
-rw-r--r-- | test/emcc_hello_world.fromasm.imprecise | 30 | ||||
-rw-r--r-- | test/passes/optimize-instructions.txt | 7 | ||||
-rw-r--r-- | test/passes/optimize-instructions.wast | 11 |
4 files changed, 36 insertions, 42 deletions
diff --git a/test/emcc_hello_world.fromasm b/test/emcc_hello_world.fromasm index fb1163576..06b48ffd6 100644 --- a/test/emcc_hello_world.fromasm +++ b/test/emcc_hello_world.fromasm @@ -6601,15 +6601,11 @@ (get_local $41) (block (br_if $do-once$114 - (i32.eqz - (i32.eqz - (i32.and - (i32.load - (get_local $0) - ) - (i32.const 32) - ) + (i32.and + (i32.load + (get_local $0) ) + (i32.const 32) ) ) (drop @@ -6955,15 +6951,11 @@ (i32.const 0) ) (br_if $do-once$106 - (i32.eqz - (i32.eqz - (i32.and - (i32.load - (get_local $0) - ) - (i32.const 32) - ) + (i32.and + (i32.load + (get_local $0) ) + (i32.const 32) ) ) (drop @@ -12923,11 +12915,7 @@ (get_local $16) ) (br_if $do-once$63 - (i32.eqz - (i32.eqz - (get_local $16) - ) - ) + (get_local $16) ) (i32.store (i32.const 180) diff --git a/test/emcc_hello_world.fromasm.imprecise b/test/emcc_hello_world.fromasm.imprecise index 149c837ec..e83f2b757 100644 --- a/test/emcc_hello_world.fromasm.imprecise +++ b/test/emcc_hello_world.fromasm.imprecise @@ -6594,15 +6594,11 @@ (get_local $41) (block (br_if $do-once$114 - (i32.eqz - (i32.eqz - (i32.and - (i32.load - (get_local $0) - ) - (i32.const 32) - ) + (i32.and + (i32.load + (get_local $0) ) + (i32.const 32) ) ) (drop @@ -6948,15 +6944,11 @@ (i32.const 0) ) (br_if $do-once$106 - (i32.eqz - (i32.eqz - (i32.and - (i32.load - (get_local $0) - ) - (i32.const 32) - ) + (i32.and + (i32.load + (get_local $0) ) + (i32.const 32) ) ) (drop @@ -12916,11 +12908,7 @@ (get_local $16) ) (br_if $do-once$63 - (i32.eqz - (i32.eqz - (get_local $16) - ) - ) + (get_local $16) ) (i32.store (i32.const 180) diff --git a/test/passes/optimize-instructions.txt b/test/passes/optimize-instructions.txt index 6d83cbdbc..ca5f02849 100644 --- a/test/passes/optimize-instructions.txt +++ b/test/passes/optimize-instructions.txt @@ -205,5 +205,12 @@ ) ) ) + (drop + (select + (i32.const 0) + (i32.const 1) + (i32.const 2) + ) + ) ) ) diff --git a/test/passes/optimize-instructions.wast b/test/passes/optimize-instructions.wast index 08868e23a..b1a7ab47e 100644 --- a/test/passes/optimize-instructions.wast +++ b/test/passes/optimize-instructions.wast @@ -240,5 +240,16 @@ ) ) ) + (drop + (select + (i32.const 0) + (i32.const 1) + (i32.eqz + (i32.eqz + (i32.const 2) + ) + ) + ) + ) ) ) |