diff options
45 files changed, 226 insertions, 941 deletions
diff --git a/auto_update_tests.py b/auto_update_tests.py index f37019f3f..f4b13c737 100755 --- a/auto_update_tests.py +++ b/auto_update_tests.py @@ -428,11 +428,11 @@ def main(): update_example_tests() update_wasm_dis_tests() update_wasm_merge_tests() - update_binaryen_js_tests() update_ctor_eval_tests() update_wasm2js_tests() update_metadce_tests() update_reduce_tests() + update_binaryen_js_tests() print '\n[ success! ]' diff --git a/src/ir/local-utils.h b/src/ir/local-utils.h index 2feeeeb00..beb90d7b3 100644 --- a/src/ir/local-utils.h +++ b/src/ir/local-utils.h @@ -46,6 +46,8 @@ struct GetLocalCounter : public PostWalker<GetLocalCounter> { } }; +// Removes trivially unneeded sets: sets for whom there is no possible get, and +// sets of the same value immediately. struct UnneededSetRemover : public PostWalker<UnneededSetRemover> { PassOptions& passOptions; @@ -64,19 +66,42 @@ struct UnneededSetRemover : public PostWalker<UnneededSetRemover> { bool removed = false; void visitSetLocal(SetLocal *curr) { + // If no possible uses, remove. if (getLocalCounter->num[curr->index] == 0) { - auto* value = curr->value; - if (curr->isTee()) { - this->replaceCurrent(value); - } else if (EffectAnalyzer(passOptions, curr->value).hasSideEffects()) { - Drop* drop = ExpressionManipulator::convert<SetLocal, Drop>(curr); - drop->value = value; - drop->finalize(); - } else { - ExpressionManipulator::nop(curr); + remove(curr); + } + // If setting the same value as we already have, remove. + auto* value = curr->value; + while (true) { + if (auto* set = value->dynCast<SetLocal>()) { + if (set->index == curr->index) { + remove(curr); + } else { + // Handle tee chains. + value = set->value; + continue; + } + } else if (auto* get = value->dynCast<GetLocal>()) { + if (get->index == curr->index) { + remove(curr); + } } - removed = true; + break; + } + } + + void remove(SetLocal* set) { + auto* value = set->value; + if (set->isTee()) { + replaceCurrent(value); + } else if (EffectAnalyzer(passOptions, set->value).hasSideEffects()) { + Drop* drop = ExpressionManipulator::convert<SetLocal, Drop>(set); + drop->value = value; + drop->finalize(); + } else { + ExpressionManipulator::nop(set); } + removed = true; } }; diff --git a/src/passes/CoalesceLocals.cpp b/src/passes/CoalesceLocals.cpp index a7c8b7fc0..2835744d3 100644 --- a/src/passes/CoalesceLocals.cpp +++ b/src/passes/CoalesceLocals.cpp @@ -75,6 +75,10 @@ struct CoalesceLocals : public WalkerPass<LivenessWalker<CoalesceLocals, Visitor interferences[low * numLocals + high] = 1; } + void unInterfere(Index i, Index j) { + interferences[std::min(i, j) * numLocals + std::max(i, j)] = 0; + } + bool interferes(Index i, Index j) { return interferences[std::min(i, j) * numLocals + std::max(i, j)]; } diff --git a/test/emcc_hello_world.fromasm b/test/emcc_hello_world.fromasm index de5871b8f..0efc4d121 100644 --- a/test/emcc_hello_world.fromasm +++ b/test/emcc_hello_world.fromasm @@ -2033,6 +2033,9 @@ (local $48 i32) (local $49 i32) (local $50 i32) + (local.set $4 + (i32.const 672) + ) (local.set $28 (global.get $STACKTOP) ) @@ -2078,7 +2081,7 @@ (local.set $38 (local.tee $25 (i32.add - (local.tee $4 + (local.tee $19 (i32.add (local.get $13) (i32.const 536) @@ -2090,13 +2093,13 @@ ) (local.set $39 (i32.add - (local.get $4) + (local.get $19) (i32.const 39) ) ) (local.set $33 (i32.add - (local.tee $4 + (local.tee $19 (i32.add (local.get $13) (i32.const 576) @@ -2107,7 +2110,7 @@ ) (local.set $40 (i32.add - (local.get $4) + (local.get $19) (i32.const 11) ) ) @@ -2163,8 +2166,8 @@ (i32.const 8) ) ) - (local.set $4 - (i32.const 672) + (local.set $19 + (i32.const 0) ) (block $label$break$L343 (block $__rjti$9 @@ -6623,7 +6626,7 @@ ) (loop $while-in130 (if - (local.tee $19 + (local.tee $4 (i32.load (i32.add (i32.shl @@ -6643,7 +6646,7 @@ ) (local.get $2) ) - (local.get $19) + (local.get $4) (local.get $1) ) (br_if $while-in130 diff --git a/test/emcc_hello_world.fromasm.clamp b/test/emcc_hello_world.fromasm.clamp index 983b724c2..ce65cca04 100644 --- a/test/emcc_hello_world.fromasm.clamp +++ b/test/emcc_hello_world.fromasm.clamp @@ -2083,6 +2083,9 @@ (local $48 i32) (local $49 i32) (local $50 i32) + (local.set $4 + (i32.const 672) + ) (local.set $28 (global.get $STACKTOP) ) @@ -2128,7 +2131,7 @@ (local.set $38 (local.tee $25 (i32.add - (local.tee $4 + (local.tee $19 (i32.add (local.get $13) (i32.const 536) @@ -2140,13 +2143,13 @@ ) (local.set $39 (i32.add - (local.get $4) + (local.get $19) (i32.const 39) ) ) (local.set $33 (i32.add - (local.tee $4 + (local.tee $19 (i32.add (local.get $13) (i32.const 576) @@ -2157,7 +2160,7 @@ ) (local.set $40 (i32.add - (local.get $4) + (local.get $19) (i32.const 11) ) ) @@ -2213,8 +2216,8 @@ (i32.const 8) ) ) - (local.set $4 - (i32.const 672) + (local.set $19 + (i32.const 0) ) (block $label$break$L343 (block $__rjti$9 @@ -6673,7 +6676,7 @@ ) (loop $while-in130 (if - (local.tee $19 + (local.tee $4 (i32.load (i32.add (i32.shl @@ -6693,7 +6696,7 @@ ) (local.get $2) ) - (local.get $19) + (local.get $4) (local.get $1) ) (br_if $while-in130 diff --git a/test/emcc_hello_world.fromasm.imprecise b/test/emcc_hello_world.fromasm.imprecise index 3e6c03d49..fe4884027 100644 --- a/test/emcc_hello_world.fromasm.imprecise +++ b/test/emcc_hello_world.fromasm.imprecise @@ -1967,6 +1967,9 @@ (local $47 i32) (local $48 i32) (local $49 i32) + (local.set $4 + (i32.const 672) + ) (local.set $28 (global.get $STACKTOP) ) @@ -2012,7 +2015,7 @@ (local.set $38 (local.tee $25 (i32.add - (local.tee $4 + (local.tee $19 (i32.add (local.get $13) (i32.const 536) @@ -2024,13 +2027,13 @@ ) (local.set $39 (i32.add - (local.get $4) + (local.get $19) (i32.const 39) ) ) (local.set $33 (i32.add - (local.tee $4 + (local.tee $19 (i32.add (local.get $13) (i32.const 576) @@ -2041,7 +2044,7 @@ ) (local.set $40 (i32.add - (local.get $4) + (local.get $19) (i32.const 11) ) ) @@ -2097,8 +2100,8 @@ (i32.const 8) ) ) - (local.set $4 - (i32.const 672) + (local.set $19 + (i32.const 0) ) (block $label$break$L343 (block $__rjti$9 @@ -6519,7 +6522,7 @@ ) (loop $while-in130 (if - (local.tee $19 + (local.tee $4 (i32.load (i32.add (i32.shl @@ -6539,7 +6542,7 @@ ) (local.get $2) ) - (local.get $19) + (local.get $4) (local.get $1) ) (br_if $while-in130 diff --git a/test/passes/flatten_dfo_O3.txt b/test/passes/flatten_dfo_O3.txt index 48ebd3dc8..74ddb5e2e 100644 --- a/test/passes/flatten_dfo_O3.txt +++ b/test/passes/flatten_dfo_O3.txt @@ -40,7 +40,6 @@ ) (func $4 (; 4 ;) (; has Stack IR ;) (type $3) (param $0 f64) (result f64) (local $1 i32) - (local $2 i32) (loop $label$1 (br $label$1) ) diff --git a/test/passes/flatten_simplify-locals-nonesting_souperify-single-use.txt b/test/passes/flatten_simplify-locals-nonesting_souperify-single-use.txt index db538c441..af2ba0f59 100644 --- a/test/passes/flatten_simplify-locals-nonesting_souperify-single-use.txt +++ b/test/passes/flatten_simplify-locals-nonesting_souperify-single-use.txt @@ -3571,9 +3571,7 @@ infer %4 ) (nop) (nop) - (local.set $y - (local.get $y) - ) + (nop) (nop) (nop) (br_if $loopy @@ -4324,9 +4322,7 @@ infer %4 (nop) ) (nop) - (local.set $var$0 - (local.get $var$0) - ) + (nop) (nop) (loop $label$6 (block $label$7 @@ -4370,9 +4366,7 @@ infer %4 (nop) ) (nop) - (local.set $var$1 - (local.get $var$1) - ) + (nop) (nop) (br $label$1) (unreachable) @@ -5055,9 +5049,7 @@ infer %4 (nop) (nop) (nop) - (local.set $var$2 - (local.get $var$2) - ) + (nop) (nop) (br $label$1) (unreachable) diff --git a/test/passes/flatten_simplify-locals-nonesting_souperify.txt b/test/passes/flatten_simplify-locals-nonesting_souperify.txt index 64829ad50..6d70acdcd 100644 --- a/test/passes/flatten_simplify-locals-nonesting_souperify.txt +++ b/test/passes/flatten_simplify-locals-nonesting_souperify.txt @@ -3677,9 +3677,7 @@ infer %4 ) (nop) (nop) - (local.set $y - (local.get $y) - ) + (nop) (nop) (nop) (br_if $loopy @@ -4430,9 +4428,7 @@ infer %4 (nop) ) (nop) - (local.set $var$0 - (local.get $var$0) - ) + (nop) (nop) (loop $label$6 (block $label$7 @@ -4476,9 +4472,7 @@ infer %4 (nop) ) (nop) - (local.set $var$1 - (local.get $var$1) - ) + (nop) (nop) (br $label$1) (unreachable) @@ -5161,9 +5155,7 @@ infer %4 (nop) (nop) (nop) - (local.set $var$2 - (local.get $var$2) - ) + (nop) (nop) (br $label$1) (unreachable) diff --git a/test/passes/simplify-locals-nostructure.txt b/test/passes/simplify-locals-nostructure.txt index 7ac5fe647..42ee14a0f 100644 --- a/test/passes/simplify-locals-nostructure.txt +++ b/test/passes/simplify-locals-nostructure.txt @@ -123,9 +123,7 @@ ) (block $block (nop) - (local.set $x - (local.get $x) - ) + (nop) ) ) (local.get $x) diff --git a/test/passes/simplify-locals.txt b/test/passes/simplify-locals.txt index 81eb0d522..cfb995910 100644 --- a/test/passes/simplify-locals.txt +++ b/test/passes/simplify-locals.txt @@ -1690,4 +1690,33 @@ (i32.const -5417091) ) ) + (func $tee-chain (; 28 ;) (type $FUNCSIG$iiiiii) (param $x i32) (param $z i32) (param $t1 i32) (param $t2 i32) (param $t3 i32) (result i32) + (nop) + (drop + (i32.const 10) + ) + (nop) + (local.set $t2 + (local.tee $t3 + (local.tee $t1 + (call $tee-chain + (local.get $x) + (local.tee $z + (i32.const 10) + ) + (local.get $t1) + (local.get $t2) + (local.get $t3) + ) + ) + ) + ) + (call $tee-chain + (local.get $x) + (local.get $z) + (local.get $t1) + (local.get $t2) + (local.get $t3) + ) + ) ) diff --git a/test/passes/simplify-locals.wast b/test/passes/simplify-locals.wast index 0dcf75f9d..1f25f5427 100644 --- a/test/passes/simplify-locals.wast +++ b/test/passes/simplify-locals.wast @@ -1514,4 +1514,35 @@ (local.get $2) ) ) + (func $tee-chain + (param $x i32) + (param $z i32) + (param $t1 i32) + (param $t2 i32) + (param $t3 i32) + (result i32) + (local.set $x + (local.get $x) + ) + (local.set $z + (local.tee $z + (i32.const 10) + ) + ) + (local.set $z + (local.tee $z + (i32.const 10) + ) + ) + (local.set $t1 + (local.tee $t2 + (local.tee $t3 + (local.tee $t1 + (call $tee-chain (local.get $x) (local.get $z) (local.get $t1) (local.get $t2) (local.get $t3)) + ) + ) + ) + ) + (call $tee-chain (local.get $x) (local.get $z) (local.get $t1) (local.get $t2) (local.get $t3)) + ) ) diff --git a/test/wasm2js/br.2asm.js b/test/wasm2js/br.2asm.js index 1b8a74c60..90822c599 100644 --- a/test/wasm2js/br.2asm.js +++ b/test/wasm2js/br.2asm.js @@ -59,7 +59,6 @@ function asmFunc(global, env, buffer) { break block; }; i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return $0 | 0; } @@ -210,7 +209,6 @@ function asmFunc(global, env, buffer) { break block; }; i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return $0 | 0; } @@ -381,7 +379,6 @@ function asmFunc(global, env, buffer) { break block; }; i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return $0 | 0; } @@ -449,7 +446,6 @@ function asmFunc(global, env, buffer) { break block; }; i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return $0 | 0; } @@ -565,12 +561,10 @@ function asmFunc(global, env, buffer) { function __wasm_ctz_i64(var$0, var$0$hi) { var$0 = var$0 | 0; var$0$hi = var$0$hi | 0; - var i64toi32_i32$0 = 0, i64toi32_i32$3 = 0, i64toi32_i32$4 = 0, i64toi32_i32$5 = 0, i64toi32_i32$2 = 0, i64toi32_i32$1 = 0, $10_1 = 0, $5$hi = 0, $8$hi = 0; + var i64toi32_i32$0 = 0, i64toi32_i32$3 = 0, i64toi32_i32$5 = 0, i64toi32_i32$4 = 0, i64toi32_i32$2 = 0, i64toi32_i32$1 = 0, $10_1 = 0, $5$hi = 0, $8$hi = 0; i64toi32_i32$0 = var$0$hi; - i64toi32_i32$0 = i64toi32_i32$0; if (((var$0 | i64toi32_i32$0 | 0 | 0) == (0 | 0) | 0) == (0 | 0)) { i64toi32_i32$0 = var$0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = var$0; i64toi32_i32$1 = 4294967295; i64toi32_i32$3 = 4294967295; @@ -584,7 +578,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$2 = var$0$hi; i64toi32_i32$3 = var$0; i64toi32_i32$2 = i64toi32_i32$5 ^ i64toi32_i32$2 | 0; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$0 = i64toi32_i32$0 ^ i64toi32_i32$3 | 0; i64toi32_i32$3 = Math_clz32(i64toi32_i32$2); i64toi32_i32$5 = 0; @@ -597,14 +590,11 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$0 - i64toi32_i32$3 | 0; i64toi32_i32$4 = (i64toi32_i32$0 >>> 0 < i64toi32_i32$3 >>> 0) + i64toi32_i32$2 | 0; i64toi32_i32$4 = i64toi32_i32$5 - i64toi32_i32$4 | 0; - i64toi32_i32$4 = i64toi32_i32$4; i64toi32_i32$0 = i64toi32_i32$1; i64toi32_i32$HIGH_BITS = i64toi32_i32$4; return i64toi32_i32$0 | 0; } i64toi32_i32$0 = 0; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$4 = 64; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$4 | 0; diff --git a/test/wasm2js/br_if.2asm.js b/test/wasm2js/br_if.2asm.js index ff17cc8eb..628da8ee9 100644 --- a/test/wasm2js/br_if.2asm.js +++ b/test/wasm2js/br_if.2asm.js @@ -84,7 +84,6 @@ function asmFunc(global, env, buffer) { dummy(); $2_1 = 11; if ($0) break block; - $2_1 = $2_1; }; return $2_1 | 0; } diff --git a/test/wasm2js/br_table.2asm.js b/test/wasm2js/br_table.2asm.js index 763eb8b44..863fe53b5 100644 --- a/test/wasm2js/br_table.2asm.js +++ b/test/wasm2js/br_table.2asm.js @@ -59,7 +59,6 @@ function asmFunc(global, env, buffer) { var i64toi32_i32$0 = 0, $1_1 = 0, $1$hi = 0; block : { i64toi32_i32$0 = 0; - i64toi32_i32$0 = i64toi32_i32$0; $1_1 = 2; $1$hi = i64toi32_i32$0; switch (0 | 0) { @@ -70,7 +69,6 @@ function asmFunc(global, env, buffer) { }; }; i64toi32_i32$0 = $1$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return $1_1 | 0; } @@ -49652,7 +49650,6 @@ function asmFunc(global, env, buffer) { var i64toi32_i32$0 = 0, $1_1 = 0, $1$hi = 0; block : { i64toi32_i32$0 = 0; - i64toi32_i32$0 = i64toi32_i32$0; $1_1 = 7; $1$hi = i64toi32_i32$0; switch (0 | 0) { @@ -49661,7 +49658,6 @@ function asmFunc(global, env, buffer) { }; }; i64toi32_i32$0 = $1$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return $1_1 | 0; } @@ -49879,7 +49875,6 @@ function asmFunc(global, env, buffer) { var i64toi32_i32$0 = 0, $1_1 = 0, $1$hi = 0; block : { i64toi32_i32$0 = 0; - i64toi32_i32$0 = i64toi32_i32$0; $1_1 = 30; $1$hi = i64toi32_i32$0; switch (1 | 0) { @@ -49888,7 +49883,6 @@ function asmFunc(global, env, buffer) { }; }; i64toi32_i32$0 = $1$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return $1_1 | 0; } @@ -49971,7 +49965,6 @@ function asmFunc(global, env, buffer) { var i64toi32_i32$0 = 0, $1_1 = 0, $1$hi = 0; block : { i64toi32_i32$0 = 0; - i64toi32_i32$0 = i64toi32_i32$0; $1_1 = 45; $1$hi = i64toi32_i32$0; switch (0 | 0) { @@ -49980,7 +49973,6 @@ function asmFunc(global, env, buffer) { }; }; i64toi32_i32$0 = $1$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return $1_1 | 0; } @@ -50204,12 +50196,10 @@ function asmFunc(global, env, buffer) { function __wasm_ctz_i64(var$0, var$0$hi) { var$0 = var$0 | 0; var$0$hi = var$0$hi | 0; - var i64toi32_i32$0 = 0, i64toi32_i32$3 = 0, i64toi32_i32$4 = 0, i64toi32_i32$5 = 0, i64toi32_i32$2 = 0, i64toi32_i32$1 = 0, $10_1 = 0, $5$hi = 0, $8$hi = 0; + var i64toi32_i32$0 = 0, i64toi32_i32$3 = 0, i64toi32_i32$5 = 0, i64toi32_i32$4 = 0, i64toi32_i32$2 = 0, i64toi32_i32$1 = 0, $10_1 = 0, $5$hi = 0, $8$hi = 0; i64toi32_i32$0 = var$0$hi; - i64toi32_i32$0 = i64toi32_i32$0; if (((var$0 | i64toi32_i32$0 | 0 | 0) == (0 | 0) | 0) == (0 | 0)) { i64toi32_i32$0 = var$0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = var$0; i64toi32_i32$1 = 4294967295; i64toi32_i32$3 = 4294967295; @@ -50223,7 +50213,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$2 = var$0$hi; i64toi32_i32$3 = var$0; i64toi32_i32$2 = i64toi32_i32$5 ^ i64toi32_i32$2 | 0; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$0 = i64toi32_i32$0 ^ i64toi32_i32$3 | 0; i64toi32_i32$3 = Math_clz32(i64toi32_i32$2); i64toi32_i32$5 = 0; @@ -50236,14 +50225,11 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$0 - i64toi32_i32$3 | 0; i64toi32_i32$4 = (i64toi32_i32$0 >>> 0 < i64toi32_i32$3 >>> 0) + i64toi32_i32$2 | 0; i64toi32_i32$4 = i64toi32_i32$5 - i64toi32_i32$4 | 0; - i64toi32_i32$4 = i64toi32_i32$4; i64toi32_i32$0 = i64toi32_i32$1; i64toi32_i32$HIGH_BITS = i64toi32_i32$4; return i64toi32_i32$0 | 0; } i64toi32_i32$0 = 0; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$4 = 64; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$4 | 0; diff --git a/test/wasm2js/br_table_temp.2asm.js b/test/wasm2js/br_table_temp.2asm.js index 25ef5feab..adcdc270d 100644 --- a/test/wasm2js/br_table_temp.2asm.js +++ b/test/wasm2js/br_table_temp.2asm.js @@ -59,7 +59,6 @@ function asmFunc(global, env, buffer) { var i64toi32_i32$0 = 0, $1_1 = 0, $1$hi = 0; block : { i64toi32_i32$0 = 0; - i64toi32_i32$0 = i64toi32_i32$0; $1_1 = 2; $1$hi = i64toi32_i32$0; switch (0 | 0) { @@ -70,7 +69,6 @@ function asmFunc(global, env, buffer) { }; }; i64toi32_i32$0 = $1$hi; - i64toi32_i32$0 = i64toi32_i32$0; return $1_1 | 0; } @@ -49651,7 +49649,6 @@ function asmFunc(global, env, buffer) { var i64toi32_i32$0 = 0, $1_1 = 0, $1$hi = 0; block : { i64toi32_i32$0 = 0; - i64toi32_i32$0 = i64toi32_i32$0; $1_1 = 7; $1$hi = i64toi32_i32$0; switch (0 | 0) { @@ -49660,7 +49657,6 @@ function asmFunc(global, env, buffer) { }; }; i64toi32_i32$0 = $1$hi; - i64toi32_i32$0 = i64toi32_i32$0; return $1_1 | 0; } @@ -49877,7 +49873,6 @@ function asmFunc(global, env, buffer) { var i64toi32_i32$0 = 0, $1_1 = 0, $1$hi = 0; block : { i64toi32_i32$0 = 0; - i64toi32_i32$0 = i64toi32_i32$0; $1_1 = 30; $1$hi = i64toi32_i32$0; switch (1 | 0) { @@ -49886,7 +49881,6 @@ function asmFunc(global, env, buffer) { }; }; i64toi32_i32$0 = $1$hi; - i64toi32_i32$0 = i64toi32_i32$0; return $1_1 | 0; } @@ -49968,7 +49962,6 @@ function asmFunc(global, env, buffer) { var i64toi32_i32$0 = 0, $1_1 = 0, $1$hi = 0; block : { i64toi32_i32$0 = 0; - i64toi32_i32$0 = i64toi32_i32$0; $1_1 = 45; $1$hi = i64toi32_i32$0; switch (0 | 0) { @@ -49977,7 +49970,6 @@ function asmFunc(global, env, buffer) { }; }; i64toi32_i32$0 = $1$hi; - i64toi32_i32$0 = i64toi32_i32$0; return $1_1 | 0; } @@ -50200,12 +50192,10 @@ function asmFunc(global, env, buffer) { function __wasm_ctz_i64(var$0, var$0$hi) { var$0 = var$0 | 0; var$0$hi = var$0$hi | 0; - var i64toi32_i32$0 = 0, i64toi32_i32$3 = 0, i64toi32_i32$4 = 0, i64toi32_i32$5 = 0, i64toi32_i32$2 = 0, i64toi32_i32$1 = 0, $10_1 = 0, $5$hi = 0, $8$hi = 0; + var i64toi32_i32$0 = 0, i64toi32_i32$3 = 0, i64toi32_i32$5 = 0, i64toi32_i32$4 = 0, i64toi32_i32$2 = 0, i64toi32_i32$1 = 0, $10_1 = 0, $5$hi = 0, $8$hi = 0; i64toi32_i32$0 = var$0$hi; - i64toi32_i32$0 = i64toi32_i32$0; if (((var$0 | i64toi32_i32$0 | 0 | 0) == (0 | 0) | 0) == (0 | 0)) { i64toi32_i32$0 = var$0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = var$0; i64toi32_i32$1 = 4294967295; i64toi32_i32$3 = 4294967295; @@ -50219,7 +50209,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$2 = var$0$hi; i64toi32_i32$3 = var$0; i64toi32_i32$2 = i64toi32_i32$5 ^ i64toi32_i32$2 | 0; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$0 = i64toi32_i32$0 ^ i64toi32_i32$3 | 0; i64toi32_i32$3 = Math_clz32(i64toi32_i32$2); i64toi32_i32$5 = 0; @@ -50232,14 +50221,11 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$0 - i64toi32_i32$3 | 0; i64toi32_i32$4 = (i64toi32_i32$0 >>> 0 < i64toi32_i32$3 >>> 0) + i64toi32_i32$2 | 0; i64toi32_i32$4 = i64toi32_i32$5 - i64toi32_i32$4 | 0; - i64toi32_i32$4 = i64toi32_i32$4; i64toi32_i32$0 = i64toi32_i32$1; i64toi32_i32$HIGH_BITS = i64toi32_i32$4; return i64toi32_i32$0 | 0; } i64toi32_i32$0 = 0; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$4 = 64; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$4 | 0; diff --git a/test/wasm2js/call.2asm.js b/test/wasm2js/call.2asm.js index 04255b1fb..470e63c21 100644 --- a/test/wasm2js/call.2asm.js +++ b/test/wasm2js/call.2asm.js @@ -48,7 +48,6 @@ function asmFunc(global, env, buffer) { $0$hi = $0$hi | 0; var i64toi32_i32$0 = 0; i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return $0 | 0; } @@ -75,7 +74,6 @@ function asmFunc(global, env, buffer) { $1$hi = $1$hi | 0; var i64toi32_i32$0 = 0; i64toi32_i32$0 = $1$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return $1 | 0; } @@ -101,8 +99,6 @@ function asmFunc(global, env, buffer) { var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0; i64toi32_i32$0 = const_i64() | 0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$1 = i64toi32_i32$1; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$0 | 0; } @@ -124,8 +120,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$0 = 0; i64toi32_i32$0 = id_i64(64 | 0, i64toi32_i32$0 | 0) | 0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$1 = i64toi32_i32$1; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$0 | 0; } @@ -147,8 +141,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$0 = 0; i64toi32_i32$0 = i32_i64(32 | 0, 64 | 0, i64toi32_i32$0 | 0) | 0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$1 = i64toi32_i32$1; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$0 | 0; } @@ -164,22 +156,18 @@ function asmFunc(global, env, buffer) { function fac($0, $0$hi) { $0 = $0 | 0; $0$hi = $0$hi | 0; - var i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, i64toi32_i32$5 = 0, $8 = 0, $8$hi = 0, i64toi32_i32$3 = 0, $6 = 0, $6$hi = 0; + var i64toi32_i32$5 = 0, i64toi32_i32$2 = 0, i64toi32_i32$0 = 0, $8 = 0, $8$hi = 0, i64toi32_i32$3 = 0, $6 = 0, $6$hi = 0; i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; if (($0 | i64toi32_i32$0 | 0 | 0) == (0 | 0)) { i64toi32_i32$0 = 0; $8 = 1; $8$hi = i64toi32_i32$0; } else { i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = $0; i64toi32_i32$3 = 1; i64toi32_i32$5 = (i64toi32_i32$2 >>> 0 < i64toi32_i32$3 >>> 0) + 0 | 0; i64toi32_i32$5 = i64toi32_i32$0 - i64toi32_i32$5 | 0; - i64toi32_i32$5 = i64toi32_i32$5; i64toi32_i32$5 = fac(i64toi32_i32$2 - i64toi32_i32$3 | 0 | 0, i64toi32_i32$5 | 0) | 0; i64toi32_i32$2 = i64toi32_i32$HIGH_BITS; $6 = i64toi32_i32$5; @@ -188,12 +176,10 @@ function asmFunc(global, env, buffer) { i64toi32_i32$5 = $6$hi; i64toi32_i32$5 = __wasm_i64_mul($0 | 0, i64toi32_i32$0 | 0, $6 | 0, i64toi32_i32$5 | 0) | 0; i64toi32_i32$2 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$2 = i64toi32_i32$2; $8 = i64toi32_i32$5; $8$hi = i64toi32_i32$2; } i64toi32_i32$2 = $8$hi; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$5 = $8; i64toi32_i32$HIGH_BITS = i64toi32_i32$2; return i64toi32_i32$5 | 0; @@ -204,17 +190,14 @@ function asmFunc(global, env, buffer) { $0$hi = $0$hi | 0; $1 = $1 | 0; $1$hi = $1$hi | 0; - var i64toi32_i32$5 = 0, i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, $11 = 0, $11$hi = 0, i64toi32_i32$3 = 0, $6 = 0, $6$hi = 0, $9 = 0, $9$hi = 0; + var i64toi32_i32$5 = 0, i64toi32_i32$2 = 0, i64toi32_i32$0 = 0, $11 = 0, $11$hi = 0, i64toi32_i32$3 = 0, $6 = 0, $6$hi = 0, $9 = 0, $9$hi = 0; i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; if (($0 | i64toi32_i32$0 | 0 | 0) == (0 | 0)) { i64toi32_i32$0 = $1$hi; - i64toi32_i32$0 = i64toi32_i32$0; $11 = $1; $11$hi = i64toi32_i32$0; } else { i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = $0; i64toi32_i32$3 = 1; i64toi32_i32$5 = (i64toi32_i32$2 >>> 0 < i64toi32_i32$3 >>> 0) + 0 | 0; @@ -233,12 +216,10 @@ function asmFunc(global, env, buffer) { i64toi32_i32$2 = $9$hi; i64toi32_i32$2 = fac_acc($6 | 0, i64toi32_i32$5 | 0, $9 | 0, i64toi32_i32$2 | 0) | 0; i64toi32_i32$5 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$5 = i64toi32_i32$5; $11 = i64toi32_i32$2; $11$hi = i64toi32_i32$5; } i64toi32_i32$5 = $11$hi; - i64toi32_i32$5 = i64toi32_i32$5; i64toi32_i32$2 = $11; i64toi32_i32$HIGH_BITS = i64toi32_i32$5; return i64toi32_i32$2 | 0; @@ -247,9 +228,8 @@ function asmFunc(global, env, buffer) { function fib($0, $0$hi) { $0 = $0 | 0; $0$hi = $0$hi | 0; - var i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, i64toi32_i32$3 = 0, i64toi32_i32$5 = 0, i64toi32_i32$1 = 0, i64toi32_i32$4 = 0, i64toi32_i32$6 = 0, $10 = 0, $10$hi = 0, $5 = 0, $5$hi = 0, $8 = 0, $8$hi = 0; + var i64toi32_i32$2 = 0, i64toi32_i32$3 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$5 = 0, i64toi32_i32$4 = 0, i64toi32_i32$6 = 0, $10 = 0, $10$hi = 0, $5 = 0, $5$hi = 0, $8 = 0, $8$hi = 0; i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = $0; i64toi32_i32$1 = 0; i64toi32_i32$3 = 1; @@ -259,7 +239,6 @@ function asmFunc(global, env, buffer) { $10$hi = i64toi32_i32$2; } else { i64toi32_i32$2 = $0$hi; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$3 = $0; i64toi32_i32$0 = 0; i64toi32_i32$1 = 2; @@ -267,7 +246,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$6 = i64toi32_i32$3 >>> 0 < i64toi32_i32$1 >>> 0; i64toi32_i32$5 = i64toi32_i32$6 + i64toi32_i32$0 | 0; i64toi32_i32$5 = i64toi32_i32$2 - i64toi32_i32$5 | 0; - i64toi32_i32$5 = i64toi32_i32$5; i64toi32_i32$5 = fib(i64toi32_i32$4 | 0, i64toi32_i32$5 | 0) | 0; i64toi32_i32$3 = i64toi32_i32$HIGH_BITS; $5 = i64toi32_i32$5; @@ -281,7 +259,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$6 = i64toi32_i32$2 >>> 0 < i64toi32_i32$1 >>> 0; i64toi32_i32$4 = i64toi32_i32$6 + i64toi32_i32$5 | 0; i64toi32_i32$4 = i64toi32_i32$3 - i64toi32_i32$4 | 0; - i64toi32_i32$4 = i64toi32_i32$4; i64toi32_i32$4 = fib(i64toi32_i32$0 | 0, i64toi32_i32$4 | 0) | 0; i64toi32_i32$2 = i64toi32_i32$HIGH_BITS; $8 = i64toi32_i32$4; @@ -293,12 +270,10 @@ function asmFunc(global, env, buffer) { i64toi32_i32$5 = i64toi32_i32$3 + i64toi32_i32$1 | 0; i64toi32_i32$0 = i64toi32_i32$2 + i64toi32_i32$4 | 0; if (i64toi32_i32$5 >>> 0 < i64toi32_i32$1 >>> 0) i64toi32_i32$0 = i64toi32_i32$0 + 1 | 0; - i64toi32_i32$0 = i64toi32_i32$0; $10 = i64toi32_i32$5; $10$hi = i64toi32_i32$0; } i64toi32_i32$0 = $10$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$3 = $10; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$3 | 0; @@ -309,14 +284,11 @@ function asmFunc(global, env, buffer) { $0$hi = $0$hi | 0; var i64toi32_i32$0 = 0, i64toi32_i32$5 = 0, $6 = 0, i64toi32_i32$3 = 0; i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; if (($0 | i64toi32_i32$0 | 0 | 0) == (0 | 0)) $6 = 44; else { i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$3 = 1; i64toi32_i32$5 = ($0 >>> 0 < i64toi32_i32$3 >>> 0) + 0 | 0; i64toi32_i32$5 = i64toi32_i32$0 - i64toi32_i32$5 | 0; - i64toi32_i32$5 = i64toi32_i32$5; $6 = odd($0 - i64toi32_i32$3 | 0 | 0, i64toi32_i32$5 | 0) | 0; } return $6 | 0; @@ -327,14 +299,11 @@ function asmFunc(global, env, buffer) { $0$hi = $0$hi | 0; var i64toi32_i32$0 = 0, i64toi32_i32$5 = 0, $6 = 0, i64toi32_i32$3 = 0; i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; if (($0 | i64toi32_i32$0 | 0 | 0) == (0 | 0)) $6 = 99; else { i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$3 = 1; i64toi32_i32$5 = ($0 >>> 0 < i64toi32_i32$3 >>> 0) + 0 | 0; i64toi32_i32$5 = i64toi32_i32$0 - i64toi32_i32$5 | 0; - i64toi32_i32$5 = i64toi32_i32$5; $6 = even($0 - i64toi32_i32$3 | 0 | 0, i64toi32_i32$5 | 0) | 0; } return $6 | 0; @@ -357,19 +326,15 @@ function asmFunc(global, env, buffer) { var$0$hi = var$0$hi | 0; var$1 = var$1 | 0; var$1$hi = var$1$hi | 0; - var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$4 = 0, i64toi32_i32$2 = 0, var$2 = 0, i64toi32_i32$3 = 0, var$3 = 0, var$4 = 0, var$5 = 0, $21_1 = 0, $22_1 = 0, var$6 = 0, $24 = 0, $17_1 = 0, $18_1 = 0, $23_1 = 0, $29 = 0, $45 = 0, $56$hi = 0, $62$hi = 0; + var i64toi32_i32$4 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, var$2 = 0, i64toi32_i32$2 = 0, i64toi32_i32$3 = 0, var$3 = 0, var$4 = 0, var$5 = 0, $21_1 = 0, $22_1 = 0, var$6 = 0, $24 = 0, $17_1 = 0, $18_1 = 0, $23_1 = 0, $29 = 0, $45 = 0, $56$hi = 0, $62$hi = 0; i64toi32_i32$0 = var$1$hi; - i64toi32_i32$0 = i64toi32_i32$0; var$2 = var$1; var$4 = var$2 >>> 16 | 0; i64toi32_i32$0 = var$0$hi; - i64toi32_i32$0 = i64toi32_i32$0; var$3 = var$0; var$5 = var$3 >>> 16 | 0; $17_1 = Math_imul(var$4, var$5); $18_1 = var$2; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = var$3; i64toi32_i32$1 = 0; i64toi32_i32$3 = 32; @@ -381,10 +346,8 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0; $21_1 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$0 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$2 >>> i64toi32_i32$4 | 0) | 0; } - i64toi32_i32$1 = i64toi32_i32$1; $23_1 = $17_1 + Math_imul($18_1, $21_1) | 0; i64toi32_i32$1 = var$1$hi; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$0 = var$1; i64toi32_i32$2 = 0; i64toi32_i32$3 = 32; @@ -396,7 +359,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$2 = i64toi32_i32$1 >>> i64toi32_i32$4 | 0; $22_1 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$1 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$0 >>> i64toi32_i32$4 | 0) | 0; } - i64toi32_i32$2 = i64toi32_i32$2; $29 = $23_1 + Math_imul($22_1, var$3) | 0; var$2 = var$2 & 65535 | 0; var$3 = var$3 & 65535 | 0; @@ -405,7 +367,6 @@ function asmFunc(global, env, buffer) { $45 = $29 + (var$2 >>> 16 | 0) | 0; var$2 = (var$2 & 65535 | 0) + Math_imul(var$4, var$3) | 0; i64toi32_i32$2 = 0; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$1 = $45 + (var$2 >>> 16 | 0) | 0; i64toi32_i32$0 = 0; i64toi32_i32$3 = 32; @@ -425,7 +386,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = $62$hi; i64toi32_i32$3 = var$2 << 16 | 0 | (var$6 & 65535 | 0) | 0; i64toi32_i32$1 = i64toi32_i32$0 | i64toi32_i32$1 | 0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$2 = i64toi32_i32$2 | i64toi32_i32$3 | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$2 | 0; @@ -443,8 +403,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = var$1$hi; i64toi32_i32$1 = _ZN17compiler_builtins3int3mul3Mul3mul17h070e9a1c69faec5bE(var$0 | 0, i64toi32_i32$0 | 0, var$1 | 0, i64toi32_i32$1 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; } diff --git a/test/wasm2js/call_indirect.2asm.js b/test/wasm2js/call_indirect.2asm.js index 7a051de37..af9e9874c 100644 --- a/test/wasm2js/call_indirect.2asm.js +++ b/test/wasm2js/call_indirect.2asm.js @@ -48,7 +48,6 @@ function asmFunc(global, env, buffer) { $0$hi = $0$hi | 0; var i64toi32_i32$0 = 0; i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return $0 | 0; } @@ -69,7 +68,6 @@ function asmFunc(global, env, buffer) { $1$hi = $1$hi | 0; var i64toi32_i32$0 = 0; i64toi32_i32$0 = $1$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return $1 | 0; } @@ -103,7 +101,6 @@ function asmFunc(global, env, buffer) { $0$hi = $0$hi | 0; var i64toi32_i32$0 = 0; i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return $0 | 0; } @@ -131,8 +128,6 @@ function asmFunc(global, env, buffer) { wasm2js_i32$0 = FUNCTION_TABLE_i[wasm2js_i32$1 & 31]() | 0; i64toi32_i32$0 = wasm2js_i32$0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$1 = i64toi32_i32$1; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$0 | 0; } @@ -160,8 +155,6 @@ function asmFunc(global, env, buffer) { wasm2js_i32$0 = FUNCTION_TABLE_iii[wasm2js_i32$1 & 31](wasm2js_i32$2 | 0, wasm2js_i32$3 | 0) | 0; i64toi32_i32$0 = wasm2js_i32$0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$1 = i64toi32_i32$1; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$0 | 0; } @@ -183,8 +176,6 @@ function asmFunc(global, env, buffer) { wasm2js_i32$0 = FUNCTION_TABLE_iii[wasm2js_i32$1 & 31](wasm2js_i32$2 | 0, wasm2js_i32$3 | 0) | 0; i64toi32_i32$0 = wasm2js_i32$0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$1 = i64toi32_i32$1; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$0 | 0; } @@ -224,8 +215,6 @@ function asmFunc(global, env, buffer) { wasm2js_i32$0 = FUNCTION_TABLE_iiii[wasm2js_i32$1 & 31](wasm2js_i32$2 | 0, wasm2js_i32$3 | 0, wasm2js_i32$4 | 0) | 0; i64toi32_i32$0 = wasm2js_i32$0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$1 = i64toi32_i32$1; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$0 | 0; } @@ -255,15 +244,12 @@ function asmFunc(global, env, buffer) { $1$hi = $1$hi | 0; var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0, wasm2js_i32$2 = 0, wasm2js_i32$3 = 0; i64toi32_i32$0 = $1$hi; - i64toi32_i32$0 = i64toi32_i32$0; wasm2js_i32$2 = $1; wasm2js_i32$3 = i64toi32_i32$0; wasm2js_i32$1 = $0; wasm2js_i32$0 = FUNCTION_TABLE_iii[wasm2js_i32$1 & 31](wasm2js_i32$2 | 0, wasm2js_i32$3 | 0) | 0; i64toi32_i32$0 = wasm2js_i32$0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$1 = i64toi32_i32$1; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$0 | 0; } @@ -278,8 +264,6 @@ function asmFunc(global, env, buffer) { wasm2js_i32$0 = FUNCTION_TABLE_iii[wasm2js_i32$1 & 31](wasm2js_i32$2 | 0, wasm2js_i32$3 | 0) | 0; i64toi32_i32$0 = wasm2js_i32$0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$1 = i64toi32_i32$1; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$0 | 0; } @@ -287,22 +271,18 @@ function asmFunc(global, env, buffer) { function fac($0, $0$hi) { $0 = $0 | 0; $0$hi = $0$hi | 0; - var i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, i64toi32_i32$5 = 0, $8 = 0, $8$hi = 0, i64toi32_i32$3 = 0, $6 = 0, $6$hi = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0, wasm2js_i32$2 = 0, wasm2js_i32$3 = 0; + var i64toi32_i32$5 = 0, i64toi32_i32$2 = 0, i64toi32_i32$0 = 0, $8 = 0, $8$hi = 0, i64toi32_i32$3 = 0, $6 = 0, $6$hi = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0, wasm2js_i32$2 = 0, wasm2js_i32$3 = 0; i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; if (($0 | i64toi32_i32$0 | 0 | 0) == (0 | 0)) { i64toi32_i32$0 = 0; $8 = 1; $8$hi = i64toi32_i32$0; } else { i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = $0; i64toi32_i32$3 = 1; i64toi32_i32$5 = (i64toi32_i32$2 >>> 0 < i64toi32_i32$3 >>> 0) + 0 | 0; i64toi32_i32$5 = i64toi32_i32$0 - i64toi32_i32$5 | 0; - i64toi32_i32$5 = i64toi32_i32$5; wasm2js_i32$2 = i64toi32_i32$2 - i64toi32_i32$3 | 0; wasm2js_i32$3 = i64toi32_i32$5; wasm2js_i32$1 = 12; @@ -315,12 +295,10 @@ function asmFunc(global, env, buffer) { i64toi32_i32$5 = $6$hi; i64toi32_i32$5 = __wasm_i64_mul($0 | 0, i64toi32_i32$0 | 0, $6 | 0, i64toi32_i32$5 | 0) | 0; i64toi32_i32$2 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$2 = i64toi32_i32$2; $8 = i64toi32_i32$5; $8$hi = i64toi32_i32$2; } i64toi32_i32$2 = $8$hi; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$5 = $8; i64toi32_i32$HIGH_BITS = i64toi32_i32$2; return i64toi32_i32$5 | 0; @@ -329,9 +307,8 @@ function asmFunc(global, env, buffer) { function fib($0, $0$hi) { $0 = $0 | 0; $0$hi = $0$hi | 0; - var i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, i64toi32_i32$3 = 0, i64toi32_i32$5 = 0, i64toi32_i32$1 = 0, i64toi32_i32$4 = 0, i64toi32_i32$6 = 0, $10 = 0, $10$hi = 0, $5 = 0, $5$hi = 0, $8 = 0, $8$hi = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0, wasm2js_i32$2 = 0, wasm2js_i32$3 = 0; + var i64toi32_i32$2 = 0, i64toi32_i32$3 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$5 = 0, i64toi32_i32$4 = 0, i64toi32_i32$6 = 0, $10 = 0, $10$hi = 0, $5 = 0, $5$hi = 0, $8 = 0, $8$hi = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0, wasm2js_i32$2 = 0, wasm2js_i32$3 = 0; i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = $0; i64toi32_i32$1 = 0; i64toi32_i32$3 = 1; @@ -341,7 +318,6 @@ function asmFunc(global, env, buffer) { $10$hi = i64toi32_i32$2; } else { i64toi32_i32$2 = $0$hi; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$3 = $0; i64toi32_i32$0 = 0; i64toi32_i32$1 = 2; @@ -349,7 +325,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$6 = i64toi32_i32$3 >>> 0 < i64toi32_i32$1 >>> 0; i64toi32_i32$5 = i64toi32_i32$6 + i64toi32_i32$0 | 0; i64toi32_i32$5 = i64toi32_i32$2 - i64toi32_i32$5 | 0; - i64toi32_i32$5 = i64toi32_i32$5; wasm2js_i32$2 = i64toi32_i32$4; wasm2js_i32$3 = i64toi32_i32$5; wasm2js_i32$1 = 13; @@ -367,7 +342,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$6 = i64toi32_i32$2 >>> 0 < i64toi32_i32$1 >>> 0; i64toi32_i32$4 = i64toi32_i32$6 + i64toi32_i32$5 | 0; i64toi32_i32$4 = i64toi32_i32$3 - i64toi32_i32$4 | 0; - i64toi32_i32$4 = i64toi32_i32$4; wasm2js_i32$3 = i64toi32_i32$0; wasm2js_i32$2 = i64toi32_i32$4; wasm2js_i32$1 = 13; @@ -383,12 +357,10 @@ function asmFunc(global, env, buffer) { i64toi32_i32$5 = i64toi32_i32$3 + i64toi32_i32$1 | 0; i64toi32_i32$0 = i64toi32_i32$2 + i64toi32_i32$4 | 0; if (i64toi32_i32$5 >>> 0 < i64toi32_i32$1 >>> 0) i64toi32_i32$0 = i64toi32_i32$0 + 1 | 0; - i64toi32_i32$0 = i64toi32_i32$0; $10 = i64toi32_i32$5; $10$hi = i64toi32_i32$0; } i64toi32_i32$0 = $10$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$3 = $10; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$3 | 0; @@ -441,19 +413,15 @@ function asmFunc(global, env, buffer) { var$0$hi = var$0$hi | 0; var$1 = var$1 | 0; var$1$hi = var$1$hi | 0; - var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$4 = 0, i64toi32_i32$2 = 0, var$2 = 0, i64toi32_i32$3 = 0, var$3 = 0, var$4 = 0, var$5 = 0, $21_1 = 0, $22_1 = 0, var$6 = 0, $24_1 = 0, $17_1 = 0, $18_1 = 0, $23_1 = 0, $29_1 = 0, $45 = 0, $56$hi = 0, $62$hi = 0; + var i64toi32_i32$4 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, var$2 = 0, i64toi32_i32$2 = 0, i64toi32_i32$3 = 0, var$3 = 0, var$4 = 0, var$5 = 0, $21_1 = 0, $22_1 = 0, var$6 = 0, $24_1 = 0, $17_1 = 0, $18_1 = 0, $23_1 = 0, $29_1 = 0, $45 = 0, $56$hi = 0, $62$hi = 0; i64toi32_i32$0 = var$1$hi; - i64toi32_i32$0 = i64toi32_i32$0; var$2 = var$1; var$4 = var$2 >>> 16 | 0; i64toi32_i32$0 = var$0$hi; - i64toi32_i32$0 = i64toi32_i32$0; var$3 = var$0; var$5 = var$3 >>> 16 | 0; $17_1 = Math_imul(var$4, var$5); $18_1 = var$2; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = var$3; i64toi32_i32$1 = 0; i64toi32_i32$3 = 32; @@ -465,10 +433,8 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0; $21_1 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$0 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$2 >>> i64toi32_i32$4 | 0) | 0; } - i64toi32_i32$1 = i64toi32_i32$1; $23_1 = $17_1 + Math_imul($18_1, $21_1) | 0; i64toi32_i32$1 = var$1$hi; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$0 = var$1; i64toi32_i32$2 = 0; i64toi32_i32$3 = 32; @@ -480,7 +446,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$2 = i64toi32_i32$1 >>> i64toi32_i32$4 | 0; $22_1 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$1 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$0 >>> i64toi32_i32$4 | 0) | 0; } - i64toi32_i32$2 = i64toi32_i32$2; $29_1 = $23_1 + Math_imul($22_1, var$3) | 0; var$2 = var$2 & 65535 | 0; var$3 = var$3 & 65535 | 0; @@ -489,7 +454,6 @@ function asmFunc(global, env, buffer) { $45 = $29_1 + (var$2 >>> 16 | 0) | 0; var$2 = (var$2 & 65535 | 0) + Math_imul(var$4, var$3) | 0; i64toi32_i32$2 = 0; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$1 = $45 + (var$2 >>> 16 | 0) | 0; i64toi32_i32$0 = 0; i64toi32_i32$3 = 32; @@ -509,7 +473,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = $62$hi; i64toi32_i32$3 = var$2 << 16 | 0 | (var$6 & 65535 | 0) | 0; i64toi32_i32$1 = i64toi32_i32$0 | i64toi32_i32$1 | 0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$2 = i64toi32_i32$2 | i64toi32_i32$3 | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$2 | 0; @@ -527,8 +490,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = var$1$hi; i64toi32_i32$1 = _ZN17compiler_builtins3int3mul3Mul3mul17h070e9a1c69faec5bE(var$0 | 0, i64toi32_i32$0 | 0, var$1 | 0, i64toi32_i32$1 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; } diff --git a/test/wasm2js/conversions-modified.2asm.js b/test/wasm2js/conversions-modified.2asm.js index 3871c147b..78254f600 100644 --- a/test/wasm2js/conversions-modified.2asm.js +++ b/test/wasm2js/conversions-modified.2asm.js @@ -26,8 +26,6 @@ function asmFunc(global, env, buffer) { var i64toi32_i32$1 = 0, i64toi32_i32$0 = 0; i64toi32_i32$1 = x; i64toi32_i32$0 = i64toi32_i32$1 >> 31 | 0; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; } @@ -36,7 +34,6 @@ function asmFunc(global, env, buffer) { x = x | 0; var i64toi32_i32$0 = 0; i64toi32_i32$0 = 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return x | 0; } @@ -69,14 +66,13 @@ function asmFunc(global, env, buffer) { function $7(x) { x = Math_fround(x); - var i64toi32_i32$0 = Math_fround(0), i64toi32_i32$1 = 0, $4_1 = 0, $5_1 = 0, i64toi32_i32$2 = 0; + var i64toi32_i32$0 = Math_fround(0), $4_1 = 0, $5_1 = 0, i64toi32_i32$1 = 0, i64toi32_i32$2 = 0; i64toi32_i32$0 = x; if (Math_fround(Math_abs(i64toi32_i32$0)) >= Math_fround(1.0)) { if (i64toi32_i32$0 > Math_fround(0.0)) $4_1 = ~~Math_fround(Math_min(Math_fround(Math_floor(Math_fround(i64toi32_i32$0 / Math_fround(4294967296.0)))), Math_fround(Math_fround(4294967296.0) - Math_fround(1.0)))) >>> 0; else $4_1 = ~~Math_fround(Math_ceil(Math_fround(Math_fround(i64toi32_i32$0 - Math_fround(~~i64toi32_i32$0 >>> 0 >>> 0)) / Math_fround(4294967296.0)))) >>> 0; $5_1 = $4_1; } else $5_1 = 0; i64toi32_i32$1 = $5_1; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$2 = ~~i64toi32_i32$0 >>> 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$2 | 0; @@ -84,14 +80,13 @@ function asmFunc(global, env, buffer) { function $8(x) { x = Math_fround(x); - var i64toi32_i32$0 = Math_fround(0), i64toi32_i32$1 = 0, $4_1 = 0, $5_1 = 0, i64toi32_i32$2 = 0; + var i64toi32_i32$0 = Math_fround(0), $4_1 = 0, $5_1 = 0, i64toi32_i32$1 = 0, i64toi32_i32$2 = 0; i64toi32_i32$0 = x; if (Math_fround(Math_abs(i64toi32_i32$0)) >= Math_fround(1.0)) { if (i64toi32_i32$0 > Math_fround(0.0)) $4_1 = ~~Math_fround(Math_min(Math_fround(Math_floor(Math_fround(i64toi32_i32$0 / Math_fround(4294967296.0)))), Math_fround(Math_fround(4294967296.0) - Math_fround(1.0)))) >>> 0; else $4_1 = ~~Math_fround(Math_ceil(Math_fround(Math_fround(i64toi32_i32$0 - Math_fround(~~i64toi32_i32$0 >>> 0 >>> 0)) / Math_fround(4294967296.0)))) >>> 0; $5_1 = $4_1; } else $5_1 = 0; i64toi32_i32$1 = $5_1; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$2 = ~~i64toi32_i32$0 >>> 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$2 | 0; @@ -99,14 +94,13 @@ function asmFunc(global, env, buffer) { function $9(x) { x = +x; - var i64toi32_i32$0 = 0.0, i64toi32_i32$1 = 0, $4_1 = 0, $5_1 = 0, i64toi32_i32$2 = 0; + var i64toi32_i32$0 = 0.0, $4_1 = 0, $5_1 = 0, i64toi32_i32$1 = 0, i64toi32_i32$2 = 0; i64toi32_i32$0 = x; if (Math_abs(i64toi32_i32$0) >= 1.0) { if (i64toi32_i32$0 > 0.0) $4_1 = ~~Math_min(Math_floor(i64toi32_i32$0 / 4294967296.0), 4294967296.0 - 1.0) >>> 0; else $4_1 = ~~Math_ceil((i64toi32_i32$0 - +(~~i64toi32_i32$0 >>> 0 >>> 0)) / 4294967296.0) >>> 0; $5_1 = $4_1; } else $5_1 = 0; i64toi32_i32$1 = $5_1; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$2 = ~~i64toi32_i32$0 >>> 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$2 | 0; @@ -114,14 +108,13 @@ function asmFunc(global, env, buffer) { function $10(x) { x = +x; - var i64toi32_i32$0 = 0.0, i64toi32_i32$1 = 0, $4_1 = 0, $5_1 = 0, i64toi32_i32$2 = 0; + var i64toi32_i32$0 = 0.0, $4_1 = 0, $5_1 = 0, i64toi32_i32$1 = 0, i64toi32_i32$2 = 0; i64toi32_i32$0 = x; if (Math_abs(i64toi32_i32$0) >= 1.0) { if (i64toi32_i32$0 > 0.0) $4_1 = ~~Math_min(Math_floor(i64toi32_i32$0 / 4294967296.0), 4294967296.0 - 1.0) >>> 0; else $4_1 = ~~Math_ceil((i64toi32_i32$0 - +(~~i64toi32_i32$0 >>> 0 >>> 0)) / 4294967296.0) >>> 0; $5_1 = $4_1; } else $5_1 = 0; i64toi32_i32$1 = $5_1; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$2 = ~~i64toi32_i32$0 >>> 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$2 | 0; @@ -137,7 +130,6 @@ function asmFunc(global, env, buffer) { x$hi = x$hi | 0; var i64toi32_i32$0 = 0; i64toi32_i32$0 = x$hi; - i64toi32_i32$0 = i64toi32_i32$0; return Math_fround(Math_fround(+(x >>> 0) + 4294967296.0 * +(i64toi32_i32$0 | 0))); } @@ -151,7 +143,6 @@ function asmFunc(global, env, buffer) { x$hi = x$hi | 0; var i64toi32_i32$0 = 0; i64toi32_i32$0 = x$hi; - i64toi32_i32$0 = i64toi32_i32$0; return +(+(x >>> 0) + 4294967296.0 * +(i64toi32_i32$0 | 0)); } @@ -165,7 +156,6 @@ function asmFunc(global, env, buffer) { x$hi = x$hi | 0; var i64toi32_i32$0 = 0; i64toi32_i32$0 = x$hi; - i64toi32_i32$0 = i64toi32_i32$0; return Math_fround(Math_fround(+(x >>> 0) + 4294967296.0 * +(i64toi32_i32$0 >>> 0))); } @@ -179,7 +169,6 @@ function asmFunc(global, env, buffer) { x$hi = x$hi | 0; var i64toi32_i32$0 = 0; i64toi32_i32$0 = x$hi; - i64toi32_i32$0 = i64toi32_i32$0; return +(+(x >>> 0) + 4294967296.0 * +(i64toi32_i32$0 >>> 0)); } @@ -203,7 +192,6 @@ function asmFunc(global, env, buffer) { x$hi = x$hi | 0; var i64toi32_i32$0 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0; i64toi32_i32$0 = x$hi; - i64toi32_i32$0 = i64toi32_i32$0; wasm2js_i32$0 = 0; wasm2js_i32$1 = x; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; @@ -225,7 +213,6 @@ function asmFunc(global, env, buffer) { wasm2js_f64$0 = x; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$0 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = HEAP32[0 >> 2] | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; diff --git a/test/wasm2js/endianness.2asm.js b/test/wasm2js/endianness.2asm.js index c4b830a30..9e2bf5b8a 100644 --- a/test/wasm2js/endianness.2asm.js +++ b/test/wasm2js/endianness.2asm.js @@ -44,13 +44,10 @@ function asmFunc(global, env, buffer) { address = address | 0; value = value | 0; value$hi = value$hi | 0; - var i64toi32_i32$0 = 0, i64toi32_i32$4 = 0, i64toi32_i32$1 = 0, i64toi32_i32$3 = 0, $9_1 = 0, $6_1 = 0, i64toi32_i32$2 = 0; + var i64toi32_i32$4 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$3 = 0, $9_1 = 0, $6_1 = 0, i64toi32_i32$2 = 0; i64toi32_i32$0 = value$hi; - i64toi32_i32$0 = i64toi32_i32$0; i32_store_little(address | 0, value | 0); $6_1 = address + 4 | 0; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = value; i64toi32_i32$1 = 0; i64toi32_i32$3 = 32; @@ -62,7 +59,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0; $9_1 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$0 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$2 >>> i64toi32_i32$4 | 0) | 0; } - i64toi32_i32$1 = i64toi32_i32$1; i32_store_little($6_1 | 0, $9_1 | 0); } @@ -83,7 +79,6 @@ function asmFunc(global, env, buffer) { $3 = i32_load_little(address | 0) | 0; $3$hi = i64toi32_i32$0; i64toi32_i32$0 = 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = i32_load_little(address + 4 | 0 | 0) | 0; i64toi32_i32$1 = 0; i64toi32_i32$3 = 32; @@ -101,7 +96,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$2 = $8$hi; i64toi32_i32$3 = $9_1; i64toi32_i32$2 = i64toi32_i32$1 | i64toi32_i32$2 | 0; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$0 = i64toi32_i32$0 | i64toi32_i32$3 | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$2; return i64toi32_i32$0 | 0; @@ -130,14 +124,9 @@ function asmFunc(global, env, buffer) { value$hi = value$hi | 0; var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0; i64toi32_i32$0 = value$hi; - i64toi32_i32$0 = i64toi32_i32$0; i16_store_little(0 | 0, value | 0); i64toi32_i32$0 = HEAP16[0 >> 1] | 0; i64toi32_i32$1 = i64toi32_i32$0 >> 31 | 0; - i64toi32_i32$1 = i64toi32_i32$1; - i64toi32_i32$1 = i64toi32_i32$1; - i64toi32_i32$1 = i64toi32_i32$1; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$0 | 0; } @@ -145,16 +134,11 @@ function asmFunc(global, env, buffer) { function $10(value, value$hi) { value = value | 0; value$hi = value$hi | 0; - var i64toi32_i32$1 = 0, i64toi32_i32$0 = 0; + var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0; i64toi32_i32$0 = value$hi; - i64toi32_i32$0 = i64toi32_i32$0; i16_store_little(0 | 0, value | 0); i64toi32_i32$0 = HEAPU16[0 >> 1] | 0; i64toi32_i32$1 = 0; - i64toi32_i32$1 = i64toi32_i32$1; - i64toi32_i32$1 = i64toi32_i32$1; - i64toi32_i32$1 = i64toi32_i32$1; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$0 | 0; } @@ -164,14 +148,9 @@ function asmFunc(global, env, buffer) { value$hi = value$hi | 0; var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0; i64toi32_i32$0 = value$hi; - i64toi32_i32$0 = i64toi32_i32$0; i32_store_little(0 | 0, value | 0); i64toi32_i32$0 = HEAP32[0 >> 2] | 0; i64toi32_i32$1 = i64toi32_i32$0 >> 31 | 0; - i64toi32_i32$1 = i64toi32_i32$1; - i64toi32_i32$1 = i64toi32_i32$1; - i64toi32_i32$1 = i64toi32_i32$1; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$0 | 0; } @@ -179,16 +158,11 @@ function asmFunc(global, env, buffer) { function $12(value, value$hi) { value = value | 0; value$hi = value$hi | 0; - var i64toi32_i32$1 = 0, i64toi32_i32$0 = 0; + var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0; i64toi32_i32$0 = value$hi; - i64toi32_i32$0 = i64toi32_i32$0; i32_store_little(0 | 0, value | 0); i64toi32_i32$0 = HEAPU32[0 >> 2] | 0; i64toi32_i32$1 = 0; - i64toi32_i32$1 = i64toi32_i32$1; - i64toi32_i32$1 = i64toi32_i32$1; - i64toi32_i32$1 = i64toi32_i32$1; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$0 | 0; } @@ -196,17 +170,12 @@ function asmFunc(global, env, buffer) { function $13(value, value$hi) { value = value | 0; value$hi = value$hi | 0; - var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$2 = 0, wasm2js_i32$0 = 0; + var i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, i64toi32_i32$1 = 0, wasm2js_i32$0 = 0; i64toi32_i32$0 = value$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64_store_little(0 | 0, value | 0, i64toi32_i32$0 | 0); i64toi32_i32$2 = 0; i64toi32_i32$0 = HEAPU32[i64toi32_i32$2 >> 2] | 0; i64toi32_i32$1 = (wasm2js_i32$0 = i64toi32_i32$2, HEAPU8[(wasm2js_i32$0 + 4 | 0) >> 0] | 0 | 0 | (HEAPU8[(wasm2js_i32$0 + 5 | 0) >> 0] | 0 | 0) << 8 | (HEAPU8[(wasm2js_i32$0 + 6 | 0) >> 0] | 0 | 0) << 16 | (HEAPU8[(wasm2js_i32$0 + 7 | 0) >> 0] | 0 | 0) << 24); - i64toi32_i32$1 = i64toi32_i32$1; - i64toi32_i32$1 = i64toi32_i32$1; - i64toi32_i32$1 = i64toi32_i32$1; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$0 | 0; } @@ -224,7 +193,6 @@ function asmFunc(global, env, buffer) { wasm2js_f64$0 = value; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$0 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64_store_little(0 | 0, HEAP32[0 >> 2] | 0 | 0, i64toi32_i32$0 | 0); return +(+HEAPF64[0 >> 3]); } @@ -252,14 +220,10 @@ function asmFunc(global, env, buffer) { value$hi = value$hi | 0; var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0; i64toi32_i32$0 = value$hi; - i64toi32_i32$0 = i64toi32_i32$0; wasm2js_i32$0 = 0; wasm2js_i32$1 = value; HEAP16[wasm2js_i32$0 >> 1] = wasm2js_i32$1; i64toi32_i32$0 = 0; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = i16_load_little(0 | 0) | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; @@ -270,14 +234,10 @@ function asmFunc(global, env, buffer) { value$hi = value$hi | 0; var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0; i64toi32_i32$0 = value$hi; - i64toi32_i32$0 = i64toi32_i32$0; wasm2js_i32$0 = 0; wasm2js_i32$1 = value; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; i64toi32_i32$0 = 0; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = i32_load_little(0 | 0) | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; @@ -289,7 +249,6 @@ function asmFunc(global, env, buffer) { var i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0, wasm2js_i32$2 = 0, wasm2js_i32$3 = 0; i64toi32_i32$0 = value$hi; i64toi32_i32$1 = 0; - i64toi32_i32$0 = i64toi32_i32$0; wasm2js_i32$0 = i64toi32_i32$1; wasm2js_i32$1 = value; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; @@ -298,10 +257,6 @@ function asmFunc(global, env, buffer) { (wasm2js_i32$2 = wasm2js_i32$0, wasm2js_i32$3 = wasm2js_i32$1), ((HEAP8[(wasm2js_i32$2 + 4 | 0) >> 0] = wasm2js_i32$3 & 255 | 0, HEAP8[(wasm2js_i32$2 + 5 | 0) >> 0] = (wasm2js_i32$3 >>> 8 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 6 | 0) >> 0] = (wasm2js_i32$3 >>> 16 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 7 | 0) >> 0] = (wasm2js_i32$3 >>> 24 | 0) & 255 | 0; i64toi32_i32$0 = i64_load_little(0 | 0) | 0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$1 = i64toi32_i32$1; - i64toi32_i32$1 = i64toi32_i32$1; - i64toi32_i32$1 = i64toi32_i32$1; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$0 | 0; } @@ -317,13 +272,12 @@ function asmFunc(global, env, buffer) { function $22(value) { value = +value; - var i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, wasm2js_i32$0 = 0, wasm2js_f64$0 = 0.0, wasm2js_i32$1 = 0; + var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, wasm2js_i32$0 = 0, wasm2js_f64$0 = 0.0, wasm2js_i32$1 = 0; wasm2js_i32$0 = 0; wasm2js_f64$0 = value; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$0 = i64_load_little(0 | 0) | 0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$1 = i64toi32_i32$1; wasm2js_i32$0 = 0; wasm2js_i32$1 = i64toi32_i32$0; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; diff --git a/test/wasm2js/f64.2asm.js b/test/wasm2js/f64.2asm.js index 4ac679b72..ac5f78a49 100644 --- a/test/wasm2js/f64.2asm.js +++ b/test/wasm2js/f64.2asm.js @@ -95,12 +95,11 @@ function asmFunc(global, env, buffer) { function $13(x, y) { x = +x; y = +y; - var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$2 = 0, i64toi32_i32$3 = 0, $4_1 = 0, $4$hi = 0, $7_1 = 0, $7$hi = 0, wasm2js_i32$0 = 0, wasm2js_f64$0 = 0.0, wasm2js_i32$1 = 0; + var i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, i64toi32_i32$1 = 0, i64toi32_i32$3 = 0, $4_1 = 0, $4$hi = 0, $7_1 = 0, $7$hi = 0, wasm2js_i32$0 = 0, wasm2js_f64$0 = 0.0, wasm2js_i32$1 = 0; wasm2js_i32$0 = 0; wasm2js_f64$0 = x; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$0 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = HEAP32[0 >> 2] | 0; i64toi32_i32$1 = 2147483647; i64toi32_i32$3 = 4294967295; @@ -111,7 +110,6 @@ function asmFunc(global, env, buffer) { wasm2js_f64$0 = y; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$1 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$0 = HEAP32[0 >> 2] | 0; i64toi32_i32$2 = 2147483648; i64toi32_i32$3 = 0; @@ -123,7 +121,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$0 = $7$hi; i64toi32_i32$3 = $7_1; i64toi32_i32$0 = i64toi32_i32$2 | i64toi32_i32$0 | 0; - i64toi32_i32$0 = i64toi32_i32$0; wasm2js_i32$0 = 0; wasm2js_i32$1 = i64toi32_i32$1 | i64toi32_i32$3 | 0; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; diff --git a/test/wasm2js/fac.2asm.js b/test/wasm2js/fac.2asm.js index 6aa6086ce..794fd2806 100644 --- a/test/wasm2js/fac.2asm.js +++ b/test/wasm2js/fac.2asm.js @@ -35,21 +35,18 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = 1; i64toi32_i32$5 = (i64toi32_i32$3 >>> 0 < i64toi32_i32$1 >>> 0) + 0 | 0; i64toi32_i32$5 = $0$hi - i64toi32_i32$5 | 0; - i64toi32_i32$5 = i64toi32_i32$5; i64toi32_i32$5 = $0(i64toi32_i32$3 - i64toi32_i32$1 | 0 | 0, i64toi32_i32$5 | 0) | 0; i64toi32_i32$3 = i64toi32_i32$HIGH_BITS; $6 = i64toi32_i32$5; $6$hi = i64toi32_i32$3; i64toi32_i32$3 = $0$hi; i64toi32_i32$5 = $6$hi; - i64toi32_i32$5 = __wasm_i64_mul($0_1 | 0, i64toi32_i32$3 | 0, $6 | 0, i64toi32_i32$5 | 0) | 0; + i64toi32_i32$5 = __wasm_i64_mul($0_1 | 0, $0$hi | 0, $6 | 0, i64toi32_i32$5 | 0) | 0; i64toi32_i32$3 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$3 = i64toi32_i32$3; $8 = i64toi32_i32$5; $8$hi = i64toi32_i32$3; } i64toi32_i32$3 = $8$hi; - i64toi32_i32$3 = i64toi32_i32$3; i64toi32_i32$5 = $8; i64toi32_i32$HIGH_BITS = i64toi32_i32$3; return i64toi32_i32$5 | 0; @@ -69,21 +66,18 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = 1; i64toi32_i32$5 = (i64toi32_i32$3 >>> 0 < i64toi32_i32$1 >>> 0) + 0 | 0; i64toi32_i32$5 = n$hi - i64toi32_i32$5 | 0; - i64toi32_i32$5 = i64toi32_i32$5; i64toi32_i32$5 = fac_rec_named(i64toi32_i32$3 - i64toi32_i32$1 | 0 | 0, i64toi32_i32$5 | 0) | 0; i64toi32_i32$3 = i64toi32_i32$HIGH_BITS; $6 = i64toi32_i32$5; $6$hi = i64toi32_i32$3; i64toi32_i32$3 = n$hi; i64toi32_i32$5 = $6$hi; - i64toi32_i32$5 = __wasm_i64_mul(n | 0, i64toi32_i32$3 | 0, $6 | 0, i64toi32_i32$5 | 0) | 0; + i64toi32_i32$5 = __wasm_i64_mul(n | 0, n$hi | 0, $6 | 0, i64toi32_i32$5 | 0) | 0; i64toi32_i32$3 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$3 = i64toi32_i32$3; $8 = i64toi32_i32$5; $8$hi = i64toi32_i32$3; } i64toi32_i32$3 = $8$hi; - i64toi32_i32$3 = i64toi32_i32$3; i64toi32_i32$5 = $8; i64toi32_i32$HIGH_BITS = i64toi32_i32$3; return i64toi32_i32$5 | 0; @@ -92,9 +86,8 @@ function asmFunc(global, env, buffer) { function $2($0_1, $0$hi) { $0_1 = $0_1 | 0; $0$hi = $0$hi | 0; - var i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, i64toi32_i32$5 = 0, i64toi32_i32$3 = 0, $1$hi = 0, $1 = 0, $2$hi = 0, i64toi32_i32$1 = 0, $2_1 = 0; + var i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, i64toi32_i32$3 = 0, $1$hi = 0, i64toi32_i32$5 = 0, $1 = 0, $2$hi = 0, i64toi32_i32$1 = 0, $2_1 = 0; i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; $1 = $0_1; $1$hi = i64toi32_i32$0; i64toi32_i32$0 = 0; @@ -103,7 +96,6 @@ function asmFunc(global, env, buffer) { block : { loop_in : do { i64toi32_i32$0 = $1$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = $1; i64toi32_i32$1 = 0; i64toi32_i32$3 = 0; @@ -114,17 +106,14 @@ function asmFunc(global, env, buffer) { i64toi32_i32$0 = $2$hi; i64toi32_i32$0 = __wasm_i64_mul($1 | 0, i64toi32_i32$2 | 0, $2_1 | 0, i64toi32_i32$0 | 0) | 0; i64toi32_i32$2 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$2 = i64toi32_i32$2; $2_1 = i64toi32_i32$0; $2$hi = i64toi32_i32$2; i64toi32_i32$2 = $1$hi; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$3 = $1; i64toi32_i32$0 = 0; i64toi32_i32$1 = 1; i64toi32_i32$5 = (i64toi32_i32$3 >>> 0 < i64toi32_i32$1 >>> 0) + i64toi32_i32$0 | 0; i64toi32_i32$5 = i64toi32_i32$2 - i64toi32_i32$5 | 0; - i64toi32_i32$5 = i64toi32_i32$5; $1 = i64toi32_i32$3 - i64toi32_i32$1 | 0; $1$hi = i64toi32_i32$5; }; @@ -133,9 +122,6 @@ function asmFunc(global, env, buffer) { } while (1); }; i64toi32_i32$5 = $2$hi; - i64toi32_i32$5 = i64toi32_i32$5; - i64toi32_i32$5 = i64toi32_i32$5; - i64toi32_i32$5 = i64toi32_i32$5; i64toi32_i32$3 = $2_1; i64toi32_i32$HIGH_BITS = i64toi32_i32$5; return i64toi32_i32$3 | 0; @@ -144,9 +130,8 @@ function asmFunc(global, env, buffer) { function $3(n, n$hi) { n = n | 0; n$hi = n$hi | 0; - var i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, i64toi32_i32$5 = 0, i64toi32_i32$3 = 0, i$hi = 0, i = 0, res$hi = 0, i64toi32_i32$1 = 0, res = 0; + var i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, i64toi32_i32$3 = 0, i$hi = 0, i64toi32_i32$5 = 0, i = 0, res$hi = 0, i64toi32_i32$1 = 0, res = 0; i64toi32_i32$0 = n$hi; - i64toi32_i32$0 = i64toi32_i32$0; i = n; i$hi = i64toi32_i32$0; i64toi32_i32$0 = 0; @@ -155,7 +140,6 @@ function asmFunc(global, env, buffer) { done : { loop : do { i64toi32_i32$0 = i$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = i; i64toi32_i32$1 = 0; i64toi32_i32$3 = 0; @@ -166,17 +150,14 @@ function asmFunc(global, env, buffer) { i64toi32_i32$0 = res$hi; i64toi32_i32$0 = __wasm_i64_mul(i | 0, i64toi32_i32$2 | 0, res | 0, i64toi32_i32$0 | 0) | 0; i64toi32_i32$2 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$2 = i64toi32_i32$2; res = i64toi32_i32$0; res$hi = i64toi32_i32$2; i64toi32_i32$2 = i$hi; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$3 = i; i64toi32_i32$0 = 0; i64toi32_i32$1 = 1; i64toi32_i32$5 = (i64toi32_i32$3 >>> 0 < i64toi32_i32$1 >>> 0) + i64toi32_i32$0 | 0; i64toi32_i32$5 = i64toi32_i32$2 - i64toi32_i32$5 | 0; - i64toi32_i32$5 = i64toi32_i32$5; i = i64toi32_i32$3 - i64toi32_i32$1 | 0; i$hi = i64toi32_i32$5; }; @@ -185,9 +166,6 @@ function asmFunc(global, env, buffer) { } while (1); }; i64toi32_i32$5 = res$hi; - i64toi32_i32$5 = i64toi32_i32$5; - i64toi32_i32$5 = i64toi32_i32$5; - i64toi32_i32$5 = i64toi32_i32$5; i64toi32_i32$3 = res; i64toi32_i32$HIGH_BITS = i64toi32_i32$5; return i64toi32_i32$3 | 0; @@ -196,13 +174,12 @@ function asmFunc(global, env, buffer) { function $4($0_1, $0$hi) { $0_1 = $0_1 | 0; $0$hi = $0$hi | 0; - var i64toi32_i32$2 = 0, i64toi32_i32$5 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$3 = 0, $1$hi = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, i64toi32_i32$4 = 0, $13 = 0, $14 = 0, $15 = 0; + var i64toi32_i32$2 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$5 = 0, i64toi32_i32$3 = 0, $1$hi = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, i64toi32_i32$4 = 0, $13 = 0, $14 = 0, $15 = 0; i64toi32_i32$0 = 0; $1 = 1; $1$hi = i64toi32_i32$0; block : { i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = $0_1; i64toi32_i32$1 = 0; i64toi32_i32$3 = 2; @@ -221,22 +198,17 @@ function asmFunc(global, env, buffer) { i64toi32_i32$0 = $0$hi; i64toi32_i32$0 = __wasm_i64_mul($1 | 0, i64toi32_i32$2 | 0, $0_1 | 0, i64toi32_i32$0 | 0) | 0; i64toi32_i32$2 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$2 = i64toi32_i32$2; $1 = i64toi32_i32$0; $1$hi = i64toi32_i32$2; i64toi32_i32$2 = $0$hi; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$3 = $0_1; i64toi32_i32$0 = 4294967295; i64toi32_i32$1 = 4294967295; i64toi32_i32$4 = $0_1 + i64toi32_i32$1 | 0; i64toi32_i32$5 = i64toi32_i32$2 + i64toi32_i32$0 | 0; if (i64toi32_i32$4 >>> 0 < i64toi32_i32$1 >>> 0) i64toi32_i32$5 = i64toi32_i32$5 + 1 | 0; - i64toi32_i32$5 = i64toi32_i32$5; $0_1 = i64toi32_i32$4; $0$hi = i64toi32_i32$5; - i64toi32_i32$5 = i64toi32_i32$5; - i64toi32_i32$5 = i64toi32_i32$5; i64toi32_i32$2 = $0_1; i64toi32_i32$3 = 0; i64toi32_i32$1 = 1; @@ -252,9 +224,6 @@ function asmFunc(global, env, buffer) { } while (1); }; i64toi32_i32$2 = $1$hi; - i64toi32_i32$2 = i64toi32_i32$2; - i64toi32_i32$2 = i64toi32_i32$2; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$5 = $1; i64toi32_i32$HIGH_BITS = i64toi32_i32$2; return i64toi32_i32$5 | 0; @@ -265,19 +234,15 @@ function asmFunc(global, env, buffer) { var$0$hi = var$0$hi | 0; var$1 = var$1 | 0; var$1$hi = var$1$hi | 0; - var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$4 = 0, i64toi32_i32$2 = 0, var$2 = 0, i64toi32_i32$3 = 0, var$3 = 0, var$4 = 0, var$5 = 0, $21 = 0, $22 = 0, var$6 = 0, $24 = 0, $17 = 0, $18 = 0, $23 = 0, $29 = 0, $45 = 0, $56$hi = 0, $62$hi = 0; + var i64toi32_i32$4 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, var$2 = 0, i64toi32_i32$2 = 0, i64toi32_i32$3 = 0, var$3 = 0, var$4 = 0, var$5 = 0, $21 = 0, $22 = 0, var$6 = 0, $24 = 0, $17 = 0, $18 = 0, $23 = 0, $29 = 0, $45 = 0, $56$hi = 0, $62$hi = 0; i64toi32_i32$0 = var$1$hi; - i64toi32_i32$0 = i64toi32_i32$0; var$2 = var$1; var$4 = var$2 >>> 16 | 0; i64toi32_i32$0 = var$0$hi; - i64toi32_i32$0 = i64toi32_i32$0; var$3 = var$0; var$5 = var$3 >>> 16 | 0; $17 = Math_imul(var$4, var$5); $18 = var$2; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = var$3; i64toi32_i32$1 = 0; i64toi32_i32$3 = 32; @@ -289,10 +254,8 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0; $21 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$0 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$2 >>> i64toi32_i32$4 | 0) | 0; } - i64toi32_i32$1 = i64toi32_i32$1; $23 = $17 + Math_imul($18, $21) | 0; i64toi32_i32$1 = var$1$hi; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$0 = var$1; i64toi32_i32$2 = 0; i64toi32_i32$3 = 32; @@ -304,7 +267,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$2 = i64toi32_i32$1 >>> i64toi32_i32$4 | 0; $22 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$1 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$0 >>> i64toi32_i32$4 | 0) | 0; } - i64toi32_i32$2 = i64toi32_i32$2; $29 = $23 + Math_imul($22, var$3) | 0; var$2 = var$2 & 65535 | 0; var$3 = var$3 & 65535 | 0; @@ -313,7 +275,6 @@ function asmFunc(global, env, buffer) { $45 = $29 + (var$2 >>> 16 | 0) | 0; var$2 = (var$2 & 65535 | 0) + Math_imul(var$4, var$3) | 0; i64toi32_i32$2 = 0; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$1 = $45 + (var$2 >>> 16 | 0) | 0; i64toi32_i32$0 = 0; i64toi32_i32$3 = 32; @@ -333,7 +294,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = $62$hi; i64toi32_i32$3 = var$2 << 16 | 0 | (var$6 & 65535 | 0) | 0; i64toi32_i32$1 = i64toi32_i32$0 | i64toi32_i32$1 | 0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$2 = i64toi32_i32$2 | i64toi32_i32$3 | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$2 | 0; @@ -351,8 +311,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = var$1$hi; i64toi32_i32$1 = _ZN17compiler_builtins3int3mul3Mul3mul17h070e9a1c69faec5bE(var$0 | 0, i64toi32_i32$0 | 0, var$1 | 0, i64toi32_i32$1 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; } diff --git a/test/wasm2js/float-ops.2asm.js b/test/wasm2js/float-ops.2asm.js index 946a763ba..8a23294b4 100644 --- a/test/wasm2js/float-ops.2asm.js +++ b/test/wasm2js/float-ops.2asm.js @@ -212,12 +212,11 @@ function asmFunc(global, env, buffer) { function copysign64($0, $1_1) { $0 = +$0; $1_1 = +$1_1; - var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$2 = 0, i64toi32_i32$3 = 0, $4_1 = 0, $4$hi = 0, $7_1 = 0, $7$hi = 0, wasm2js_i32$0 = 0, wasm2js_f64$0 = 0.0, wasm2js_i32$1 = 0; + var i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, i64toi32_i32$1 = 0, i64toi32_i32$3 = 0, $4_1 = 0, $4$hi = 0, $7_1 = 0, $7$hi = 0, wasm2js_i32$0 = 0, wasm2js_f64$0 = 0.0, wasm2js_i32$1 = 0; wasm2js_i32$0 = 0; wasm2js_f64$0 = $0; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$0 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = HEAP32[0 >> 2] | 0; i64toi32_i32$1 = 2147483647; i64toi32_i32$3 = 4294967295; @@ -228,7 +227,6 @@ function asmFunc(global, env, buffer) { wasm2js_f64$0 = $1_1; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$1 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$0 = HEAP32[0 >> 2] | 0; i64toi32_i32$2 = 2147483648; i64toi32_i32$3 = 0; @@ -240,7 +238,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$0 = $7$hi; i64toi32_i32$3 = $7_1; i64toi32_i32$0 = i64toi32_i32$2 | i64toi32_i32$0 | 0; - i64toi32_i32$0 = i64toi32_i32$0; wasm2js_i32$0 = 0; wasm2js_i32$1 = i64toi32_i32$1 | i64toi32_i32$3 | 0; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; @@ -301,7 +298,6 @@ function asmFunc(global, env, buffer) { $0$hi = $0$hi | 0; var i64toi32_i32$0 = 0; i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; return Math_fround(Math_fround(+($0 >>> 0) + 4294967296.0 * +(i64toi32_i32$0 | 0))); } @@ -310,7 +306,6 @@ function asmFunc(global, env, buffer) { $0$hi = $0$hi | 0; var i64toi32_i32$0 = 0; i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; return +(+($0 >>> 0) + 4294967296.0 * +(i64toi32_i32$0 | 0)); } @@ -319,7 +314,6 @@ function asmFunc(global, env, buffer) { $0$hi = $0$hi | 0; var i64toi32_i32$0 = 0; i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; return Math_fround(Math_fround(+($0 >>> 0) + 4294967296.0 * +(i64toi32_i32$0 >>> 0))); } @@ -328,59 +322,54 @@ function asmFunc(global, env, buffer) { $0$hi = $0$hi | 0; var i64toi32_i32$0 = 0; i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; return +(+($0 >>> 0) + 4294967296.0 * +(i64toi32_i32$0 >>> 0)); } function $47($0) { $0 = Math_fround($0); - var i64toi32_i32$0 = Math_fround(0), i64toi32_i32$1 = 0, $3_1 = 0, $4_1 = 0; + var i64toi32_i32$0 = Math_fround(0), $3_1 = 0, $4_1 = 0, i64toi32_i32$1 = 0; i64toi32_i32$0 = $0; if (Math_fround(Math_abs(i64toi32_i32$0)) >= Math_fround(1.0)) { if (i64toi32_i32$0 > Math_fround(0.0)) $3_1 = ~~Math_fround(Math_min(Math_fround(Math_floor(Math_fround(i64toi32_i32$0 / Math_fround(4294967296.0)))), Math_fround(Math_fround(4294967296.0) - Math_fround(1.0)))) >>> 0; else $3_1 = ~~Math_fround(Math_ceil(Math_fround(Math_fround(i64toi32_i32$0 - Math_fround(~~i64toi32_i32$0 >>> 0 >>> 0)) / Math_fround(4294967296.0)))) >>> 0; $4_1 = $3_1; } else $4_1 = 0; i64toi32_i32$1 = $4_1; - i64toi32_i32$1 = i64toi32_i32$1; return (~~i64toi32_i32$0 >>> 0 | 0) == (0 | 0) & (i64toi32_i32$1 | 0) == (0 | 0) | 0 | 0; } function $48($0) { $0 = +$0; - var i64toi32_i32$0 = 0.0, i64toi32_i32$1 = 0, $3_1 = 0, $4_1 = 0; + var i64toi32_i32$0 = 0.0, $3_1 = 0, $4_1 = 0, i64toi32_i32$1 = 0; i64toi32_i32$0 = $0; if (Math_abs(i64toi32_i32$0) >= 1.0) { if (i64toi32_i32$0 > 0.0) $3_1 = ~~Math_min(Math_floor(i64toi32_i32$0 / 4294967296.0), 4294967296.0 - 1.0) >>> 0; else $3_1 = ~~Math_ceil((i64toi32_i32$0 - +(~~i64toi32_i32$0 >>> 0 >>> 0)) / 4294967296.0) >>> 0; $4_1 = $3_1; } else $4_1 = 0; i64toi32_i32$1 = $4_1; - i64toi32_i32$1 = i64toi32_i32$1; return (~~i64toi32_i32$0 >>> 0 | 0) == (0 | 0) & (i64toi32_i32$1 | 0) == (0 | 0) | 0 | 0; } function $49($0) { $0 = Math_fround($0); - var i64toi32_i32$0 = Math_fround(0), i64toi32_i32$1 = 0, $3_1 = 0, $4_1 = 0; + var i64toi32_i32$0 = Math_fround(0), $3_1 = 0, $4_1 = 0, i64toi32_i32$1 = 0; i64toi32_i32$0 = $0; if (Math_fround(Math_abs(i64toi32_i32$0)) >= Math_fround(1.0)) { if (i64toi32_i32$0 > Math_fround(0.0)) $3_1 = ~~Math_fround(Math_min(Math_fround(Math_floor(Math_fround(i64toi32_i32$0 / Math_fround(4294967296.0)))), Math_fround(Math_fround(4294967296.0) - Math_fround(1.0)))) >>> 0; else $3_1 = ~~Math_fround(Math_ceil(Math_fround(Math_fround(i64toi32_i32$0 - Math_fround(~~i64toi32_i32$0 >>> 0 >>> 0)) / Math_fround(4294967296.0)))) >>> 0; $4_1 = $3_1; } else $4_1 = 0; i64toi32_i32$1 = $4_1; - i64toi32_i32$1 = i64toi32_i32$1; return (~~i64toi32_i32$0 >>> 0 | 0) == (0 | 0) & (i64toi32_i32$1 | 0) == (0 | 0) | 0 | 0; } function $50($0) { $0 = +$0; - var i64toi32_i32$0 = 0.0, i64toi32_i32$1 = 0, $3_1 = 0, $4_1 = 0; + var i64toi32_i32$0 = 0.0, $3_1 = 0, $4_1 = 0, i64toi32_i32$1 = 0; i64toi32_i32$0 = $0; if (Math_abs(i64toi32_i32$0) >= 1.0) { if (i64toi32_i32$0 > 0.0) $3_1 = ~~Math_min(Math_floor(i64toi32_i32$0 / 4294967296.0), 4294967296.0 - 1.0) >>> 0; else $3_1 = ~~Math_ceil((i64toi32_i32$0 - +(~~i64toi32_i32$0 >>> 0 >>> 0)) / 4294967296.0) >>> 0; $4_1 = $3_1; } else $4_1 = 0; i64toi32_i32$1 = $4_1; - i64toi32_i32$1 = i64toi32_i32$1; return (~~i64toi32_i32$0 >>> 0 | 0) == (0 | 0) & (i64toi32_i32$1 | 0) == (0 | 0) | 0 | 0; } diff --git a/test/wasm2js/float_literals-modified.2asm.js b/test/wasm2js/float_literals-modified.2asm.js index 3cc4147a0..b93b82832 100644 --- a/test/wasm2js/float_literals-modified.2asm.js +++ b/test/wasm2js/float_literals-modified.2asm.js @@ -147,7 +147,6 @@ function asmFunc(global, env, buffer) { wasm2js_f64$0 = nan; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$0 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = HEAP32[0 >> 2] | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; @@ -159,7 +158,6 @@ function asmFunc(global, env, buffer) { wasm2js_f64$0 = nan; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$0 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = HEAP32[0 >> 2] | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; @@ -171,7 +169,6 @@ function asmFunc(global, env, buffer) { wasm2js_f64$0 = -nan; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$0 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = HEAP32[0 >> 2] | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; @@ -183,7 +180,6 @@ function asmFunc(global, env, buffer) { wasm2js_f64$0 = nan; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$0 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = HEAP32[0 >> 2] | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; @@ -195,7 +191,6 @@ function asmFunc(global, env, buffer) { wasm2js_f64$0 = nan; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$0 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = HEAP32[0 >> 2] | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; @@ -207,7 +202,6 @@ function asmFunc(global, env, buffer) { wasm2js_f64$0 = -nan; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$0 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = HEAP32[0 >> 2] | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; @@ -219,7 +213,6 @@ function asmFunc(global, env, buffer) { wasm2js_f64$0 = nan; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$0 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = HEAP32[0 >> 2] | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; @@ -231,7 +224,6 @@ function asmFunc(global, env, buffer) { wasm2js_f64$0 = nan; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$0 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = HEAP32[0 >> 2] | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; @@ -243,7 +235,6 @@ function asmFunc(global, env, buffer) { wasm2js_f64$0 = -nan; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$0 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = HEAP32[0 >> 2] | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; @@ -255,7 +246,6 @@ function asmFunc(global, env, buffer) { wasm2js_f64$0 = infinity; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$0 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = HEAP32[0 >> 2] | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; @@ -267,7 +257,6 @@ function asmFunc(global, env, buffer) { wasm2js_f64$0 = infinity; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$0 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = HEAP32[0 >> 2] | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; @@ -279,7 +268,6 @@ function asmFunc(global, env, buffer) { wasm2js_f64$0 = -infinity; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$0 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = HEAP32[0 >> 2] | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; @@ -291,7 +279,6 @@ function asmFunc(global, env, buffer) { wasm2js_f64$0 = 0.0; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$0 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = HEAP32[0 >> 2] | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; @@ -303,7 +290,6 @@ function asmFunc(global, env, buffer) { wasm2js_f64$0 = 0.0; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$0 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = HEAP32[0 >> 2] | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; @@ -315,7 +301,6 @@ function asmFunc(global, env, buffer) { wasm2js_f64$0 = -0.0; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$0 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = HEAP32[0 >> 2] | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; @@ -327,7 +312,6 @@ function asmFunc(global, env, buffer) { wasm2js_f64$0 = 6.283185307179586; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$0 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = HEAP32[0 >> 2] | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; @@ -339,7 +323,6 @@ function asmFunc(global, env, buffer) { wasm2js_f64$0 = 5.0e-324; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$0 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = HEAP32[0 >> 2] | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; @@ -351,7 +334,6 @@ function asmFunc(global, env, buffer) { wasm2js_f64$0 = 2.2250738585072014e-308; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$0 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = HEAP32[0 >> 2] | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; @@ -363,7 +345,6 @@ function asmFunc(global, env, buffer) { wasm2js_f64$0 = 2.225073858507201e-308; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$0 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = HEAP32[0 >> 2] | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; @@ -375,7 +356,6 @@ function asmFunc(global, env, buffer) { wasm2js_f64$0 = 1797693134862315708145274.0e284; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$0 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = HEAP32[0 >> 2] | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; @@ -387,7 +367,6 @@ function asmFunc(global, env, buffer) { wasm2js_f64$0 = 1267650600228229401496703.0e6; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$0 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = HEAP32[0 >> 2] | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; @@ -399,7 +378,6 @@ function asmFunc(global, env, buffer) { wasm2js_f64$0 = 0.0; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$0 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = HEAP32[0 >> 2] | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; @@ -411,7 +389,6 @@ function asmFunc(global, env, buffer) { wasm2js_f64$0 = 0.0; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$0 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = HEAP32[0 >> 2] | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; @@ -423,7 +400,6 @@ function asmFunc(global, env, buffer) { wasm2js_f64$0 = -0.0; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$0 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = HEAP32[0 >> 2] | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; @@ -435,7 +411,6 @@ function asmFunc(global, env, buffer) { wasm2js_f64$0 = 6.283185307179586; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$0 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = HEAP32[0 >> 2] | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; @@ -447,7 +422,6 @@ function asmFunc(global, env, buffer) { wasm2js_f64$0 = 5.0e-324; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$0 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = HEAP32[0 >> 2] | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; @@ -459,7 +433,6 @@ function asmFunc(global, env, buffer) { wasm2js_f64$0 = 2.2250738585072014e-308; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$0 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = HEAP32[0 >> 2] | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; @@ -471,7 +444,6 @@ function asmFunc(global, env, buffer) { wasm2js_f64$0 = 2.225073858507201e-308; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$0 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = HEAP32[0 >> 2] | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; @@ -483,7 +455,6 @@ function asmFunc(global, env, buffer) { wasm2js_f64$0 = 1797693134862315708145274.0e284; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$0 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = HEAP32[0 >> 2] | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; @@ -495,7 +466,6 @@ function asmFunc(global, env, buffer) { wasm2js_f64$0 = 1.e+100; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$0 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = HEAP32[0 >> 2] | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; diff --git a/test/wasm2js/float_misc.2asm.js b/test/wasm2js/float_misc.2asm.js index 7b5098c9d..469e70e86 100644 --- a/test/wasm2js/float_misc.2asm.js +++ b/test/wasm2js/float_misc.2asm.js @@ -140,12 +140,11 @@ function asmFunc(global, env, buffer) { function $21(x, y) { x = +x; y = +y; - var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$2 = 0, i64toi32_i32$3 = 0, $4_1 = 0, $4$hi = 0, $7_1 = 0, $7$hi = 0, wasm2js_i32$0 = 0, wasm2js_f64$0 = 0.0, wasm2js_i32$1 = 0; + var i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, i64toi32_i32$1 = 0, i64toi32_i32$3 = 0, $4_1 = 0, $4$hi = 0, $7_1 = 0, $7$hi = 0, wasm2js_i32$0 = 0, wasm2js_f64$0 = 0.0, wasm2js_i32$1 = 0; wasm2js_i32$0 = 0; wasm2js_f64$0 = x; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$0 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = HEAP32[0 >> 2] | 0; i64toi32_i32$1 = 2147483647; i64toi32_i32$3 = 4294967295; @@ -156,7 +155,6 @@ function asmFunc(global, env, buffer) { wasm2js_f64$0 = y; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$1 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$0 = HEAP32[0 >> 2] | 0; i64toi32_i32$2 = 2147483648; i64toi32_i32$3 = 0; @@ -168,7 +166,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$0 = $7$hi; i64toi32_i32$3 = $7_1; i64toi32_i32$0 = i64toi32_i32$2 | i64toi32_i32$0 | 0; - i64toi32_i32$0 = i64toi32_i32$0; wasm2js_i32$0 = 0; wasm2js_i32$1 = i64toi32_i32$1 | i64toi32_i32$3 | 0; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; diff --git a/test/wasm2js/func.2asm.js b/test/wasm2js/func.2asm.js index 0f6038ca0..83919f943 100644 --- a/test/wasm2js/func.2asm.js +++ b/test/wasm2js/func.2asm.js @@ -135,7 +135,6 @@ function asmFunc(global, env, buffer) { function $24() { var i64toi32_i32$0 = 0, $0$hi = 0, $0 = 0; i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return $0 | 0; } @@ -158,7 +157,6 @@ function asmFunc(global, env, buffer) { function $28() { var i64toi32_i32$0 = 0, $1$hi = 0, $1_1 = 0; i64toi32_i32$0 = $1$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return $1_1 | 0; } @@ -176,7 +174,6 @@ function asmFunc(global, env, buffer) { function $31() { var i64toi32_i32$0 = 0, $4 = 0.0, $0 = Math_fround(0), x = 0, $2$hi = 0, $2_1 = 0, $3 = 0, $5_1 = 0; i64toi32_i32$0 = $2$hi; - i64toi32_i32$0 = i64toi32_i32$0; return +$4; } @@ -193,7 +190,6 @@ function asmFunc(global, env, buffer) { $1$hi = $1$hi | 0; var i64toi32_i32$0 = 0; i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return $0 | 0; } @@ -223,7 +219,6 @@ function asmFunc(global, env, buffer) { $1$hi = $1$hi | 0; var i64toi32_i32$0 = 0; i64toi32_i32$0 = $1$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return $1_1 | 0; } @@ -250,7 +245,6 @@ function asmFunc(global, env, buffer) { $5_1 = $5_1 | 0; var i64toi32_i32$0 = 0; i64toi32_i32$0 = x$hi; - i64toi32_i32$0 = i64toi32_i32$0; return +$4; } @@ -339,7 +333,6 @@ function asmFunc(global, env, buffer) { break fake_return_waka123; }; i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return $0 | 0; } @@ -440,7 +433,6 @@ function asmFunc(global, env, buffer) { function $68() { var i64toi32_i32$0 = 0, $0$hi = 0, $0 = 0; i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return $0 | 0; } diff --git a/test/wasm2js/get-set-local.2asm.js b/test/wasm2js/get-set-local.2asm.js index 58c93ba2d..69c6a16ae 100644 --- a/test/wasm2js/get-set-local.2asm.js +++ b/test/wasm2js/get-set-local.2asm.js @@ -31,10 +31,7 @@ function asmFunc(global, env, buffer) { r$hi = r$hi | 0; var i64toi32_i32$0 = 0, $9$hi = 0; i64toi32_i32$0 = r$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$0 = 0; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; $9$hi = i64toi32_i32$0; i64toi32_i32$0 = r$hi; i64toi32_i32$0 = $9$hi; diff --git a/test/wasm2js/get_local.2asm.js b/test/wasm2js/get_local.2asm.js index b88d35036..5a71697b9 100644 --- a/test/wasm2js/get_local.2asm.js +++ b/test/wasm2js/get_local.2asm.js @@ -29,7 +29,6 @@ function asmFunc(global, env, buffer) { function $1() { var i64toi32_i32$0 = 0, $0$hi = 0, $0_1 = 0; i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return $0_1 | 0; } @@ -54,7 +53,6 @@ function asmFunc(global, env, buffer) { $0$hi = $0$hi | 0; var i64toi32_i32$0 = 0; i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return $0_1 | 0; } @@ -78,11 +76,8 @@ function asmFunc(global, env, buffer) { $4_1 = $4_1 | 0; var i64toi32_i32$0 = 0, $5_1 = Math_fround(0), $6$hi = 0, $6_1 = 0, $7$hi = 0, $7_1 = 0, $8_1 = 0.0; i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$0 = $6$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$0 = $7$hi; - i64toi32_i32$0 = i64toi32_i32$0; } function $9($0_1, $0$hi, $1_1, $2_1, $3_1, $4_1) { @@ -96,15 +91,12 @@ function asmFunc(global, env, buffer) { i64toi32_i32$0 = 0; $6$hi = i64toi32_i32$0; i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = $0_1; $10 = +(i64toi32_i32$1 >>> 0) + 4294967296.0 * +(i64toi32_i32$0 >>> 0); i64toi32_i32$0 = $6$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = 6; $21 = +(i64toi32_i32$1 >>> 0) + 4294967296.0 * +(i64toi32_i32$0 >>> 0); i64toi32_i32$0 = $7$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = $7_1; return +($10 + (+$1_1 + ($2_1 + (+($3_1 >>> 0) + (+($4_1 | 0) + (+Math_fround(5.5) + ($21 + (+(i64toi32_i32$1 >>> 0) + 4294967296.0 * +(i64toi32_i32$0 >>> 0) + 8.0)))))))); } diff --git a/test/wasm2js/i64-ctz.2asm.js b/test/wasm2js/i64-ctz.2asm.js index bb0de102e..481c42e61 100644 --- a/test/wasm2js/i64-ctz.2asm.js +++ b/test/wasm2js/i64-ctz.2asm.js @@ -26,11 +26,8 @@ function asmFunc(global, env, buffer) { $0$hi = $0$hi | 0; var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0; i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$0 = __wasm_popcnt_i64($0 | 0, i64toi32_i32$0 | 0) | 0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$1 = i64toi32_i32$1; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$0 | 0; } @@ -40,11 +37,8 @@ function asmFunc(global, env, buffer) { $0$hi = $0$hi | 0; var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0; i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$0 = __wasm_ctz_i64($0 | 0, i64toi32_i32$0 | 0) | 0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$1 = i64toi32_i32$1; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$0 | 0; } @@ -52,12 +46,10 @@ function asmFunc(global, env, buffer) { function __wasm_ctz_i64(var$0, var$0$hi) { var$0 = var$0 | 0; var$0$hi = var$0$hi | 0; - var i64toi32_i32$0 = 0, i64toi32_i32$3 = 0, i64toi32_i32$4 = 0, i64toi32_i32$5 = 0, i64toi32_i32$2 = 0, i64toi32_i32$1 = 0, $10 = 0, $5$hi = 0, $8$hi = 0; + var i64toi32_i32$0 = 0, i64toi32_i32$3 = 0, i64toi32_i32$5 = 0, i64toi32_i32$4 = 0, i64toi32_i32$2 = 0, i64toi32_i32$1 = 0, $10 = 0, $5$hi = 0, $8$hi = 0; i64toi32_i32$0 = var$0$hi; - i64toi32_i32$0 = i64toi32_i32$0; if (((var$0 | i64toi32_i32$0 | 0 | 0) == (0 | 0) | 0) == (0 | 0)) { i64toi32_i32$0 = var$0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = var$0; i64toi32_i32$1 = 4294967295; i64toi32_i32$3 = 4294967295; @@ -71,7 +63,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$2 = var$0$hi; i64toi32_i32$3 = var$0; i64toi32_i32$2 = i64toi32_i32$5 ^ i64toi32_i32$2 | 0; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$0 = i64toi32_i32$0 ^ i64toi32_i32$3 | 0; i64toi32_i32$3 = Math_clz32(i64toi32_i32$2); i64toi32_i32$5 = 0; @@ -84,14 +75,11 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$0 - i64toi32_i32$3 | 0; i64toi32_i32$4 = (i64toi32_i32$0 >>> 0 < i64toi32_i32$3 >>> 0) + i64toi32_i32$2 | 0; i64toi32_i32$4 = i64toi32_i32$5 - i64toi32_i32$4 | 0; - i64toi32_i32$4 = i64toi32_i32$4; i64toi32_i32$0 = i64toi32_i32$1; i64toi32_i32$HIGH_BITS = i64toi32_i32$4; return i64toi32_i32$0 | 0; } i64toi32_i32$0 = 0; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$4 = 64; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$4 | 0; @@ -100,22 +88,18 @@ function asmFunc(global, env, buffer) { function __wasm_popcnt_i64(var$0, var$0$hi) { var$0 = var$0 | 0; var$0$hi = var$0$hi | 0; - var i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, i64toi32_i32$4 = 0, i64toi32_i32$5 = 0, i64toi32_i32$3 = 0, i64toi32_i32$1 = 0, var$1$hi = 0, var$1 = 0, $5 = 0, $5$hi = 0, $4 = 0, $9$hi = 0; + var i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, i64toi32_i32$5 = 0, i64toi32_i32$4 = 0, i64toi32_i32$3 = 0, i64toi32_i32$1 = 0, var$1$hi = 0, var$1 = 0, $5 = 0, $5$hi = 0, $4 = 0, $9$hi = 0; label$1 : { label$2 : do { i64toi32_i32$0 = var$1$hi; i64toi32_i32$0 = var$0$hi; - i64toi32_i32$0 = i64toi32_i32$0; $4 = (var$0 | i64toi32_i32$0 | 0 | 0) == (0 | 0); i64toi32_i32$0 = var$1$hi; $5 = var$1; $5$hi = i64toi32_i32$0; if ($4) break label$1; i64toi32_i32$0 = $5$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$0 = var$0$hi; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = var$0; i64toi32_i32$1 = 0; i64toi32_i32$3 = 1; @@ -128,18 +112,15 @@ function asmFunc(global, env, buffer) { i64toi32_i32$2 = $9$hi; i64toi32_i32$3 = i64toi32_i32$4; i64toi32_i32$2 = i64toi32_i32$5 & i64toi32_i32$2 | 0; - i64toi32_i32$2 = i64toi32_i32$2; var$0 = i64toi32_i32$0 & i64toi32_i32$4 | 0; var$0$hi = i64toi32_i32$2; i64toi32_i32$2 = var$1$hi; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$5 = var$1; i64toi32_i32$0 = 0; i64toi32_i32$3 = 1; i64toi32_i32$1 = i64toi32_i32$5 + i64toi32_i32$3 | 0; i64toi32_i32$4 = i64toi32_i32$2 + i64toi32_i32$0 | 0; if (i64toi32_i32$1 >>> 0 < i64toi32_i32$3 >>> 0) i64toi32_i32$4 = i64toi32_i32$4 + 1 | 0; - i64toi32_i32$4 = i64toi32_i32$4; var$1 = i64toi32_i32$1; var$1$hi = i64toi32_i32$4; continue label$2; @@ -147,7 +128,6 @@ function asmFunc(global, env, buffer) { } while (1); }; i64toi32_i32$4 = $5$hi; - i64toi32_i32$4 = i64toi32_i32$4; i64toi32_i32$5 = $5; i64toi32_i32$HIGH_BITS = i64toi32_i32$4; return i64toi32_i32$5 | 0; diff --git a/test/wasm2js/i64-rotate.2asm.js b/test/wasm2js/i64-rotate.2asm.js index d7b07fb2a..1981e0d0f 100644 --- a/test/wasm2js/i64-rotate.2asm.js +++ b/test/wasm2js/i64-rotate.2asm.js @@ -76,15 +76,12 @@ function asmFunc(global, env, buffer) { var$1$hi = var$1$hi | 0; var i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, i64toi32_i32$3 = 0, i64toi32_i32$5 = 0, i64toi32_i32$4 = 0, var$2$hi = 0, var$2 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $6$hi = 0, $8$hi = 0, $10 = 0, $10$hi = 0, $15$hi = 0, $17$hi = 0, $19$hi = 0; i64toi32_i32$0 = var$1$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = var$1; i64toi32_i32$1 = 0; i64toi32_i32$3 = 63; i64toi32_i32$1 = i64toi32_i32$0 & i64toi32_i32$1 | 0; - i64toi32_i32$1 = i64toi32_i32$1; var$2 = i64toi32_i32$2 & i64toi32_i32$3 | 0; var$2$hi = i64toi32_i32$1; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$1 = 4294967295; i64toi32_i32$0 = 4294967295; i64toi32_i32$2 = var$2$hi; @@ -128,15 +125,12 @@ function asmFunc(global, env, buffer) { i64toi32_i32$4 = i64toi32_i32$0 - i64toi32_i32$3 | 0; i64toi32_i32$5 = (i64toi32_i32$0 >>> 0 < i64toi32_i32$3 >>> 0) + i64toi32_i32$2 | 0; i64toi32_i32$5 = i64toi32_i32$1 - i64toi32_i32$5 | 0; - i64toi32_i32$5 = i64toi32_i32$5; i64toi32_i32$1 = i64toi32_i32$4; i64toi32_i32$0 = 0; i64toi32_i32$3 = 63; i64toi32_i32$0 = i64toi32_i32$5 & i64toi32_i32$0 | 0; - i64toi32_i32$0 = i64toi32_i32$0; var$1 = i64toi32_i32$1 & i64toi32_i32$3 | 0; var$1$hi = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$0 = 4294967295; i64toi32_i32$5 = 4294967295; i64toi32_i32$1 = var$1$hi; @@ -176,7 +170,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = $19$hi; i64toi32_i32$3 = $22; i64toi32_i32$1 = i64toi32_i32$0 | i64toi32_i32$1 | 0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$5 = i64toi32_i32$5 | i64toi32_i32$3 | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$5 | 0; @@ -189,15 +182,12 @@ function asmFunc(global, env, buffer) { var$1$hi = var$1$hi | 0; var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$2 = 0, i64toi32_i32$3 = 0, i64toi32_i32$5 = 0, i64toi32_i32$4 = 0, var$2$hi = 0, var$2 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $6$hi = 0, $8$hi = 0, $10 = 0, $10$hi = 0, $15$hi = 0, $17$hi = 0, $19$hi = 0; i64toi32_i32$0 = var$1$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = var$1; i64toi32_i32$1 = 0; i64toi32_i32$3 = 63; i64toi32_i32$1 = i64toi32_i32$0 & i64toi32_i32$1 | 0; - i64toi32_i32$1 = i64toi32_i32$1; var$2 = i64toi32_i32$2 & i64toi32_i32$3 | 0; var$2$hi = i64toi32_i32$1; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$1 = 4294967295; i64toi32_i32$0 = 4294967295; i64toi32_i32$2 = var$2$hi; @@ -241,15 +231,12 @@ function asmFunc(global, env, buffer) { i64toi32_i32$4 = i64toi32_i32$0 - i64toi32_i32$3 | 0; i64toi32_i32$5 = (i64toi32_i32$0 >>> 0 < i64toi32_i32$3 >>> 0) + i64toi32_i32$2 | 0; i64toi32_i32$5 = i64toi32_i32$1 - i64toi32_i32$5 | 0; - i64toi32_i32$5 = i64toi32_i32$5; i64toi32_i32$1 = i64toi32_i32$4; i64toi32_i32$0 = 0; i64toi32_i32$3 = 63; i64toi32_i32$0 = i64toi32_i32$5 & i64toi32_i32$0 | 0; - i64toi32_i32$0 = i64toi32_i32$0; var$1 = i64toi32_i32$1 & i64toi32_i32$3 | 0; var$1$hi = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$0 = 4294967295; i64toi32_i32$5 = 4294967295; i64toi32_i32$1 = var$1$hi; @@ -289,7 +276,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = $19$hi; i64toi32_i32$3 = $22; i64toi32_i32$1 = i64toi32_i32$0 | i64toi32_i32$1 | 0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$5 = i64toi32_i32$5 | i64toi32_i32$3 | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$5 | 0; diff --git a/test/wasm2js/i64-select.2asm.js b/test/wasm2js/i64-select.2asm.js index dab62286c..99562534d 100644 --- a/test/wasm2js/i64-select.2asm.js +++ b/test/wasm2js/i64-select.2asm.js @@ -33,12 +33,10 @@ function asmFunc(global, env, buffer) { } function $2() { - var i64toi32_i32$3 = 0, i64toi32_i32$2 = 0, i64toi32_i32$4 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0, wasm2js_i32$2 = 0; + var i64toi32_i32$4 = 0, i64toi32_i32$3 = 0, i64toi32_i32$2 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0, wasm2js_i32$2 = 0; i64toi32_i32$4 = 1; i64toi32_i32$3 = (wasm2js_i32$0 = 4294967295, wasm2js_i32$1 = 0, wasm2js_i32$2 = i64toi32_i32$4, wasm2js_i32$2 ? wasm2js_i32$0 : wasm2js_i32$1); i64toi32_i32$2 = (wasm2js_i32$0 = 4294967295, wasm2js_i32$1 = 0, wasm2js_i32$2 = i64toi32_i32$4, wasm2js_i32$2 ? wasm2js_i32$0 : wasm2js_i32$1); - i64toi32_i32$2 = i64toi32_i32$2; - i64toi32_i32$3 = i64toi32_i32$3; i64toi32_i32$HIGH_BITS = i64toi32_i32$2; return i64toi32_i32$3 | 0; } diff --git a/test/wasm2js/i64.2asm.js b/test/wasm2js/i64.2asm.js index 65332ff36..4edf6f67b 100644 --- a/test/wasm2js/i64.2asm.js +++ b/test/wasm2js/i64.2asm.js @@ -31,7 +31,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$4 = x + i64toi32_i32$3 | 0; i64toi32_i32$5 = x$hi + y$hi | 0; if (i64toi32_i32$4 >>> 0 < i64toi32_i32$3 >>> 0) i64toi32_i32$5 = i64toi32_i32$5 + 1 | 0; - i64toi32_i32$5 = i64toi32_i32$5; i64toi32_i32$HIGH_BITS = i64toi32_i32$5; return i64toi32_i32$4 | 0; } @@ -41,7 +40,7 @@ function asmFunc(global, env, buffer) { x$hi = x$hi | 0; y = y | 0; y$hi = y$hi | 0; - var i64toi32_i32$5 = 0, i64toi32_i32$2 = 0, i64toi32_i32$0 = 0, i64toi32_i32$3 = 0; + var i64toi32_i32$2 = 0, i64toi32_i32$0 = 0, i64toi32_i32$5 = 0, i64toi32_i32$3 = 0; i64toi32_i32$0 = x$hi; i64toi32_i32$0 = y$hi; i64toi32_i32$0 = x$hi; @@ -49,7 +48,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$3 = y; i64toi32_i32$5 = (i64toi32_i32$2 >>> 0 < i64toi32_i32$3 >>> 0) + y$hi | 0; i64toi32_i32$5 = i64toi32_i32$0 - i64toi32_i32$5 | 0; - i64toi32_i32$5 = i64toi32_i32$5; i64toi32_i32$2 = i64toi32_i32$2 - i64toi32_i32$3 | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$5; return i64toi32_i32$2 | 0; @@ -67,8 +65,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = y$hi; i64toi32_i32$1 = __wasm_i64_mul(x | 0, i64toi32_i32$0 | 0, y | 0, i64toi32_i32$1 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; } @@ -85,8 +81,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = y$hi; i64toi32_i32$1 = __wasm_i64_sdiv(x | 0, i64toi32_i32$0 | 0, y | 0, i64toi32_i32$1 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; } @@ -103,8 +97,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = y$hi; i64toi32_i32$1 = __wasm_i64_udiv(x | 0, i64toi32_i32$0 | 0, y | 0, i64toi32_i32$1 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; } @@ -121,8 +113,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = y$hi; i64toi32_i32$1 = __wasm_i64_srem(x | 0, i64toi32_i32$0 | 0, y | 0, i64toi32_i32$1 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; } @@ -139,8 +129,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = y$hi; i64toi32_i32$1 = __wasm_i64_urem(x | 0, i64toi32_i32$0 | 0, y | 0, i64toi32_i32$1 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; } @@ -150,14 +138,13 @@ function asmFunc(global, env, buffer) { x$hi = x$hi | 0; y = y | 0; y$hi = y$hi | 0; - var i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, i64toi32_i32$2 = 0; + var i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, i64toi32_i32$1 = 0; i64toi32_i32$0 = x$hi; i64toi32_i32$0 = y$hi; i64toi32_i32$0 = x$hi; i64toi32_i32$2 = x; i64toi32_i32$1 = y$hi; i64toi32_i32$1 = i64toi32_i32$0 & i64toi32_i32$1 | 0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$2 = i64toi32_i32$2 & y | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$2 | 0; @@ -168,14 +155,13 @@ function asmFunc(global, env, buffer) { x$hi = x$hi | 0; y = y | 0; y$hi = y$hi | 0; - var i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, i64toi32_i32$2 = 0; + var i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, i64toi32_i32$1 = 0; i64toi32_i32$0 = x$hi; i64toi32_i32$0 = y$hi; i64toi32_i32$0 = x$hi; i64toi32_i32$2 = x; i64toi32_i32$1 = y$hi; i64toi32_i32$1 = i64toi32_i32$0 | i64toi32_i32$1 | 0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$2 = i64toi32_i32$2 | y | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$2 | 0; @@ -186,14 +172,13 @@ function asmFunc(global, env, buffer) { x$hi = x$hi | 0; y = y | 0; y$hi = y$hi | 0; - var i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, i64toi32_i32$2 = 0; + var i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, i64toi32_i32$1 = 0; i64toi32_i32$0 = x$hi; i64toi32_i32$0 = y$hi; i64toi32_i32$0 = x$hi; i64toi32_i32$2 = x; i64toi32_i32$1 = y$hi; i64toi32_i32$1 = i64toi32_i32$0 ^ i64toi32_i32$1 | 0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$2 = i64toi32_i32$2 ^ y | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$2 | 0; @@ -204,7 +189,7 @@ function asmFunc(global, env, buffer) { x$hi = x$hi | 0; y = y | 0; y$hi = y$hi | 0; - var i64toi32_i32$2 = 0, i64toi32_i32$1 = 0, i64toi32_i32$4 = 0, i64toi32_i32$0 = 0, i64toi32_i32$3 = 0, $9_1 = 0; + var i64toi32_i32$2 = 0, i64toi32_i32$4 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$3 = 0, $9_1 = 0; i64toi32_i32$0 = x$hi; i64toi32_i32$0 = y$hi; i64toi32_i32$0 = x$hi; @@ -219,7 +204,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = ((1 << i64toi32_i32$4 | 0) - 1 | 0) & (i64toi32_i32$2 >>> (32 - i64toi32_i32$4 | 0) | 0) | 0 | (i64toi32_i32$0 << i64toi32_i32$4 | 0) | 0; $9_1 = i64toi32_i32$2 << i64toi32_i32$4 | 0; } - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$2 = $9_1; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$2 | 0; @@ -230,7 +214,7 @@ function asmFunc(global, env, buffer) { x$hi = x$hi | 0; y = y | 0; y$hi = y$hi | 0; - var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$4 = 0, i64toi32_i32$2 = 0, i64toi32_i32$3 = 0, $9_1 = 0; + var i64toi32_i32$0 = 0, i64toi32_i32$4 = 0, i64toi32_i32$2 = 0, i64toi32_i32$1 = 0, i64toi32_i32$3 = 0, $9_1 = 0; i64toi32_i32$0 = x$hi; i64toi32_i32$0 = y$hi; i64toi32_i32$0 = x$hi; @@ -245,7 +229,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$0 >> i64toi32_i32$4 | 0; $9_1 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$0 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$2 >>> i64toi32_i32$4 | 0) | 0; } - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$2 = $9_1; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$2 | 0; @@ -256,7 +239,7 @@ function asmFunc(global, env, buffer) { x$hi = x$hi | 0; y = y | 0; y$hi = y$hi | 0; - var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$4 = 0, i64toi32_i32$2 = 0, i64toi32_i32$3 = 0, $9_1 = 0; + var i64toi32_i32$0 = 0, i64toi32_i32$4 = 0, i64toi32_i32$2 = 0, i64toi32_i32$1 = 0, i64toi32_i32$3 = 0, $9_1 = 0; i64toi32_i32$0 = x$hi; i64toi32_i32$0 = y$hi; i64toi32_i32$0 = x$hi; @@ -271,7 +254,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0; $9_1 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$0 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$2 >>> i64toi32_i32$4 | 0) | 0; } - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$2 = $9_1; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$2 | 0; @@ -289,8 +271,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = y$hi; i64toi32_i32$1 = __wasm_rotl_i64(x | 0, i64toi32_i32$0 | 0, y | 0, i64toi32_i32$1 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; } @@ -307,8 +287,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = y$hi; i64toi32_i32$1 = __wasm_rotr_i64(x | 0, i64toi32_i32$0 | 0, y | 0, i64toi32_i32$1 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; } @@ -316,14 +294,12 @@ function asmFunc(global, env, buffer) { function $15(x, x$hi) { x = x | 0; x$hi = x$hi | 0; - var i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, i64toi32_i32$3 = 0, $6_1 = 0, i64toi32_i32$1 = 0; + var i64toi32_i32$0 = 0, i64toi32_i32$3 = 0, $6_1 = 0, i64toi32_i32$1 = 0, i64toi32_i32$2 = 0; i64toi32_i32$0 = x$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = x; i64toi32_i32$3 = Math_clz32(i64toi32_i32$0); i64toi32_i32$2 = 0; if ((i64toi32_i32$3 | 0) == (32 | 0)) $6_1 = Math_clz32(i64toi32_i32$1) + 32 | 0; else $6_1 = i64toi32_i32$3; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$0 = $6_1; i64toi32_i32$HIGH_BITS = i64toi32_i32$2; return i64toi32_i32$0 | 0; @@ -334,11 +310,8 @@ function asmFunc(global, env, buffer) { x$hi = x$hi | 0; var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0; i64toi32_i32$0 = x$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$0 = __wasm_ctz_i64(x | 0, i64toi32_i32$0 | 0) | 0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$1 = i64toi32_i32$1; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$0 | 0; } @@ -348,11 +321,8 @@ function asmFunc(global, env, buffer) { x$hi = x$hi | 0; var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0; i64toi32_i32$0 = x$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$0 = __wasm_popcnt_i64(x | 0, i64toi32_i32$0 | 0) | 0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$1 = i64toi32_i32$1; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$0 | 0; } @@ -362,7 +332,6 @@ function asmFunc(global, env, buffer) { x$hi = x$hi | 0; var i64toi32_i32$0 = 0; i64toi32_i32$0 = x$hi; - i64toi32_i32$0 = i64toi32_i32$0; return (x | i64toi32_i32$0 | 0 | 0) == (0 | 0) | 0; } @@ -531,19 +500,15 @@ function asmFunc(global, env, buffer) { var$0$hi = var$0$hi | 0; var$1 = var$1 | 0; var$1$hi = var$1$hi | 0; - var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$4 = 0, i64toi32_i32$2 = 0, var$2 = 0, i64toi32_i32$3 = 0, var$3 = 0, var$4 = 0, var$5 = 0, $21_1 = 0, $22_1 = 0, var$6 = 0, $24_1 = 0, $17_1 = 0, $18_1 = 0, $23_1 = 0, $29 = 0, $45 = 0, $56$hi = 0, $62$hi = 0; + var i64toi32_i32$4 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, var$2 = 0, i64toi32_i32$2 = 0, i64toi32_i32$3 = 0, var$3 = 0, var$4 = 0, var$5 = 0, $21_1 = 0, $22_1 = 0, var$6 = 0, $24_1 = 0, $17_1 = 0, $18_1 = 0, $23_1 = 0, $29 = 0, $45 = 0, $56$hi = 0, $62$hi = 0; i64toi32_i32$0 = var$1$hi; - i64toi32_i32$0 = i64toi32_i32$0; var$2 = var$1; var$4 = var$2 >>> 16 | 0; i64toi32_i32$0 = var$0$hi; - i64toi32_i32$0 = i64toi32_i32$0; var$3 = var$0; var$5 = var$3 >>> 16 | 0; $17_1 = Math_imul(var$4, var$5); $18_1 = var$2; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = var$3; i64toi32_i32$1 = 0; i64toi32_i32$3 = 32; @@ -555,10 +520,8 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0; $21_1 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$0 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$2 >>> i64toi32_i32$4 | 0) | 0; } - i64toi32_i32$1 = i64toi32_i32$1; $23_1 = $17_1 + Math_imul($18_1, $21_1) | 0; i64toi32_i32$1 = var$1$hi; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$0 = var$1; i64toi32_i32$2 = 0; i64toi32_i32$3 = 32; @@ -570,7 +533,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$2 = i64toi32_i32$1 >>> i64toi32_i32$4 | 0; $22_1 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$1 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$0 >>> i64toi32_i32$4 | 0) | 0; } - i64toi32_i32$2 = i64toi32_i32$2; $29 = $23_1 + Math_imul($22_1, var$3) | 0; var$2 = var$2 & 65535 | 0; var$3 = var$3 & 65535 | 0; @@ -579,7 +541,6 @@ function asmFunc(global, env, buffer) { $45 = $29 + (var$2 >>> 16 | 0) | 0; var$2 = (var$2 & 65535 | 0) + Math_imul(var$4, var$3) | 0; i64toi32_i32$2 = 0; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$1 = $45 + (var$2 >>> 16 | 0) | 0; i64toi32_i32$0 = 0; i64toi32_i32$3 = 32; @@ -599,7 +560,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = $62$hi; i64toi32_i32$3 = var$2 << 16 | 0 | (var$6 & 65535 | 0) | 0; i64toi32_i32$1 = i64toi32_i32$0 | i64toi32_i32$1 | 0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$2 = i64toi32_i32$2 | i64toi32_i32$3 | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$2 | 0; @@ -612,7 +572,6 @@ function asmFunc(global, env, buffer) { var$1$hi = var$1$hi | 0; var i64toi32_i32$1 = 0, i64toi32_i32$2 = 0, i64toi32_i32$4 = 0, i64toi32_i32$3 = 0, i64toi32_i32$0 = 0, i64toi32_i32$5 = 0, var$2 = 0, var$2$hi = 0, i64toi32_i32$6 = 0, $21_1 = 0, $22_1 = 0, $23_1 = 0, $7$hi = 0, $9_1 = 0, $9$hi = 0, $14$hi = 0, $16$hi = 0, $17_1 = 0, $17$hi = 0, $23$hi = 0; i64toi32_i32$0 = var$0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = var$0; i64toi32_i32$1 = 0; i64toi32_i32$3 = 63; @@ -624,10 +583,8 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$0 >> i64toi32_i32$4 | 0; $21_1 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$0 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$2 >>> i64toi32_i32$4 | 0) | 0; } - i64toi32_i32$1 = i64toi32_i32$1; var$2 = $21_1; var$2$hi = i64toi32_i32$1; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$1 = var$0$hi; i64toi32_i32$1 = var$2$hi; i64toi32_i32$0 = var$2; @@ -647,7 +604,6 @@ function asmFunc(global, env, buffer) { $9_1 = i64toi32_i32$4; $9$hi = i64toi32_i32$5; i64toi32_i32$5 = var$1$hi; - i64toi32_i32$5 = i64toi32_i32$5; i64toi32_i32$2 = var$1; i64toi32_i32$1 = 0; i64toi32_i32$3 = 63; @@ -659,10 +615,8 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$5 >> i64toi32_i32$0 | 0; $22_1 = (((1 << i64toi32_i32$0 | 0) - 1 | 0) & i64toi32_i32$5 | 0) << (32 - i64toi32_i32$0 | 0) | 0 | (i64toi32_i32$2 >>> i64toi32_i32$0 | 0) | 0; } - i64toi32_i32$1 = i64toi32_i32$1; var$2 = $22_1; var$2$hi = i64toi32_i32$1; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$1 = var$1$hi; i64toi32_i32$1 = var$2$hi; i64toi32_i32$5 = var$2; @@ -693,7 +647,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = var$0$hi; i64toi32_i32$3 = var$0; i64toi32_i32$1 = i64toi32_i32$4 ^ i64toi32_i32$1 | 0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$4 = i64toi32_i32$2 ^ i64toi32_i32$3 | 0; i64toi32_i32$2 = 0; i64toi32_i32$3 = 63; @@ -705,10 +658,8 @@ function asmFunc(global, env, buffer) { i64toi32_i32$2 = i64toi32_i32$1 >> i64toi32_i32$5 | 0; $23_1 = (((1 << i64toi32_i32$5 | 0) - 1 | 0) & i64toi32_i32$1 | 0) << (32 - i64toi32_i32$5 | 0) | 0 | (i64toi32_i32$4 >>> i64toi32_i32$5 | 0) | 0; } - i64toi32_i32$2 = i64toi32_i32$2; var$0 = $23_1; var$0$hi = i64toi32_i32$2; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$2 = $17$hi; i64toi32_i32$1 = $17_1; i64toi32_i32$4 = var$0$hi; @@ -719,12 +670,10 @@ function asmFunc(global, env, buffer) { i64toi32_i32$4 = $23$hi; i64toi32_i32$2 = i64toi32_i32$1 ^ i64toi32_i32$3 | 0; i64toi32_i32$1 = var$0$hi; - i64toi32_i32$3 = i64toi32_i32$3; i64toi32_i32$5 = i64toi32_i32$2 - i64toi32_i32$3 | 0; i64toi32_i32$6 = i64toi32_i32$2 >>> 0 < i64toi32_i32$3 >>> 0; i64toi32_i32$0 = i64toi32_i32$6 + i64toi32_i32$1 | 0; i64toi32_i32$0 = i64toi32_i32$4 - i64toi32_i32$0 | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = i64toi32_i32$5; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$2 | 0; @@ -735,9 +684,8 @@ function asmFunc(global, env, buffer) { var$0$hi = var$0$hi | 0; var$1 = var$1 | 0; var$1$hi = var$1$hi | 0; - var i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, i64toi32_i32$4 = 0, i64toi32_i32$2 = 0, i64toi32_i32$3 = 0, i64toi32_i32$5 = 0, var$2$hi = 0, i64toi32_i32$6 = 0, var$2 = 0, $20_1 = 0, $21_1 = 0, $7$hi = 0, $9_1 = 0, $9$hi = 0, $14$hi = 0, $16$hi = 0, $17$hi = 0, $19$hi = 0; + var i64toi32_i32$1 = 0, i64toi32_i32$4 = 0, i64toi32_i32$2 = 0, i64toi32_i32$0 = 0, i64toi32_i32$3 = 0, i64toi32_i32$5 = 0, var$2$hi = 0, i64toi32_i32$6 = 0, var$2 = 0, $20_1 = 0, $21_1 = 0, $7$hi = 0, $9_1 = 0, $9$hi = 0, $14$hi = 0, $16$hi = 0, $17$hi = 0, $19$hi = 0; i64toi32_i32$0 = var$0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = var$0; i64toi32_i32$1 = 0; i64toi32_i32$3 = 63; @@ -749,10 +697,8 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$0 >> i64toi32_i32$4 | 0; $20_1 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$0 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$2 >>> i64toi32_i32$4 | 0) | 0; } - i64toi32_i32$1 = i64toi32_i32$1; var$2 = $20_1; var$2$hi = i64toi32_i32$1; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$1 = var$0$hi; i64toi32_i32$1 = var$2$hi; i64toi32_i32$0 = var$2; @@ -772,7 +718,6 @@ function asmFunc(global, env, buffer) { $9_1 = i64toi32_i32$4; $9$hi = i64toi32_i32$5; i64toi32_i32$5 = var$1$hi; - i64toi32_i32$5 = i64toi32_i32$5; i64toi32_i32$2 = var$1; i64toi32_i32$1 = 0; i64toi32_i32$3 = 63; @@ -784,10 +729,8 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$5 >> i64toi32_i32$0 | 0; $21_1 = (((1 << i64toi32_i32$0 | 0) - 1 | 0) & i64toi32_i32$5 | 0) << (32 - i64toi32_i32$0 | 0) | 0 | (i64toi32_i32$2 >>> i64toi32_i32$0 | 0) | 0; } - i64toi32_i32$1 = i64toi32_i32$1; var$0 = $21_1; var$0$hi = i64toi32_i32$1; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$1 = var$1$hi; i64toi32_i32$1 = var$0$hi; i64toi32_i32$5 = var$0; @@ -821,12 +764,10 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = $19$hi; i64toi32_i32$4 = i64toi32_i32$2 ^ i64toi32_i32$3 | 0; i64toi32_i32$2 = var$2$hi; - i64toi32_i32$3 = i64toi32_i32$3; i64toi32_i32$5 = i64toi32_i32$4 - i64toi32_i32$3 | 0; i64toi32_i32$6 = i64toi32_i32$4 >>> 0 < i64toi32_i32$3 >>> 0; i64toi32_i32$0 = i64toi32_i32$6 + i64toi32_i32$2 | 0; i64toi32_i32$0 = i64toi32_i32$1 - i64toi32_i32$0 | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$4 = i64toi32_i32$5; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$4 | 0; @@ -850,7 +791,6 @@ function asmFunc(global, env, buffer) { label$10 : { label$11 : { i64toi32_i32$0 = var$0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = var$0; i64toi32_i32$1 = 0; i64toi32_i32$3 = 32; @@ -862,15 +802,12 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0; $38 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$0 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$2 >>> i64toi32_i32$4 | 0) | 0; } - i64toi32_i32$1 = i64toi32_i32$1; var$2 = $38; if (var$2) block : { i64toi32_i32$1 = var$1$hi; - i64toi32_i32$1 = i64toi32_i32$1; var$3 = var$1; if ((var$3 | 0) == (0 | 0)) break label$11; i64toi32_i32$1 = var$1$hi; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$0 = var$1; i64toi32_i32$2 = 0; i64toi32_i32$3 = 32; @@ -882,7 +819,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$2 = i64toi32_i32$1 >>> i64toi32_i32$4 | 0; $39 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$1 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$0 >>> i64toi32_i32$4 | 0) | 0; } - i64toi32_i32$2 = i64toi32_i32$2; var$4 = $39; if ((var$4 | 0) == (0 | 0)) break label$9; var$2 = Math_clz32(var$4) - Math_clz32(var$2) | 0; @@ -890,21 +826,17 @@ function asmFunc(global, env, buffer) { break label$2; }; i64toi32_i32$2 = var$1$hi; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$1 = var$1; i64toi32_i32$0 = 1; i64toi32_i32$3 = 0; if (i64toi32_i32$2 >>> 0 > i64toi32_i32$0 >>> 0 | ((i64toi32_i32$2 | 0) == (i64toi32_i32$0 | 0) & i64toi32_i32$1 >>> 0 >= i64toi32_i32$3 >>> 0 | 0) | 0) break label$2; i64toi32_i32$1 = var$0$hi; - i64toi32_i32$1 = i64toi32_i32$1; var$2 = var$0; i64toi32_i32$1 = var$1$hi; - i64toi32_i32$1 = i64toi32_i32$1; var$3 = var$1; var$2 = (var$2 >>> 0) / (var$3 >>> 0) | 0; i64toi32_i32$1 = 0; i64toi32_i32$2 = 1024; - i64toi32_i32$1 = i64toi32_i32$1; wasm2js_i32$0 = i64toi32_i32$2; wasm2js_i32$1 = var$0 - Math_imul(var$2, var$3) | 0; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; @@ -912,13 +844,11 @@ function asmFunc(global, env, buffer) { wasm2js_i32$1 = i64toi32_i32$1; (wasm2js_i32$2 = wasm2js_i32$0, wasm2js_i32$3 = wasm2js_i32$1), ((HEAP8[(wasm2js_i32$2 + 4 | 0) >> 0] = wasm2js_i32$3 & 255 | 0, HEAP8[(wasm2js_i32$2 + 5 | 0) >> 0] = (wasm2js_i32$3 >>> 8 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 6 | 0) >> 0] = (wasm2js_i32$3 >>> 16 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 7 | 0) >> 0] = (wasm2js_i32$3 >>> 24 | 0) & 255 | 0; i64toi32_i32$1 = 0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$2 = var$2; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$2 | 0; }; i64toi32_i32$2 = var$1$hi; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$3 = var$1; i64toi32_i32$1 = 0; i64toi32_i32$0 = 32; @@ -930,16 +860,13 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$2 >>> i64toi32_i32$4 | 0; $40 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$2 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$3 >>> i64toi32_i32$4 | 0) | 0; } - i64toi32_i32$1 = i64toi32_i32$1; var$3 = $40; i64toi32_i32$1 = var$0$hi; - i64toi32_i32$1 = i64toi32_i32$1; if ((var$0 | 0) == (0 | 0)) break label$7; if ((var$3 | 0) == (0 | 0)) break label$6; var$4 = var$3 + 4294967295 | 0; if (var$4 & var$3 | 0) break label$6; i64toi32_i32$1 = 0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$2 = var$4 & var$2 | 0; i64toi32_i32$3 = 0; i64toi32_i32$0 = 32; @@ -953,7 +880,6 @@ function asmFunc(global, env, buffer) { } $63$hi = i64toi32_i32$3; i64toi32_i32$3 = var$0$hi; - i64toi32_i32$3 = i64toi32_i32$3; i64toi32_i32$1 = var$0; i64toi32_i32$2 = 0; i64toi32_i32$0 = 4294967295; @@ -967,7 +893,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$2 | i64toi32_i32$1 | 0; $66 = i64toi32_i32$3 | i64toi32_i32$0 | 0; i64toi32_i32$3 = 1024; - i64toi32_i32$1 = i64toi32_i32$1; wasm2js_i32$0 = i64toi32_i32$3; wasm2js_i32$1 = $66; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; @@ -975,7 +900,6 @@ function asmFunc(global, env, buffer) { wasm2js_i32$1 = i64toi32_i32$1; (wasm2js_i32$2 = wasm2js_i32$0, wasm2js_i32$3 = wasm2js_i32$1), ((HEAP8[(wasm2js_i32$2 + 4 | 0) >> 0] = wasm2js_i32$3 & 255 | 0, HEAP8[(wasm2js_i32$2 + 5 | 0) >> 0] = (wasm2js_i32$3 >>> 8 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 6 | 0) >> 0] = (wasm2js_i32$3 >>> 16 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 7 | 0) >> 0] = (wasm2js_i32$3 >>> 24 | 0) & 255 | 0; i64toi32_i32$1 = 0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$3 = var$2 >>> ((__wasm_ctz_i32(var$3 | 0) | 0) & 31 | 0) | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$3 | 0; @@ -993,7 +917,6 @@ function asmFunc(global, env, buffer) { }; var$4 = (var$2 >>> 0) / (var$3 >>> 0) | 0; i64toi32_i32$3 = 0; - i64toi32_i32$3 = i64toi32_i32$3; i64toi32_i32$2 = var$2 - Math_imul(var$4, var$3) | 0; i64toi32_i32$1 = 0; i64toi32_i32$0 = 32; @@ -1006,7 +929,6 @@ function asmFunc(global, env, buffer) { $42 = i64toi32_i32$2 << i64toi32_i32$4 | 0; } i64toi32_i32$2 = 1024; - i64toi32_i32$1 = i64toi32_i32$1; wasm2js_i32$0 = i64toi32_i32$2; wasm2js_i32$1 = $42; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; @@ -1014,7 +936,6 @@ function asmFunc(global, env, buffer) { wasm2js_i32$1 = i64toi32_i32$1; (wasm2js_i32$2 = wasm2js_i32$0, wasm2js_i32$3 = wasm2js_i32$1), ((HEAP8[(wasm2js_i32$2 + 4 | 0) >> 0] = wasm2js_i32$3 & 255 | 0, HEAP8[(wasm2js_i32$2 + 5 | 0) >> 0] = (wasm2js_i32$3 >>> 8 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 6 | 0) >> 0] = (wasm2js_i32$3 >>> 16 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 7 | 0) >> 0] = (wasm2js_i32$3 >>> 24 | 0) & 255 | 0; i64toi32_i32$1 = 0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$2 = var$4; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$2 | 0; @@ -1024,10 +945,8 @@ function asmFunc(global, env, buffer) { break label$2; }; i64toi32_i32$2 = var$0$hi; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$2 = 0; i64toi32_i32$1 = 1024; - i64toi32_i32$2 = i64toi32_i32$2; wasm2js_i32$0 = i64toi32_i32$1; wasm2js_i32$1 = var$4 & var$0 | 0; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; @@ -1050,7 +969,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$2 >>> i64toi32_i32$4 | 0; $43 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$2 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$3 >>> i64toi32_i32$4 | 0) | 0; } - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$3 = $43; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$3 | 0; @@ -1073,7 +991,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$3 >>> i64toi32_i32$4 | 0; $44 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$3 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$2 >>> i64toi32_i32$4 | 0) | 0; } - i64toi32_i32$1 = i64toi32_i32$1; var$5 = $44; var$5$hi = i64toi32_i32$1; i64toi32_i32$1 = var$0$hi; @@ -1091,25 +1008,21 @@ function asmFunc(global, env, buffer) { i64toi32_i32$2 = ((1 << i64toi32_i32$4 | 0) - 1 | 0) & (i64toi32_i32$3 >>> (32 - i64toi32_i32$4 | 0) | 0) | 0 | (i64toi32_i32$1 << i64toi32_i32$4 | 0) | 0; $45 = i64toi32_i32$3 << i64toi32_i32$4 | 0; } - i64toi32_i32$2 = i64toi32_i32$2; var$0 = $45; var$0$hi = i64toi32_i32$2; label$13 : { if (var$2) block3 : { i64toi32_i32$2 = var$1$hi; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$1 = var$1; i64toi32_i32$3 = 4294967295; i64toi32_i32$0 = 4294967295; i64toi32_i32$4 = i64toi32_i32$1 + i64toi32_i32$0 | 0; i64toi32_i32$5 = i64toi32_i32$2 + i64toi32_i32$3 | 0; if (i64toi32_i32$4 >>> 0 < i64toi32_i32$0 >>> 0) i64toi32_i32$5 = i64toi32_i32$5 + 1 | 0; - i64toi32_i32$5 = i64toi32_i32$5; var$8 = i64toi32_i32$4; var$8$hi = i64toi32_i32$5; label$15 : do { i64toi32_i32$5 = var$5$hi; - i64toi32_i32$5 = i64toi32_i32$5; i64toi32_i32$2 = var$5; i64toi32_i32$1 = 0; i64toi32_i32$0 = 1; @@ -1124,7 +1037,6 @@ function asmFunc(global, env, buffer) { $140 = $46; $140$hi = i64toi32_i32$1; i64toi32_i32$1 = var$0$hi; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$5 = var$0; i64toi32_i32$2 = 0; i64toi32_i32$0 = 63; @@ -1142,10 +1054,8 @@ function asmFunc(global, env, buffer) { i64toi32_i32$5 = $142$hi; i64toi32_i32$0 = $47; i64toi32_i32$5 = i64toi32_i32$2 | i64toi32_i32$5 | 0; - i64toi32_i32$5 = i64toi32_i32$5; var$5 = i64toi32_i32$1 | i64toi32_i32$0 | 0; var$5$hi = i64toi32_i32$5; - i64toi32_i32$5 = i64toi32_i32$5; $144 = var$5; $144$hi = i64toi32_i32$5; i64toi32_i32$5 = var$8$hi; @@ -1158,7 +1068,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$6 = i64toi32_i32$2 >>> 0 < i64toi32_i32$0 >>> 0; i64toi32_i32$4 = i64toi32_i32$6 + i64toi32_i32$1 | 0; i64toi32_i32$4 = i64toi32_i32$5 - i64toi32_i32$4 | 0; - i64toi32_i32$4 = i64toi32_i32$4; i64toi32_i32$5 = i64toi32_i32$3; i64toi32_i32$2 = 0; i64toi32_i32$0 = 63; @@ -1170,10 +1079,8 @@ function asmFunc(global, env, buffer) { i64toi32_i32$2 = i64toi32_i32$4 >> i64toi32_i32$1 | 0; $48 = (((1 << i64toi32_i32$1 | 0) - 1 | 0) & i64toi32_i32$4 | 0) << (32 - i64toi32_i32$1 | 0) | 0 | (i64toi32_i32$5 >>> i64toi32_i32$1 | 0) | 0; } - i64toi32_i32$2 = i64toi32_i32$2; var$6 = $48; var$6$hi = i64toi32_i32$2; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$2 = var$1$hi; i64toi32_i32$2 = var$6$hi; i64toi32_i32$4 = var$6; @@ -1190,11 +1097,9 @@ function asmFunc(global, env, buffer) { i64toi32_i32$6 = i64toi32_i32$2 >>> 0 < i64toi32_i32$0 >>> 0; i64toi32_i32$3 = i64toi32_i32$6 + i64toi32_i32$4 | 0; i64toi32_i32$3 = i64toi32_i32$5 - i64toi32_i32$3 | 0; - i64toi32_i32$3 = i64toi32_i32$3; var$5 = i64toi32_i32$1; var$5$hi = i64toi32_i32$3; i64toi32_i32$3 = var$0$hi; - i64toi32_i32$3 = i64toi32_i32$3; i64toi32_i32$5 = var$0; i64toi32_i32$2 = 0; i64toi32_i32$0 = 1; @@ -1213,20 +1118,15 @@ function asmFunc(global, env, buffer) { i64toi32_i32$5 = var$7$hi; i64toi32_i32$0 = var$7; i64toi32_i32$5 = i64toi32_i32$2 | i64toi32_i32$5 | 0; - i64toi32_i32$5 = i64toi32_i32$5; var$0 = i64toi32_i32$3 | i64toi32_i32$0 | 0; var$0$hi = i64toi32_i32$5; i64toi32_i32$5 = var$6$hi; - i64toi32_i32$5 = i64toi32_i32$5; i64toi32_i32$2 = var$6; i64toi32_i32$3 = 0; i64toi32_i32$0 = 1; i64toi32_i32$3 = i64toi32_i32$5 & i64toi32_i32$3 | 0; - i64toi32_i32$3 = i64toi32_i32$3; var$6 = i64toi32_i32$2 & i64toi32_i32$0 | 0; var$6$hi = i64toi32_i32$3; - i64toi32_i32$3 = i64toi32_i32$3; - i64toi32_i32$3 = i64toi32_i32$3; var$7 = var$6; var$7$hi = i64toi32_i32$3; var$2 = var$2 + 4294967295 | 0; @@ -1238,7 +1138,6 @@ function asmFunc(global, env, buffer) { }; i64toi32_i32$3 = var$5$hi; i64toi32_i32$2 = 1024; - i64toi32_i32$3 = i64toi32_i32$3; wasm2js_i32$0 = i64toi32_i32$2; wasm2js_i32$1 = var$5; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; @@ -1246,7 +1145,6 @@ function asmFunc(global, env, buffer) { wasm2js_i32$1 = i64toi32_i32$3; (wasm2js_i32$2 = wasm2js_i32$0, wasm2js_i32$3 = wasm2js_i32$1), ((HEAP8[(wasm2js_i32$2 + 4 | 0) >> 0] = wasm2js_i32$3 & 255 | 0, HEAP8[(wasm2js_i32$2 + 5 | 0) >> 0] = (wasm2js_i32$3 >>> 8 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 6 | 0) >> 0] = (wasm2js_i32$3 >>> 16 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 7 | 0) >> 0] = (wasm2js_i32$3 >>> 24 | 0) & 255 | 0; i64toi32_i32$3 = var$0$hi; - i64toi32_i32$3 = i64toi32_i32$3; i64toi32_i32$5 = var$0; i64toi32_i32$2 = 0; i64toi32_i32$0 = 1; @@ -1265,14 +1163,12 @@ function asmFunc(global, env, buffer) { i64toi32_i32$5 = var$6$hi; i64toi32_i32$0 = var$6; i64toi32_i32$5 = i64toi32_i32$2 | i64toi32_i32$5 | 0; - i64toi32_i32$5 = i64toi32_i32$5; i64toi32_i32$3 = i64toi32_i32$3 | i64toi32_i32$0 | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$5; return i64toi32_i32$3 | 0; }; i64toi32_i32$3 = var$0$hi; i64toi32_i32$5 = 1024; - i64toi32_i32$3 = i64toi32_i32$3; wasm2js_i32$0 = i64toi32_i32$5; wasm2js_i32$1 = var$0; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; @@ -1284,9 +1180,6 @@ function asmFunc(global, env, buffer) { var$0$hi = i64toi32_i32$3; }; i64toi32_i32$3 = var$0$hi; - i64toi32_i32$3 = i64toi32_i32$3; - i64toi32_i32$3 = i64toi32_i32$3; - i64toi32_i32$3 = i64toi32_i32$3; i64toi32_i32$5 = var$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$3; return i64toi32_i32$5 | 0; @@ -1295,12 +1188,10 @@ function asmFunc(global, env, buffer) { function __wasm_ctz_i64(var$0, var$0$hi) { var$0 = var$0 | 0; var$0$hi = var$0$hi | 0; - var i64toi32_i32$0 = 0, i64toi32_i32$3 = 0, i64toi32_i32$4 = 0, i64toi32_i32$5 = 0, i64toi32_i32$2 = 0, i64toi32_i32$1 = 0, $10_1 = 0, $5$hi = 0, $8$hi = 0; + var i64toi32_i32$0 = 0, i64toi32_i32$3 = 0, i64toi32_i32$5 = 0, i64toi32_i32$4 = 0, i64toi32_i32$2 = 0, i64toi32_i32$1 = 0, $10_1 = 0, $5$hi = 0, $8$hi = 0; i64toi32_i32$0 = var$0$hi; - i64toi32_i32$0 = i64toi32_i32$0; if (((var$0 | i64toi32_i32$0 | 0 | 0) == (0 | 0) | 0) == (0 | 0)) { i64toi32_i32$0 = var$0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = var$0; i64toi32_i32$1 = 4294967295; i64toi32_i32$3 = 4294967295; @@ -1314,7 +1205,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$2 = var$0$hi; i64toi32_i32$3 = var$0; i64toi32_i32$2 = i64toi32_i32$5 ^ i64toi32_i32$2 | 0; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$0 = i64toi32_i32$0 ^ i64toi32_i32$3 | 0; i64toi32_i32$3 = Math_clz32(i64toi32_i32$2); i64toi32_i32$5 = 0; @@ -1327,14 +1217,11 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$0 - i64toi32_i32$3 | 0; i64toi32_i32$4 = (i64toi32_i32$0 >>> 0 < i64toi32_i32$3 >>> 0) + i64toi32_i32$2 | 0; i64toi32_i32$4 = i64toi32_i32$5 - i64toi32_i32$4 | 0; - i64toi32_i32$4 = i64toi32_i32$4; i64toi32_i32$0 = i64toi32_i32$1; i64toi32_i32$HIGH_BITS = i64toi32_i32$4; return i64toi32_i32$0 | 0; } i64toi32_i32$0 = 0; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$4 = 64; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$4 | 0; @@ -1352,8 +1239,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = var$1$hi; i64toi32_i32$1 = _ZN17compiler_builtins3int3mul3Mul3mul17h070e9a1c69faec5bE(var$0 | 0, i64toi32_i32$0 | 0, var$1 | 0, i64toi32_i32$1 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; } @@ -1370,8 +1255,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = var$1$hi; i64toi32_i32$1 = _ZN17compiler_builtins3int4sdiv3Div3div17he78fc483e41d7ec7E(var$0 | 0, i64toi32_i32$0 | 0, var$1 | 0, i64toi32_i32$1 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; } @@ -1388,8 +1271,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = var$1$hi; i64toi32_i32$1 = _ZN17compiler_builtins3int4sdiv3Mod4mod_17h2cbb7bbf36e41d68E(var$0 | 0, i64toi32_i32$0 | 0, var$1 | 0, i64toi32_i32$1 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; } @@ -1406,8 +1287,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = var$1$hi; i64toi32_i32$1 = _ZN17compiler_builtins3int4udiv10divmod_u6417h6026910b5ed08e40E(var$0 | 0, i64toi32_i32$0 | 0, var$1 | 0, i64toi32_i32$1 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; } @@ -1417,21 +1296,16 @@ function asmFunc(global, env, buffer) { var$0$hi = var$0$hi | 0; var$1 = var$1 | 0; var$1$hi = var$1$hi | 0; - var i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, wasm2js_i32$0 = 0; + var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$2 = 0, wasm2js_i32$0 = 0; i64toi32_i32$0 = var$0$hi; i64toi32_i32$0 = var$1$hi; i64toi32_i32$0 = var$0$hi; i64toi32_i32$1 = var$1$hi; i64toi32_i32$1 = _ZN17compiler_builtins3int4udiv10divmod_u6417h6026910b5ed08e40E(var$0 | 0, i64toi32_i32$0 | 0, var$1 | 0, i64toi32_i32$1 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = 1024; i64toi32_i32$0 = HEAPU32[i64toi32_i32$2 >> 2] | 0; i64toi32_i32$1 = (wasm2js_i32$0 = i64toi32_i32$2, HEAPU8[(wasm2js_i32$0 + 4 | 0) >> 0] | 0 | 0 | (HEAPU8[(wasm2js_i32$0 + 5 | 0) >> 0] | 0 | 0) << 8 | (HEAPU8[(wasm2js_i32$0 + 6 | 0) >> 0] | 0 | 0) << 16 | (HEAPU8[(wasm2js_i32$0 + 7 | 0) >> 0] | 0 | 0) << 24); - i64toi32_i32$1 = i64toi32_i32$1; - i64toi32_i32$1 = i64toi32_i32$1; - i64toi32_i32$1 = i64toi32_i32$1; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$0 | 0; } @@ -1439,22 +1313,18 @@ function asmFunc(global, env, buffer) { function __wasm_popcnt_i64(var$0, var$0$hi) { var$0 = var$0 | 0; var$0$hi = var$0$hi | 0; - var i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, i64toi32_i32$4 = 0, i64toi32_i32$5 = 0, i64toi32_i32$3 = 0, i64toi32_i32$1 = 0, var$1$hi = 0, var$1 = 0, $5_1 = 0, $5$hi = 0, $4_1 = 0, $9$hi = 0; + var i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, i64toi32_i32$5 = 0, i64toi32_i32$4 = 0, i64toi32_i32$3 = 0, i64toi32_i32$1 = 0, var$1$hi = 0, var$1 = 0, $5_1 = 0, $5$hi = 0, $4_1 = 0, $9$hi = 0; label$1 : { label$2 : do { i64toi32_i32$0 = var$1$hi; i64toi32_i32$0 = var$0$hi; - i64toi32_i32$0 = i64toi32_i32$0; $4_1 = (var$0 | i64toi32_i32$0 | 0 | 0) == (0 | 0); i64toi32_i32$0 = var$1$hi; $5_1 = var$1; $5$hi = i64toi32_i32$0; if ($4_1) break label$1; i64toi32_i32$0 = $5$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$0 = var$0$hi; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = var$0; i64toi32_i32$1 = 0; i64toi32_i32$3 = 1; @@ -1467,18 +1337,15 @@ function asmFunc(global, env, buffer) { i64toi32_i32$2 = $9$hi; i64toi32_i32$3 = i64toi32_i32$4; i64toi32_i32$2 = i64toi32_i32$5 & i64toi32_i32$2 | 0; - i64toi32_i32$2 = i64toi32_i32$2; var$0 = i64toi32_i32$0 & i64toi32_i32$4 | 0; var$0$hi = i64toi32_i32$2; i64toi32_i32$2 = var$1$hi; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$5 = var$1; i64toi32_i32$0 = 0; i64toi32_i32$3 = 1; i64toi32_i32$1 = i64toi32_i32$5 + i64toi32_i32$3 | 0; i64toi32_i32$4 = i64toi32_i32$2 + i64toi32_i32$0 | 0; if (i64toi32_i32$1 >>> 0 < i64toi32_i32$3 >>> 0) i64toi32_i32$4 = i64toi32_i32$4 + 1 | 0; - i64toi32_i32$4 = i64toi32_i32$4; var$1 = i64toi32_i32$1; var$1$hi = i64toi32_i32$4; continue label$2; @@ -1486,7 +1353,6 @@ function asmFunc(global, env, buffer) { } while (1); }; i64toi32_i32$4 = $5$hi; - i64toi32_i32$4 = i64toi32_i32$4; i64toi32_i32$5 = $5_1; i64toi32_i32$HIGH_BITS = i64toi32_i32$4; return i64toi32_i32$5 | 0; @@ -1499,15 +1365,12 @@ function asmFunc(global, env, buffer) { var$1$hi = var$1$hi | 0; var i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, i64toi32_i32$3 = 0, i64toi32_i32$5 = 0, i64toi32_i32$4 = 0, var$2$hi = 0, var$2 = 0, $19_1 = 0, $20_1 = 0, $21_1 = 0, $22_1 = 0, $6$hi = 0, $8$hi = 0, $10_1 = 0, $10$hi = 0, $15$hi = 0, $17$hi = 0, $19$hi = 0; i64toi32_i32$0 = var$1$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = var$1; i64toi32_i32$1 = 0; i64toi32_i32$3 = 63; i64toi32_i32$1 = i64toi32_i32$0 & i64toi32_i32$1 | 0; - i64toi32_i32$1 = i64toi32_i32$1; var$2 = i64toi32_i32$2 & i64toi32_i32$3 | 0; var$2$hi = i64toi32_i32$1; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$1 = 4294967295; i64toi32_i32$0 = 4294967295; i64toi32_i32$2 = var$2$hi; @@ -1551,15 +1414,12 @@ function asmFunc(global, env, buffer) { i64toi32_i32$4 = i64toi32_i32$0 - i64toi32_i32$3 | 0; i64toi32_i32$5 = (i64toi32_i32$0 >>> 0 < i64toi32_i32$3 >>> 0) + i64toi32_i32$2 | 0; i64toi32_i32$5 = i64toi32_i32$1 - i64toi32_i32$5 | 0; - i64toi32_i32$5 = i64toi32_i32$5; i64toi32_i32$1 = i64toi32_i32$4; i64toi32_i32$0 = 0; i64toi32_i32$3 = 63; i64toi32_i32$0 = i64toi32_i32$5 & i64toi32_i32$0 | 0; - i64toi32_i32$0 = i64toi32_i32$0; var$1 = i64toi32_i32$1 & i64toi32_i32$3 | 0; var$1$hi = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$0 = 4294967295; i64toi32_i32$5 = 4294967295; i64toi32_i32$1 = var$1$hi; @@ -1599,7 +1459,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = $19$hi; i64toi32_i32$3 = $22_1; i64toi32_i32$1 = i64toi32_i32$0 | i64toi32_i32$1 | 0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$5 = i64toi32_i32$5 | i64toi32_i32$3 | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$5 | 0; @@ -1612,15 +1471,12 @@ function asmFunc(global, env, buffer) { var$1$hi = var$1$hi | 0; var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$2 = 0, i64toi32_i32$3 = 0, i64toi32_i32$5 = 0, i64toi32_i32$4 = 0, var$2$hi = 0, var$2 = 0, $19_1 = 0, $20_1 = 0, $21_1 = 0, $22_1 = 0, $6$hi = 0, $8$hi = 0, $10_1 = 0, $10$hi = 0, $15$hi = 0, $17$hi = 0, $19$hi = 0; i64toi32_i32$0 = var$1$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = var$1; i64toi32_i32$1 = 0; i64toi32_i32$3 = 63; i64toi32_i32$1 = i64toi32_i32$0 & i64toi32_i32$1 | 0; - i64toi32_i32$1 = i64toi32_i32$1; var$2 = i64toi32_i32$2 & i64toi32_i32$3 | 0; var$2$hi = i64toi32_i32$1; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$1 = 4294967295; i64toi32_i32$0 = 4294967295; i64toi32_i32$2 = var$2$hi; @@ -1664,15 +1520,12 @@ function asmFunc(global, env, buffer) { i64toi32_i32$4 = i64toi32_i32$0 - i64toi32_i32$3 | 0; i64toi32_i32$5 = (i64toi32_i32$0 >>> 0 < i64toi32_i32$3 >>> 0) + i64toi32_i32$2 | 0; i64toi32_i32$5 = i64toi32_i32$1 - i64toi32_i32$5 | 0; - i64toi32_i32$5 = i64toi32_i32$5; i64toi32_i32$1 = i64toi32_i32$4; i64toi32_i32$0 = 0; i64toi32_i32$3 = 63; i64toi32_i32$0 = i64toi32_i32$5 & i64toi32_i32$0 | 0; - i64toi32_i32$0 = i64toi32_i32$0; var$1 = i64toi32_i32$1 & i64toi32_i32$3 | 0; var$1$hi = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$0 = 4294967295; i64toi32_i32$5 = 4294967295; i64toi32_i32$1 = var$1$hi; @@ -1712,7 +1565,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = $19$hi; i64toi32_i32$3 = $22_1; i64toi32_i32$1 = i64toi32_i32$0 | i64toi32_i32$1 | 0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$5 = i64toi32_i32$5 | i64toi32_i32$3 | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$5 | 0; diff --git a/test/wasm2js/int_exprs.2asm.js b/test/wasm2js/int_exprs.2asm.js index 749257bb1..e3aac0e2b 100644 --- a/test/wasm2js/int_exprs.2asm.js +++ b/test/wasm2js/int_exprs.2asm.js @@ -38,9 +38,8 @@ function asmFunc(global, env, buffer) { x$hi = x$hi | 0; y = y | 0; y$hi = y$hi | 0; - var i64toi32_i32$4 = 0, i64toi32_i32$5 = 0, i64toi32_i32$0 = 0, i64toi32_i32$3 = 0, i64toi32_i32$1 = 0, i64toi32_i32$2 = 0, $13 = 0, $14 = 0, $15 = 0, $3_1 = 0, $3$hi = 0, $5$hi = 0; + var i64toi32_i32$4 = 0, i64toi32_i32$3 = 0, i64toi32_i32$5 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$2 = 0, $13 = 0, $14 = 0, $15 = 0, $3_1 = 0, $3$hi = 0, $5$hi = 0; i64toi32_i32$0 = x$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = x; i64toi32_i32$1 = 0; i64toi32_i32$3 = 1; @@ -50,7 +49,6 @@ function asmFunc(global, env, buffer) { $3_1 = i64toi32_i32$4; $3$hi = i64toi32_i32$5; i64toi32_i32$5 = y$hi; - i64toi32_i32$5 = i64toi32_i32$5; i64toi32_i32$0 = y; i64toi32_i32$2 = 0; i64toi32_i32$3 = 1; @@ -77,9 +75,8 @@ function asmFunc(global, env, buffer) { x$hi = x$hi | 0; y = y | 0; y$hi = y$hi | 0; - var i64toi32_i32$4 = 0, i64toi32_i32$5 = 0, i64toi32_i32$0 = 0, i64toi32_i32$3 = 0, i64toi32_i32$1 = 0, i64toi32_i32$2 = 0, $3_1 = 0, $3$hi = 0, $5$hi = 0; + var i64toi32_i32$4 = 0, i64toi32_i32$3 = 0, i64toi32_i32$5 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$2 = 0, $3_1 = 0, $3$hi = 0, $5$hi = 0; i64toi32_i32$0 = x$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = x; i64toi32_i32$1 = 0; i64toi32_i32$3 = 1; @@ -89,7 +86,6 @@ function asmFunc(global, env, buffer) { $3_1 = i64toi32_i32$4; $3$hi = i64toi32_i32$5; i64toi32_i32$5 = y$hi; - i64toi32_i32$5 = i64toi32_i32$5; i64toi32_i32$0 = y; i64toi32_i32$2 = 0; i64toi32_i32$3 = 1; diff --git a/test/wasm2js/int_literals.2asm.js b/test/wasm2js/int_literals.2asm.js index 0bb6933e2..deb6b99c9 100644 --- a/test/wasm2js/int_literals.2asm.js +++ b/test/wasm2js/int_literals.2asm.js @@ -101,7 +101,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$4 = 0 + i64toi32_i32$3 | 0; i64toi32_i32$5 = 2147483648 + 0 | 0; if (i64toi32_i32$4 >>> 0 < i64toi32_i32$3 >>> 0) i64toi32_i32$5 = i64toi32_i32$5 + 1 | 0; - i64toi32_i32$5 = i64toi32_i32$5; i64toi32_i32$HIGH_BITS = i64toi32_i32$5; return i64toi32_i32$4 | 0; } diff --git a/test/wasm2js/left-to-right.2asm.js b/test/wasm2js/left-to-right.2asm.js index 2f0855615..94f18db42 100644 --- a/test/wasm2js/left-to-right.2asm.js +++ b/test/wasm2js/left-to-right.2asm.js @@ -152,8 +152,6 @@ function asmFunc(global, env, buffer) { wasm2js_i32$1 = 1; HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; i64toi32_i32$0 = 0; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return 0 | 0; } @@ -165,8 +163,6 @@ function asmFunc(global, env, buffer) { wasm2js_i32$1 = 2; HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; i64toi32_i32$0 = 0; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return 1 | 0; } @@ -178,8 +174,6 @@ function asmFunc(global, env, buffer) { wasm2js_i32$1 = 3; HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; i64toi32_i32$0 = 0; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return 1 | 0; } @@ -503,7 +497,7 @@ function asmFunc(global, env, buffer) { } function $64() { - var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$5 = 0, i64toi32_i32$3 = 0, i64toi32_i32$4 = 0, $0 = 0, $0$hi = 0, $1 = 0, $1$hi = 0; + var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$3 = 0, i64toi32_i32$4 = 0, i64toi32_i32$5 = 0, $0 = 0, $0$hi = 0, $1 = 0, $1$hi = 0; reset(); i64toi32_i32$0 = i64_left() | 0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; @@ -519,12 +513,11 @@ function asmFunc(global, env, buffer) { i64toi32_i32$4 = $0 + i64toi32_i32$3 | 0; i64toi32_i32$5 = i64toi32_i32$0 + i64toi32_i32$1 | 0; if (i64toi32_i32$4 >>> 0 < i64toi32_i32$3 >>> 0) i64toi32_i32$5 = i64toi32_i32$5 + 1 | 0; - i64toi32_i32$5 = i64toi32_i32$5; return get() | 0 | 0; } function $65() { - var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$5 = 0, i64toi32_i32$2 = 0, i64toi32_i32$3 = 0, $0 = 0, $0$hi = 0, $1 = 0, $1$hi = 0; + var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$2 = 0, i64toi32_i32$3 = 0, i64toi32_i32$5 = 0, $0 = 0, $0$hi = 0, $1 = 0, $1$hi = 0; reset(); i64toi32_i32$0 = i64_left() | 0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; @@ -540,12 +533,11 @@ function asmFunc(global, env, buffer) { i64toi32_i32$3 = $1; i64toi32_i32$5 = (i64toi32_i32$2 >>> 0 < i64toi32_i32$3 >>> 0) + i64toi32_i32$1 | 0; i64toi32_i32$5 = i64toi32_i32$0 - i64toi32_i32$5 | 0; - i64toi32_i32$5 = i64toi32_i32$5; return get() | 0 | 0; } function $66() { - var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, $0 = 0, $0$hi = 0, $1 = 0, $1$hi = 0; + var i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, $0 = 0, $0$hi = 0, $1 = 0, $1$hi = 0; reset(); i64toi32_i32$0 = i64_left() | 0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; @@ -559,12 +551,11 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = $1$hi; i64toi32_i32$1 = __wasm_i64_mul($0 | 0, i64toi32_i32$0 | 0, $1 | 0, i64toi32_i32$1 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$0 = i64toi32_i32$0; return get() | 0 | 0; } function $67() { - var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, $0 = 0, $0$hi = 0, $1 = 0, $1$hi = 0; + var i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, $0 = 0, $0$hi = 0, $1 = 0, $1$hi = 0; reset(); i64toi32_i32$0 = i64_left() | 0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; @@ -578,12 +569,11 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = $1$hi; i64toi32_i32$1 = __wasm_i64_sdiv($0 | 0, i64toi32_i32$0 | 0, $1 | 0, i64toi32_i32$1 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$0 = i64toi32_i32$0; return get() | 0 | 0; } function $68() { - var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, $0 = 0, $0$hi = 0, $1 = 0, $1$hi = 0; + var i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, $0 = 0, $0$hi = 0, $1 = 0, $1$hi = 0; reset(); i64toi32_i32$0 = i64_left() | 0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; @@ -597,12 +587,11 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = $1$hi; i64toi32_i32$1 = __wasm_i64_udiv($0 | 0, i64toi32_i32$0 | 0, $1 | 0, i64toi32_i32$1 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$0 = i64toi32_i32$0; return get() | 0 | 0; } function $69() { - var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, $0 = 0, $0$hi = 0, $1 = 0, $1$hi = 0; + var i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, $0 = 0, $0$hi = 0, $1 = 0, $1$hi = 0; reset(); i64toi32_i32$0 = i64_left() | 0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; @@ -616,12 +605,11 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = $1$hi; i64toi32_i32$1 = __wasm_i64_srem($0 | 0, i64toi32_i32$0 | 0, $1 | 0, i64toi32_i32$1 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$0 = i64toi32_i32$0; return get() | 0 | 0; } function $70() { - var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, $0 = 0, $0$hi = 0, $1 = 0, $1$hi = 0; + var i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, $0 = 0, $0$hi = 0, $1 = 0, $1$hi = 0; reset(); i64toi32_i32$0 = i64_left() | 0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; @@ -635,7 +623,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = $1$hi; i64toi32_i32$1 = __wasm_i64_urem($0 | 0, i64toi32_i32$0 | 0, $1 | 0, i64toi32_i32$1 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$0 = i64toi32_i32$0; return get() | 0 | 0; } @@ -653,7 +640,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$0 = $0$hi; i64toi32_i32$1 = $1$hi; i64toi32_i32$1 = i64toi32_i32$0 & i64toi32_i32$1 | 0; - i64toi32_i32$1 = i64toi32_i32$1; return get() | 0 | 0; } @@ -671,7 +657,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$0 = $0$hi; i64toi32_i32$1 = $1$hi; i64toi32_i32$1 = i64toi32_i32$0 | i64toi32_i32$1 | 0; - i64toi32_i32$1 = i64toi32_i32$1; return get() | 0 | 0; } @@ -689,7 +674,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$0 = $0$hi; i64toi32_i32$1 = $1$hi; i64toi32_i32$1 = i64toi32_i32$0 ^ i64toi32_i32$1 | 0; - i64toi32_i32$1 = i64toi32_i32$1; return get() | 0 | 0; } @@ -716,12 +700,11 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = ((1 << i64toi32_i32$4 | 0) - 1 | 0) & (i64toi32_i32$2 >>> (32 - i64toi32_i32$4 | 0) | 0) | 0 | (i64toi32_i32$0 << i64toi32_i32$4 | 0) | 0; $9 = i64toi32_i32$2 << i64toi32_i32$4 | 0; } - i64toi32_i32$1 = i64toi32_i32$1; return get() | 0 | 0; } function $75() { - var i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, i64toi32_i32$4 = 0, i64toi32_i32$3 = 0, $9 = 0, $0 = 0, $0$hi = 0, $1 = 0, $1$hi = 0, i64toi32_i32$2 = 0; + var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$4 = 0, i64toi32_i32$3 = 0, $9 = 0, $0 = 0, $0$hi = 0, $1 = 0, $1$hi = 0, i64toi32_i32$2 = 0; reset(); i64toi32_i32$0 = i64_left() | 0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; @@ -743,7 +726,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0; $9 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$0 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$2 >>> i64toi32_i32$4 | 0) | 0; } - i64toi32_i32$1 = i64toi32_i32$1; return get() | 0 | 0; } @@ -770,7 +752,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$0 >> i64toi32_i32$4 | 0; $9 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$0 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$2 >>> i64toi32_i32$4 | 0) | 0; } - i64toi32_i32$1 = i64toi32_i32$1; return get() | 0 | 0; } @@ -971,14 +952,13 @@ function asmFunc(global, env, buffer) { } function $87() { - var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, $0 = 0, $1 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0, wasm2js_i32$2 = 0, wasm2js_i32$3 = 0; + var i64toi32_i32$0 = 0, $0 = 0, i64toi32_i32$1 = 0, $1 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0, wasm2js_i32$2 = 0, wasm2js_i32$3 = 0; reset(); $0 = i32_left() | 0; i64toi32_i32$0 = i64_right() | 0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; $1 = i64toi32_i32$0; i64toi32_i32$0 = $0; - i64toi32_i32$1 = i64toi32_i32$1; wasm2js_i32$0 = i64toi32_i32$0; wasm2js_i32$1 = $1; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; @@ -1206,13 +1186,12 @@ function asmFunc(global, env, buffer) { } function $115() { - var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$2 = 0, i64toi32_i32$3 = 0, $2 = 0, $2$hi = 0, $5 = 0, $5$hi = 0, wasm2js_i32$0 = 0, wasm2js_f64$0 = 0.0, wasm2js_i32$1 = 0; + var i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, i64toi32_i32$1 = 0, i64toi32_i32$3 = 0, $2 = 0, $2$hi = 0, $5 = 0, $5$hi = 0, wasm2js_i32$0 = 0, wasm2js_f64$0 = 0.0, wasm2js_i32$1 = 0; reset(); wasm2js_i32$0 = 0; wasm2js_f64$0 = +f64_left(); HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$0 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = HEAP32[0 >> 2] | 0; i64toi32_i32$1 = 2147483647; i64toi32_i32$3 = 4294967295; @@ -1223,7 +1202,6 @@ function asmFunc(global, env, buffer) { wasm2js_f64$0 = +f64_right(); HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$1 = HEAP32[(0 + 4 | 0) >> 2] | 0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$0 = HEAP32[0 >> 2] | 0; i64toi32_i32$2 = 2147483648; i64toi32_i32$3 = 0; @@ -1235,7 +1213,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$0 = $5$hi; i64toi32_i32$3 = $5; i64toi32_i32$0 = i64toi32_i32$2 | i64toi32_i32$0 | 0; - i64toi32_i32$0 = i64toi32_i32$0; wasm2js_i32$0 = 0; wasm2js_i32$1 = i64toi32_i32$1 | i64toi32_i32$3 | 0; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; @@ -1362,19 +1339,15 @@ function asmFunc(global, env, buffer) { var$0$hi = var$0$hi | 0; var$1 = var$1 | 0; var$1$hi = var$1$hi | 0; - var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$4 = 0, i64toi32_i32$2 = 0, var$2 = 0, i64toi32_i32$3 = 0, var$3 = 0, var$4 = 0, var$5 = 0, $21 = 0, $22 = 0, var$6 = 0, $24 = 0, $17 = 0, $18 = 0, $23 = 0, $29 = 0, $45_1 = 0, $56$hi = 0, $62$hi = 0; + var i64toi32_i32$4 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, var$2 = 0, i64toi32_i32$2 = 0, i64toi32_i32$3 = 0, var$3 = 0, var$4 = 0, var$5 = 0, $21 = 0, $22 = 0, var$6 = 0, $24 = 0, $17 = 0, $18 = 0, $23 = 0, $29 = 0, $45_1 = 0, $56$hi = 0, $62$hi = 0; i64toi32_i32$0 = var$1$hi; - i64toi32_i32$0 = i64toi32_i32$0; var$2 = var$1; var$4 = var$2 >>> 16 | 0; i64toi32_i32$0 = var$0$hi; - i64toi32_i32$0 = i64toi32_i32$0; var$3 = var$0; var$5 = var$3 >>> 16 | 0; $17 = Math_imul(var$4, var$5); $18 = var$2; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = var$3; i64toi32_i32$1 = 0; i64toi32_i32$3 = 32; @@ -1386,10 +1359,8 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0; $21 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$0 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$2 >>> i64toi32_i32$4 | 0) | 0; } - i64toi32_i32$1 = i64toi32_i32$1; $23 = $17 + Math_imul($18, $21) | 0; i64toi32_i32$1 = var$1$hi; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$0 = var$1; i64toi32_i32$2 = 0; i64toi32_i32$3 = 32; @@ -1401,7 +1372,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$2 = i64toi32_i32$1 >>> i64toi32_i32$4 | 0; $22 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$1 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$0 >>> i64toi32_i32$4 | 0) | 0; } - i64toi32_i32$2 = i64toi32_i32$2; $29 = $23 + Math_imul($22, var$3) | 0; var$2 = var$2 & 65535 | 0; var$3 = var$3 & 65535 | 0; @@ -1410,7 +1380,6 @@ function asmFunc(global, env, buffer) { $45_1 = $29 + (var$2 >>> 16 | 0) | 0; var$2 = (var$2 & 65535 | 0) + Math_imul(var$4, var$3) | 0; i64toi32_i32$2 = 0; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$1 = $45_1 + (var$2 >>> 16 | 0) | 0; i64toi32_i32$0 = 0; i64toi32_i32$3 = 32; @@ -1430,7 +1399,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = $62$hi; i64toi32_i32$3 = var$2 << 16 | 0 | (var$6 & 65535 | 0) | 0; i64toi32_i32$1 = i64toi32_i32$0 | i64toi32_i32$1 | 0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$2 = i64toi32_i32$2 | i64toi32_i32$3 | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$2 | 0; @@ -1443,7 +1411,6 @@ function asmFunc(global, env, buffer) { var$1$hi = var$1$hi | 0; var i64toi32_i32$1 = 0, i64toi32_i32$2 = 0, i64toi32_i32$4 = 0, i64toi32_i32$3 = 0, i64toi32_i32$0 = 0, i64toi32_i32$5 = 0, var$2 = 0, var$2$hi = 0, i64toi32_i32$6 = 0, $21 = 0, $22 = 0, $23 = 0, $7$hi = 0, $9 = 0, $9$hi = 0, $14$hi = 0, $16$hi = 0, $17 = 0, $17$hi = 0, $23$hi = 0; i64toi32_i32$0 = var$0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = var$0; i64toi32_i32$1 = 0; i64toi32_i32$3 = 63; @@ -1455,10 +1422,8 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$0 >> i64toi32_i32$4 | 0; $21 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$0 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$2 >>> i64toi32_i32$4 | 0) | 0; } - i64toi32_i32$1 = i64toi32_i32$1; var$2 = $21; var$2$hi = i64toi32_i32$1; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$1 = var$0$hi; i64toi32_i32$1 = var$2$hi; i64toi32_i32$0 = var$2; @@ -1478,7 +1443,6 @@ function asmFunc(global, env, buffer) { $9 = i64toi32_i32$4; $9$hi = i64toi32_i32$5; i64toi32_i32$5 = var$1$hi; - i64toi32_i32$5 = i64toi32_i32$5; i64toi32_i32$2 = var$1; i64toi32_i32$1 = 0; i64toi32_i32$3 = 63; @@ -1490,10 +1454,8 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$5 >> i64toi32_i32$0 | 0; $22 = (((1 << i64toi32_i32$0 | 0) - 1 | 0) & i64toi32_i32$5 | 0) << (32 - i64toi32_i32$0 | 0) | 0 | (i64toi32_i32$2 >>> i64toi32_i32$0 | 0) | 0; } - i64toi32_i32$1 = i64toi32_i32$1; var$2 = $22; var$2$hi = i64toi32_i32$1; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$1 = var$1$hi; i64toi32_i32$1 = var$2$hi; i64toi32_i32$5 = var$2; @@ -1524,7 +1486,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = var$0$hi; i64toi32_i32$3 = var$0; i64toi32_i32$1 = i64toi32_i32$4 ^ i64toi32_i32$1 | 0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$4 = i64toi32_i32$2 ^ i64toi32_i32$3 | 0; i64toi32_i32$2 = 0; i64toi32_i32$3 = 63; @@ -1536,10 +1497,8 @@ function asmFunc(global, env, buffer) { i64toi32_i32$2 = i64toi32_i32$1 >> i64toi32_i32$5 | 0; $23 = (((1 << i64toi32_i32$5 | 0) - 1 | 0) & i64toi32_i32$1 | 0) << (32 - i64toi32_i32$5 | 0) | 0 | (i64toi32_i32$4 >>> i64toi32_i32$5 | 0) | 0; } - i64toi32_i32$2 = i64toi32_i32$2; var$0 = $23; var$0$hi = i64toi32_i32$2; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$2 = $17$hi; i64toi32_i32$1 = $17; i64toi32_i32$4 = var$0$hi; @@ -1550,12 +1509,10 @@ function asmFunc(global, env, buffer) { i64toi32_i32$4 = $23$hi; i64toi32_i32$2 = i64toi32_i32$1 ^ i64toi32_i32$3 | 0; i64toi32_i32$1 = var$0$hi; - i64toi32_i32$3 = i64toi32_i32$3; i64toi32_i32$5 = i64toi32_i32$2 - i64toi32_i32$3 | 0; i64toi32_i32$6 = i64toi32_i32$2 >>> 0 < i64toi32_i32$3 >>> 0; i64toi32_i32$0 = i64toi32_i32$6 + i64toi32_i32$1 | 0; i64toi32_i32$0 = i64toi32_i32$4 - i64toi32_i32$0 | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = i64toi32_i32$5; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$2 | 0; @@ -1566,9 +1523,8 @@ function asmFunc(global, env, buffer) { var$0$hi = var$0$hi | 0; var$1 = var$1 | 0; var$1$hi = var$1$hi | 0; - var i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, i64toi32_i32$4 = 0, i64toi32_i32$2 = 0, i64toi32_i32$3 = 0, i64toi32_i32$5 = 0, var$2$hi = 0, i64toi32_i32$6 = 0, var$2 = 0, $20 = 0, $21 = 0, $7$hi = 0, $9 = 0, $9$hi = 0, $14$hi = 0, $16$hi = 0, $17$hi = 0, $19$hi = 0; + var i64toi32_i32$1 = 0, i64toi32_i32$4 = 0, i64toi32_i32$2 = 0, i64toi32_i32$0 = 0, i64toi32_i32$3 = 0, i64toi32_i32$5 = 0, var$2$hi = 0, i64toi32_i32$6 = 0, var$2 = 0, $20 = 0, $21 = 0, $7$hi = 0, $9 = 0, $9$hi = 0, $14$hi = 0, $16$hi = 0, $17$hi = 0, $19$hi = 0; i64toi32_i32$0 = var$0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = var$0; i64toi32_i32$1 = 0; i64toi32_i32$3 = 63; @@ -1580,10 +1536,8 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$0 >> i64toi32_i32$4 | 0; $20 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$0 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$2 >>> i64toi32_i32$4 | 0) | 0; } - i64toi32_i32$1 = i64toi32_i32$1; var$2 = $20; var$2$hi = i64toi32_i32$1; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$1 = var$0$hi; i64toi32_i32$1 = var$2$hi; i64toi32_i32$0 = var$2; @@ -1603,7 +1557,6 @@ function asmFunc(global, env, buffer) { $9 = i64toi32_i32$4; $9$hi = i64toi32_i32$5; i64toi32_i32$5 = var$1$hi; - i64toi32_i32$5 = i64toi32_i32$5; i64toi32_i32$2 = var$1; i64toi32_i32$1 = 0; i64toi32_i32$3 = 63; @@ -1615,10 +1568,8 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$5 >> i64toi32_i32$0 | 0; $21 = (((1 << i64toi32_i32$0 | 0) - 1 | 0) & i64toi32_i32$5 | 0) << (32 - i64toi32_i32$0 | 0) | 0 | (i64toi32_i32$2 >>> i64toi32_i32$0 | 0) | 0; } - i64toi32_i32$1 = i64toi32_i32$1; var$0 = $21; var$0$hi = i64toi32_i32$1; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$1 = var$1$hi; i64toi32_i32$1 = var$0$hi; i64toi32_i32$5 = var$0; @@ -1652,12 +1603,10 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = $19$hi; i64toi32_i32$4 = i64toi32_i32$2 ^ i64toi32_i32$3 | 0; i64toi32_i32$2 = var$2$hi; - i64toi32_i32$3 = i64toi32_i32$3; i64toi32_i32$5 = i64toi32_i32$4 - i64toi32_i32$3 | 0; i64toi32_i32$6 = i64toi32_i32$4 >>> 0 < i64toi32_i32$3 >>> 0; i64toi32_i32$0 = i64toi32_i32$6 + i64toi32_i32$2 | 0; i64toi32_i32$0 = i64toi32_i32$1 - i64toi32_i32$0 | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$4 = i64toi32_i32$5; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$4 | 0; @@ -1681,7 +1630,6 @@ function asmFunc(global, env, buffer) { label$10 : { label$11 : { i64toi32_i32$0 = var$0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = var$0; i64toi32_i32$1 = 0; i64toi32_i32$3 = 32; @@ -1693,15 +1641,12 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0; $38_1 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$0 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$2 >>> i64toi32_i32$4 | 0) | 0; } - i64toi32_i32$1 = i64toi32_i32$1; var$2 = $38_1; if (var$2) block : { i64toi32_i32$1 = var$1$hi; - i64toi32_i32$1 = i64toi32_i32$1; var$3 = var$1; if ((var$3 | 0) == (0 | 0)) break label$11; i64toi32_i32$1 = var$1$hi; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$0 = var$1; i64toi32_i32$2 = 0; i64toi32_i32$3 = 32; @@ -1713,7 +1658,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$2 = i64toi32_i32$1 >>> i64toi32_i32$4 | 0; $39_1 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$1 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$0 >>> i64toi32_i32$4 | 0) | 0; } - i64toi32_i32$2 = i64toi32_i32$2; var$4 = $39_1; if ((var$4 | 0) == (0 | 0)) break label$9; var$2 = Math_clz32(var$4) - Math_clz32(var$2) | 0; @@ -1721,21 +1665,17 @@ function asmFunc(global, env, buffer) { break label$2; }; i64toi32_i32$2 = var$1$hi; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$1 = var$1; i64toi32_i32$0 = 1; i64toi32_i32$3 = 0; if (i64toi32_i32$2 >>> 0 > i64toi32_i32$0 >>> 0 | ((i64toi32_i32$2 | 0) == (i64toi32_i32$0 | 0) & i64toi32_i32$1 >>> 0 >= i64toi32_i32$3 >>> 0 | 0) | 0) break label$2; i64toi32_i32$1 = var$0$hi; - i64toi32_i32$1 = i64toi32_i32$1; var$2 = var$0; i64toi32_i32$1 = var$1$hi; - i64toi32_i32$1 = i64toi32_i32$1; var$3 = var$1; var$2 = (var$2 >>> 0) / (var$3 >>> 0) | 0; i64toi32_i32$1 = 0; i64toi32_i32$2 = 1024; - i64toi32_i32$1 = i64toi32_i32$1; wasm2js_i32$0 = i64toi32_i32$2; wasm2js_i32$1 = var$0 - Math_imul(var$2, var$3) | 0; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; @@ -1743,13 +1683,11 @@ function asmFunc(global, env, buffer) { wasm2js_i32$1 = i64toi32_i32$1; (wasm2js_i32$2 = wasm2js_i32$0, wasm2js_i32$3 = wasm2js_i32$1), ((HEAP8[(wasm2js_i32$2 + 4 | 0) >> 0] = wasm2js_i32$3 & 255 | 0, HEAP8[(wasm2js_i32$2 + 5 | 0) >> 0] = (wasm2js_i32$3 >>> 8 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 6 | 0) >> 0] = (wasm2js_i32$3 >>> 16 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 7 | 0) >> 0] = (wasm2js_i32$3 >>> 24 | 0) & 255 | 0; i64toi32_i32$1 = 0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$2 = var$2; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$2 | 0; }; i64toi32_i32$2 = var$1$hi; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$3 = var$1; i64toi32_i32$1 = 0; i64toi32_i32$0 = 32; @@ -1761,16 +1699,13 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$2 >>> i64toi32_i32$4 | 0; $40_1 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$2 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$3 >>> i64toi32_i32$4 | 0) | 0; } - i64toi32_i32$1 = i64toi32_i32$1; var$3 = $40_1; i64toi32_i32$1 = var$0$hi; - i64toi32_i32$1 = i64toi32_i32$1; if ((var$0 | 0) == (0 | 0)) break label$7; if ((var$3 | 0) == (0 | 0)) break label$6; var$4 = var$3 + 4294967295 | 0; if (var$4 & var$3 | 0) break label$6; i64toi32_i32$1 = 0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$2 = var$4 & var$2 | 0; i64toi32_i32$3 = 0; i64toi32_i32$0 = 32; @@ -1784,7 +1719,6 @@ function asmFunc(global, env, buffer) { } $63$hi = i64toi32_i32$3; i64toi32_i32$3 = var$0$hi; - i64toi32_i32$3 = i64toi32_i32$3; i64toi32_i32$1 = var$0; i64toi32_i32$2 = 0; i64toi32_i32$0 = 4294967295; @@ -1798,7 +1732,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$2 | i64toi32_i32$1 | 0; $66_1 = i64toi32_i32$3 | i64toi32_i32$0 | 0; i64toi32_i32$3 = 1024; - i64toi32_i32$1 = i64toi32_i32$1; wasm2js_i32$0 = i64toi32_i32$3; wasm2js_i32$1 = $66_1; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; @@ -1806,7 +1739,6 @@ function asmFunc(global, env, buffer) { wasm2js_i32$1 = i64toi32_i32$1; (wasm2js_i32$2 = wasm2js_i32$0, wasm2js_i32$3 = wasm2js_i32$1), ((HEAP8[(wasm2js_i32$2 + 4 | 0) >> 0] = wasm2js_i32$3 & 255 | 0, HEAP8[(wasm2js_i32$2 + 5 | 0) >> 0] = (wasm2js_i32$3 >>> 8 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 6 | 0) >> 0] = (wasm2js_i32$3 >>> 16 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 7 | 0) >> 0] = (wasm2js_i32$3 >>> 24 | 0) & 255 | 0; i64toi32_i32$1 = 0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$3 = var$2 >>> ((__wasm_ctz_i32(var$3 | 0) | 0) & 31 | 0) | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$3 | 0; @@ -1824,7 +1756,6 @@ function asmFunc(global, env, buffer) { }; var$4 = (var$2 >>> 0) / (var$3 >>> 0) | 0; i64toi32_i32$3 = 0; - i64toi32_i32$3 = i64toi32_i32$3; i64toi32_i32$2 = var$2 - Math_imul(var$4, var$3) | 0; i64toi32_i32$1 = 0; i64toi32_i32$0 = 32; @@ -1837,7 +1768,6 @@ function asmFunc(global, env, buffer) { $42_1 = i64toi32_i32$2 << i64toi32_i32$4 | 0; } i64toi32_i32$2 = 1024; - i64toi32_i32$1 = i64toi32_i32$1; wasm2js_i32$0 = i64toi32_i32$2; wasm2js_i32$1 = $42_1; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; @@ -1845,7 +1775,6 @@ function asmFunc(global, env, buffer) { wasm2js_i32$1 = i64toi32_i32$1; (wasm2js_i32$2 = wasm2js_i32$0, wasm2js_i32$3 = wasm2js_i32$1), ((HEAP8[(wasm2js_i32$2 + 4 | 0) >> 0] = wasm2js_i32$3 & 255 | 0, HEAP8[(wasm2js_i32$2 + 5 | 0) >> 0] = (wasm2js_i32$3 >>> 8 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 6 | 0) >> 0] = (wasm2js_i32$3 >>> 16 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 7 | 0) >> 0] = (wasm2js_i32$3 >>> 24 | 0) & 255 | 0; i64toi32_i32$1 = 0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$2 = var$4; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$2 | 0; @@ -1855,10 +1784,8 @@ function asmFunc(global, env, buffer) { break label$2; }; i64toi32_i32$2 = var$0$hi; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$2 = 0; i64toi32_i32$1 = 1024; - i64toi32_i32$2 = i64toi32_i32$2; wasm2js_i32$0 = i64toi32_i32$1; wasm2js_i32$1 = var$4 & var$0 | 0; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; @@ -1881,7 +1808,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$2 >>> i64toi32_i32$4 | 0; $43_1 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$2 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$3 >>> i64toi32_i32$4 | 0) | 0; } - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$3 = $43_1; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$3 | 0; @@ -1904,7 +1830,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$3 >>> i64toi32_i32$4 | 0; $44_1 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$3 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$2 >>> i64toi32_i32$4 | 0) | 0; } - i64toi32_i32$1 = i64toi32_i32$1; var$5 = $44_1; var$5$hi = i64toi32_i32$1; i64toi32_i32$1 = var$0$hi; @@ -1922,25 +1847,21 @@ function asmFunc(global, env, buffer) { i64toi32_i32$2 = ((1 << i64toi32_i32$4 | 0) - 1 | 0) & (i64toi32_i32$3 >>> (32 - i64toi32_i32$4 | 0) | 0) | 0 | (i64toi32_i32$1 << i64toi32_i32$4 | 0) | 0; $45_1 = i64toi32_i32$3 << i64toi32_i32$4 | 0; } - i64toi32_i32$2 = i64toi32_i32$2; var$0 = $45_1; var$0$hi = i64toi32_i32$2; label$13 : { if (var$2) block3 : { i64toi32_i32$2 = var$1$hi; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$1 = var$1; i64toi32_i32$3 = 4294967295; i64toi32_i32$0 = 4294967295; i64toi32_i32$4 = i64toi32_i32$1 + i64toi32_i32$0 | 0; i64toi32_i32$5 = i64toi32_i32$2 + i64toi32_i32$3 | 0; if (i64toi32_i32$4 >>> 0 < i64toi32_i32$0 >>> 0) i64toi32_i32$5 = i64toi32_i32$5 + 1 | 0; - i64toi32_i32$5 = i64toi32_i32$5; var$8 = i64toi32_i32$4; var$8$hi = i64toi32_i32$5; label$15 : do { i64toi32_i32$5 = var$5$hi; - i64toi32_i32$5 = i64toi32_i32$5; i64toi32_i32$2 = var$5; i64toi32_i32$1 = 0; i64toi32_i32$0 = 1; @@ -1955,7 +1876,6 @@ function asmFunc(global, env, buffer) { $140 = $46_1; $140$hi = i64toi32_i32$1; i64toi32_i32$1 = var$0$hi; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$5 = var$0; i64toi32_i32$2 = 0; i64toi32_i32$0 = 63; @@ -1973,10 +1893,8 @@ function asmFunc(global, env, buffer) { i64toi32_i32$5 = $142$hi; i64toi32_i32$0 = $47_1; i64toi32_i32$5 = i64toi32_i32$2 | i64toi32_i32$5 | 0; - i64toi32_i32$5 = i64toi32_i32$5; var$5 = i64toi32_i32$1 | i64toi32_i32$0 | 0; var$5$hi = i64toi32_i32$5; - i64toi32_i32$5 = i64toi32_i32$5; $144 = var$5; $144$hi = i64toi32_i32$5; i64toi32_i32$5 = var$8$hi; @@ -1989,7 +1907,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$6 = i64toi32_i32$2 >>> 0 < i64toi32_i32$0 >>> 0; i64toi32_i32$4 = i64toi32_i32$6 + i64toi32_i32$1 | 0; i64toi32_i32$4 = i64toi32_i32$5 - i64toi32_i32$4 | 0; - i64toi32_i32$4 = i64toi32_i32$4; i64toi32_i32$5 = i64toi32_i32$3; i64toi32_i32$2 = 0; i64toi32_i32$0 = 63; @@ -2001,10 +1918,8 @@ function asmFunc(global, env, buffer) { i64toi32_i32$2 = i64toi32_i32$4 >> i64toi32_i32$1 | 0; $48_1 = (((1 << i64toi32_i32$1 | 0) - 1 | 0) & i64toi32_i32$4 | 0) << (32 - i64toi32_i32$1 | 0) | 0 | (i64toi32_i32$5 >>> i64toi32_i32$1 | 0) | 0; } - i64toi32_i32$2 = i64toi32_i32$2; var$6 = $48_1; var$6$hi = i64toi32_i32$2; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$2 = var$1$hi; i64toi32_i32$2 = var$6$hi; i64toi32_i32$4 = var$6; @@ -2021,11 +1936,9 @@ function asmFunc(global, env, buffer) { i64toi32_i32$6 = i64toi32_i32$2 >>> 0 < i64toi32_i32$0 >>> 0; i64toi32_i32$3 = i64toi32_i32$6 + i64toi32_i32$4 | 0; i64toi32_i32$3 = i64toi32_i32$5 - i64toi32_i32$3 | 0; - i64toi32_i32$3 = i64toi32_i32$3; var$5 = i64toi32_i32$1; var$5$hi = i64toi32_i32$3; i64toi32_i32$3 = var$0$hi; - i64toi32_i32$3 = i64toi32_i32$3; i64toi32_i32$5 = var$0; i64toi32_i32$2 = 0; i64toi32_i32$0 = 1; @@ -2044,20 +1957,15 @@ function asmFunc(global, env, buffer) { i64toi32_i32$5 = var$7$hi; i64toi32_i32$0 = var$7; i64toi32_i32$5 = i64toi32_i32$2 | i64toi32_i32$5 | 0; - i64toi32_i32$5 = i64toi32_i32$5; var$0 = i64toi32_i32$3 | i64toi32_i32$0 | 0; var$0$hi = i64toi32_i32$5; i64toi32_i32$5 = var$6$hi; - i64toi32_i32$5 = i64toi32_i32$5; i64toi32_i32$2 = var$6; i64toi32_i32$3 = 0; i64toi32_i32$0 = 1; i64toi32_i32$3 = i64toi32_i32$5 & i64toi32_i32$3 | 0; - i64toi32_i32$3 = i64toi32_i32$3; var$6 = i64toi32_i32$2 & i64toi32_i32$0 | 0; var$6$hi = i64toi32_i32$3; - i64toi32_i32$3 = i64toi32_i32$3; - i64toi32_i32$3 = i64toi32_i32$3; var$7 = var$6; var$7$hi = i64toi32_i32$3; var$2 = var$2 + 4294967295 | 0; @@ -2069,7 +1977,6 @@ function asmFunc(global, env, buffer) { }; i64toi32_i32$3 = var$5$hi; i64toi32_i32$2 = 1024; - i64toi32_i32$3 = i64toi32_i32$3; wasm2js_i32$0 = i64toi32_i32$2; wasm2js_i32$1 = var$5; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; @@ -2077,7 +1984,6 @@ function asmFunc(global, env, buffer) { wasm2js_i32$1 = i64toi32_i32$3; (wasm2js_i32$2 = wasm2js_i32$0, wasm2js_i32$3 = wasm2js_i32$1), ((HEAP8[(wasm2js_i32$2 + 4 | 0) >> 0] = wasm2js_i32$3 & 255 | 0, HEAP8[(wasm2js_i32$2 + 5 | 0) >> 0] = (wasm2js_i32$3 >>> 8 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 6 | 0) >> 0] = (wasm2js_i32$3 >>> 16 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 7 | 0) >> 0] = (wasm2js_i32$3 >>> 24 | 0) & 255 | 0; i64toi32_i32$3 = var$0$hi; - i64toi32_i32$3 = i64toi32_i32$3; i64toi32_i32$5 = var$0; i64toi32_i32$2 = 0; i64toi32_i32$0 = 1; @@ -2096,14 +2002,12 @@ function asmFunc(global, env, buffer) { i64toi32_i32$5 = var$6$hi; i64toi32_i32$0 = var$6; i64toi32_i32$5 = i64toi32_i32$2 | i64toi32_i32$5 | 0; - i64toi32_i32$5 = i64toi32_i32$5; i64toi32_i32$3 = i64toi32_i32$3 | i64toi32_i32$0 | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$5; return i64toi32_i32$3 | 0; }; i64toi32_i32$3 = var$0$hi; i64toi32_i32$5 = 1024; - i64toi32_i32$3 = i64toi32_i32$3; wasm2js_i32$0 = i64toi32_i32$5; wasm2js_i32$1 = var$0; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; @@ -2115,9 +2019,6 @@ function asmFunc(global, env, buffer) { var$0$hi = i64toi32_i32$3; }; i64toi32_i32$3 = var$0$hi; - i64toi32_i32$3 = i64toi32_i32$3; - i64toi32_i32$3 = i64toi32_i32$3; - i64toi32_i32$3 = i64toi32_i32$3; i64toi32_i32$5 = var$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$3; return i64toi32_i32$5 | 0; @@ -2135,8 +2036,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = var$1$hi; i64toi32_i32$1 = _ZN17compiler_builtins3int3mul3Mul3mul17h070e9a1c69faec5bE(var$0 | 0, i64toi32_i32$0 | 0, var$1 | 0, i64toi32_i32$1 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; } @@ -2153,8 +2052,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = var$1$hi; i64toi32_i32$1 = _ZN17compiler_builtins3int4sdiv3Div3div17he78fc483e41d7ec7E(var$0 | 0, i64toi32_i32$0 | 0, var$1 | 0, i64toi32_i32$1 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; } @@ -2171,8 +2068,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = var$1$hi; i64toi32_i32$1 = _ZN17compiler_builtins3int4sdiv3Mod4mod_17h2cbb7bbf36e41d68E(var$0 | 0, i64toi32_i32$0 | 0, var$1 | 0, i64toi32_i32$1 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; } @@ -2189,8 +2084,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = var$1$hi; i64toi32_i32$1 = _ZN17compiler_builtins3int4udiv10divmod_u6417h6026910b5ed08e40E(var$0 | 0, i64toi32_i32$0 | 0, var$1 | 0, i64toi32_i32$1 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; } @@ -2200,21 +2093,16 @@ function asmFunc(global, env, buffer) { var$0$hi = var$0$hi | 0; var$1 = var$1 | 0; var$1$hi = var$1$hi | 0; - var i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, wasm2js_i32$0 = 0; + var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$2 = 0, wasm2js_i32$0 = 0; i64toi32_i32$0 = var$0$hi; i64toi32_i32$0 = var$1$hi; i64toi32_i32$0 = var$0$hi; i64toi32_i32$1 = var$1$hi; i64toi32_i32$1 = _ZN17compiler_builtins3int4udiv10divmod_u6417h6026910b5ed08e40E(var$0 | 0, i64toi32_i32$0 | 0, var$1 | 0, i64toi32_i32$1 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = 1024; i64toi32_i32$0 = HEAPU32[i64toi32_i32$2 >> 2] | 0; i64toi32_i32$1 = (wasm2js_i32$0 = i64toi32_i32$2, HEAPU8[(wasm2js_i32$0 + 4 | 0) >> 0] | 0 | 0 | (HEAPU8[(wasm2js_i32$0 + 5 | 0) >> 0] | 0 | 0) << 8 | (HEAPU8[(wasm2js_i32$0 + 6 | 0) >> 0] | 0 | 0) << 16 | (HEAPU8[(wasm2js_i32$0 + 7 | 0) >> 0] | 0 | 0) << 24); - i64toi32_i32$1 = i64toi32_i32$1; - i64toi32_i32$1 = i64toi32_i32$1; - i64toi32_i32$1 = i64toi32_i32$1; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$0 | 0; } diff --git a/test/wasm2js/loop.2asm.js b/test/wasm2js/loop.2asm.js index 98d928356..9b9df3ff6 100644 --- a/test/wasm2js/loop.2asm.js +++ b/test/wasm2js/loop.2asm.js @@ -377,14 +377,13 @@ function asmFunc(global, env, buffer) { function $16($0, $0$hi) { $0 = $0 | 0; $0$hi = $0$hi | 0; - var i64toi32_i32$0 = 0, i64toi32_i32$5 = 0, $1$hi = 0, i64toi32_i32$1 = 0, $1_1 = 0, i64toi32_i32$3 = 0; + var i64toi32_i32$0 = 0, $1$hi = 0, i64toi32_i32$5 = 0, i64toi32_i32$1 = 0, $1_1 = 0, i64toi32_i32$3 = 0; i64toi32_i32$0 = 0; $1_1 = 1; $1$hi = i64toi32_i32$0; block : { loop_in : do { i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; if (($0 | i64toi32_i32$0 | 0 | 0) == (0 | 0)) break block; i64toi32_i32$0 = $0$hi; i64toi32_i32$0 = $1$hi; @@ -392,16 +391,13 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = $1$hi; i64toi32_i32$1 = __wasm_i64_mul($0 | 0, i64toi32_i32$0 | 0, $1_1 | 0, $1$hi | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$0 = i64toi32_i32$0; $1_1 = i64toi32_i32$1; $1$hi = i64toi32_i32$0; i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = 0; i64toi32_i32$3 = 1; i64toi32_i32$5 = ($0 >>> 0 < i64toi32_i32$3 >>> 0) + i64toi32_i32$1 | 0; i64toi32_i32$5 = i64toi32_i32$0 - i64toi32_i32$5 | 0; - i64toi32_i32$5 = i64toi32_i32$5; $0 = $0 - i64toi32_i32$3 | 0; $0$hi = i64toi32_i32$5; continue loop_in; @@ -409,9 +405,6 @@ function asmFunc(global, env, buffer) { } while (1); }; i64toi32_i32$5 = $1$hi; - i64toi32_i32$5 = i64toi32_i32$5; - i64toi32_i32$5 = i64toi32_i32$5; - i64toi32_i32$5 = i64toi32_i32$5; i64toi32_i32$HIGH_BITS = i64toi32_i32$5; return $1_1 | 0; } @@ -419,7 +412,7 @@ function asmFunc(global, env, buffer) { function $17($0, $0$hi) { $0 = $0 | 0; $0$hi = $0$hi | 0; - var i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, i64toi32_i32$5 = 0, $2$hi = 0, i64toi32_i32$1 = 0, $1$hi = 0, $2_1 = 0, $1_1 = 0, i64toi32_i32$4 = 0; + var i64toi32_i32$0 = 0, $1$hi = 0, $2$hi = 0, i64toi32_i32$1 = 0, $2_1 = 0, i64toi32_i32$5 = 0, $1_1 = 0, i64toi32_i32$4 = 0; i64toi32_i32$0 = 0; $1_1 = 1; $1$hi = i64toi32_i32$0; @@ -431,26 +424,17 @@ function asmFunc(global, env, buffer) { i64toi32_i32$0 = $2$hi; i64toi32_i32$0 = $0$hi; i64toi32_i32$0 = $2$hi; - i64toi32_i32$2 = $2_1; i64toi32_i32$1 = $0$hi; - if (i64toi32_i32$0 >>> 0 > i64toi32_i32$1 >>> 0 | ((i64toi32_i32$0 | 0) == (i64toi32_i32$1 | 0) & i64toi32_i32$2 >>> 0 > $0 >>> 0 | 0) | 0) break block; - i64toi32_i32$2 = $1$hi; - i64toi32_i32$2 = $2$hi; - i64toi32_i32$2 = $1$hi; + if (i64toi32_i32$0 >>> 0 > i64toi32_i32$1 >>> 0 | ((i64toi32_i32$0 | 0) == (i64toi32_i32$1 | 0) & $2_1 >>> 0 > $0 >>> 0 | 0) | 0) break block; i64toi32_i32$0 = $2$hi; - i64toi32_i32$0 = __wasm_i64_mul($1_1 | 0, i64toi32_i32$2 | 0, $2_1 | 0, i64toi32_i32$0 | 0) | 0; - i64toi32_i32$2 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$2 = i64toi32_i32$2; + i64toi32_i32$0 = __wasm_i64_mul($1_1 | 0, $1$hi | 0, $2_1 | 0, i64toi32_i32$0 | 0) | 0; $1_1 = i64toi32_i32$0; - $1$hi = i64toi32_i32$2; - i64toi32_i32$2 = $2$hi; - i64toi32_i32$2 = i64toi32_i32$2; + $1$hi = i64toi32_i32$HIGH_BITS; i64toi32_i32$0 = 0; i64toi32_i32$1 = 1; i64toi32_i32$4 = $2_1 + i64toi32_i32$1 | 0; - i64toi32_i32$5 = i64toi32_i32$2 + i64toi32_i32$0 | 0; + i64toi32_i32$5 = $2$hi + i64toi32_i32$0 | 0; if (i64toi32_i32$4 >>> 0 < i64toi32_i32$1 >>> 0) i64toi32_i32$5 = i64toi32_i32$5 + 1 | 0; - i64toi32_i32$5 = i64toi32_i32$5; $2_1 = i64toi32_i32$4; $2$hi = i64toi32_i32$5; continue loop_in; @@ -458,10 +442,7 @@ function asmFunc(global, env, buffer) { } while (1); }; i64toi32_i32$5 = $1$hi; - i64toi32_i32$5 = i64toi32_i32$5; - i64toi32_i32$5 = i64toi32_i32$5; - i64toi32_i32$5 = i64toi32_i32$5; - i64toi32_i32$HIGH_BITS = i64toi32_i32$5; + i64toi32_i32$HIGH_BITS = $1$hi; return $1_1 | 0; } @@ -497,19 +478,15 @@ function asmFunc(global, env, buffer) { var$0$hi = var$0$hi | 0; var$1 = var$1 | 0; var$1$hi = var$1$hi | 0; - var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$4 = 0, i64toi32_i32$2 = 0, var$2 = 0, i64toi32_i32$3 = 0, var$3 = 0, var$4 = 0, var$5 = 0, $21 = 0, $22 = 0, var$6 = 0, $24 = 0, $17_1 = 0, $18_1 = 0, $23 = 0, $29 = 0, $45 = 0, $56$hi = 0, $62$hi = 0; + var i64toi32_i32$4 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, var$2 = 0, i64toi32_i32$2 = 0, i64toi32_i32$3 = 0, var$3 = 0, var$4 = 0, var$5 = 0, $21 = 0, $22 = 0, var$6 = 0, $24 = 0, $17_1 = 0, $18_1 = 0, $23 = 0, $29 = 0, $45 = 0, $56$hi = 0, $62$hi = 0; i64toi32_i32$0 = var$1$hi; - i64toi32_i32$0 = i64toi32_i32$0; var$2 = var$1; var$4 = var$2 >>> 16 | 0; i64toi32_i32$0 = var$0$hi; - i64toi32_i32$0 = i64toi32_i32$0; var$3 = var$0; var$5 = var$3 >>> 16 | 0; $17_1 = Math_imul(var$4, var$5); $18_1 = var$2; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = var$3; i64toi32_i32$1 = 0; i64toi32_i32$3 = 32; @@ -521,10 +498,8 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0; $21 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$0 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$2 >>> i64toi32_i32$4 | 0) | 0; } - i64toi32_i32$1 = i64toi32_i32$1; $23 = $17_1 + Math_imul($18_1, $21) | 0; i64toi32_i32$1 = var$1$hi; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$0 = var$1; i64toi32_i32$2 = 0; i64toi32_i32$3 = 32; @@ -536,7 +511,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$2 = i64toi32_i32$1 >>> i64toi32_i32$4 | 0; $22 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$1 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$0 >>> i64toi32_i32$4 | 0) | 0; } - i64toi32_i32$2 = i64toi32_i32$2; $29 = $23 + Math_imul($22, var$3) | 0; var$2 = var$2 & 65535 | 0; var$3 = var$3 & 65535 | 0; @@ -545,7 +519,6 @@ function asmFunc(global, env, buffer) { $45 = $29 + (var$2 >>> 16 | 0) | 0; var$2 = (var$2 & 65535 | 0) + Math_imul(var$4, var$3) | 0; i64toi32_i32$2 = 0; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$1 = $45 + (var$2 >>> 16 | 0) | 0; i64toi32_i32$0 = 0; i64toi32_i32$3 = 32; @@ -565,7 +538,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = $62$hi; i64toi32_i32$3 = var$2 << 16 | 0 | (var$6 & 65535 | 0) | 0; i64toi32_i32$1 = i64toi32_i32$0 | i64toi32_i32$1 | 0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$2 = i64toi32_i32$2 | i64toi32_i32$3 | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$2 | 0; @@ -589,8 +561,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = var$1$hi; i64toi32_i32$1 = _ZN17compiler_builtins3int3mul3Mul3mul17h070e9a1c69faec5bE(var$0 | 0, i64toi32_i32$0 | 0, var$1 | 0, i64toi32_i32$1 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; } diff --git a/test/wasm2js/reinterpret.2asm.js b/test/wasm2js/reinterpret.2asm.js index 7928cb62e..7aca3ba38 100644 --- a/test/wasm2js/reinterpret.2asm.js +++ b/test/wasm2js/reinterpret.2asm.js @@ -35,7 +35,6 @@ function asmFunc(global, env, buffer) { $0$hi = $0$hi | 0; var i64toi32_i32$0 = 0, $3$hi = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0, wasm2js_f64$0 = 0.0; i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; wasm2js_i32$0 = 0; wasm2js_i32$1 = $0; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; diff --git a/test/wasm2js/select.2asm.js b/test/wasm2js/select.2asm.js index 672a7fe6c..d0e6f8fdd 100644 --- a/test/wasm2js/select.2asm.js +++ b/test/wasm2js/select.2asm.js @@ -35,15 +35,13 @@ function asmFunc(global, env, buffer) { rhs = rhs | 0; rhs$hi = rhs$hi | 0; cond = cond | 0; - var i64toi32_i32$0 = 0, i64toi32_i32$3 = 0, i64toi32_i32$2 = 0, i64toi32_i32$4 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0, wasm2js_i32$2 = 0; + var i64toi32_i32$0 = 0, i64toi32_i32$4 = 0, i64toi32_i32$3 = 0, i64toi32_i32$2 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0, wasm2js_i32$2 = 0; i64toi32_i32$0 = lhs$hi; i64toi32_i32$0 = rhs$hi; i64toi32_i32$4 = cond; i64toi32_i32$0 = lhs$hi; i64toi32_i32$3 = (wasm2js_i32$0 = lhs, wasm2js_i32$1 = rhs, wasm2js_i32$2 = i64toi32_i32$4, wasm2js_i32$2 ? wasm2js_i32$0 : wasm2js_i32$1); i64toi32_i32$2 = (wasm2js_i32$0 = i64toi32_i32$0, wasm2js_i32$1 = rhs$hi, wasm2js_i32$2 = i64toi32_i32$4, wasm2js_i32$2 ? wasm2js_i32$0 : wasm2js_i32$1); - i64toi32_i32$2 = i64toi32_i32$2; - i64toi32_i32$3 = i64toi32_i32$3; i64toi32_i32$HIGH_BITS = i64toi32_i32$2; return i64toi32_i32$3 | 0; } diff --git a/test/wasm2js/set_local.2asm.js b/test/wasm2js/set_local.2asm.js index e6c6562fc..50222d6a2 100644 --- a/test/wasm2js/set_local.2asm.js +++ b/test/wasm2js/set_local.2asm.js @@ -78,15 +78,12 @@ function asmFunc(global, env, buffer) { i64toi32_i32$0 = 0; $6$hi = i64toi32_i32$0; i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = $0_1; $10 = +(i64toi32_i32$1 >>> 0) + 4294967296.0 * +(i64toi32_i32$0 >>> 0); i64toi32_i32$0 = $6$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = 6; $21 = +(i64toi32_i32$1 >>> 0) + 4294967296.0 * +(i64toi32_i32$0 >>> 0); i64toi32_i32$0 = $7$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = $7_1; i64toi32_i32$3 = $10 + (+Math_fround(-.30000001192092896) + ($2_1 + (+(40 >>> 0) + (+(4294967289 | 0) + (+Math_fround(5.5) + ($21 + (+(i64toi32_i32$1 >>> 0) + 4294967296.0 * +(i64toi32_i32$0 >>> 0) + 8.0))))))); if (Math_abs(i64toi32_i32$3) >= 1.0) { @@ -94,9 +91,6 @@ function asmFunc(global, env, buffer) { $15 = $14; } else $15 = 0; i64toi32_i32$0 = $15; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = ~~i64toi32_i32$3 >>> 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; diff --git a/test/wasm2js/stack-modified.2asm.js b/test/wasm2js/stack-modified.2asm.js index 099eb1893..1b65bb24b 100644 --- a/test/wasm2js/stack-modified.2asm.js +++ b/test/wasm2js/stack-modified.2asm.js @@ -24,9 +24,8 @@ function asmFunc(global, env, buffer) { function $0(var$0, var$0$hi) { var$0 = var$0 | 0; var$0$hi = var$0$hi | 0; - var i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, i64toi32_i32$5 = 0, i64toi32_i32$3 = 0, var$1$hi = 0, var$1 = 0, var$2$hi = 0, i64toi32_i32$1 = 0, var$2 = 0; + var i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, i64toi32_i32$3 = 0, var$1$hi = 0, i64toi32_i32$5 = 0, var$1 = 0, var$2$hi = 0, i64toi32_i32$1 = 0, var$2 = 0; i64toi32_i32$0 = var$0$hi; - i64toi32_i32$0 = i64toi32_i32$0; var$1 = var$0; var$1$hi = i64toi32_i32$0; i64toi32_i32$0 = 0; @@ -35,7 +34,6 @@ function asmFunc(global, env, buffer) { label$1 : { label$2 : do { i64toi32_i32$0 = var$1$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = var$1; i64toi32_i32$1 = 0; i64toi32_i32$3 = 0; @@ -46,17 +44,14 @@ function asmFunc(global, env, buffer) { i64toi32_i32$0 = var$2$hi; i64toi32_i32$0 = __wasm_i64_mul(var$1 | 0, i64toi32_i32$2 | 0, var$2 | 0, i64toi32_i32$0 | 0) | 0; i64toi32_i32$2 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$2 = i64toi32_i32$2; var$2 = i64toi32_i32$0; var$2$hi = i64toi32_i32$2; i64toi32_i32$2 = var$1$hi; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$3 = var$1; i64toi32_i32$0 = 0; i64toi32_i32$1 = 1; i64toi32_i32$5 = (i64toi32_i32$3 >>> 0 < i64toi32_i32$1 >>> 0) + i64toi32_i32$0 | 0; i64toi32_i32$5 = i64toi32_i32$2 - i64toi32_i32$5 | 0; - i64toi32_i32$5 = i64toi32_i32$5; var$1 = i64toi32_i32$3 - i64toi32_i32$1 | 0; var$1$hi = i64toi32_i32$5; }; @@ -65,9 +60,6 @@ function asmFunc(global, env, buffer) { } while (1); }; i64toi32_i32$5 = var$2$hi; - i64toi32_i32$5 = i64toi32_i32$5; - i64toi32_i32$5 = i64toi32_i32$5; - i64toi32_i32$5 = i64toi32_i32$5; i64toi32_i32$3 = var$2; i64toi32_i32$HIGH_BITS = i64toi32_i32$5; return i64toi32_i32$3 | 0; @@ -76,9 +68,8 @@ function asmFunc(global, env, buffer) { function $1(var$0, var$0$hi) { var$0 = var$0 | 0; var$0$hi = var$0$hi | 0; - var i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, i64toi32_i32$5 = 0, i64toi32_i32$3 = 0, var$1$hi = 0, var$1 = 0, var$2$hi = 0, i64toi32_i32$1 = 0, var$2 = 0; + var i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, i64toi32_i32$3 = 0, var$1$hi = 0, i64toi32_i32$5 = 0, var$1 = 0, var$2$hi = 0, i64toi32_i32$1 = 0, var$2 = 0; i64toi32_i32$0 = var$0$hi; - i64toi32_i32$0 = i64toi32_i32$0; var$1 = var$0; var$1$hi = i64toi32_i32$0; i64toi32_i32$0 = 0; @@ -87,7 +78,6 @@ function asmFunc(global, env, buffer) { label$1 : { label$2 : do { i64toi32_i32$0 = var$1$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = var$1; i64toi32_i32$1 = 0; i64toi32_i32$3 = 0; @@ -98,17 +88,14 @@ function asmFunc(global, env, buffer) { i64toi32_i32$0 = var$2$hi; i64toi32_i32$0 = __wasm_i64_mul(var$1 | 0, i64toi32_i32$2 | 0, var$2 | 0, i64toi32_i32$0 | 0) | 0; i64toi32_i32$2 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$2 = i64toi32_i32$2; var$2 = i64toi32_i32$0; var$2$hi = i64toi32_i32$2; i64toi32_i32$2 = var$1$hi; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$3 = var$1; i64toi32_i32$0 = 0; i64toi32_i32$1 = 1; i64toi32_i32$5 = (i64toi32_i32$3 >>> 0 < i64toi32_i32$1 >>> 0) + i64toi32_i32$0 | 0; i64toi32_i32$5 = i64toi32_i32$2 - i64toi32_i32$5 | 0; - i64toi32_i32$5 = i64toi32_i32$5; var$1 = i64toi32_i32$3 - i64toi32_i32$1 | 0; var$1$hi = i64toi32_i32$5; }; @@ -117,9 +104,6 @@ function asmFunc(global, env, buffer) { } while (1); }; i64toi32_i32$5 = var$2$hi; - i64toi32_i32$5 = i64toi32_i32$5; - i64toi32_i32$5 = i64toi32_i32$5; - i64toi32_i32$5 = i64toi32_i32$5; i64toi32_i32$3 = var$2; i64toi32_i32$HIGH_BITS = i64toi32_i32$5; return i64toi32_i32$3 | 0; @@ -128,9 +112,8 @@ function asmFunc(global, env, buffer) { function $2(var$0, var$0$hi) { var$0 = var$0 | 0; var$0$hi = var$0$hi | 0; - var i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, i64toi32_i32$5 = 0, i64toi32_i32$3 = 0, var$1$hi = 0, var$1 = 0, var$2$hi = 0, i64toi32_i32$1 = 0, var$2 = 0; + var i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, i64toi32_i32$3 = 0, var$1$hi = 0, i64toi32_i32$5 = 0, var$1 = 0, var$2$hi = 0, i64toi32_i32$1 = 0, var$2 = 0; i64toi32_i32$0 = var$0$hi; - i64toi32_i32$0 = i64toi32_i32$0; var$1 = var$0; var$1$hi = i64toi32_i32$0; i64toi32_i32$0 = 0; @@ -139,7 +122,6 @@ function asmFunc(global, env, buffer) { label$1 : { label$2 : do { i64toi32_i32$0 = var$1$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = var$1; i64toi32_i32$1 = 0; i64toi32_i32$3 = 0; @@ -150,17 +132,14 @@ function asmFunc(global, env, buffer) { i64toi32_i32$0 = var$2$hi; i64toi32_i32$0 = __wasm_i64_mul(var$1 | 0, i64toi32_i32$2 | 0, var$2 | 0, i64toi32_i32$0 | 0) | 0; i64toi32_i32$2 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$2 = i64toi32_i32$2; var$2 = i64toi32_i32$0; var$2$hi = i64toi32_i32$2; i64toi32_i32$2 = var$1$hi; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$3 = var$1; i64toi32_i32$0 = 0; i64toi32_i32$1 = 1; i64toi32_i32$5 = (i64toi32_i32$3 >>> 0 < i64toi32_i32$1 >>> 0) + i64toi32_i32$0 | 0; i64toi32_i32$5 = i64toi32_i32$2 - i64toi32_i32$5 | 0; - i64toi32_i32$5 = i64toi32_i32$5; var$1 = i64toi32_i32$3 - i64toi32_i32$1 | 0; var$1$hi = i64toi32_i32$5; }; @@ -169,9 +148,6 @@ function asmFunc(global, env, buffer) { } while (1); }; i64toi32_i32$5 = var$2$hi; - i64toi32_i32$5 = i64toi32_i32$5; - i64toi32_i32$5 = i64toi32_i32$5; - i64toi32_i32$5 = i64toi32_i32$5; i64toi32_i32$3 = var$2; i64toi32_i32$HIGH_BITS = i64toi32_i32$5; return i64toi32_i32$3 | 0; @@ -180,9 +156,8 @@ function asmFunc(global, env, buffer) { function $3(var$0, var$0$hi) { var$0 = var$0 | 0; var$0$hi = var$0$hi | 0; - var i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, i64toi32_i32$5 = 0, i64toi32_i32$3 = 0, var$1$hi = 0, var$1 = 0, var$2$hi = 0, i64toi32_i32$1 = 0, var$2 = 0; + var i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, i64toi32_i32$3 = 0, var$1$hi = 0, i64toi32_i32$5 = 0, var$1 = 0, var$2$hi = 0, i64toi32_i32$1 = 0, var$2 = 0; i64toi32_i32$0 = var$0$hi; - i64toi32_i32$0 = i64toi32_i32$0; var$1 = var$0; var$1$hi = i64toi32_i32$0; i64toi32_i32$0 = 0; @@ -191,7 +166,6 @@ function asmFunc(global, env, buffer) { label$1 : { label$2 : do { i64toi32_i32$0 = var$1$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = var$1; i64toi32_i32$1 = 0; i64toi32_i32$3 = 0; @@ -202,17 +176,14 @@ function asmFunc(global, env, buffer) { i64toi32_i32$0 = var$2$hi; i64toi32_i32$0 = __wasm_i64_mul(var$1 | 0, i64toi32_i32$2 | 0, var$2 | 0, i64toi32_i32$0 | 0) | 0; i64toi32_i32$2 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$2 = i64toi32_i32$2; var$2 = i64toi32_i32$0; var$2$hi = i64toi32_i32$2; i64toi32_i32$2 = var$1$hi; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$3 = var$1; i64toi32_i32$0 = 0; i64toi32_i32$1 = 1; i64toi32_i32$5 = (i64toi32_i32$3 >>> 0 < i64toi32_i32$1 >>> 0) + i64toi32_i32$0 | 0; i64toi32_i32$5 = i64toi32_i32$2 - i64toi32_i32$5 | 0; - i64toi32_i32$5 = i64toi32_i32$5; var$1 = i64toi32_i32$3 - i64toi32_i32$1 | 0; var$1$hi = i64toi32_i32$5; }; @@ -221,9 +192,6 @@ function asmFunc(global, env, buffer) { } while (1); }; i64toi32_i32$5 = var$2$hi; - i64toi32_i32$5 = i64toi32_i32$5; - i64toi32_i32$5 = i64toi32_i32$5; - i64toi32_i32$5 = i64toi32_i32$5; i64toi32_i32$3 = var$2; i64toi32_i32$HIGH_BITS = i64toi32_i32$5; return i64toi32_i32$3 | 0; @@ -232,9 +200,8 @@ function asmFunc(global, env, buffer) { function $4(var$0, var$0$hi) { var$0 = var$0 | 0; var$0$hi = var$0$hi | 0; - var i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, i64toi32_i32$5 = 0, i64toi32_i32$3 = 0, var$1$hi = 0, var$1 = 0, var$2$hi = 0, i64toi32_i32$1 = 0, var$2 = 0; + var i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, i64toi32_i32$3 = 0, var$1$hi = 0, i64toi32_i32$5 = 0, var$1 = 0, var$2$hi = 0, i64toi32_i32$1 = 0, var$2 = 0; i64toi32_i32$0 = var$0$hi; - i64toi32_i32$0 = i64toi32_i32$0; var$1 = var$0; var$1$hi = i64toi32_i32$0; i64toi32_i32$0 = 0; @@ -243,7 +210,6 @@ function asmFunc(global, env, buffer) { label$1 : { label$2 : do { i64toi32_i32$0 = var$1$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = var$1; i64toi32_i32$1 = 0; i64toi32_i32$3 = 0; @@ -254,17 +220,14 @@ function asmFunc(global, env, buffer) { i64toi32_i32$0 = var$2$hi; i64toi32_i32$0 = __wasm_i64_mul(var$1 | 0, i64toi32_i32$2 | 0, var$2 | 0, i64toi32_i32$0 | 0) | 0; i64toi32_i32$2 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$2 = i64toi32_i32$2; var$2 = i64toi32_i32$0; var$2$hi = i64toi32_i32$2; i64toi32_i32$2 = var$1$hi; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$3 = var$1; i64toi32_i32$0 = 0; i64toi32_i32$1 = 1; i64toi32_i32$5 = (i64toi32_i32$3 >>> 0 < i64toi32_i32$1 >>> 0) + i64toi32_i32$0 | 0; i64toi32_i32$5 = i64toi32_i32$2 - i64toi32_i32$5 | 0; - i64toi32_i32$5 = i64toi32_i32$5; var$1 = i64toi32_i32$3 - i64toi32_i32$1 | 0; var$1$hi = i64toi32_i32$5; }; @@ -273,9 +236,6 @@ function asmFunc(global, env, buffer) { } while (1); }; i64toi32_i32$5 = var$2$hi; - i64toi32_i32$5 = i64toi32_i32$5; - i64toi32_i32$5 = i64toi32_i32$5; - i64toi32_i32$5 = i64toi32_i32$5; i64toi32_i32$3 = var$2; i64toi32_i32$HIGH_BITS = i64toi32_i32$5; return i64toi32_i32$3 | 0; @@ -286,19 +246,15 @@ function asmFunc(global, env, buffer) { var$0$hi = var$0$hi | 0; var$1 = var$1 | 0; var$1$hi = var$1$hi | 0; - var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$4 = 0, i64toi32_i32$2 = 0, var$2 = 0, i64toi32_i32$3 = 0, var$3 = 0, var$4 = 0, var$5 = 0, $21 = 0, $22 = 0, var$6 = 0, $24 = 0, $17 = 0, $18 = 0, $23 = 0, $29 = 0, $45 = 0, $56$hi = 0, $62$hi = 0; + var i64toi32_i32$4 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, var$2 = 0, i64toi32_i32$2 = 0, i64toi32_i32$3 = 0, var$3 = 0, var$4 = 0, var$5 = 0, $21 = 0, $22 = 0, var$6 = 0, $24 = 0, $17 = 0, $18 = 0, $23 = 0, $29 = 0, $45 = 0, $56$hi = 0, $62$hi = 0; i64toi32_i32$0 = var$1$hi; - i64toi32_i32$0 = i64toi32_i32$0; var$2 = var$1; var$4 = var$2 >>> 16 | 0; i64toi32_i32$0 = var$0$hi; - i64toi32_i32$0 = i64toi32_i32$0; var$3 = var$0; var$5 = var$3 >>> 16 | 0; $17 = Math_imul(var$4, var$5); $18 = var$2; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = var$3; i64toi32_i32$1 = 0; i64toi32_i32$3 = 32; @@ -310,10 +266,8 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0; $21 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$0 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$2 >>> i64toi32_i32$4 | 0) | 0; } - i64toi32_i32$1 = i64toi32_i32$1; $23 = $17 + Math_imul($18, $21) | 0; i64toi32_i32$1 = var$1$hi; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$0 = var$1; i64toi32_i32$2 = 0; i64toi32_i32$3 = 32; @@ -325,7 +279,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$2 = i64toi32_i32$1 >>> i64toi32_i32$4 | 0; $22 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$1 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$0 >>> i64toi32_i32$4 | 0) | 0; } - i64toi32_i32$2 = i64toi32_i32$2; $29 = $23 + Math_imul($22, var$3) | 0; var$2 = var$2 & 65535 | 0; var$3 = var$3 & 65535 | 0; @@ -334,7 +287,6 @@ function asmFunc(global, env, buffer) { $45 = $29 + (var$2 >>> 16 | 0) | 0; var$2 = (var$2 & 65535 | 0) + Math_imul(var$4, var$3) | 0; i64toi32_i32$2 = 0; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$1 = $45 + (var$2 >>> 16 | 0) | 0; i64toi32_i32$0 = 0; i64toi32_i32$3 = 32; @@ -354,7 +306,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = $62$hi; i64toi32_i32$3 = var$2 << 16 | 0 | (var$6 & 65535 | 0) | 0; i64toi32_i32$1 = i64toi32_i32$0 | i64toi32_i32$1 | 0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$2 = i64toi32_i32$2 | i64toi32_i32$3 | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$2 | 0; @@ -372,8 +323,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = var$1$hi; i64toi32_i32$1 = _ZN17compiler_builtins3int3mul3Mul3mul17h070e9a1c69faec5bE(var$0 | 0, i64toi32_i32$0 | 0, var$1 | 0, i64toi32_i32$1 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; } diff --git a/test/wasm2js/switch.2asm.js b/test/wasm2js/switch.2asm.js index f24849395..e793696df 100644 --- a/test/wasm2js/switch.2asm.js +++ b/test/wasm2js/switch.2asm.js @@ -121,7 +121,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$2 = 0; i64toi32_i32$5 = (i64toi32_i32$2 >>> 0 < i >>> 0) + i$hi | 0; i64toi32_i32$5 = 0 - i64toi32_i32$5 | 0; - i64toi32_i32$5 = i64toi32_i32$5; $7_1 = i64toi32_i32$2 - i | 0; $7$hi = i64toi32_i32$5; break switch_; @@ -133,7 +132,6 @@ function asmFunc(global, env, buffer) { }; }; i64toi32_i32$5 = j$hi; - i64toi32_i32$5 = i64toi32_i32$5; $7_1 = j; $7$hi = i64toi32_i32$5; break switch_; @@ -143,7 +141,6 @@ function asmFunc(global, env, buffer) { $7$hi = i64toi32_i32$5; }; i64toi32_i32$5 = $7$hi; - i64toi32_i32$5 = i64toi32_i32$5; i64toi32_i32$2 = $7_1; i64toi32_i32$HIGH_BITS = i64toi32_i32$5; return i64toi32_i32$2 | 0; diff --git a/test/wasm2js/tee_local.2asm.js b/test/wasm2js/tee_local.2asm.js index 77bc0567f..b29a167b8 100644 --- a/test/wasm2js/tee_local.2asm.js +++ b/test/wasm2js/tee_local.2asm.js @@ -28,8 +28,6 @@ function asmFunc(global, env, buffer) { function $1() { var i64toi32_i32$0 = 0; i64toi32_i32$0 = 0; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return 0 | 0; } @@ -52,8 +50,6 @@ function asmFunc(global, env, buffer) { $0$hi = $0$hi | 0; var i64toi32_i32$0 = 0; i64toi32_i32$0 = 0; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return 11 | 0; } @@ -77,14 +73,8 @@ function asmFunc(global, env, buffer) { $4_1 = $4_1 | 0; var i64toi32_i32$0 = 0; i64toi32_i32$0 = 0; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$0 = 0; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$0 = 0; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; } function $9($0_1, $0$hi, $1_1, $2_1, $3_1, $4_1) { @@ -102,19 +92,14 @@ function asmFunc(global, env, buffer) { i64toi32_i32$0 = 0; $6_1 = 6; $6$hi = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; $8_1 = 8.0; i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = $0_1; $16 = +(i64toi32_i32$1 >>> 0) + 4294967296.0 * +(i64toi32_i32$0 >>> 0); i64toi32_i32$0 = $6$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = $6_1; $27 = +(i64toi32_i32$1 >>> 0) + 4294967296.0 * +(i64toi32_i32$0 >>> 0); i64toi32_i32$0 = $7$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = $7_1; i64toi32_i32$3 = $16 + (+$1_1 + ($2_1 + (+($3_1 >>> 0) + (+($4_1 | 0) + (+$5_1 + ($27 + (+(i64toi32_i32$1 >>> 0) + 4294967296.0 * +(i64toi32_i32$0 >>> 0) + $8_1))))))); if (Math_abs(i64toi32_i32$3) >= 1.0) { @@ -122,9 +107,6 @@ function asmFunc(global, env, buffer) { $18 = $17; } else $18 = 0; i64toi32_i32$0 = $18; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = ~~i64toi32_i32$3 >>> 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; @@ -139,18 +121,12 @@ function asmFunc(global, env, buffer) { $4_1 = $4_1 | 0; var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, $10_1 = 0.0, $21 = 0.0; i64toi32_i32$0 = 0; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = 1; $10_1 = +(i64toi32_i32$1 >>> 0) + 4294967296.0 * +(i64toi32_i32$0 >>> 0); i64toi32_i32$0 = 0; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = 6; $21 = +(i64toi32_i32$1 >>> 0) + 4294967296.0 * +(i64toi32_i32$0 >>> 0); i64toi32_i32$0 = 0; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = 0; return +($10_1 + (+Math_fround(2.0) + (3.3 + (+(4 >>> 0) + (+(5 | 0) + (+Math_fround(5.5) + ($21 + (+(i64toi32_i32$1 >>> 0) + 4294967296.0 * +(i64toi32_i32$0 >>> 0) + 8.0)))))))); } diff --git a/test/wasm2js/traps.2asm.js b/test/wasm2js/traps.2asm.js index a869c6c74..c31231653 100644 --- a/test/wasm2js/traps.2asm.js +++ b/test/wasm2js/traps.2asm.js @@ -45,8 +45,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = y$hi; i64toi32_i32$1 = __wasm_i64_sdiv(x | 0, i64toi32_i32$0 | 0, y | 0, i64toi32_i32$1 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; } @@ -63,8 +61,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = y$hi; i64toi32_i32$1 = __wasm_i64_udiv(x | 0, i64toi32_i32$0 | 0, y | 0, i64toi32_i32$1 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; } @@ -76,7 +72,6 @@ function asmFunc(global, env, buffer) { var$1$hi = var$1$hi | 0; var i64toi32_i32$1 = 0, i64toi32_i32$2 = 0, i64toi32_i32$4 = 0, i64toi32_i32$3 = 0, i64toi32_i32$0 = 0, i64toi32_i32$5 = 0, var$2 = 0, var$2$hi = 0, i64toi32_i32$6 = 0, $21 = 0, $22 = 0, $23 = 0, $7$hi = 0, $9 = 0, $9$hi = 0, $14$hi = 0, $16$hi = 0, $17 = 0, $17$hi = 0, $23$hi = 0; i64toi32_i32$0 = var$0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = var$0; i64toi32_i32$1 = 0; i64toi32_i32$3 = 63; @@ -88,10 +83,8 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$0 >> i64toi32_i32$4 | 0; $21 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$0 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$2 >>> i64toi32_i32$4 | 0) | 0; } - i64toi32_i32$1 = i64toi32_i32$1; var$2 = $21; var$2$hi = i64toi32_i32$1; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$1 = var$0$hi; i64toi32_i32$1 = var$2$hi; i64toi32_i32$0 = var$2; @@ -111,7 +104,6 @@ function asmFunc(global, env, buffer) { $9 = i64toi32_i32$4; $9$hi = i64toi32_i32$5; i64toi32_i32$5 = var$1$hi; - i64toi32_i32$5 = i64toi32_i32$5; i64toi32_i32$2 = var$1; i64toi32_i32$1 = 0; i64toi32_i32$3 = 63; @@ -123,10 +115,8 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$5 >> i64toi32_i32$0 | 0; $22 = (((1 << i64toi32_i32$0 | 0) - 1 | 0) & i64toi32_i32$5 | 0) << (32 - i64toi32_i32$0 | 0) | 0 | (i64toi32_i32$2 >>> i64toi32_i32$0 | 0) | 0; } - i64toi32_i32$1 = i64toi32_i32$1; var$2 = $22; var$2$hi = i64toi32_i32$1; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$1 = var$1$hi; i64toi32_i32$1 = var$2$hi; i64toi32_i32$5 = var$2; @@ -157,7 +147,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = var$0$hi; i64toi32_i32$3 = var$0; i64toi32_i32$1 = i64toi32_i32$4 ^ i64toi32_i32$1 | 0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$4 = i64toi32_i32$2 ^ i64toi32_i32$3 | 0; i64toi32_i32$2 = 0; i64toi32_i32$3 = 63; @@ -169,10 +158,8 @@ function asmFunc(global, env, buffer) { i64toi32_i32$2 = i64toi32_i32$1 >> i64toi32_i32$5 | 0; $23 = (((1 << i64toi32_i32$5 | 0) - 1 | 0) & i64toi32_i32$1 | 0) << (32 - i64toi32_i32$5 | 0) | 0 | (i64toi32_i32$4 >>> i64toi32_i32$5 | 0) | 0; } - i64toi32_i32$2 = i64toi32_i32$2; var$0 = $23; var$0$hi = i64toi32_i32$2; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$2 = $17$hi; i64toi32_i32$1 = $17; i64toi32_i32$4 = var$0$hi; @@ -183,12 +170,10 @@ function asmFunc(global, env, buffer) { i64toi32_i32$4 = $23$hi; i64toi32_i32$2 = i64toi32_i32$1 ^ i64toi32_i32$3 | 0; i64toi32_i32$1 = var$0$hi; - i64toi32_i32$3 = i64toi32_i32$3; i64toi32_i32$5 = i64toi32_i32$2 - i64toi32_i32$3 | 0; i64toi32_i32$6 = i64toi32_i32$2 >>> 0 < i64toi32_i32$3 >>> 0; i64toi32_i32$0 = i64toi32_i32$6 + i64toi32_i32$1 | 0; i64toi32_i32$0 = i64toi32_i32$4 - i64toi32_i32$0 | 0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = i64toi32_i32$5; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$2 | 0; @@ -212,7 +197,6 @@ function asmFunc(global, env, buffer) { label$10 : { label$11 : { i64toi32_i32$0 = var$0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = var$0; i64toi32_i32$1 = 0; i64toi32_i32$3 = 32; @@ -224,15 +208,12 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0; $38 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$0 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$2 >>> i64toi32_i32$4 | 0) | 0; } - i64toi32_i32$1 = i64toi32_i32$1; var$2 = $38; if (var$2) block : { i64toi32_i32$1 = var$1$hi; - i64toi32_i32$1 = i64toi32_i32$1; var$3 = var$1; if ((var$3 | 0) == (0 | 0)) break label$11; i64toi32_i32$1 = var$1$hi; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$0 = var$1; i64toi32_i32$2 = 0; i64toi32_i32$3 = 32; @@ -244,7 +225,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$2 = i64toi32_i32$1 >>> i64toi32_i32$4 | 0; $39 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$1 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$0 >>> i64toi32_i32$4 | 0) | 0; } - i64toi32_i32$2 = i64toi32_i32$2; var$4 = $39; if ((var$4 | 0) == (0 | 0)) break label$9; var$2 = Math_clz32(var$4) - Math_clz32(var$2) | 0; @@ -252,21 +232,17 @@ function asmFunc(global, env, buffer) { break label$2; }; i64toi32_i32$2 = var$1$hi; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$1 = var$1; i64toi32_i32$0 = 1; i64toi32_i32$3 = 0; if (i64toi32_i32$2 >>> 0 > i64toi32_i32$0 >>> 0 | ((i64toi32_i32$2 | 0) == (i64toi32_i32$0 | 0) & i64toi32_i32$1 >>> 0 >= i64toi32_i32$3 >>> 0 | 0) | 0) break label$2; i64toi32_i32$1 = var$0$hi; - i64toi32_i32$1 = i64toi32_i32$1; var$2 = var$0; i64toi32_i32$1 = var$1$hi; - i64toi32_i32$1 = i64toi32_i32$1; var$3 = var$1; var$2 = (var$2 >>> 0) / (var$3 >>> 0) | 0; i64toi32_i32$1 = 0; i64toi32_i32$2 = 1024; - i64toi32_i32$1 = i64toi32_i32$1; wasm2js_i32$0 = i64toi32_i32$2; wasm2js_i32$1 = var$0 - Math_imul(var$2, var$3) | 0; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; @@ -274,13 +250,11 @@ function asmFunc(global, env, buffer) { wasm2js_i32$1 = i64toi32_i32$1; (wasm2js_i32$2 = wasm2js_i32$0, wasm2js_i32$3 = wasm2js_i32$1), ((HEAP8[(wasm2js_i32$2 + 4 | 0) >> 0] = wasm2js_i32$3 & 255 | 0, HEAP8[(wasm2js_i32$2 + 5 | 0) >> 0] = (wasm2js_i32$3 >>> 8 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 6 | 0) >> 0] = (wasm2js_i32$3 >>> 16 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 7 | 0) >> 0] = (wasm2js_i32$3 >>> 24 | 0) & 255 | 0; i64toi32_i32$1 = 0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$2 = var$2; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$2 | 0; }; i64toi32_i32$2 = var$1$hi; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$3 = var$1; i64toi32_i32$1 = 0; i64toi32_i32$0 = 32; @@ -292,16 +266,13 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$2 >>> i64toi32_i32$4 | 0; $40 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$2 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$3 >>> i64toi32_i32$4 | 0) | 0; } - i64toi32_i32$1 = i64toi32_i32$1; var$3 = $40; i64toi32_i32$1 = var$0$hi; - i64toi32_i32$1 = i64toi32_i32$1; if ((var$0 | 0) == (0 | 0)) break label$7; if ((var$3 | 0) == (0 | 0)) break label$6; var$4 = var$3 + 4294967295 | 0; if (var$4 & var$3 | 0) break label$6; i64toi32_i32$1 = 0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$2 = var$4 & var$2 | 0; i64toi32_i32$3 = 0; i64toi32_i32$0 = 32; @@ -315,7 +286,6 @@ function asmFunc(global, env, buffer) { } $63$hi = i64toi32_i32$3; i64toi32_i32$3 = var$0$hi; - i64toi32_i32$3 = i64toi32_i32$3; i64toi32_i32$1 = var$0; i64toi32_i32$2 = 0; i64toi32_i32$0 = 4294967295; @@ -329,7 +299,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$2 | i64toi32_i32$1 | 0; $66 = i64toi32_i32$3 | i64toi32_i32$0 | 0; i64toi32_i32$3 = 1024; - i64toi32_i32$1 = i64toi32_i32$1; wasm2js_i32$0 = i64toi32_i32$3; wasm2js_i32$1 = $66; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; @@ -337,7 +306,6 @@ function asmFunc(global, env, buffer) { wasm2js_i32$1 = i64toi32_i32$1; (wasm2js_i32$2 = wasm2js_i32$0, wasm2js_i32$3 = wasm2js_i32$1), ((HEAP8[(wasm2js_i32$2 + 4 | 0) >> 0] = wasm2js_i32$3 & 255 | 0, HEAP8[(wasm2js_i32$2 + 5 | 0) >> 0] = (wasm2js_i32$3 >>> 8 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 6 | 0) >> 0] = (wasm2js_i32$3 >>> 16 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 7 | 0) >> 0] = (wasm2js_i32$3 >>> 24 | 0) & 255 | 0; i64toi32_i32$1 = 0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$3 = var$2 >>> ((__wasm_ctz_i32(var$3 | 0) | 0) & 31 | 0) | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$3 | 0; @@ -355,7 +323,6 @@ function asmFunc(global, env, buffer) { }; var$4 = (var$2 >>> 0) / (var$3 >>> 0) | 0; i64toi32_i32$3 = 0; - i64toi32_i32$3 = i64toi32_i32$3; i64toi32_i32$2 = var$2 - Math_imul(var$4, var$3) | 0; i64toi32_i32$1 = 0; i64toi32_i32$0 = 32; @@ -368,7 +335,6 @@ function asmFunc(global, env, buffer) { $42 = i64toi32_i32$2 << i64toi32_i32$4 | 0; } i64toi32_i32$2 = 1024; - i64toi32_i32$1 = i64toi32_i32$1; wasm2js_i32$0 = i64toi32_i32$2; wasm2js_i32$1 = $42; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; @@ -376,7 +342,6 @@ function asmFunc(global, env, buffer) { wasm2js_i32$1 = i64toi32_i32$1; (wasm2js_i32$2 = wasm2js_i32$0, wasm2js_i32$3 = wasm2js_i32$1), ((HEAP8[(wasm2js_i32$2 + 4 | 0) >> 0] = wasm2js_i32$3 & 255 | 0, HEAP8[(wasm2js_i32$2 + 5 | 0) >> 0] = (wasm2js_i32$3 >>> 8 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 6 | 0) >> 0] = (wasm2js_i32$3 >>> 16 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 7 | 0) >> 0] = (wasm2js_i32$3 >>> 24 | 0) & 255 | 0; i64toi32_i32$1 = 0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$2 = var$4; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$2 | 0; @@ -386,10 +351,8 @@ function asmFunc(global, env, buffer) { break label$2; }; i64toi32_i32$2 = var$0$hi; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$2 = 0; i64toi32_i32$1 = 1024; - i64toi32_i32$2 = i64toi32_i32$2; wasm2js_i32$0 = i64toi32_i32$1; wasm2js_i32$1 = var$4 & var$0 | 0; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; @@ -412,7 +375,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$2 >>> i64toi32_i32$4 | 0; $43 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$2 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$3 >>> i64toi32_i32$4 | 0) | 0; } - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$3 = $43; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$3 | 0; @@ -435,7 +397,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$3 >>> i64toi32_i32$4 | 0; $44 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$3 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$2 >>> i64toi32_i32$4 | 0) | 0; } - i64toi32_i32$1 = i64toi32_i32$1; var$5 = $44; var$5$hi = i64toi32_i32$1; i64toi32_i32$1 = var$0$hi; @@ -453,25 +414,21 @@ function asmFunc(global, env, buffer) { i64toi32_i32$2 = ((1 << i64toi32_i32$4 | 0) - 1 | 0) & (i64toi32_i32$3 >>> (32 - i64toi32_i32$4 | 0) | 0) | 0 | (i64toi32_i32$1 << i64toi32_i32$4 | 0) | 0; $45 = i64toi32_i32$3 << i64toi32_i32$4 | 0; } - i64toi32_i32$2 = i64toi32_i32$2; var$0 = $45; var$0$hi = i64toi32_i32$2; label$13 : { if (var$2) block3 : { i64toi32_i32$2 = var$1$hi; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$1 = var$1; i64toi32_i32$3 = 4294967295; i64toi32_i32$0 = 4294967295; i64toi32_i32$4 = i64toi32_i32$1 + i64toi32_i32$0 | 0; i64toi32_i32$5 = i64toi32_i32$2 + i64toi32_i32$3 | 0; if (i64toi32_i32$4 >>> 0 < i64toi32_i32$0 >>> 0) i64toi32_i32$5 = i64toi32_i32$5 + 1 | 0; - i64toi32_i32$5 = i64toi32_i32$5; var$8 = i64toi32_i32$4; var$8$hi = i64toi32_i32$5; label$15 : do { i64toi32_i32$5 = var$5$hi; - i64toi32_i32$5 = i64toi32_i32$5; i64toi32_i32$2 = var$5; i64toi32_i32$1 = 0; i64toi32_i32$0 = 1; @@ -486,7 +443,6 @@ function asmFunc(global, env, buffer) { $140 = $46; $140$hi = i64toi32_i32$1; i64toi32_i32$1 = var$0$hi; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$5 = var$0; i64toi32_i32$2 = 0; i64toi32_i32$0 = 63; @@ -504,10 +460,8 @@ function asmFunc(global, env, buffer) { i64toi32_i32$5 = $142$hi; i64toi32_i32$0 = $47; i64toi32_i32$5 = i64toi32_i32$2 | i64toi32_i32$5 | 0; - i64toi32_i32$5 = i64toi32_i32$5; var$5 = i64toi32_i32$1 | i64toi32_i32$0 | 0; var$5$hi = i64toi32_i32$5; - i64toi32_i32$5 = i64toi32_i32$5; $144 = var$5; $144$hi = i64toi32_i32$5; i64toi32_i32$5 = var$8$hi; @@ -520,7 +474,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$6 = i64toi32_i32$2 >>> 0 < i64toi32_i32$0 >>> 0; i64toi32_i32$4 = i64toi32_i32$6 + i64toi32_i32$1 | 0; i64toi32_i32$4 = i64toi32_i32$5 - i64toi32_i32$4 | 0; - i64toi32_i32$4 = i64toi32_i32$4; i64toi32_i32$5 = i64toi32_i32$3; i64toi32_i32$2 = 0; i64toi32_i32$0 = 63; @@ -532,10 +485,8 @@ function asmFunc(global, env, buffer) { i64toi32_i32$2 = i64toi32_i32$4 >> i64toi32_i32$1 | 0; $48 = (((1 << i64toi32_i32$1 | 0) - 1 | 0) & i64toi32_i32$4 | 0) << (32 - i64toi32_i32$1 | 0) | 0 | (i64toi32_i32$5 >>> i64toi32_i32$1 | 0) | 0; } - i64toi32_i32$2 = i64toi32_i32$2; var$6 = $48; var$6$hi = i64toi32_i32$2; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$2 = var$1$hi; i64toi32_i32$2 = var$6$hi; i64toi32_i32$4 = var$6; @@ -552,11 +503,9 @@ function asmFunc(global, env, buffer) { i64toi32_i32$6 = i64toi32_i32$2 >>> 0 < i64toi32_i32$0 >>> 0; i64toi32_i32$3 = i64toi32_i32$6 + i64toi32_i32$4 | 0; i64toi32_i32$3 = i64toi32_i32$5 - i64toi32_i32$3 | 0; - i64toi32_i32$3 = i64toi32_i32$3; var$5 = i64toi32_i32$1; var$5$hi = i64toi32_i32$3; i64toi32_i32$3 = var$0$hi; - i64toi32_i32$3 = i64toi32_i32$3; i64toi32_i32$5 = var$0; i64toi32_i32$2 = 0; i64toi32_i32$0 = 1; @@ -575,20 +524,15 @@ function asmFunc(global, env, buffer) { i64toi32_i32$5 = var$7$hi; i64toi32_i32$0 = var$7; i64toi32_i32$5 = i64toi32_i32$2 | i64toi32_i32$5 | 0; - i64toi32_i32$5 = i64toi32_i32$5; var$0 = i64toi32_i32$3 | i64toi32_i32$0 | 0; var$0$hi = i64toi32_i32$5; i64toi32_i32$5 = var$6$hi; - i64toi32_i32$5 = i64toi32_i32$5; i64toi32_i32$2 = var$6; i64toi32_i32$3 = 0; i64toi32_i32$0 = 1; i64toi32_i32$3 = i64toi32_i32$5 & i64toi32_i32$3 | 0; - i64toi32_i32$3 = i64toi32_i32$3; var$6 = i64toi32_i32$2 & i64toi32_i32$0 | 0; var$6$hi = i64toi32_i32$3; - i64toi32_i32$3 = i64toi32_i32$3; - i64toi32_i32$3 = i64toi32_i32$3; var$7 = var$6; var$7$hi = i64toi32_i32$3; var$2 = var$2 + 4294967295 | 0; @@ -600,7 +544,6 @@ function asmFunc(global, env, buffer) { }; i64toi32_i32$3 = var$5$hi; i64toi32_i32$2 = 1024; - i64toi32_i32$3 = i64toi32_i32$3; wasm2js_i32$0 = i64toi32_i32$2; wasm2js_i32$1 = var$5; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; @@ -608,7 +551,6 @@ function asmFunc(global, env, buffer) { wasm2js_i32$1 = i64toi32_i32$3; (wasm2js_i32$2 = wasm2js_i32$0, wasm2js_i32$3 = wasm2js_i32$1), ((HEAP8[(wasm2js_i32$2 + 4 | 0) >> 0] = wasm2js_i32$3 & 255 | 0, HEAP8[(wasm2js_i32$2 + 5 | 0) >> 0] = (wasm2js_i32$3 >>> 8 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 6 | 0) >> 0] = (wasm2js_i32$3 >>> 16 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 7 | 0) >> 0] = (wasm2js_i32$3 >>> 24 | 0) & 255 | 0; i64toi32_i32$3 = var$0$hi; - i64toi32_i32$3 = i64toi32_i32$3; i64toi32_i32$5 = var$0; i64toi32_i32$2 = 0; i64toi32_i32$0 = 1; @@ -627,14 +569,12 @@ function asmFunc(global, env, buffer) { i64toi32_i32$5 = var$6$hi; i64toi32_i32$0 = var$6; i64toi32_i32$5 = i64toi32_i32$2 | i64toi32_i32$5 | 0; - i64toi32_i32$5 = i64toi32_i32$5; i64toi32_i32$3 = i64toi32_i32$3 | i64toi32_i32$0 | 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$5; return i64toi32_i32$3 | 0; }; i64toi32_i32$3 = var$0$hi; i64toi32_i32$5 = 1024; - i64toi32_i32$3 = i64toi32_i32$3; wasm2js_i32$0 = i64toi32_i32$5; wasm2js_i32$1 = var$0; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; @@ -646,9 +586,6 @@ function asmFunc(global, env, buffer) { var$0$hi = i64toi32_i32$3; }; i64toi32_i32$3 = var$0$hi; - i64toi32_i32$3 = i64toi32_i32$3; - i64toi32_i32$3 = i64toi32_i32$3; - i64toi32_i32$3 = i64toi32_i32$3; i64toi32_i32$5 = var$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$3; return i64toi32_i32$5 | 0; @@ -666,8 +603,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = var$1$hi; i64toi32_i32$1 = _ZN17compiler_builtins3int4sdiv3Div3div17he78fc483e41d7ec7E(var$0 | 0, i64toi32_i32$0 | 0, var$1 | 0, i64toi32_i32$1 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; } @@ -684,8 +619,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = var$1$hi; i64toi32_i32$1 = _ZN17compiler_builtins3int4udiv10divmod_u6417h6026910b5ed08e40E(var$0 | 0, i64toi32_i32$0 | 0, var$1 | 0, i64toi32_i32$1 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$1 = i64toi32_i32$1; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$1 | 0; } diff --git a/test/wasm2js/unaligned.2asm.js b/test/wasm2js/unaligned.2asm.js index 61d49db7f..849833501 100644 --- a/test/wasm2js/unaligned.2asm.js +++ b/test/wasm2js/unaligned.2asm.js @@ -27,12 +27,10 @@ function asmFunc(global, env, buffer) { } function $1() { - var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$2 = 0, wasm2js_i32$0 = 0; + var i64toi32_i32$2 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, wasm2js_i32$0 = 0; i64toi32_i32$2 = 0; i64toi32_i32$0 = (wasm2js_i32$0 = i64toi32_i32$2, HEAPU8[wasm2js_i32$0 >> 0] | 0 | 0 | (HEAPU8[(wasm2js_i32$0 + 1 | 0) >> 0] | 0 | 0) << 8 | (HEAPU8[(wasm2js_i32$0 + 2 | 0) >> 0] | 0 | 0) << 16 | (HEAPU8[(wasm2js_i32$0 + 3 | 0) >> 0] | 0 | 0) << 24); i64toi32_i32$1 = (wasm2js_i32$0 = i64toi32_i32$2, HEAPU8[(wasm2js_i32$0 + 4 | 0) >> 0] | 0 | 0 | (HEAPU8[(wasm2js_i32$0 + 5 | 0) >> 0] | 0 | 0) << 8 | (HEAPU8[(wasm2js_i32$0 + 6 | 0) >> 0] | 0 | 0) << 16 | (HEAPU8[(wasm2js_i32$0 + 7 | 0) >> 0] | 0 | 0) << 24); - i64toi32_i32$1 = i64toi32_i32$1; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$0 | 0; } @@ -43,10 +41,9 @@ function asmFunc(global, env, buffer) { } function $3() { - var i64toi32_i32$1 = 0, i64toi32_i32$2 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0, wasm2js_i32$2 = 0; + var i64toi32_i32$2 = 0, i64toi32_i32$1 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0, wasm2js_i32$2 = 0; i64toi32_i32$2 = 0; i64toi32_i32$1 = (wasm2js_i32$0 = i64toi32_i32$2, HEAPU8[(wasm2js_i32$0 + 4 | 0) >> 0] | 0 | 0 | (HEAPU8[(wasm2js_i32$0 + 5 | 0) >> 0] | 0 | 0) << 8 | (HEAPU8[(wasm2js_i32$0 + 6 | 0) >> 0] | 0 | 0) << 16 | (HEAPU8[(wasm2js_i32$0 + 7 | 0) >> 0] | 0 | 0) << 24); - i64toi32_i32$1 = i64toi32_i32$1; wasm2js_i32$0 = 0; wasm2js_i32$1 = (wasm2js_i32$2 = i64toi32_i32$2, HEAPU8[wasm2js_i32$2 >> 0] | 0 | 0 | (HEAPU8[(wasm2js_i32$2 + 1 | 0) >> 0] | 0 | 0) << 8 | (HEAPU8[(wasm2js_i32$2 + 2 | 0) >> 0] | 0 | 0) << 16 | (HEAPU8[(wasm2js_i32$2 + 3 | 0) >> 0] | 0 | 0) << 24); HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; @@ -82,13 +79,12 @@ function asmFunc(global, env, buffer) { } function $7() { - var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, wasm2js_i32$0 = 0, wasm2js_f64$0 = 0.0, wasm2js_i32$1 = 0, wasm2js_i32$2 = 0, wasm2js_i32$3 = 0; + var i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, wasm2js_i32$0 = 0, wasm2js_f64$0 = 0.0, wasm2js_i32$1 = 0, wasm2js_i32$2 = 0, wasm2js_i32$3 = 0; wasm2js_i32$0 = 0; wasm2js_f64$0 = 0.0; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; i64toi32_i32$0 = HEAP32[(0 + 4 | 0) >> 2] | 0; i64toi32_i32$1 = 0; - i64toi32_i32$0 = i64toi32_i32$0; wasm2js_i32$0 = i64toi32_i32$1; wasm2js_i32$1 = HEAP32[0 >> 2] | 0; (wasm2js_i32$2 = wasm2js_i32$0, wasm2js_i32$3 = wasm2js_i32$1), ((HEAP8[wasm2js_i32$2 >> 0] = wasm2js_i32$3 & 255 | 0, HEAP8[(wasm2js_i32$2 + 1 | 0) >> 0] = (wasm2js_i32$3 >>> 8 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 2 | 0) >> 0] = (wasm2js_i32$3 >>> 16 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 3 | 0) >> 0] = (wasm2js_i32$3 >>> 24 | 0) & 255 | 0; diff --git a/test/wasm2js/unary-ops.2asm.js b/test/wasm2js/unary-ops.2asm.js index ee5fd1ed8..f06c136b3 100644 --- a/test/wasm2js/unary-ops.2asm.js +++ b/test/wasm2js/unary-ops.2asm.js @@ -37,7 +37,6 @@ function asmFunc(global, env, buffer) { r$hi = r$hi | 0; var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, $3$hi = 0, i64toi32_i32$2 = 0; i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$0 = __wasm_popcnt_i64($0 | 0, i64toi32_i32$0 | 0) | 0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; $3$hi = i64toi32_i32$1; @@ -79,7 +78,6 @@ function asmFunc(global, env, buffer) { $0$hi = $0$hi | 0; var i64toi32_i32$0 = 0; i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; return ($0 | i64toi32_i32$0 | 0 | 0) == (0 | 0) | 0; } @@ -98,9 +96,8 @@ function asmFunc(global, env, buffer) { $0$hi = $0$hi | 0; r = r | 0; r$hi = r$hi | 0; - var i64toi32_i32$0 = 0, i64toi32_i32$3 = 0, i64toi32_i32$2 = 0, i64toi32_i32$1 = 0, $9_1 = 0, $3$hi = 0; + var i64toi32_i32$3 = 0, i64toi32_i32$2 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, $9_1 = 0, $3$hi = 0; i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$1 = $0; i64toi32_i32$3 = Math_clz32(i64toi32_i32$0); i64toi32_i32$2 = 0; @@ -121,7 +118,6 @@ function asmFunc(global, env, buffer) { r$hi = r$hi | 0; var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, $3$hi = 0, i64toi32_i32$2 = 0; i64toi32_i32$0 = $0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$0 = __wasm_ctz_i64($0 | 0, i64toi32_i32$0 | 0) | 0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; $3$hi = i64toi32_i32$1; @@ -141,12 +137,10 @@ function asmFunc(global, env, buffer) { function __wasm_ctz_i64(var$0, var$0$hi) { var$0 = var$0 | 0; var$0$hi = var$0$hi | 0; - var i64toi32_i32$0 = 0, i64toi32_i32$3 = 0, i64toi32_i32$4 = 0, i64toi32_i32$5 = 0, i64toi32_i32$2 = 0, i64toi32_i32$1 = 0, $10 = 0, $5$hi = 0, $8$hi = 0; + var i64toi32_i32$0 = 0, i64toi32_i32$3 = 0, i64toi32_i32$5 = 0, i64toi32_i32$4 = 0, i64toi32_i32$2 = 0, i64toi32_i32$1 = 0, $10 = 0, $5$hi = 0, $8$hi = 0; i64toi32_i32$0 = var$0$hi; - i64toi32_i32$0 = i64toi32_i32$0; if (((var$0 | i64toi32_i32$0 | 0 | 0) == (0 | 0) | 0) == (0 | 0)) { i64toi32_i32$0 = var$0$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = var$0; i64toi32_i32$1 = 4294967295; i64toi32_i32$3 = 4294967295; @@ -160,7 +154,6 @@ function asmFunc(global, env, buffer) { i64toi32_i32$2 = var$0$hi; i64toi32_i32$3 = var$0; i64toi32_i32$2 = i64toi32_i32$5 ^ i64toi32_i32$2 | 0; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$0 = i64toi32_i32$0 ^ i64toi32_i32$3 | 0; i64toi32_i32$3 = Math_clz32(i64toi32_i32$2); i64toi32_i32$5 = 0; @@ -173,14 +166,11 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = i64toi32_i32$0 - i64toi32_i32$3 | 0; i64toi32_i32$4 = (i64toi32_i32$0 >>> 0 < i64toi32_i32$3 >>> 0) + i64toi32_i32$2 | 0; i64toi32_i32$4 = i64toi32_i32$5 - i64toi32_i32$4 | 0; - i64toi32_i32$4 = i64toi32_i32$4; i64toi32_i32$0 = i64toi32_i32$1; i64toi32_i32$HIGH_BITS = i64toi32_i32$4; return i64toi32_i32$0 | 0; } i64toi32_i32$0 = 0; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$4 = 64; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; return i64toi32_i32$4 | 0; @@ -205,22 +195,18 @@ function asmFunc(global, env, buffer) { function __wasm_popcnt_i64(var$0, var$0$hi) { var$0 = var$0 | 0; var$0$hi = var$0$hi | 0; - var i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, i64toi32_i32$4 = 0, i64toi32_i32$5 = 0, i64toi32_i32$3 = 0, i64toi32_i32$1 = 0, var$1$hi = 0, var$1 = 0, $5_1 = 0, $5$hi = 0, $4_1 = 0, $9$hi = 0; + var i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, i64toi32_i32$5 = 0, i64toi32_i32$4 = 0, i64toi32_i32$3 = 0, i64toi32_i32$1 = 0, var$1$hi = 0, var$1 = 0, $5_1 = 0, $5$hi = 0, $4_1 = 0, $9$hi = 0; label$1 : { label$2 : do { i64toi32_i32$0 = var$1$hi; i64toi32_i32$0 = var$0$hi; - i64toi32_i32$0 = i64toi32_i32$0; $4_1 = (var$0 | i64toi32_i32$0 | 0 | 0) == (0 | 0); i64toi32_i32$0 = var$1$hi; $5_1 = var$1; $5$hi = i64toi32_i32$0; if ($4_1) break label$1; i64toi32_i32$0 = $5$hi; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$0 = var$0$hi; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; i64toi32_i32$2 = var$0; i64toi32_i32$1 = 0; i64toi32_i32$3 = 1; @@ -233,18 +219,15 @@ function asmFunc(global, env, buffer) { i64toi32_i32$2 = $9$hi; i64toi32_i32$3 = i64toi32_i32$4; i64toi32_i32$2 = i64toi32_i32$5 & i64toi32_i32$2 | 0; - i64toi32_i32$2 = i64toi32_i32$2; var$0 = i64toi32_i32$0 & i64toi32_i32$4 | 0; var$0$hi = i64toi32_i32$2; i64toi32_i32$2 = var$1$hi; - i64toi32_i32$2 = i64toi32_i32$2; i64toi32_i32$5 = var$1; i64toi32_i32$0 = 0; i64toi32_i32$3 = 1; i64toi32_i32$1 = i64toi32_i32$5 + i64toi32_i32$3 | 0; i64toi32_i32$4 = i64toi32_i32$2 + i64toi32_i32$0 | 0; if (i64toi32_i32$1 >>> 0 < i64toi32_i32$3 >>> 0) i64toi32_i32$4 = i64toi32_i32$4 + 1 | 0; - i64toi32_i32$4 = i64toi32_i32$4; var$1 = i64toi32_i32$1; var$1$hi = i64toi32_i32$4; continue label$2; @@ -252,7 +235,6 @@ function asmFunc(global, env, buffer) { } while (1); }; i64toi32_i32$4 = $5$hi; - i64toi32_i32$4 = i64toi32_i32$4; i64toi32_i32$5 = $5_1; i64toi32_i32$HIGH_BITS = i64toi32_i32$4; return i64toi32_i32$5 | 0; |