diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-09-06 16:14:13 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-09-07 18:42:14 -0700 |
commit | c2072c3f7c96eed6abbc7901c181bec92e3b9ced (patch) | |
tree | 4e76eeb402646a57c2c4fd60776f8d23f1ec53fe /test/emcc_hello_world.fromasm | |
parent | 779c2a20af50c351fb725b785a0ed6932143280d (diff) | |
download | binaryen-c2072c3f7c96eed6abbc7901c181bec92e3b9ced.tar.gz binaryen-c2072c3f7c96eed6abbc7901c181bec92e3b9ced.tar.bz2 binaryen-c2072c3f7c96eed6abbc7901c181bec92e3b9ced.zip |
optimize loads+shifts into signed loads
Diffstat (limited to 'test/emcc_hello_world.fromasm')
-rw-r--r-- | test/emcc_hello_world.fromasm | 284 |
1 files changed, 70 insertions, 214 deletions
diff --git a/test/emcc_hello_world.fromasm b/test/emcc_hello_world.fromasm index 10da1e436..15b9aa473 100644 --- a/test/emcc_hello_world.fromasm +++ b/test/emcc_hello_world.fromasm @@ -467,14 +467,8 @@ ) ) (if - (i32.shr_s - (i32.shl - (i32.load8_s - (get_local $2) - ) - (i32.const 24) - ) - (i32.const 24) + (i32.load8_s + (get_local $2) ) (set_local $2 (get_local $0) @@ -1415,14 +1409,8 @@ ) (if (i32.lt_s - (i32.shr_s - (i32.shl - (i32.load8_s offset=74 - (get_local $0) - ) - (i32.const 24) - ) - (i32.const 24) + (i32.load8_s offset=74 + (get_local $0) ) (i32.const 1) ) @@ -1697,14 +1685,8 @@ (block $label$break$L10 (if (i32.gt_s - (i32.shr_s - (i32.shl - (i32.load8_s offset=75 - (get_local $2) - ) - (i32.const 24) - ) - (i32.const 24) + (i32.load8_s offset=75 + (get_local $2) ) (i32.const -1) ) @@ -1729,22 +1711,16 @@ ) (if (i32.eq - (i32.shr_s - (i32.shl - (i32.load8_s + (i32.load8_s + (i32.add + (get_local $0) + (tee_local $4 (i32.add - (get_local $0) - (tee_local $4 - (i32.add - (get_local $3) - (i32.const -1) - ) - ) + (get_local $3) + (i32.const -1) ) ) - (i32.const 24) ) - (i32.const 24) ) (i32.const 10) ) @@ -1840,19 +1816,13 @@ (i32.or (i32.add (tee_local $1 - (i32.shr_s - (i32.shl - (i32.load8_s - (tee_local $2 - (i32.add - (get_local $0) - (i32.const 74) - ) - ) + (i32.load8_s + (tee_local $2 + (i32.add + (get_local $0) + (i32.const 74) ) - (i32.const 24) ) - (i32.const 24) ) ) (i32.const 255) @@ -2189,14 +2159,8 @@ (block $while-out$1 (if (i32.eq - (i32.shr_s - (i32.shl - (i32.load8_s - (get_local $2) - ) - (i32.const 24) - ) - (i32.const 24) + (i32.load8_s + (get_local $2) ) (i32.shr_s (i32.shl @@ -2320,14 +2284,8 @@ ) (if (i32.eq - (i32.shr_s - (i32.shl - (i32.load8_s - (get_local $5) - ) - (i32.const 24) - ) - (i32.const 24) + (i32.load8_s + (get_local $5) ) (i32.shr_s (i32.shl @@ -2476,14 +2434,8 @@ (block $while-out$7 (if (i32.eq - (i32.shr_s - (i32.shl - (i32.load8_s - (get_local $9) - ) - (i32.const 24) - ) - (i32.const 24) + (i32.load8_s + (get_local $9) ) (i32.shr_s (i32.shl @@ -3066,14 +3018,8 @@ ) (if (i32.ne - (i32.shr_s - (i32.shl - (i32.load8_s offset=1 - (get_local $54) - ) - (i32.const 24) - ) - (i32.const 24) + (i32.load8_s offset=1 + (get_local $54) ) (i32.const 37) ) @@ -3095,19 +3041,13 @@ ) (if (i32.eq - (i32.shr_s - (i32.shl - (i32.load8_s - (tee_local $1 - (i32.add - (get_local $54) - (i32.const 2) - ) - ) + (i32.load8_s + (tee_local $1 + (i32.add + (get_local $54) + (i32.const 2) ) - (i32.const 24) ) - (i32.const 24) ) (i32.const 37) ) @@ -3211,14 +3151,8 @@ (get_local $5) (tee_local $7 (i32.eq - (i32.shr_s - (i32.shl - (i32.load8_s offset=2 - (get_local $41) - ) - (i32.const 24) - ) - (i32.const 24) + (i32.load8_s offset=2 + (get_local $41) ) (i32.const 36) ) @@ -3370,19 +3304,13 @@ (i32.lt_u (tee_local $1 (i32.add - (i32.shr_s - (i32.shl - (i32.load8_s - (tee_local $6 - (i32.add - (get_local $9) - (i32.const 1) - ) - ) + (i32.load8_s + (tee_local $6 + (i32.add + (get_local $9) + (i32.const 1) ) - (i32.const 24) ) - (i32.const 24) ) (i32.const -48) ) @@ -3391,14 +3319,8 @@ ) (if (i32.eq - (i32.shr_s - (i32.shl - (i32.load8_s offset=2 - (get_local $9) - ) - (i32.const 24) - ) - (i32.const 24) + (i32.load8_s offset=2 + (get_local $9) ) (i32.const 36) ) @@ -3419,14 +3341,8 @@ (get_local $3) (i32.shl (i32.add - (i32.shr_s - (i32.shl - (i32.load8_s - (get_local $6) - ) - (i32.const 24) - ) - (i32.const 24) + (i32.load8_s + (get_local $6) ) (i32.const -48) ) @@ -3601,19 +3517,13 @@ (i32.ge_u (tee_local $6 (i32.add - (i32.shr_s - (i32.shl - (i32.load8_s - (tee_local $1 - (i32.add - (get_local $1) - (i32.const 1) - ) - ) + (i32.load8_s + (tee_local $1 + (i32.add + (get_local $1) + (i32.const 1) ) - (i32.const 24) ) - (i32.const 24) ) (i32.const -48) ) @@ -3663,14 +3573,8 @@ (block $label$break$L46 (if (i32.eq - (i32.shr_s - (i32.shl - (i32.load8_s - (get_local $9) - ) - (i32.const 24) - ) - (i32.const 24) + (i32.load8_s + (get_local $9) ) (i32.const 46) ) @@ -3743,19 +3647,13 @@ (i32.ge_u (tee_local $6 (i32.add - (i32.shr_s - (i32.shl - (i32.load8_s - (tee_local $1 - (i32.add - (get_local $1) - (i32.const 1) - ) - ) + (i32.load8_s + (tee_local $1 + (i32.add + (get_local $1) + (i32.const 1) ) - (i32.const 24) ) - (i32.const 24) ) (i32.const -48) ) @@ -3779,19 +3677,13 @@ (i32.lt_u (tee_local $1 (i32.add - (i32.shr_s - (i32.shl - (i32.load8_s - (tee_local $6 - (i32.add - (get_local $9) - (i32.const 2) - ) - ) + (i32.load8_s + (tee_local $6 + (i32.add + (get_local $9) + (i32.const 2) ) - (i32.const 24) ) - (i32.const 24) ) (i32.const -48) ) @@ -3800,14 +3692,8 @@ ) (if (i32.eq - (i32.shr_s - (i32.shl - (i32.load8_s offset=3 - (get_local $9) - ) - (i32.const 24) - ) - (i32.const 24) + (i32.load8_s offset=3 + (get_local $9) ) (i32.const 36) ) @@ -3828,14 +3714,8 @@ (get_local $3) (i32.shl (i32.add - (i32.shr_s - (i32.shl - (i32.load8_s - (get_local $6) - ) - (i32.const 24) - ) - (i32.const 24) + (i32.load8_s + (get_local $6) ) (i32.const -48) ) @@ -3921,14 +3801,8 @@ (i32.gt_u (tee_local $1 (i32.add - (i32.shr_s - (i32.shl - (i32.load8_s - (get_local $11) - ) - (i32.const 24) - ) - (i32.const 24) + (i32.load8_s + (get_local $11) ) (i32.const -65) ) @@ -4143,14 +4017,8 @@ (i32.eq (i32.and (tee_local $1 - (i32.shr_s - (i32.shl - (i32.load8_s - (get_local $11) - ) - (i32.const 24) - ) - (i32.const 24) + (i32.load8_s + (get_local $11) ) ) (i32.const 15) @@ -5023,14 +4891,8 @@ (get_local $30) ) (i32.eq - (i32.shr_s - (i32.shl - (i32.load8_s - (get_local $9) - ) - (i32.const 24) - ) - (i32.const 24) + (i32.load8_s + (get_local $9) ) (i32.const 45) ) @@ -6182,14 +6044,8 @@ (br_if $do-once$90 (get_local $14) (i32.ne - (i32.shr_s - (i32.shl - (i32.load8_s - (get_local $39) - ) - (i32.const 24) - ) - (i32.const 24) + (i32.load8_s + (get_local $39) ) (i32.const 45) ) |