diff options
Diffstat (limited to 'test/wasm2js/unary-ops.2asm.js.opt')
-rw-r--r-- | test/wasm2js/unary-ops.2asm.js.opt | 113 |
1 files changed, 49 insertions, 64 deletions
diff --git a/test/wasm2js/unary-ops.2asm.js.opt b/test/wasm2js/unary-ops.2asm.js.opt index cb37b0099..027c9164d 100644 --- a/test/wasm2js/unary-ops.2asm.js.opt +++ b/test/wasm2js/unary-ops.2asm.js.opt @@ -16,7 +16,17 @@ function asmFunc(env) { var i64toi32_i32$HIGH_BITS = 0; function $1($0) { $0 = $0 | 0; - return __wasm_popcnt_i32($0) | 0; + var $1_1 = 0, $2 = 0; + while (1) { + $2 = $1_1; + if ($0) { + $0 = $0 - 1 & $0; + $1_1 = $1_1 + 1 | 0; + continue; + } + break; + }; + return $2 | 0; } function $6($0) { @@ -34,19 +44,25 @@ function asmFunc(env) { return $0 | 0; } - function $8($0, $1_1, $2, $3) { - $0 = $0 | 0; - $1_1 = $1_1 | 0; - $2 = $2 | 0; - $3 = $3 | 0; - var $4 = 0; - $4 = Math_clz32($0) + 32 | 0; - $0 = Math_clz32($1_1); - return !$3 & ($2 | 0) == ((($0 | 0) == 32 ? $4 : $0) | 0); - } - function legalstub$2($0, $1_1, $2, $3) { - return (__wasm_popcnt_i64($0, $1_1) | 0) == ($2 | 0) & ($3 | 0) == (i64toi32_i32$HIGH_BITS | 0); + var $4 = 0, $5 = 0, $6_1 = 0, $7_1 = 0; + $7_1 = $2; + $4 = $1_1; + while (1) { + $2 = $5; + $1_1 = $6_1; + if ($0 | $4) { + $1_1 = $0; + $0 = $1_1 - 1 & $1_1; + $4 = $4 - ($1_1 >>> 0 < 1) & $4; + $5 = $5 + 1 | 0; + $6_1 = $5 >>> 0 < 1 ? $6_1 + 1 | 0 : $6_1; + continue; + } + break; + }; + i64toi32_i32$HIGH_BITS = $1_1; + return ($2 | 0) == ($7_1 | 0) & ($3 | 0) == (i64toi32_i32$HIGH_BITS | 0); } function legalstub$3($0, $1_1, $2) { @@ -62,62 +78,31 @@ function asmFunc(env) { } function legalstub$8($0, $1_1, $2, $3) { - return $8($0, $1_1, $2, $3); + var $4 = 0; + $4 = Math_clz32($0) + 32 | 0; + $0 = Math_clz32($1_1); + return !$3 & ($2 | 0) == ((($0 | 0) == 32 ? $4 : $0) | 0); } function legalstub$9($0, $1_1, $2, $3) { - return (__wasm_ctz_i64($0, $1_1) | 0) == ($2 | 0) & ($3 | 0) == (i64toi32_i32$HIGH_BITS | 0); - } - - function __wasm_ctz_i64($0, $1_1) { - var $2 = 0, $3 = 0; - if ($0 | $1_1) { - $2 = $1_1 - 1 | 0; - $3 = $0 - 1 | 0; - $2 = ($3 | 0) != -1 ? $2 + 1 | 0 : $2; - $3 = Math_clz32($0 ^ $3) + 32 | 0; - $0 = Math_clz32($1_1 ^ $2); - $0 = ($0 | 0) == 32 ? $3 : $0; - $1_1 = 63 - $0 | 0; - i64toi32_i32$HIGH_BITS = 0 - ($0 >>> 0 > 63) | 0; - return $1_1; - } - i64toi32_i32$HIGH_BITS = 0; - return 64; - } - - function __wasm_popcnt_i32($0) { - var $1_1 = 0, $2 = 0; - while (1) { - $2 = $1_1; - if ($0) { - $0 = $0 - 1 & $0; - $1_1 = $1_1 + 1 | 0; - continue; - } - break; - }; - return $2; - } - - function __wasm_popcnt_i64($0, $1_1) { - var $2 = 0, $3 = 0, $4 = 0, $5 = 0; - while (1) { - $5 = $4; - $2 = $3; + var $4 = 0, $5 = 0, $6_1 = 0, $7_1 = 0; + __inlined_func$__wasm_ctz_i64 : { if ($0 | $1_1) { - $2 = $0; - $0 = $2 - 1 & $2; - $1_1 = $1_1 - ($2 >>> 0 < 1) & $1_1; - $2 = $4 + 1 | 0; - $3 = $2 >>> 0 < 1 ? $3 + 1 | 0 : $3; - $4 = $2; - continue; + $4 = $1_1 - 1 | 0; + $5 = $4 + 1 | 0; + $6_1 = $4; + $4 = $0 - 1 | 0; + $7_1 = Math_clz32($0 ^ $4) + 32 | 0; + $0 = Math_clz32($1_1 ^ (($4 | 0) != -1 ? $5 : $6_1)); + $0 = ($0 | 0) == 32 ? $7_1 : $0; + $1_1 = 63 - $0 | 0; + i64toi32_i32$HIGH_BITS = 0 - ($0 >>> 0 > 63) | 0; + break __inlined_func$__wasm_ctz_i64; } - break; - }; - i64toi32_i32$HIGH_BITS = $2; - return $5; + i64toi32_i32$HIGH_BITS = 0; + $1_1 = 64; + } + return ($1_1 | 0) == ($2 | 0) & ($3 | 0) == (i64toi32_i32$HIGH_BITS | 0); } return { |