diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-09-11 11:39:31 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-09-12 10:36:02 -0700 |
commit | 4d0fea95aec72f932efa83a0601b98c177e59a85 (patch) | |
tree | 5a6b117a0b3c298862daf87ba18f213b9824f3c6 /test/unit.fromasm.imprecise.no-opts | |
parent | ff9757dd827f16e132fdab16bc615ba29f07b415 (diff) | |
download | binaryen-4d0fea95aec72f932efa83a0601b98c177e59a85.tar.gz binaryen-4d0fea95aec72f932efa83a0601b98c177e59a85.tar.bz2 binaryen-4d0fea95aec72f932efa83a0601b98c177e59a85.zip |
thread relooper jumps
Diffstat (limited to 'test/unit.fromasm.imprecise.no-opts')
-rw-r--r-- | test/unit.fromasm.imprecise.no-opts | 312 |
1 files changed, 276 insertions, 36 deletions
diff --git a/test/unit.fromasm.imprecise.no-opts b/test/unit.fromasm.imprecise.no-opts index c46cc19c2..7808b6cf2 100644 --- a/test/unit.fromasm.imprecise.no-opts +++ b/test/unit.fromasm.imprecise.no-opts @@ -1250,53 +1250,50 @@ (get_local $i$lcssa) ) ) - (func $optimize_exprs_at_end (param $$e i32) - (local $$0 i32) - (local $$1 i32) - (local $$arrayidx i32) - (local $$cmp i32) - (local $$conv i32) - (local $$dec i32) - (local $$i$012 i32) - (local $$i$012$lcssa i32) - (local $$i$111 i32) - (local $$inc i32) - (local $$incdec$ptr i32) - (local $$incdec$ptr$lcssa i32) - (local $$s$0$lcssa i32) - (local $$s$010 i32) - (local $$s$1 i32) - (local $$tobool i32) - (local $$tobool5 i32) - (local $$tobool5$9 i32) - (local $$tobool8 i32) + (func $relooperJumpThreading (param $x i32) (result i32) (local $label i32) - (loop $while-in$1 - (block $while-out$0 - (if - (get_local $$cmp) - (br $while-out$0) + (if + (get_local $x) + (block + (call_import $h + (i32.const 0) ) - (set_local $$inc - (get_local $$i$012) + (set_local $label + (i32.const 1) ) - (set_local $$tobool - (i32.eq - (get_local $$inc) + ) + ) + (if + (i32.eq + (get_local $label) + (i32.const 1) + ) + (call_import $h + (i32.const 1) + ) + ) + (call_import $h + (i32.const -1) + ) + (loop $while-in$1 + (block $while-out$0 + (set_local $x + (i32.add + (get_local $x) (i32.const 1) ) ) (if - (get_local $$tobool) + (get_local $x) (block + (call_import $h + (i32.const 2) + ) (set_local $label - (i32.const 5) + (i32.const 2) ) (br $while-out$0) ) - (set_local $$i$012 - (get_local $$inc) - ) ) (br $while-in$1) ) @@ -1306,7 +1303,250 @@ (get_local $label) (i32.const 2) ) - (nop) + (call_import $h + (i32.const 3) + ) + ) + (call_import $h + (i32.const -2) + ) + (if + (get_local $x) + (block + (call_import $h + (i32.const 4) + ) + (if + (i32.eq + (get_local $x) + (i32.const 3) + ) + (set_local $label + (i32.const 3) + ) + (set_local $label + (i32.const 4) + ) + ) + ) + ) + (if + (i32.eq + (get_local $label) + (i32.const 3) + ) + (call_import $h + (i32.const 5) + ) + (if + (i32.eq + (get_local $label) + (i32.const 4) + ) + (call_import $h + (i32.const 6) + ) + ) + ) + (call_import $h + (i32.const -3) + ) + (if + (get_local $x) + (block + (call_import $h + (i32.const 7) + ) + (if + (i32.eq + (get_local $x) + (i32.const 5) + ) + (set_local $label + (i32.const 5) + ) + (set_local $label + (i32.const 6) + ) + ) + ) + ) + (if + (i32.eq + (get_local $label) + (i32.const 5) + ) + (block + (call_import $h + (i32.const 8) + ) + (if + (i32.eq + (get_local $x) + (i32.const 6) + ) + (set_local $label + (i32.const 6) + ) + ) + ) + ) + (if + (i32.eq + (get_local $label) + (i32.const 6) + ) + (call_import $h + (i32.const 9) + ) + ) + (call_import $h + (i32.const -4) + ) + (if + (get_local $x) + (block + (call_import $h + (i32.const 10) + ) + (set_local $label + (i32.const 7) + ) + ) + ) + (block $label$break$L1 + (if + (i32.eq + (get_local $label) + (i32.const 7) + ) + (block + (call_import $h + (i32.const 11) + ) + (br $label$break$L1) + ) + ) + ) + (call_import $h + (i32.const -5) + ) + (if + (get_local $x) + (block + (call_import $h + (i32.const 12) + ) + (if + (i32.eq + (get_local $x) + (i32.const 8) + ) + (set_local $label + (i32.const 8) + ) + (set_local $label + (i32.const 9) + ) + ) + ) + ) + (if + (i32.eq + (get_local $label) + (i32.const 8) + ) + (block + (call_import $h + (i32.const 13) + ) + (if + (get_local $x) + (set_local $label + (i32.const 9) + ) + ) + ) + ) + (block $label$break$L1 + (if + (i32.eq + (get_local $label) + (i32.const 9) + ) + (block + (call_import $h + (i32.const 14) + ) + (br $label$break$L1) + ) + ) + ) + (call_import $h + (i32.const -6) + ) + (return + (get_local $x) + ) + ) + (func $relooperJumpThreading__ZN4game14preloadweaponsEv + (local $$12 i32) + (local $$14 i32) + (local $$or$cond8 i32) + (local $$or$cond6 i32) + (local $$vararg_ptr5 i32) + (local $$11 i32) + (local $$exitcond i32) + (local $label i32) + (loop $while-in$1 + (block $while-out$0 + (if + (get_local $$14) + (if + (get_local $$or$cond8) + (set_local $label + (i32.const 7) + ) + (set_local $label + (i32.const 8) + ) + ) + (if + (get_local $$or$cond6) + (set_local $label + (i32.const 7) + ) + (set_local $label + (i32.const 8) + ) + ) + ) + (if + (i32.eq + (get_local $label) + (i32.const 7) + ) + (set_local $label + (i32.const 0) + ) + (if + (i32.eq + (get_local $label) + (i32.const 8) + ) + (block + (set_local $label + (i32.const 0) + ) + (i32.store + (get_local $$vararg_ptr5) + (get_local $$11) + ) + ) + ) + ) + (br $while-in$1) + ) ) ) ) |