diff options
Diffstat (limited to 'test/wasm2js')
-rw-r--r-- | test/wasm2js/i64-add-sub.2asm.js.opt | 4 | ||||
-rw-r--r-- | test/wasm2js/i64-ctz.2asm.js.opt | 26 | ||||
-rw-r--r-- | test/wasm2js/unary-ops.2asm.js.opt | 26 |
3 files changed, 23 insertions, 33 deletions
diff --git a/test/wasm2js/i64-add-sub.2asm.js.opt b/test/wasm2js/i64-add-sub.2asm.js.opt index 6d00c9321..d44e7657d 100644 --- a/test/wasm2js/i64-add-sub.2asm.js.opt +++ b/test/wasm2js/i64-add-sub.2asm.js.opt @@ -21,9 +21,7 @@ function asmFunc(global, env) { $5 = $5 | 0; $1_1 = $1_1 + $3 | 0; $0 = $0 + $2 | 0; - if ($2 >>> 0 > $0 >>> 0) { - $1_1 = $1_1 + 1 | 0 - } + $1_1 = $2 >>> 0 > $0 >>> 0 ? $1_1 + 1 | 0 : $1_1; return ($0 | 0) == ($4 | 0) & ($1_1 | 0) == ($5 | 0); } diff --git a/test/wasm2js/i64-ctz.2asm.js.opt b/test/wasm2js/i64-ctz.2asm.js.opt index 4cb4f79ff..9edec2848 100644 --- a/test/wasm2js/i64-ctz.2asm.js.opt +++ b/test/wasm2js/i64-ctz.2asm.js.opt @@ -30,14 +30,12 @@ function asmFunc(global, env) { function __wasm_ctz_i64($0, $1) { var $2 = 0, $3 = 0; if ($0 | $1) { - $3 = $1 + -1 | 0; - $2 = $0 + -1 | 0; - if (($2 | 0) != -1) { - $3 = $3 + 1 | 0 - } - $2 = Math_clz32($0 ^ $2) + 32 | 0; - $0 = Math_clz32($1 ^ $3); - $0 = ($0 | 0) == 32 ? $2 : $0; + $2 = $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 ^ $2); + $0 = ($0 | 0) == 32 ? $3 : $0; $1 = 63 - $0 | 0; i64toi32_i32$HIGH_BITS = 0 - ($0 >>> 0 > 63) | 0; return $1; @@ -49,17 +47,15 @@ function asmFunc(global, env) { function __wasm_popcnt_i64($0, $1) { var $2 = 0, $3 = 0, $4 = 0, $5 = 0; while (1) { - $5 = $3; - $2 = $4; + $5 = $4; + $2 = $3; if ($0 | $1) { $2 = $0; $0 = $2 - 1 & $2; $1 = $1 - ($2 >>> 0 < 1) & $1; - $2 = $3 + 1 | 0; - if ($2 >>> 0 < 1) { - $4 = $4 + 1 | 0 - } - $3 = $2; + $2 = $4 + 1 | 0; + $3 = $2 >>> 0 < 1 ? $3 + 1 | 0 : $3; + $4 = $2; continue; } break; diff --git a/test/wasm2js/unary-ops.2asm.js.opt b/test/wasm2js/unary-ops.2asm.js.opt index 9bda50800..d42ea3e97 100644 --- a/test/wasm2js/unary-ops.2asm.js.opt +++ b/test/wasm2js/unary-ops.2asm.js.opt @@ -71,14 +71,12 @@ function asmFunc(global, env) { function __wasm_ctz_i64($0, $1_1) { var $2 = 0, $3 = 0; if ($0 | $1_1) { - $3 = $1_1 + -1 | 0; - $2 = $0 + -1 | 0; - if (($2 | 0) != -1) { - $3 = $3 + 1 | 0 - } - $2 = Math_clz32($0 ^ $2) + 32 | 0; - $0 = Math_clz32($1_1 ^ $3); - $0 = ($0 | 0) == 32 ? $2 : $0; + $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; @@ -104,17 +102,15 @@ function asmFunc(global, env) { function __wasm_popcnt_i64($0, $1_1) { var $2 = 0, $3 = 0, $4 = 0, $5 = 0; while (1) { - $5 = $3; - $2 = $4; + $5 = $4; + $2 = $3; if ($0 | $1_1) { $2 = $0; $0 = $2 - 1 & $2; $1_1 = $1_1 - ($2 >>> 0 < 1) & $1_1; - $2 = $3 + 1 | 0; - if ($2 >>> 0 < 1) { - $4 = $4 + 1 | 0 - } - $3 = $2; + $2 = $4 + 1 | 0; + $3 = $2 >>> 0 < 1 ? $3 + 1 | 0 : $3; + $4 = $2; continue; } break; |