diff options
Diffstat (limited to 'test/passes')
-rw-r--r-- | test/passes/simplify-locals.txt | 188 | ||||
-rw-r--r-- | test/passes/vacuum.txt | 22 |
2 files changed, 95 insertions, 115 deletions
diff --git a/test/passes/simplify-locals.txt b/test/passes/simplify-locals.txt index d97e8fc33..2310366de 100644 --- a/test/passes/simplify-locals.txt +++ b/test/passes/simplify-locals.txt @@ -276,106 +276,63 @@ (set_local $$rem (get_local $__stackBase__) ) - (set_local $$1$0 - (i32.or - (i32.shr_s - (get_local $$a$1) - (i32.const 31) - ) - (i32.shl - (if - (i32.lt_s - (get_local $$a$1) - (i32.const 0) - ) - (i32.const -1) - (i32.const 0) - ) - (i32.const 1) - ) - ) - ) - (set_local $$1$1 - (i32.or - (i32.shr_s - (if - (i32.lt_s - (get_local $$a$1) - (i32.const 0) - ) - (i32.const -1) - (i32.const 0) - ) - (i32.const 31) - ) - (i32.shl - (if - (i32.lt_s - (get_local $$a$1) - (i32.const 0) - ) - (i32.const -1) - (i32.const 0) - ) - (i32.const 1) - ) - ) - ) - (set_local $$2$0 - (i32.or - (i32.shr_s - (get_local $$b$1) - (i32.const 31) - ) - (i32.shl - (if - (i32.lt_s - (get_local $$b$1) - (i32.const 0) - ) - (i32.const -1) - (i32.const 0) - ) - (i32.const 1) - ) - ) - ) - (set_local $$2$1 - (i32.or - (i32.shr_s - (if - (i32.lt_s - (get_local $$b$1) - (i32.const 0) - ) - (i32.const -1) - (i32.const 0) - ) - (i32.const 31) - ) - (i32.shl - (if - (i32.lt_s - (get_local $$b$1) - (i32.const 0) - ) - (i32.const -1) - (i32.const 0) - ) - (i32.const 1) - ) - ) - ) + (nop) + (nop) + (nop) + (nop) (nop) (nop) (call_import $___udivmoddi4 (call_import $_i64Subtract (i32.xor - (get_local $$1$0) + (set_local $$1$0 + (i32.or + (i32.shr_s + (get_local $$a$1) + (i32.const 31) + ) + (i32.shl + (if + (i32.lt_s + (get_local $$a$1) + (i32.const 0) + ) + (i32.const -1) + (i32.const 0) + ) + (i32.const 1) + ) + ) + ) (get_local $$a$0) ) (i32.xor - (get_local $$1$1) + (set_local $$1$1 + (i32.or + (i32.shr_s + (if + (i32.lt_s + (get_local $$a$1) + (i32.const 0) + ) + (i32.const -1) + (i32.const 0) + ) + (i32.const 31) + ) + (i32.shl + (if + (i32.lt_s + (get_local $$a$1) + (i32.const 0) + ) + (i32.const -1) + (i32.const 0) + ) + (i32.const 1) + ) + ) + ) (get_local $$a$1) ) (get_local $$1$0) @@ -386,11 +343,54 @@ ) (call_import $_i64Subtract (i32.xor - (get_local $$2$0) + (set_local $$2$0 + (i32.or + (i32.shr_s + (get_local $$b$1) + (i32.const 31) + ) + (i32.shl + (if + (i32.lt_s + (get_local $$b$1) + (i32.const 0) + ) + (i32.const -1) + (i32.const 0) + ) + (i32.const 1) + ) + ) + ) (get_local $$b$0) ) (i32.xor - (get_local $$2$1) + (set_local $$2$1 + (i32.or + (i32.shr_s + (if + (i32.lt_s + (get_local $$b$1) + (i32.const 0) + ) + (i32.const -1) + (i32.const 0) + ) + (i32.const 31) + ) + (i32.shl + (if + (i32.lt_s + (get_local $$b$1) + (i32.const 0) + ) + (i32.const -1) + (i32.const 0) + ) + (i32.const 1) + ) + ) + ) (get_local $$b$1) ) (get_local $$2$0) diff --git a/test/passes/vacuum.txt b/test/passes/vacuum.txt index fb3731dba..75737713b 100644 --- a/test/passes/vacuum.txt +++ b/test/passes/vacuum.txt @@ -1,27 +1,7 @@ (module (memory 256 256) (func $b - (block $waka1 - (br $waka1) - ) - (block $waka2 - (br $waka2) - ) - (block $waka3 - (br_table $waka3 $waka3 $waka3 - (i32.const 57) - ) - ) - (if - (i32.eqz - (i32.const 100) - ) - (i32.const 101) - ) - (if - (i32.const 102) - (i32.const 103) - ) + (nop) ) (func $l (local $x i32) |