summaryrefslogtreecommitdiff
path: root/test/wasm2js/unary-ops.2asm.js.opt
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2019-05-10 12:24:03 -0700
committerGitHub <noreply@github.com>2019-05-10 12:24:03 -0700
commit4b35f384fe753f06c22a04bfa1be056e92f67739 (patch)
tree5a1a9c515dbffb01bae91d113ce88e8210e91e8b /test/wasm2js/unary-ops.2asm.js.opt
parentd216f8742ba0663fffb035c577a5449bbc8a33a2 (diff)
downloadbinaryen-4b35f384fe753f06c22a04bfa1be056e92f67739.tar.gz
binaryen-4b35f384fe753f06c22a04bfa1be056e92f67739.tar.bz2
binaryen-4b35f384fe753f06c22a04bfa1be056e92f67739.zip
Look through fallthrough values in precompute-propagate (#2093)
This helps quite a lot on wasm2js.
Diffstat (limited to 'test/wasm2js/unary-ops.2asm.js.opt')
-rw-r--r--test/wasm2js/unary-ops.2asm.js.opt63
1 files changed, 17 insertions, 46 deletions
diff --git a/test/wasm2js/unary-ops.2asm.js.opt b/test/wasm2js/unary-ops.2asm.js.opt
index 7dcc1c85c..836400f0e 100644
--- a/test/wasm2js/unary-ops.2asm.js.opt
+++ b/test/wasm2js/unary-ops.2asm.js.opt
@@ -57,11 +57,7 @@ function asmFunc(global, env, buffer) {
}
function legalstub$3($0, $1_1, $2) {
- var $3 = 0;
- $3 = $1_1;
- $1_1 = $2;
- $2 = $3 | 0;
- return !$1_1 & ($0 | 0) == ($2 | 0);
+ return !$2 & ($0 | 0) == ($1_1 | 0);
}
function legalstub$4($0, $1_1, $2) {
@@ -73,28 +69,7 @@ function asmFunc(global, env, buffer) {
}
function legalstub$8($0, $1_1, $2, $3) {
- var $4 = 0, $5 = 0;
- $5 = $0;
- $4 = 32;
- $0 = $4 & 31;
- if (32 >>> 0 <= $4 >>> 0) {
- $4 = $1_1 << $0;
- $0 = 0;
- } else {
- $4 = (1 << $0) - 1 & $1_1 >>> 32 - $0;
- $0 = $1_1 << $0;
- }
- $5 = $5 | $0;
- $1_1 = 32;
- $0 = $1_1 & 31;
- if (32 >>> 0 <= $1_1 >>> 0) {
- $1_1 = $3 << $0;
- $0 = 0;
- } else {
- $1_1 = (1 << $0) - 1 & $3 >>> 32 - $0;
- $0 = $3 << $0;
- }
- return $8($5, $4, $0 | $2, $1_1);
+ return $8($0, $1_1, $2, $3);
}
function legalstub$9($0, $1_1, $2, $3) {
@@ -102,21 +77,18 @@ function asmFunc(global, env, buffer) {
}
function __wasm_ctz_i64($0, $1_1) {
- var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6_1 = 0;
+ var $2 = 0, $3 = 0;
if ($0 | $1_1) {
- $4 = 63;
- $6_1 = $4;
$3 = $1_1 + -1 | 0;
- $2 = -1;
- $5 = $2 + $0 | 0;
- if ($5 >>> 0 < $2 >>> 0) {
+ $2 = $0 + -1 | 0;
+ if ($2 >>> 0 < -1 >>> 0) {
$3 = $3 + 1 | 0
}
- $2 = Math_clz32($0 ^ $5) + 32 | 0;
+ $2 = Math_clz32($0 ^ $2) + 32 | 0;
$0 = Math_clz32($1_1 ^ $3);
$0 = ($0 | 0) == (32 | 0) ? $2 : $0;
- $1_1 = $6_1 - $0 | 0;
- i64toi32_i32$HIGH_BITS = 0 - ($4 >>> 0 < $0 >>> 0) | 0;
+ $1_1 = 63 - $0 | 0;
+ i64toi32_i32$HIGH_BITS = 0 - (63 >>> 0 < $0 >>> 0) | 0;
return $1_1;
}
i64toi32_i32$HIGH_BITS = 0;
@@ -140,24 +112,23 @@ function asmFunc(global, env, buffer) {
function __wasm_popcnt_i64($0, $1_1) {
var $2 = 0, $3 = 0, $4 = 0, $5 = 0;
label$2 : while (1) {
- $3 = $4;
- $2 = $5;
+ $5 = $3;
+ $2 = $4;
if ($0 | $1_1) {
$2 = $0;
- $3 = 1;
- $0 = $2 - $3 & $2;
- $1_1 = $1_1 - ($2 >>> 0 < $3 >>> 0) & $1_1;
- $2 = 1 + $4 | 0;
- if ($2 >>> 0 < $3 >>> 0) {
- $5 = $5 + 1 | 0
+ $0 = $2 - 1 & $2;
+ $1_1 = $1_1 - ($2 >>> 0 < 1 >>> 0) & $1_1;
+ $2 = $3 + 1 | 0;
+ if ($2 >>> 0 < 1 >>> 0) {
+ $4 = $4 + 1 | 0
}
- $4 = $2;
+ $3 = $2;
continue;
}
break;
};
i64toi32_i32$HIGH_BITS = $2;
- return $3;
+ return $5;
}
var FUNCTION_TABLE = [];