diff options
author | Alon Zakai <azakai@google.com> | 2021-11-09 17:01:47 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-10 01:01:47 +0000 |
commit | c30152666af8db5ef8634165a5a3ff192d3a6c98 (patch) | |
tree | 07330c059c5861480db31e396c188879b6800beb /test | |
parent | b260f1cc65096a7784da8ef8ad25a067e0480e5b (diff) | |
download | binaryen-c30152666af8db5ef8634165a5a3ff192d3a6c98.tar.gz binaryen-c30152666af8db5ef8634165a5a3ff192d3a6c98.tar.bz2 binaryen-c30152666af8db5ef8634165a5a3ff192d3a6c98.zip |
CoalesceLocals: Rewrite the algorithm to be linear and to ignore copies (#4314)
The old algorithm can be summarized as: In each basic block, start at the beginning.
Each pair of live locals there might interfere with each other, as they might arrive from
different entry blocks with different values. Afterwards, go through the block and find
overlapping live ranges, and mark interferences there as well.
This is non-linear because at the start of the block we do a double-loop over all
pairs of live locals, which in general can be O(N^2) (N - number of locals). It also
has the downside of ignoring copies: if two locals have overlapping live ranges but
they must have identical values on those ranges, they do not actually interfere,
for example
x = 10;
y = x;
.. // live ranges overlap here
foo(x, y); // live ranges end here.
We can ignore this overlap since the copy shows they are identical there, but the
pass did not take this into account. To some extent other passes can remove such
copies (SimplifyLocals, MergeLocals, RedundantSetElimination), but in general
this was a weak spot for the optimizer.
I realized there is a solution to both these problems: In Wasm, given that we have
a default value for all locals, if a local is live at the start of a block then it must be
live at the end of all the blocks reaching it. That is so because the liveness will
extend backwards all the way to some set of the local, possibly all the way to
the zero-initialization at the start of the function, and it extends that way through
all predecessor blocks. A consequence of this is that there are no interferences
between locals that only occur during a merge: The live ranges include the
predecessor blocks, and theirs, and so forth, until we reach a block where one
of the locals is assigned a value different than the other. That is a necessary and
sufficient condition for intererence, and therefore when processing a block we
only need to look at its contents, and can ignore the merging of control flow,
which allows us to be linear.
More details on this and on the new algorithm in comments in the source, but
the basic idea is that it simply goes through each block in a linear way, finding
which values are assigned to each local (using a numbering of unique values),
and noting which are live at each time. If two locals are live and one is assigned
a value that is not the same as the value in the other, mark them as interfering.
This is of substantial benefit to j2wasm output, I believe because it is common
there to find local subexpression elimination opportunities after inlining, and
each time we find one we add a local. If we inline different functions into the
same target, we may end up with copied locals for each of them. (This was
not noticed in the past because it is very rare on LLVM output, which has
already had inlining and GVN etc. done.)
There is a small benefit to LLVM output as well, though just a few
percent at best. However, it is enough to be noticeable on some of
the code size tests.
This is also faster than the previous pass. It's normally not noticeable
as this pass is not one of the slowest anyhow, but I found some real-world
codebases where the pass becomes 50% faster. I have not found any
case where it is slower than the old algorithm.
Fuzzed over several days to be sure this is correct, and also verified
on the emscripten test suite.
Diffstat (limited to 'test')
-rw-r--r-- | test/lit/passes/Oz.wast | 6 | ||||
-rw-r--r-- | test/lit/passes/coalesce-locals-learning.wast | 29 | ||||
-rw-r--r-- | test/lit/passes/coalesce-locals.wast | 461 | ||||
-rw-r--r-- | test/lit/passes/inlining-optimizing_optimize-level=3.wast | 733 | ||||
-rw-r--r-- | test/passes/converge_O3_metrics.bin.txt | 78 | ||||
-rw-r--r-- | test/wasm2js/i64-ctz.2asm.js.opt | 8 | ||||
-rw-r--r-- | test/wasm2js/i64-rotate.2asm.js.opt | 24 | ||||
-rw-r--r-- | test/wasm2js/unary-ops.2asm.js.opt | 28 |
8 files changed, 864 insertions, 503 deletions
diff --git a/test/lit/passes/Oz.wast b/test/lit/passes/Oz.wast index eabcf9aff..bd1aeced3 100644 --- a/test/lit/passes/Oz.wast +++ b/test/lit/passes/Oz.wast @@ -58,7 +58,7 @@ ;; CHECK: (func $8 (; has Stack IR ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) ;; CHECK-NEXT: (i32.store ;; CHECK-NEXT: (local.tee $0 - ;; CHECK-NEXT: (local.tee $1 + ;; CHECK-NEXT: (local.tee $0 ;; CHECK-NEXT: (i32.add ;; CHECK-NEXT: (local.get $1) ;; CHECK-NEXT: (i32.const 4) @@ -73,9 +73,7 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.store - ;; CHECK-NEXT: (local.tee $0 - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: (i32.or ;; CHECK-NEXT: (i32.load ;; CHECK-NEXT: (local.get $0) diff --git a/test/lit/passes/coalesce-locals-learning.wast b/test/lit/passes/coalesce-locals-learning.wast index af1c7d560..6e896ae9d 100644 --- a/test/lit/passes/coalesce-locals-learning.wast +++ b/test/lit/passes/coalesce-locals-learning.wast @@ -301,12 +301,11 @@ ) ;; CHECK: (func $zero-init ;; CHECK-NEXT: (local $0 i32) - ;; CHECK-NEXT: (local $1 i32) ;; CHECK-NEXT: (drop ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (local.get $1) + ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) (func $zero-init (type $2) @@ -321,12 +320,11 @@ ) ;; CHECK: (func $multi ;; CHECK-NEXT: (local $0 i32) - ;; CHECK-NEXT: (local $1 i32) ;; CHECK-NEXT: (drop ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (local.get $1) + ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) (func $multi (type $2) @@ -342,14 +340,13 @@ ) ;; CHECK: (func $if-else ;; CHECK-NEXT: (local $0 i32) - ;; CHECK-NEXT: (local $1 i32) ;; CHECK-NEXT: (if ;; CHECK-NEXT: (i32.const 0) ;; CHECK-NEXT: (drop ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (local.get $1) + ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -730,20 +727,19 @@ ) ;; CHECK: (func $if5 ;; CHECK-NEXT: (local $0 i32) - ;; CHECK-NEXT: (local $1 i32) ;; CHECK-NEXT: (if ;; CHECK-NEXT: (i32.const 0) ;; CHECK-NEXT: (block $block1 ;; CHECK-NEXT: (drop ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $1 + ;; CHECK-NEXT: (local.set $0 ;; CHECK-NEXT: (i32.const 1) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (local.get $1) + ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) (func $if5 (type $2) @@ -877,16 +873,14 @@ ) ;; CHECK: (func $params (param $0 i32) (param $1 f32) ;; CHECK-NEXT: (local $2 i32) - ;; CHECK-NEXT: (local $3 i32) - ;; CHECK-NEXT: (local $4 i32) ;; CHECK-NEXT: (drop ;; CHECK-NEXT: (local.get $2) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (local.get $3) + ;; CHECK-NEXT: (local.get $2) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (local.get $4) + ;; CHECK-NEXT: (local.get $2) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) (func $params (type $3) (param $p i32) (param $q f32) @@ -906,7 +900,6 @@ ) ;; CHECK: (func $interfere-in-dead4 ;; CHECK-NEXT: (local $0 i32) - ;; CHECK-NEXT: (local $1 i32) ;; CHECK-NEXT: (block $block ;; CHECK-NEXT: (br_if $block ;; CHECK-NEXT: (i32.const 0) @@ -915,7 +908,7 @@ ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (local.get $1) + ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -936,8 +929,6 @@ ) ;; CHECK: (func $switch ;; CHECK-NEXT: (local $0 i32) - ;; CHECK-NEXT: (local $1 i32) - ;; CHECK-NEXT: (local $2 i32) ;; CHECK-NEXT: (block $switch$def ;; CHECK-NEXT: (block $switch-case$1 ;; CHECK-NEXT: (block $switch-case$2 @@ -953,11 +944,11 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (local.get $1) + ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (local.get $2) + ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) (func $switch (type $2) diff --git a/test/lit/passes/coalesce-locals.wast b/test/lit/passes/coalesce-locals.wast index 343013150..b252e8363 100644 --- a/test/lit/passes/coalesce-locals.wast +++ b/test/lit/passes/coalesce-locals.wast @@ -7,14 +7,14 @@ (memory 10) ;; CHECK: (type $2 (func)) + ;; CHECK: (type $none_=>_i32 (func (result i32))) + ;; CHECK: (type $4 (func (param i32))) ;; CHECK: (type $FUNCSIG$iii (func (param i32 i32) (result i32))) ;; CHECK: (type $f64_i32_=>_i64 (func (param f64 i32) (result i64))) - ;; CHECK: (type $none_=>_i32 (func (result i32))) - ;; CHECK: (type $3 (func (param i32 f32))) ;; CHECK: (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) @@ -318,12 +318,11 @@ ) ;; CHECK: (func $zero-init ;; CHECK-NEXT: (local $0 i32) - ;; CHECK-NEXT: (local $1 i32) ;; CHECK-NEXT: (drop ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (local.get $1) + ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) (func $zero-init (type $2) @@ -338,12 +337,11 @@ ) ;; CHECK: (func $multi ;; CHECK-NEXT: (local $0 i32) - ;; CHECK-NEXT: (local $1 i32) ;; CHECK-NEXT: (drop ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (local.get $1) + ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) (func $multi (type $2) @@ -359,14 +357,13 @@ ) ;; CHECK: (func $if-else ;; CHECK-NEXT: (local $0 i32) - ;; CHECK-NEXT: (local $1 i32) ;; CHECK-NEXT: (if ;; CHECK-NEXT: (i32.const 0) ;; CHECK-NEXT: (drop ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (local.get $1) + ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -747,20 +744,19 @@ ) ;; CHECK: (func $if5 ;; CHECK-NEXT: (local $0 i32) - ;; CHECK-NEXT: (local $1 i32) ;; CHECK-NEXT: (if ;; CHECK-NEXT: (i32.const 0) ;; CHECK-NEXT: (block $block1 ;; CHECK-NEXT: (drop ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $1 + ;; CHECK-NEXT: (local.set $0 ;; CHECK-NEXT: (i32.const 1) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (local.get $1) + ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) (func $if5 (type $2) @@ -769,6 +765,9 @@ (if (i32.const 0) (block $block1 + ;; These locals can be coalesced together: $x's live range ends here, + ;; and $y's begins right after it, so they do not have an overlap with + ;; a different value. (drop (local.get $x) ) @@ -781,6 +780,43 @@ (local.get $y) ) ) + ;; CHECK: (func $if5-flip + ;; CHECK-NEXT: (local $0 i32) + ;; CHECK-NEXT: (local $1 i32) + ;; CHECK-NEXT: (if + ;; CHECK-NEXT: (i32.const 0) + ;; CHECK-NEXT: (block $block1 + ;; CHECK-NEXT: (local.set $1 + ;; CHECK-NEXT: (i32.const 1) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (local.get $0) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (local.get $1) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + (func $if5-flip (type $2) + (local $x i32) + (local $y i32) + (if + (i32.const 0) + (block $block1 + ;; As above, but flipping these two instructions causes a conflict. + (local.set $y + (i32.const 1) + ) + (drop + (local.get $x) + ) + ) + ) + (drop + (local.get $y) + ) + ) ;; CHECK: (func $loop ;; CHECK-NEXT: (local $0 i32) ;; CHECK-NEXT: (local $1 i32) @@ -890,16 +926,14 @@ ) ;; CHECK: (func $params (param $0 i32) (param $1 f32) ;; CHECK-NEXT: (local $2 i32) - ;; CHECK-NEXT: (local $3 i32) - ;; CHECK-NEXT: (local $4 i32) ;; CHECK-NEXT: (drop ;; CHECK-NEXT: (local.get $2) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (local.get $3) + ;; CHECK-NEXT: (local.get $2) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (local.get $4) + ;; CHECK-NEXT: (local.get $2) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) (func $params (type $3) (param $p i32) (param $q f32) @@ -919,7 +953,6 @@ ) ;; CHECK: (func $interfere-in-dead4 ;; CHECK-NEXT: (local $0 i32) - ;; CHECK-NEXT: (local $1 i32) ;; CHECK-NEXT: (block $block ;; CHECK-NEXT: (br_if $block ;; CHECK-NEXT: (i32.const 0) @@ -928,7 +961,7 @@ ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (local.get $1) + ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -949,8 +982,6 @@ ) ;; CHECK: (func $switch ;; CHECK-NEXT: (local $0 i32) - ;; CHECK-NEXT: (local $1 i32) - ;; CHECK-NEXT: (local $2 i32) ;; CHECK-NEXT: (block $switch$def ;; CHECK-NEXT: (block $switch-case$1 ;; CHECK-NEXT: (block $switch-case$2 @@ -966,11 +997,11 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (local.get $1) + ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (local.get $2) + ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) (func $switch (type $2) @@ -2508,4 +2539,392 @@ (local.get $temp) ) ) + + ;; CHECK: (func $copies-do-not-interfere (result i32) + ;; CHECK-NEXT: (local $0 i32) + ;; CHECK-NEXT: (local.set $0 + ;; CHECK-NEXT: (i32.const 100) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (nop) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (local.get $0) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (local.get $0) + ;; CHECK-NEXT: ) + (func $copies-do-not-interfere (result i32) + (local $0 i32) + (local $1 i32) + (local.set $0 + (i32.const 100) + ) + ;; The two locals are copies, and so they do not interfere, even though + ;; their live ranges overlap and there is a set of one of them in that + ;; overlap. We can coalesce them together to a single local. + (local.set $1 + (local.get $0) + ) + (drop + (local.get $0) + ) + (local.get $1) + ) + + ;; CHECK: (func $tee-copies-do-not-interfere (result i32) + ;; CHECK-NEXT: (local $0 i32) + ;; CHECK-NEXT: (local.set $0 + ;; CHECK-NEXT: (local.tee $0 + ;; CHECK-NEXT: (i32.const 100) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (local.get $0) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (local.get $0) + ;; CHECK-NEXT: ) + (func $tee-copies-do-not-interfere (result i32) + (local $0 i32) + (local $1 i32) + ;; Similar to the above, but now the copying is done using a tee. + (local.set $1 + (local.tee $0 + (i32.const 100) + ) + ) + (drop + (local.get $0) + ) + (local.get $1) + ) + + ;; CHECK: (func $multiple-tee-copies-do-not-interfere (result i32) + ;; CHECK-NEXT: (local $0 i32) + ;; CHECK-NEXT: (local.set $0 + ;; CHECK-NEXT: (local.tee $0 + ;; CHECK-NEXT: (local.tee $0 + ;; CHECK-NEXT: (i32.const 100) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (local.get $0) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (local.get $0) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (local.get $0) + ;; CHECK-NEXT: ) + (func $multiple-tee-copies-do-not-interfere (result i32) + (local $0 i32) + (local $1 i32) + (local $2 i32) + ;; Similar to the above, but a chain of 3 items. + (local.set $2 + (local.tee $1 + (local.tee $0 + (i32.const 100) + ) + ) + ) + (drop + (local.get $0) + ) + (drop + (local.get $1) + ) + (local.get $2) + ) + + ;; CHECK: (func $copies-and-then-interfere (result i32) + ;; CHECK-NEXT: (local $0 i32) + ;; CHECK-NEXT: (local $1 i32) + ;; CHECK-NEXT: (local.set $1 + ;; CHECK-NEXT: (i32.const 100) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (local.set $0 + ;; CHECK-NEXT: (local.get $1) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (local.get $1) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (local.get $0) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (local.set $0 + ;; CHECK-NEXT: (i32.const 123) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (local.get $1) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (local.get $0) + ;; CHECK-NEXT: ) + (func $copies-and-then-interfere (result i32) + (local $0 i32) + (local $1 i32) + (local.set $0 + (i32.const 100) + ) + (local.set $1 + (local.get $0) + ) + (drop + (local.get $0) + ) + (drop + (local.get $1) + ) + ;; The copy before this set should not confuse us - this set causes a + ;; divergence on the overlapping live ranges, and we cannot coalesce these + ;; two locals. + (local.set $1 + (i32.const 123) + ) + (drop + (local.get $0) + ) + (local.get $1) + ) + + ;; CHECK: (func $copies-and-then-set-without-interfering (result i32) + ;; CHECK-NEXT: (local $0 i32) + ;; CHECK-NEXT: (local.set $0 + ;; CHECK-NEXT: (i32.const 100) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (nop) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (local.get $0) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (local.get $0) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (local.set $0 + ;; CHECK-NEXT: (i32.const 123) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (local.get $0) + ;; CHECK-NEXT: ) + (func $copies-and-then-set-without-interfering (result i32) + (local $0 i32) + (local $1 i32) + (local.set $0 + (i32.const 100) + ) + (local.set $1 + (local.get $0) + ) + (drop + (local.get $0) + ) + (drop + (local.get $1) + ) + ;; Similar to the above, but now $0's live range has ended (there is no get + ;; of it at the point of this set), and so there is no interference, and + ;; these locals can be coalesced. + (local.set $1 + (i32.const 123) + ) + (local.get $1) + ) + + ;; CHECK: (func $copy-third-party (result i32) + ;; CHECK-NEXT: (local $0 i32) + ;; CHECK-NEXT: (local.set $0 + ;; CHECK-NEXT: (i32.const 100) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (nop) + ;; CHECK-NEXT: (nop) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (local.get $0) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (local.get $0) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (local.get $0) + ;; CHECK-NEXT: ) + (func $copy-third-party (result i32) + (local $0 i32) + (local $1 i32) + (local $2 i32) + ;; $2 begins with a value, which is copied to $0 and $1. None of these + ;; interfere and they can all be coalesced. + (local.set $2 + (i32.const 100) + ) + (local.set $1 + (local.get $2) + ) + (local.set $0 + (local.get $2) + ) + (drop + (local.get $0) + ) + (drop + (local.get $1) + ) + (local.get $2) + ) + + ;; CHECK: (func $ineffective-set (result i32) + ;; CHECK-NEXT: (local $0 i32) + ;; CHECK-NEXT: (local $1 i32) + ;; CHECK-NEXT: (local.set $0 + ;; CHECK-NEXT: (i32.const 100) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (local.get $0) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (local.get $1) + ;; CHECK-NEXT: ) + (func $ineffective-set (result i32) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local.set $0 + ;; This set of $2 is ineffective in that there are no gets of $2, but the + ;; value does flow through to the outer set, and we must notice that. In + ;; particular, we must see that $0 and $1 conflict, and cannot be coalesced + ;; together ($1 is alive from the zero init to the very end, and so $0's + ;; set means it diverges). + (local.tee $2 + (i32.const 100) + ) + ) + (drop + (local.get $0) + ) + (local.get $1) + ) + + ;; CHECK: (func $inter-block-copy (result i32) + ;; CHECK-NEXT: (local $0 i32) + ;; CHECK-NEXT: (local $1 i32) + ;; CHECK-NEXT: (local.set $0 + ;; CHECK-NEXT: (i32.const 100) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (nop) + ;; CHECK-NEXT: (nop) + ;; CHECK-NEXT: (if + ;; CHECK-NEXT: (local.get $0) + ;; CHECK-NEXT: (local.set $1 + ;; CHECK-NEXT: (local.get $0) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (local.set $1 + ;; CHECK-NEXT: (local.get $0) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (local.get $0) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (local.get $0) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (local.get $0) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (local.get $1) + ;; CHECK-NEXT: ) + (func $inter-block-copy (result i32) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local.set $0 + (i32.const 100) + ) + (local.set $1 + (local.get $0) + ) + (local.set $2 + (local.get $0) + ) + ;; At this point $1 is equal to $2, as they are both copies of $0. Then the + ;; if assigns one of them to $3, which means that $3 is also equal to them + ;; all. However, we only analyze copied values *inside* blocks, which means + ;; that in each of the if arms we see that $3 is assigned either the value + ;; of $1 or $2, but we don't know that those values are both equal to $0. As + ;; a result, we will infer that $3 interfers with $0, as their live ranges + ;; overlap and $3 is assigned a value that looks different than $0. This + ;; will prevent $3 being coalesced with all the others. (However, see the + ;; next testcase for more on this.) + (if + (local.get $0) + (local.set $3 + (local.get $1) + ) + (local.set $3 + (local.get $2) + ) + ) + (drop + (local.get $0) + ) + (drop + (local.get $1) + ) + (drop + (local.get $2) + ) + (local.get $3) + ) + + ;; CHECK: (func $inter-block-copy-second-pass (result i32) + ;; CHECK-NEXT: (local $0 i32) + ;; CHECK-NEXT: (local.set $0 + ;; CHECK-NEXT: (i32.const 100) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (nop) + ;; CHECK-NEXT: (nop) + ;; CHECK-NEXT: (if + ;; CHECK-NEXT: (local.get $0) + ;; CHECK-NEXT: (nop) + ;; CHECK-NEXT: (nop) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (local.get $0) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (local.get $0) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (local.get $0) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (local.get $0) + ;; CHECK-NEXT: ) + (func $inter-block-copy-second-pass (result i32) + (local $0 i32) + (local $1 i32) + ;; This function contains the output of the previous testcase + ;; $inter-block-copy, and shows what running a second pass results in. After + ;; the first pass we have coalesced the original $0, $1, and $2 into a single + ;; local ($0), and renamed the original $3 into $1. At this point the + ;; algorithm can see that $0 and $1 do not interfere: there are no copies in + ;; the middle, and in both if arms when we assign a value to $1 it is the + ;; value already in $0, and there is no other assignment of either one that + ;; appears in their overlapping live ranges, so they will be coalesced into + ;; a single local. + (local.set $0 + (i32.const 100) + ) + (nop) + (nop) + (if + (local.get $0) + (local.set $1 + (local.get $0) + ) + (local.set $1 + (local.get $0) + ) + ) + (drop + (local.get $0) + ) + (drop + (local.get $0) + ) + (drop + (local.get $0) + ) + (local.get $1) + ) ) diff --git a/test/lit/passes/inlining-optimizing_optimize-level=3.wast b/test/lit/passes/inlining-optimizing_optimize-level=3.wast index 3a5e89e67..11eea40ff 100644 --- a/test/lit/passes/inlining-optimizing_optimize-level=3.wast +++ b/test/lit/passes/inlining-optimizing_optimize-level=3.wast @@ -316,14 +316,11 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: (call $abort) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $4 - ;; CHECK-NEXT: (local.tee $0 - ;; CHECK-NEXT: (global.get $STACKTOP) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) ;; CHECK-NEXT: (global.set $STACKTOP ;; CHECK-NEXT: (i32.add - ;; CHECK-NEXT: (local.get $0) + ;; CHECK-NEXT: (local.tee $4 + ;; CHECK-NEXT: (global.get $STACKTOP) + ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.const 16) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -343,14 +340,11 @@ ;; CHECK-NEXT: (i32.const 8) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $2 - ;; CHECK-NEXT: (local.tee $1 - ;; CHECK-NEXT: (global.get $STACKTOP) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) ;; CHECK-NEXT: (global.set $STACKTOP ;; CHECK-NEXT: (i32.add - ;; CHECK-NEXT: (local.get $1) + ;; CHECK-NEXT: (local.tee $1 + ;; CHECK-NEXT: (global.get $STACKTOP) + ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.const 224) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -361,15 +355,15 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: (call $abort) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $1 + ;; CHECK-NEXT: (local.set $2 ;; CHECK-NEXT: (i32.add - ;; CHECK-NEXT: (local.get $2) + ;; CHECK-NEXT: (local.get $1) ;; CHECK-NEXT: (i32.const 120) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $5 ;; CHECK-NEXT: (i32.add - ;; CHECK-NEXT: (local.get $2) + ;; CHECK-NEXT: (local.get $1) ;; CHECK-NEXT: (i32.const 136) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -378,7 +372,7 @@ ;; CHECK-NEXT: (local.tee $3 ;; CHECK-NEXT: (local.tee $7 ;; CHECK-NEXT: (i32.add - ;; CHECK-NEXT: (local.get $2) + ;; CHECK-NEXT: (local.get $1) ;; CHECK-NEXT: (i32.const 80) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -404,7 +398,7 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.store - ;; CHECK-NEXT: (local.get $1) + ;; CHECK-NEXT: (local.get $2) ;; CHECK-NEXT: (i32.load ;; CHECK-NEXT: (local.get $4) ;; CHECK-NEXT: ) @@ -415,8 +409,8 @@ ;; CHECK-NEXT: (call $_printf_core ;; CHECK-NEXT: (i32.const 0) ;; CHECK-NEXT: (i32.const 672) - ;; CHECK-NEXT: (local.get $1) ;; CHECK-NEXT: (local.get $2) + ;; CHECK-NEXT: (local.get $1) ;; CHECK-NEXT: (local.get $7) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.const 0) @@ -461,8 +455,8 @@ ;; CHECK-NEXT: (call $_printf_core ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: (i32.const 672) - ;; CHECK-NEXT: (local.get $1) ;; CHECK-NEXT: (local.get $2) + ;; CHECK-NEXT: (local.get $1) ;; CHECK-NEXT: (local.get $7) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -515,12 +509,12 @@ ;; CHECK-NEXT: (i32.const 80) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $1 + ;; CHECK-NEXT: (local.set $2 ;; CHECK-NEXT: (call $_printf_core ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: (i32.const 672) - ;; CHECK-NEXT: (local.get $1) ;; CHECK-NEXT: (local.get $2) + ;; CHECK-NEXT: (local.get $1) ;; CHECK-NEXT: (local.get $7) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -589,7 +583,7 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (global.set $STACKTOP - ;; CHECK-NEXT: (local.get $2) + ;; CHECK-NEXT: (local.get $1) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (global.set $STACKTOP ;; CHECK-NEXT: (local.get $4) @@ -4063,8 +4057,8 @@ ;; CHECK-NEXT: (local $21 i32) ;; CHECK-NEXT: (local $22 i32) ;; CHECK-NEXT: (local $23 i32) - ;; CHECK-NEXT: (local $24 f64) - ;; CHECK-NEXT: (local $25 i32) + ;; CHECK-NEXT: (local $24 i32) + ;; CHECK-NEXT: (local $25 f64) ;; CHECK-NEXT: (local $26 i32) ;; CHECK-NEXT: (local $27 i32) ;; CHECK-NEXT: (local $28 i32) @@ -4085,9 +4079,6 @@ ;; CHECK-NEXT: (local $43 i32) ;; CHECK-NEXT: (local $44 i32) ;; CHECK-NEXT: (local $45 i32) - ;; CHECK-NEXT: (local $46 i32) - ;; CHECK-NEXT: (local $47 i32) - ;; CHECK-NEXT: (local $48 i32) ;; CHECK-NEXT: (local.set $13 ;; CHECK-NEXT: (local.tee $5 ;; CHECK-NEXT: (global.get $STACKTOP) @@ -4118,34 +4109,32 @@ ;; CHECK-NEXT: (i32.const 528) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $28 + ;; CHECK-NEXT: (local.set $29 ;; CHECK-NEXT: (i32.ne ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: (i32.const 0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $37 - ;; CHECK-NEXT: (local.tee $25 - ;; CHECK-NEXT: (i32.add - ;; CHECK-NEXT: (local.tee $5 - ;; CHECK-NEXT: (i32.add - ;; CHECK-NEXT: (local.get $13) - ;; CHECK-NEXT: (i32.const 536) - ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (local.set $23 + ;; CHECK-NEXT: (i32.add + ;; CHECK-NEXT: (local.tee $5 + ;; CHECK-NEXT: (i32.add + ;; CHECK-NEXT: (local.get $13) + ;; CHECK-NEXT: (i32.const 536) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (i32.const 40) ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (i32.const 40) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $38 + ;; CHECK-NEXT: (local.set $36 ;; CHECK-NEXT: (i32.add ;; CHECK-NEXT: (local.get $5) ;; CHECK-NEXT: (i32.const 39) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $42 + ;; CHECK-NEXT: (local.set $39 ;; CHECK-NEXT: (i32.add - ;; CHECK-NEXT: (local.tee $39 + ;; CHECK-NEXT: (local.tee $37 ;; CHECK-NEXT: (i32.add ;; CHECK-NEXT: (local.get $13) ;; CHECK-NEXT: (i32.const 8) @@ -4154,7 +4143,7 @@ ;; CHECK-NEXT: (i32.const 4) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $22 + ;; CHECK-NEXT: (local.set $24 ;; CHECK-NEXT: (i32.add ;; CHECK-NEXT: (local.tee $5 ;; CHECK-NEXT: (i32.add @@ -4165,40 +4154,38 @@ ;; CHECK-NEXT: (i32.const 12) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $40 + ;; CHECK-NEXT: (local.set $38 ;; CHECK-NEXT: (i32.add ;; CHECK-NEXT: (local.get $5) ;; CHECK-NEXT: (i32.const 11) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $43 + ;; CHECK-NEXT: (local.set $40 ;; CHECK-NEXT: (i32.sub - ;; CHECK-NEXT: (local.get $22) - ;; CHECK-NEXT: (local.tee $34 - ;; CHECK-NEXT: (local.tee $23 - ;; CHECK-NEXT: (i32.add - ;; CHECK-NEXT: (local.get $13) - ;; CHECK-NEXT: (i32.const 588) - ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (local.get $24) + ;; CHECK-NEXT: (local.tee $22 + ;; CHECK-NEXT: (i32.add + ;; CHECK-NEXT: (local.get $13) + ;; CHECK-NEXT: (i32.const 588) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $44 + ;; CHECK-NEXT: (local.set $41 ;; CHECK-NEXT: (i32.sub ;; CHECK-NEXT: (i32.const -2) - ;; CHECK-NEXT: (local.get $34) + ;; CHECK-NEXT: (local.get $22) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $45 + ;; CHECK-NEXT: (local.set $42 ;; CHECK-NEXT: (i32.add - ;; CHECK-NEXT: (local.get $22) + ;; CHECK-NEXT: (local.get $24) ;; CHECK-NEXT: (i32.const 2) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $47 + ;; CHECK-NEXT: (local.set $44 ;; CHECK-NEXT: (i32.add - ;; CHECK-NEXT: (local.tee $46 + ;; CHECK-NEXT: (local.tee $43 ;; CHECK-NEXT: (i32.add ;; CHECK-NEXT: (local.get $13) ;; CHECK-NEXT: (i32.const 24) @@ -4207,17 +4194,15 @@ ;; CHECK-NEXT: (i32.const 288) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $41 - ;; CHECK-NEXT: (local.tee $29 - ;; CHECK-NEXT: (i32.add - ;; CHECK-NEXT: (local.get $23) - ;; CHECK-NEXT: (i32.const 9) - ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (local.set $27 + ;; CHECK-NEXT: (i32.add + ;; CHECK-NEXT: (local.get $22) + ;; CHECK-NEXT: (i32.const 9) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $32 ;; CHECK-NEXT: (i32.add - ;; CHECK-NEXT: (local.get $23) + ;; CHECK-NEXT: (local.get $22) ;; CHECK-NEXT: (i32.const 8) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -4239,7 +4224,7 @@ ;; CHECK-NEXT: (local.set $18 ;; CHECK-NEXT: (if (result i32) ;; CHECK-NEXT: (i32.gt_s - ;; CHECK-NEXT: (local.get $11) + ;; CHECK-NEXT: (local.get $10) ;; CHECK-NEXT: (i32.sub ;; CHECK-NEXT: (i32.const 2147483647) ;; CHECK-NEXT: (local.get $18) @@ -4253,7 +4238,7 @@ ;; CHECK-NEXT: (i32.const -1) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.add - ;; CHECK-NEXT: (local.get $11) + ;; CHECK-NEXT: (local.get $10) ;; CHECK-NEXT: (local.get $18) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -4268,7 +4253,7 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $11 + ;; CHECK-NEXT: (local.set $10 ;; CHECK-NEXT: (local.get $5) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (block $label$break$L12 @@ -4289,20 +4274,20 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $6 - ;; CHECK-NEXT: (local.get $11) + ;; CHECK-NEXT: (local.get $10) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (br $__rjti$1) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $6 - ;; CHECK-NEXT: (local.get $11) + ;; CHECK-NEXT: (local.get $10) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (br $label$break$L9) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $7 ;; CHECK-NEXT: (i32.load8_s - ;; CHECK-NEXT: (local.tee $11 + ;; CHECK-NEXT: (local.tee $10 ;; CHECK-NEXT: (i32.add - ;; CHECK-NEXT: (local.get $11) + ;; CHECK-NEXT: (local.get $10) ;; CHECK-NEXT: (i32.const 1) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -4322,9 +4307,9 @@ ;; CHECK-NEXT: (i32.const 37) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $11 + ;; CHECK-NEXT: (local.set $10 ;; CHECK-NEXT: (i32.add - ;; CHECK-NEXT: (local.get $11) + ;; CHECK-NEXT: (local.get $10) ;; CHECK-NEXT: (i32.const 1) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -4345,12 +4330,12 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $7 ;; CHECK-NEXT: (i32.sub - ;; CHECK-NEXT: (local.get $11) + ;; CHECK-NEXT: (local.get $10) ;; CHECK-NEXT: (local.get $5) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (if - ;; CHECK-NEXT: (local.get $28) + ;; CHECK-NEXT: (local.get $29) ;; CHECK-NEXT: (if ;; CHECK-NEXT: (i32.eqz ;; CHECK-NEXT: (i32.and @@ -4372,13 +4357,13 @@ ;; CHECK-NEXT: (if ;; CHECK-NEXT: (i32.ne ;; CHECK-NEXT: (local.get $5) - ;; CHECK-NEXT: (local.get $11) + ;; CHECK-NEXT: (local.get $10) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (block ;; CHECK-NEXT: (local.set $5 ;; CHECK-NEXT: (local.get $6) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $11 + ;; CHECK-NEXT: (local.set $10 ;; CHECK-NEXT: (local.get $7) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (br $label$continue$L1) @@ -4391,7 +4376,7 @@ ;; CHECK-NEXT: (i32.sub ;; CHECK-NEXT: (local.tee $9 ;; CHECK-NEXT: (i32.load8_s - ;; CHECK-NEXT: (local.tee $11 + ;; CHECK-NEXT: (local.tee $10 ;; CHECK-NEXT: (i32.add ;; CHECK-NEXT: (local.get $6) ;; CHECK-NEXT: (i32.const 1) @@ -4407,13 +4392,13 @@ ;; CHECK-NEXT: (block (result i32) ;; CHECK-NEXT: (local.set $6 ;; CHECK-NEXT: (i32.load8_s - ;; CHECK-NEXT: (local.tee $11 + ;; CHECK-NEXT: (local.tee $10 ;; CHECK-NEXT: (select ;; CHECK-NEXT: (i32.add ;; CHECK-NEXT: (local.get $6) ;; CHECK-NEXT: (i32.const 3) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.get $11) + ;; CHECK-NEXT: (local.get $10) ;; CHECK-NEXT: (local.tee $9 ;; CHECK-NEXT: (i32.eq ;; CHECK-NEXT: (i32.load8_s offset=2 @@ -4524,9 +4509,9 @@ ;; CHECK-NEXT: (local.tee $6 ;; CHECK-NEXT: (local.tee $1 ;; CHECK-NEXT: (i32.load8_s - ;; CHECK-NEXT: (local.tee $11 + ;; CHECK-NEXT: (local.tee $10 ;; CHECK-NEXT: (i32.add - ;; CHECK-NEXT: (local.get $11) + ;; CHECK-NEXT: (local.get $10) ;; CHECK-NEXT: (i32.const 1) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -4557,7 +4542,7 @@ ;; CHECK-NEXT: (i32.const 42) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (block $do-once5 (result i32) - ;; CHECK-NEXT: (local.set $11 + ;; CHECK-NEXT: (local.set $10 ;; CHECK-NEXT: (block $__rjto$0 (result i32) ;; CHECK-NEXT: (block $__rjti$0 ;; CHECK-NEXT: (br_if $__rjti$0 @@ -4567,7 +4552,7 @@ ;; CHECK-NEXT: (i32.load8_s ;; CHECK-NEXT: (local.tee $6 ;; CHECK-NEXT: (i32.add - ;; CHECK-NEXT: (local.get $11) + ;; CHECK-NEXT: (local.get $10) ;; CHECK-NEXT: (i32.const 1) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -4581,7 +4566,7 @@ ;; CHECK-NEXT: (br_if $__rjti$0 ;; CHECK-NEXT: (i32.ne ;; CHECK-NEXT: (i32.load8_s offset=2 - ;; CHECK-NEXT: (local.get $11) + ;; CHECK-NEXT: (local.get $10) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.const 36) ;; CHECK-NEXT: ) @@ -4617,14 +4602,14 @@ ;; CHECK-NEXT: (local.set $8 ;; CHECK-NEXT: (i32.const 1) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $17 + ;; CHECK-NEXT: (local.set $16 ;; CHECK-NEXT: (i32.load ;; CHECK-NEXT: (local.get $6) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (br $__rjto$0 ;; CHECK-NEXT: (i32.add - ;; CHECK-NEXT: (local.get $11) + ;; CHECK-NEXT: (local.get $10) ;; CHECK-NEXT: (i32.const 3) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -4640,16 +4625,16 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: (if ;; CHECK-NEXT: (i32.eqz - ;; CHECK-NEXT: (local.get $28) + ;; CHECK-NEXT: (local.get $29) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (block ;; CHECK-NEXT: (local.set $9 ;; CHECK-NEXT: (local.get $1) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $11 + ;; CHECK-NEXT: (local.set $10 ;; CHECK-NEXT: (local.get $6) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $17 + ;; CHECK-NEXT: (local.set $16 ;; CHECK-NEXT: (i32.const 0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (br $do-once5 @@ -4657,9 +4642,9 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $17 + ;; CHECK-NEXT: (local.set $16 ;; CHECK-NEXT: (i32.load - ;; CHECK-NEXT: (local.tee $11 + ;; CHECK-NEXT: (local.tee $10 ;; CHECK-NEXT: (i32.and ;; CHECK-NEXT: (i32.add ;; CHECK-NEXT: (i32.load @@ -4675,7 +4660,7 @@ ;; CHECK-NEXT: (i32.store ;; CHECK-NEXT: (local.get $2) ;; CHECK-NEXT: (i32.add - ;; CHECK-NEXT: (local.get $11) + ;; CHECK-NEXT: (local.get $10) ;; CHECK-NEXT: (i32.const 4) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -4688,14 +4673,14 @@ ;; CHECK-NEXT: (local.set $9 ;; CHECK-NEXT: (if (result i32) ;; CHECK-NEXT: (i32.lt_s - ;; CHECK-NEXT: (local.get $17) + ;; CHECK-NEXT: (local.get $16) ;; CHECK-NEXT: (i32.const 0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (block (result i32) - ;; CHECK-NEXT: (local.set $17 + ;; CHECK-NEXT: (local.set $16 ;; CHECK-NEXT: (i32.sub ;; CHECK-NEXT: (i32.const 0) - ;; CHECK-NEXT: (local.get $17) + ;; CHECK-NEXT: (local.get $16) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.or @@ -4740,12 +4725,12 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: (if ;; CHECK-NEXT: (i32.lt_u - ;; CHECK-NEXT: (local.tee $10 + ;; CHECK-NEXT: (local.tee $11 ;; CHECK-NEXT: (i32.sub ;; CHECK-NEXT: (i32.load8_s - ;; CHECK-NEXT: (local.tee $11 + ;; CHECK-NEXT: (local.tee $10 ;; CHECK-NEXT: (i32.add - ;; CHECK-NEXT: (local.get $11) + ;; CHECK-NEXT: (local.get $10) ;; CHECK-NEXT: (i32.const 1) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -4760,7 +4745,7 @@ ;; CHECK-NEXT: (local.get $6) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $6 - ;; CHECK-NEXT: (local.get $10) + ;; CHECK-NEXT: (local.get $11) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (br $while-in8) ;; CHECK-NEXT: ) @@ -4781,7 +4766,7 @@ ;; CHECK-NEXT: (local.set $9 ;; CHECK-NEXT: (local.get $1) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $17 + ;; CHECK-NEXT: (local.set $16 ;; CHECK-NEXT: (local.get $6) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.get $8) @@ -4792,7 +4777,7 @@ ;; CHECK-NEXT: (local.set $9 ;; CHECK-NEXT: (local.get $1) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $17 + ;; CHECK-NEXT: (local.set $16 ;; CHECK-NEXT: (i32.const 0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.get $8) @@ -4804,7 +4789,7 @@ ;; CHECK-NEXT: (if (result i32) ;; CHECK-NEXT: (i32.eq ;; CHECK-NEXT: (i32.load8_s - ;; CHECK-NEXT: (local.get $11) + ;; CHECK-NEXT: (local.get $10) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.const 46) ;; CHECK-NEXT: ) @@ -4815,7 +4800,7 @@ ;; CHECK-NEXT: (i32.load8_s ;; CHECK-NEXT: (local.tee $6 ;; CHECK-NEXT: (i32.add - ;; CHECK-NEXT: (local.get $11) + ;; CHECK-NEXT: (local.get $10) ;; CHECK-NEXT: (i32.const 1) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -4827,7 +4812,7 @@ ;; CHECK-NEXT: (local.set $6 ;; CHECK-NEXT: (if (result i32) ;; CHECK-NEXT: (i32.lt_u - ;; CHECK-NEXT: (local.tee $10 + ;; CHECK-NEXT: (local.tee $11 ;; CHECK-NEXT: (i32.sub ;; CHECK-NEXT: (local.get $8) ;; CHECK-NEXT: (i32.const 48) @@ -4836,16 +4821,16 @@ ;; CHECK-NEXT: (i32.const 10) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (block (result i32) - ;; CHECK-NEXT: (local.set $11 + ;; CHECK-NEXT: (local.set $10 ;; CHECK-NEXT: (local.get $6) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $8 ;; CHECK-NEXT: (i32.const 0) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.get $10) + ;; CHECK-NEXT: (local.get $11) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (block - ;; CHECK-NEXT: (local.set $11 + ;; CHECK-NEXT: (local.set $10 ;; CHECK-NEXT: (local.get $6) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (br $label$break$L46 @@ -4870,9 +4855,9 @@ ;; CHECK-NEXT: (local.tee $6 ;; CHECK-NEXT: (i32.sub ;; CHECK-NEXT: (i32.load8_s - ;; CHECK-NEXT: (local.tee $11 + ;; CHECK-NEXT: (local.tee $10 ;; CHECK-NEXT: (i32.add - ;; CHECK-NEXT: (local.get $11) + ;; CHECK-NEXT: (local.get $10) ;; CHECK-NEXT: (i32.const 1) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -4895,7 +4880,7 @@ ;; CHECK-NEXT: (i32.load8_s ;; CHECK-NEXT: (local.tee $6 ;; CHECK-NEXT: (i32.add - ;; CHECK-NEXT: (local.get $11) + ;; CHECK-NEXT: (local.get $10) ;; CHECK-NEXT: (i32.const 2) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -4908,7 +4893,7 @@ ;; CHECK-NEXT: (if ;; CHECK-NEXT: (i32.eq ;; CHECK-NEXT: (i32.load8_s offset=3 - ;; CHECK-NEXT: (local.get $11) + ;; CHECK-NEXT: (local.get $10) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.const 36) ;; CHECK-NEXT: ) @@ -4941,9 +4926,9 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $11 + ;; CHECK-NEXT: (local.set $10 ;; CHECK-NEXT: (i32.add - ;; CHECK-NEXT: (local.get $11) + ;; CHECK-NEXT: (local.get $10) ;; CHECK-NEXT: (i32.const 4) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -4965,11 +4950,11 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (if (result i32) - ;; CHECK-NEXT: (local.get $28) + ;; CHECK-NEXT: (local.get $29) ;; CHECK-NEXT: (block (result i32) ;; CHECK-NEXT: (local.set $8 ;; CHECK-NEXT: (i32.load - ;; CHECK-NEXT: (local.tee $11 + ;; CHECK-NEXT: (local.tee $10 ;; CHECK-NEXT: (i32.and ;; CHECK-NEXT: (i32.add ;; CHECK-NEXT: (i32.load @@ -4985,17 +4970,17 @@ ;; CHECK-NEXT: (i32.store ;; CHECK-NEXT: (local.get $2) ;; CHECK-NEXT: (i32.add - ;; CHECK-NEXT: (local.get $11) + ;; CHECK-NEXT: (local.get $10) ;; CHECK-NEXT: (i32.const 4) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $11 + ;; CHECK-NEXT: (local.set $10 ;; CHECK-NEXT: (local.get $6) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.get $8) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (block (result i32) - ;; CHECK-NEXT: (local.set $11 + ;; CHECK-NEXT: (local.set $10 ;; CHECK-NEXT: (local.get $6) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.const 0) @@ -5006,9 +4991,9 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $8 - ;; CHECK-NEXT: (local.get $11) + ;; CHECK-NEXT: (local.get $10) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $10 + ;; CHECK-NEXT: (local.set $11 ;; CHECK-NEXT: (i32.const 0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (loop $while-in13 @@ -5031,7 +5016,7 @@ ;; CHECK-NEXT: (br $label$break$L1) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $11 + ;; CHECK-NEXT: (local.set $10 ;; CHECK-NEXT: (i32.add ;; CHECK-NEXT: (local.get $8) ;; CHECK-NEXT: (i32.const 1) @@ -5047,7 +5032,7 @@ ;; CHECK-NEXT: (i32.add ;; CHECK-NEXT: (i32.add ;; CHECK-NEXT: (i32.mul - ;; CHECK-NEXT: (local.get $10) + ;; CHECK-NEXT: (local.get $11) ;; CHECK-NEXT: (i32.const 58) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.const 3611) @@ -5065,9 +5050,9 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: (block ;; CHECK-NEXT: (local.set $8 - ;; CHECK-NEXT: (local.get $11) + ;; CHECK-NEXT: (local.get $10) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $10 + ;; CHECK-NEXT: (local.set $11 ;; CHECK-NEXT: (local.get $12) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (br $while-in13) @@ -5088,7 +5073,7 @@ ;; CHECK-NEXT: (br $label$break$L1) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $16 + ;; CHECK-NEXT: (local.set $17 ;; CHECK-NEXT: (i32.ge_s ;; CHECK-NEXT: (local.get $19) ;; CHECK-NEXT: (i32.const 0) @@ -5105,7 +5090,7 @@ ;; CHECK-NEXT: (i32.const 19) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (if - ;; CHECK-NEXT: (local.get $16) + ;; CHECK-NEXT: (local.get $17) ;; CHECK-NEXT: (block ;; CHECK-NEXT: (local.set $18 ;; CHECK-NEXT: (i32.const -1) @@ -5116,7 +5101,7 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: (block ;; CHECK-NEXT: (if - ;; CHECK-NEXT: (local.get $16) + ;; CHECK-NEXT: (local.get $17) ;; CHECK-NEXT: (block ;; CHECK-NEXT: (i32.store ;; CHECK-NEXT: (i32.add @@ -5156,7 +5141,7 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: (if ;; CHECK-NEXT: (i32.eqz - ;; CHECK-NEXT: (local.get $28) + ;; CHECK-NEXT: (local.get $29) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (block ;; CHECK-NEXT: (local.set $18 @@ -5176,13 +5161,13 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: (if ;; CHECK-NEXT: (i32.eqz - ;; CHECK-NEXT: (local.get $28) + ;; CHECK-NEXT: (local.get $29) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (block ;; CHECK-NEXT: (local.set $5 - ;; CHECK-NEXT: (local.get $11) + ;; CHECK-NEXT: (local.get $10) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $11 + ;; CHECK-NEXT: (local.set $10 ;; CHECK-NEXT: (local.get $7) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (br $label$continue$L1) @@ -5220,7 +5205,7 @@ ;; CHECK-NEXT: (call $_pad ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: (i32.const 32) - ;; CHECK-NEXT: (local.get $17) + ;; CHECK-NEXT: (local.get $16) ;; CHECK-NEXT: (local.tee $7 ;; CHECK-NEXT: (block $__rjti$7 (result i32) ;; CHECK-NEXT: (block $__rjti$6 @@ -5262,7 +5247,7 @@ ;; CHECK-NEXT: (i32.const 3) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.ne - ;; CHECK-NEXT: (local.get $10) + ;; CHECK-NEXT: (local.get $11) ;; CHECK-NEXT: (i32.const 0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -5281,7 +5266,7 @@ ;; CHECK-NEXT: (block $switch-case20 ;; CHECK-NEXT: (block $switch-case19 ;; CHECK-NEXT: (br_table $switch-case19 $switch-case20 $switch-case21 $switch-case22 $switch-case23 $switch-default26 $switch-case24 $switch-case25 $switch-default26 - ;; CHECK-NEXT: (local.get $10) + ;; CHECK-NEXT: (local.get $11) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.store @@ -5291,9 +5276,9 @@ ;; CHECK-NEXT: (local.get $18) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $5 - ;; CHECK-NEXT: (local.get $11) + ;; CHECK-NEXT: (local.get $10) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $11 + ;; CHECK-NEXT: (local.set $10 ;; CHECK-NEXT: (local.get $7) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (br $label$continue$L1) @@ -5305,9 +5290,9 @@ ;; CHECK-NEXT: (local.get $18) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $5 - ;; CHECK-NEXT: (local.get $11) + ;; CHECK-NEXT: (local.get $10) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $11 + ;; CHECK-NEXT: (local.set $10 ;; CHECK-NEXT: (local.get $7) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (br $label$continue$L1) @@ -5334,9 +5319,9 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $5 - ;; CHECK-NEXT: (local.get $11) + ;; CHECK-NEXT: (local.get $10) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $11 + ;; CHECK-NEXT: (local.set $10 ;; CHECK-NEXT: (local.get $7) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (br $label$continue$L1) @@ -5348,9 +5333,9 @@ ;; CHECK-NEXT: (local.get $18) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $5 - ;; CHECK-NEXT: (local.get $11) + ;; CHECK-NEXT: (local.get $10) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $11 + ;; CHECK-NEXT: (local.set $10 ;; CHECK-NEXT: (local.get $7) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (br $label$continue$L1) @@ -5362,9 +5347,9 @@ ;; CHECK-NEXT: (local.get $18) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $5 - ;; CHECK-NEXT: (local.get $11) + ;; CHECK-NEXT: (local.get $10) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $11 + ;; CHECK-NEXT: (local.set $10 ;; CHECK-NEXT: (local.get $7) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (br $label$continue$L1) @@ -5376,9 +5361,9 @@ ;; CHECK-NEXT: (local.get $18) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $5 - ;; CHECK-NEXT: (local.get $11) + ;; CHECK-NEXT: (local.get $10) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $11 + ;; CHECK-NEXT: (local.set $10 ;; CHECK-NEXT: (local.get $7) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (br $label$continue$L1) @@ -5405,17 +5390,17 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $5 - ;; CHECK-NEXT: (local.get $11) + ;; CHECK-NEXT: (local.get $10) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $11 + ;; CHECK-NEXT: (local.set $10 ;; CHECK-NEXT: (local.get $7) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (br $label$continue$L1) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $5 - ;; CHECK-NEXT: (local.get $11) + ;; CHECK-NEXT: (local.get $10) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $11 + ;; CHECK-NEXT: (local.set $10 ;; CHECK-NEXT: (local.get $7) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (br $label$continue$L1) @@ -5461,7 +5446,7 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: (block ;; CHECK-NEXT: (local.set $8 - ;; CHECK-NEXT: (local.get $25) + ;; CHECK-NEXT: (local.get $23) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (loop $while-in32 ;; CHECK-NEXT: (i32.store8 @@ -5496,7 +5481,7 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $8 - ;; CHECK-NEXT: (local.get $25) + ;; CHECK-NEXT: (local.get $23) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (if @@ -5513,7 +5498,7 @@ ;; CHECK-NEXT: (local.tee $5 ;; CHECK-NEXT: (i32.add ;; CHECK-NEXT: (i32.sub - ;; CHECK-NEXT: (local.get $37) + ;; CHECK-NEXT: (local.get $23) ;; CHECK-NEXT: (local.get $8) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.const 1) @@ -5537,7 +5522,7 @@ ;; CHECK-NEXT: (local.set $8 ;; CHECK-NEXT: (i32.const 0) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $10 + ;; CHECK-NEXT: (local.set $11 ;; CHECK-NEXT: (i32.const 4091) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (br $__rjti$8) @@ -5587,13 +5572,13 @@ ;; CHECK-NEXT: (local.set $8 ;; CHECK-NEXT: (i32.const 1) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $10 + ;; CHECK-NEXT: (local.set $11 ;; CHECK-NEXT: (i32.const 4091) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (br $__rjti$4) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $10 + ;; CHECK-NEXT: (local.set $11 ;; CHECK-NEXT: (if (result i32) ;; CHECK-NEXT: (i32.and ;; CHECK-NEXT: (local.get $9) @@ -5605,20 +5590,15 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.const 4092) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (block (result i32) - ;; CHECK-NEXT: (local.set $8 - ;; CHECK-NEXT: (local.tee $10 - ;; CHECK-NEXT: (i32.and - ;; CHECK-NEXT: (local.get $9) - ;; CHECK-NEXT: (i32.const 1) - ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (select + ;; CHECK-NEXT: (i32.const 4093) + ;; CHECK-NEXT: (i32.const 4091) + ;; CHECK-NEXT: (local.tee $8 + ;; CHECK-NEXT: (i32.and + ;; CHECK-NEXT: (local.get $9) + ;; CHECK-NEXT: (i32.const 1) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (select - ;; CHECK-NEXT: (i32.const 4093) - ;; CHECK-NEXT: (i32.const 4091) - ;; CHECK-NEXT: (local.get $10) - ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -5637,7 +5617,7 @@ ;; CHECK-NEXT: (local.set $8 ;; CHECK-NEXT: (i32.const 0) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $10 + ;; CHECK-NEXT: (local.set $11 ;; CHECK-NEXT: (i32.const 4091) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (br $__rjti$4) @@ -5648,13 +5628,13 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.store8 - ;; CHECK-NEXT: (local.get $38) + ;; CHECK-NEXT: (local.get $36) ;; CHECK-NEXT: (i32.load ;; CHECK-NEXT: (local.get $13) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $7 - ;; CHECK-NEXT: (local.get $38) + ;; CHECK-NEXT: (local.get $36) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $9 ;; CHECK-NEXT: (local.get $12) @@ -5665,11 +5645,11 @@ ;; CHECK-NEXT: (local.set $8 ;; CHECK-NEXT: (i32.const 0) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $10 + ;; CHECK-NEXT: (local.set $11 ;; CHECK-NEXT: (i32.const 4091) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (br $__rjto$8 - ;; CHECK-NEXT: (local.get $25) + ;; CHECK-NEXT: (local.get $23) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $5 @@ -5774,18 +5754,18 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.store - ;; CHECK-NEXT: (local.get $39) + ;; CHECK-NEXT: (local.get $37) ;; CHECK-NEXT: (i32.load ;; CHECK-NEXT: (local.get $13) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.store - ;; CHECK-NEXT: (local.get $42) + ;; CHECK-NEXT: (local.get $39) ;; CHECK-NEXT: (i32.const 0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.store ;; CHECK-NEXT: (local.get $13) - ;; CHECK-NEXT: (local.get $39) + ;; CHECK-NEXT: (local.get $37) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $8 ;; CHECK-NEXT: (i32.const -1) @@ -5804,7 +5784,7 @@ ;; CHECK-NEXT: (call $_pad ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: (i32.const 32) - ;; CHECK-NEXT: (local.get $17) + ;; CHECK-NEXT: (local.get $16) ;; CHECK-NEXT: (i32.const 0) ;; CHECK-NEXT: (local.get $9) ;; CHECK-NEXT: ) @@ -5843,7 +5823,7 @@ ;; CHECK-NEXT: (i32.const 0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (block (result i32) - ;; CHECK-NEXT: (local.set $27 + ;; CHECK-NEXT: (local.set $28 ;; CHECK-NEXT: (i32.const 1) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $14 @@ -5859,13 +5839,13 @@ ;; CHECK-NEXT: (i32.const 2048) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (block (result i32) - ;; CHECK-NEXT: (local.set $27 + ;; CHECK-NEXT: (local.set $28 ;; CHECK-NEXT: (i32.const 1) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.const 4111) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (block (result i32) - ;; CHECK-NEXT: (local.set $27 + ;; CHECK-NEXT: (local.set $28 ;; CHECK-NEXT: (local.tee $5 ;; CHECK-NEXT: (i32.and ;; CHECK-NEXT: (local.get $9) @@ -5908,7 +5888,7 @@ ;; CHECK-NEXT: (if ;; CHECK-NEXT: (local.tee $5 ;; CHECK-NEXT: (f64.ne - ;; CHECK-NEXT: (local.tee $24 + ;; CHECK-NEXT: (local.tee $25 ;; CHECK-NEXT: (f64.mul ;; CHECK-NEXT: (call $_frexp ;; CHECK-NEXT: (local.get $14) @@ -5941,14 +5921,14 @@ ;; CHECK-NEXT: (i32.const 97) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (block - ;; CHECK-NEXT: (local.set $10 + ;; CHECK-NEXT: (local.set $11 ;; CHECK-NEXT: (select ;; CHECK-NEXT: (i32.add ;; CHECK-NEXT: (local.get $30) ;; CHECK-NEXT: (i32.const 9) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.get $30) - ;; CHECK-NEXT: (local.tee $16 + ;; CHECK-NEXT: (local.tee $17 ;; CHECK-NEXT: (i32.and ;; CHECK-NEXT: (local.get $15) ;; CHECK-NEXT: (i32.const 32) @@ -5972,7 +5952,7 @@ ;; CHECK-NEXT: (i32.const 11) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.get $24) + ;; CHECK-NEXT: (local.get $25) ;; CHECK-NEXT: (block (result f64) ;; CHECK-NEXT: (local.set $14 ;; CHECK-NEXT: (f64.const 8) @@ -5999,7 +5979,7 @@ ;; CHECK-NEXT: (local.get $14) ;; CHECK-NEXT: (f64.sub ;; CHECK-NEXT: (f64.neg - ;; CHECK-NEXT: (local.get $24) + ;; CHECK-NEXT: (local.get $25) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.get $14) ;; CHECK-NEXT: ) @@ -6007,14 +5987,14 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: (f64.sub ;; CHECK-NEXT: (f64.add - ;; CHECK-NEXT: (local.get $24) + ;; CHECK-NEXT: (local.get $25) ;; CHECK-NEXT: (local.get $14) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.get $14) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.eq ;; CHECK-NEXT: (i32.load8_s - ;; CHECK-NEXT: (local.get $10) + ;; CHECK-NEXT: (local.get $11) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.const 45) ;; CHECK-NEXT: ) @@ -6024,7 +6004,7 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $12 ;; CHECK-NEXT: (i32.or - ;; CHECK-NEXT: (local.get $27) + ;; CHECK-NEXT: (local.get $28) ;; CHECK-NEXT: (i32.const 2) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -6059,18 +6039,18 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.const 31) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.get $22) + ;; CHECK-NEXT: (local.get $24) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.get $22) + ;; CHECK-NEXT: (local.get $24) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (block ;; CHECK-NEXT: (i32.store8 - ;; CHECK-NEXT: (local.get $40) + ;; CHECK-NEXT: (local.get $38) ;; CHECK-NEXT: (i32.const 48) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $5 - ;; CHECK-NEXT: (local.get $40) + ;; CHECK-NEXT: (local.get $38) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -6117,7 +6097,7 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $5 - ;; CHECK-NEXT: (local.get $23) + ;; CHECK-NEXT: (local.get $22) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (loop $while-in56 ;; CHECK-NEXT: (i32.store8 @@ -6154,7 +6134,7 @@ ;; CHECK-NEXT: (i32.const 4075) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.get $16) + ;; CHECK-NEXT: (local.get $17) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $14 @@ -6178,7 +6158,7 @@ ;; CHECK-NEXT: (i32.const 1) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.get $34) + ;; CHECK-NEXT: (local.get $22) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.const 1) ;; CHECK-NEXT: ) @@ -6218,7 +6198,7 @@ ;; CHECK-NEXT: (call $_pad ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: (i32.const 32) - ;; CHECK-NEXT: (local.get $17) + ;; CHECK-NEXT: (local.get $16) ;; CHECK-NEXT: (local.tee $7 ;; CHECK-NEXT: (i32.add ;; CHECK-NEXT: (local.tee $6 @@ -6226,13 +6206,13 @@ ;; CHECK-NEXT: (i32.sub ;; CHECK-NEXT: (i32.add ;; CHECK-NEXT: (local.get $6) - ;; CHECK-NEXT: (local.get $45) + ;; CHECK-NEXT: (local.get $42) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.get $8) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.add ;; CHECK-NEXT: (i32.sub - ;; CHECK-NEXT: (local.get $43) + ;; CHECK-NEXT: (local.get $40) ;; CHECK-NEXT: (local.get $8) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.get $5) @@ -6245,7 +6225,7 @@ ;; CHECK-NEXT: (i32.lt_s ;; CHECK-NEXT: (i32.add ;; CHECK-NEXT: (local.get $5) - ;; CHECK-NEXT: (local.get $44) + ;; CHECK-NEXT: (local.get $41) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.get $6) ;; CHECK-NEXT: ) @@ -6268,7 +6248,7 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: (drop ;; CHECK-NEXT: (call $___fwritex - ;; CHECK-NEXT: (local.get $10) + ;; CHECK-NEXT: (local.get $11) ;; CHECK-NEXT: (local.get $12) ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: ) @@ -6277,7 +6257,7 @@ ;; CHECK-NEXT: (call $_pad ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: (i32.const 48) - ;; CHECK-NEXT: (local.get $17) + ;; CHECK-NEXT: (local.get $16) ;; CHECK-NEXT: (local.get $7) ;; CHECK-NEXT: (i32.xor ;; CHECK-NEXT: (local.get $9) @@ -6287,7 +6267,7 @@ ;; CHECK-NEXT: (local.set $5 ;; CHECK-NEXT: (i32.sub ;; CHECK-NEXT: (local.get $5) - ;; CHECK-NEXT: (local.get $34) + ;; CHECK-NEXT: (local.get $22) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (if @@ -6301,7 +6281,7 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: (drop ;; CHECK-NEXT: (call $___fwritex - ;; CHECK-NEXT: (local.get $23) + ;; CHECK-NEXT: (local.get $22) ;; CHECK-NEXT: (local.get $5) ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: ) @@ -6316,7 +6296,7 @@ ;; CHECK-NEXT: (local.get $5) ;; CHECK-NEXT: (local.tee $6 ;; CHECK-NEXT: (i32.sub - ;; CHECK-NEXT: (local.get $22) + ;; CHECK-NEXT: (local.get $24) ;; CHECK-NEXT: (local.get $8) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -6345,7 +6325,7 @@ ;; CHECK-NEXT: (call $_pad ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: (i32.const 32) - ;; CHECK-NEXT: (local.get $17) + ;; CHECK-NEXT: (local.get $16) ;; CHECK-NEXT: (local.get $7) ;; CHECK-NEXT: (i32.xor ;; CHECK-NEXT: (local.get $9) @@ -6354,11 +6334,11 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: (br $do-once49 ;; CHECK-NEXT: (select - ;; CHECK-NEXT: (local.get $17) + ;; CHECK-NEXT: (local.get $16) ;; CHECK-NEXT: (local.get $7) ;; CHECK-NEXT: (i32.lt_s ;; CHECK-NEXT: (local.get $7) - ;; CHECK-NEXT: (local.get $17) + ;; CHECK-NEXT: (local.get $16) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -6380,7 +6360,7 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (f64.mul - ;; CHECK-NEXT: (local.get $24) + ;; CHECK-NEXT: (local.get $25) ;; CHECK-NEXT: (f64.const 268435456) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -6390,15 +6370,15 @@ ;; CHECK-NEXT: (local.get $21) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.get $24) + ;; CHECK-NEXT: (local.get $25) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $7 ;; CHECK-NEXT: (local.tee $8 ;; CHECK-NEXT: (select - ;; CHECK-NEXT: (local.get $46) - ;; CHECK-NEXT: (local.get $47) + ;; CHECK-NEXT: (local.get $43) + ;; CHECK-NEXT: (local.get $44) ;; CHECK-NEXT: (i32.lt_s ;; CHECK-NEXT: (local.get $5) ;; CHECK-NEXT: (i32.const 0) @@ -6461,7 +6441,7 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: (if ;; CHECK-NEXT: (i32.gt_s - ;; CHECK-NEXT: (local.tee $10 + ;; CHECK-NEXT: (local.tee $11 ;; CHECK-NEXT: (i32.load ;; CHECK-NEXT: (local.get $21) ;; CHECK-NEXT: ) @@ -6473,19 +6453,19 @@ ;; CHECK-NEXT: (local.get $8) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (loop $while-in62 - ;; CHECK-NEXT: (local.set $16 + ;; CHECK-NEXT: (local.set $17 ;; CHECK-NEXT: (select ;; CHECK-NEXT: (i32.const 29) - ;; CHECK-NEXT: (local.get $10) + ;; CHECK-NEXT: (local.get $11) ;; CHECK-NEXT: (i32.gt_s - ;; CHECK-NEXT: (local.get $10) + ;; CHECK-NEXT: (local.get $11) ;; CHECK-NEXT: (i32.const 29) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (if ;; CHECK-NEXT: (i32.ge_u - ;; CHECK-NEXT: (local.tee $10 + ;; CHECK-NEXT: (local.tee $11 ;; CHECK-NEXT: (i32.sub ;; CHECK-NEXT: (local.get $7) ;; CHECK-NEXT: (i32.const 4) @@ -6499,7 +6479,7 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: (loop $while-in66 ;; CHECK-NEXT: (i32.store - ;; CHECK-NEXT: (local.get $10) + ;; CHECK-NEXT: (local.get $11) ;; CHECK-NEXT: (call $___uremdi3 ;; CHECK-NEXT: (block (result i32) ;; CHECK-NEXT: (global.set $tempRet0 @@ -6508,10 +6488,10 @@ ;; CHECK-NEXT: (local.tee $20 ;; CHECK-NEXT: (call $_bitshift64Shl ;; CHECK-NEXT: (i32.load - ;; CHECK-NEXT: (local.get $10) + ;; CHECK-NEXT: (local.get $11) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.const 0) - ;; CHECK-NEXT: (local.get $16) + ;; CHECK-NEXT: (local.get $17) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.tee $12 @@ -6543,9 +6523,9 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: (br_if $while-in66 ;; CHECK-NEXT: (i32.ge_u - ;; CHECK-NEXT: (local.tee $10 + ;; CHECK-NEXT: (local.tee $11 ;; CHECK-NEXT: (i32.sub - ;; CHECK-NEXT: (local.get $10) + ;; CHECK-NEXT: (local.get $11) ;; CHECK-NEXT: (i32.const 4) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -6578,7 +6558,7 @@ ;; CHECK-NEXT: (if ;; CHECK-NEXT: (i32.eqz ;; CHECK-NEXT: (i32.load - ;; CHECK-NEXT: (local.tee $10 + ;; CHECK-NEXT: (local.tee $11 ;; CHECK-NEXT: (i32.sub ;; CHECK-NEXT: (local.get $7) ;; CHECK-NEXT: (i32.const 4) @@ -6588,7 +6568,7 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: (block ;; CHECK-NEXT: (local.set $7 - ;; CHECK-NEXT: (local.get $10) + ;; CHECK-NEXT: (local.get $11) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (br $while-in68) ;; CHECK-NEXT: ) @@ -6597,18 +6577,18 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.store ;; CHECK-NEXT: (local.get $21) - ;; CHECK-NEXT: (local.tee $10 + ;; CHECK-NEXT: (local.tee $11 ;; CHECK-NEXT: (i32.sub ;; CHECK-NEXT: (i32.load ;; CHECK-NEXT: (local.get $21) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.get $16) + ;; CHECK-NEXT: (local.get $17) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (br_if $while-in62 ;; CHECK-NEXT: (i32.gt_s - ;; CHECK-NEXT: (local.get $10) + ;; CHECK-NEXT: (local.get $11) ;; CHECK-NEXT: (i32.const 0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -6630,7 +6610,7 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: (if ;; CHECK-NEXT: (i32.lt_s - ;; CHECK-NEXT: (local.get $10) + ;; CHECK-NEXT: (local.get $11) ;; CHECK-NEXT: (i32.const 0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (block @@ -6660,13 +6640,13 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $5 ;; CHECK-NEXT: (loop $while-in70 (result i32) - ;; CHECK-NEXT: (local.set $16 + ;; CHECK-NEXT: (local.set $17 ;; CHECK-NEXT: (select ;; CHECK-NEXT: (i32.const 9) ;; CHECK-NEXT: (local.tee $7 ;; CHECK-NEXT: (i32.sub ;; CHECK-NEXT: (i32.const 0) - ;; CHECK-NEXT: (local.get $10) + ;; CHECK-NEXT: (local.get $11) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.gt_s @@ -6685,18 +6665,18 @@ ;; CHECK-NEXT: (i32.sub ;; CHECK-NEXT: (i32.shl ;; CHECK-NEXT: (i32.const 1) - ;; CHECK-NEXT: (local.get $16) + ;; CHECK-NEXT: (local.get $17) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.const 1) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $35 + ;; CHECK-NEXT: (local.set $34 ;; CHECK-NEXT: (i32.shr_u ;; CHECK-NEXT: (i32.const 1000000000) - ;; CHECK-NEXT: (local.get $16) + ;; CHECK-NEXT: (local.get $17) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $10 + ;; CHECK-NEXT: (local.set $11 ;; CHECK-NEXT: (i32.const 0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $7 @@ -6706,24 +6686,24 @@ ;; CHECK-NEXT: (i32.store ;; CHECK-NEXT: (local.get $7) ;; CHECK-NEXT: (i32.add - ;; CHECK-NEXT: (local.get $10) + ;; CHECK-NEXT: (local.get $11) ;; CHECK-NEXT: (i32.shr_u - ;; CHECK-NEXT: (local.tee $10 + ;; CHECK-NEXT: (local.tee $11 ;; CHECK-NEXT: (i32.load ;; CHECK-NEXT: (local.get $7) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.get $16) + ;; CHECK-NEXT: (local.get $17) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $10 + ;; CHECK-NEXT: (local.set $11 ;; CHECK-NEXT: (i32.mul ;; CHECK-NEXT: (i32.and - ;; CHECK-NEXT: (local.get $10) + ;; CHECK-NEXT: (local.get $11) ;; CHECK-NEXT: (local.get $12) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.get $35) + ;; CHECK-NEXT: (local.get $34) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (br_if $while-in74 @@ -6752,12 +6732,12 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: (br_if $do-once71 ;; CHECK-NEXT: (i32.eqz - ;; CHECK-NEXT: (local.get $10) + ;; CHECK-NEXT: (local.get $11) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.store ;; CHECK-NEXT: (local.get $5) - ;; CHECK-NEXT: (local.get $10) + ;; CHECK-NEXT: (local.get $11) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $5 ;; CHECK-NEXT: (i32.add @@ -6809,18 +6789,18 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.store ;; CHECK-NEXT: (local.get $21) - ;; CHECK-NEXT: (local.tee $10 + ;; CHECK-NEXT: (local.tee $11 ;; CHECK-NEXT: (i32.add ;; CHECK-NEXT: (i32.load ;; CHECK-NEXT: (local.get $21) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.get $16) + ;; CHECK-NEXT: (local.get $17) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (if (result i32) ;; CHECK-NEXT: (i32.lt_s - ;; CHECK-NEXT: (local.get $10) + ;; CHECK-NEXT: (local.get $11) ;; CHECK-NEXT: (i32.const 0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (block @@ -6833,7 +6813,7 @@ ;; CHECK-NEXT: (br $while-in70) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (block (result i32) - ;; CHECK-NEXT: (local.set $10 + ;; CHECK-NEXT: (local.set $11 ;; CHECK-NEXT: (local.get $12) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.get $7) @@ -6842,7 +6822,7 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $10 + ;; CHECK-NEXT: (local.set $11 ;; CHECK-NEXT: (local.get $7) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -6852,7 +6832,7 @@ ;; CHECK-NEXT: (if ;; CHECK-NEXT: (i32.lt_u ;; CHECK-NEXT: (local.get $5) - ;; CHECK-NEXT: (local.get $10) + ;; CHECK-NEXT: (local.get $11) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (block $do-once75 ;; CHECK-NEXT: (local.set $7 @@ -6929,7 +6909,7 @@ ;; CHECK-NEXT: (i32.const 0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.tee $35 + ;; CHECK-NEXT: (local.tee $34 ;; CHECK-NEXT: (i32.eq ;; CHECK-NEXT: (local.get $26) ;; CHECK-NEXT: (i32.const 103) @@ -6946,7 +6926,7 @@ ;; CHECK-NEXT: (i32.mul ;; CHECK-NEXT: (i32.shr_s ;; CHECK-NEXT: (i32.sub - ;; CHECK-NEXT: (local.get $10) + ;; CHECK-NEXT: (local.get $11) ;; CHECK-NEXT: (local.get $20) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.const 2) @@ -7009,29 +6989,27 @@ ;; CHECK-NEXT: (i32.const 10) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $16 - ;; CHECK-NEXT: (local.tee $8 - ;; CHECK-NEXT: (i32.load - ;; CHECK-NEXT: (local.tee $6 - ;; CHECK-NEXT: (i32.sub - ;; CHECK-NEXT: (i32.add - ;; CHECK-NEXT: (local.get $20) - ;; CHECK-NEXT: (i32.shl - ;; CHECK-NEXT: (local.get $8) - ;; CHECK-NEXT: (i32.const 2) - ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (local.set $8 + ;; CHECK-NEXT: (i32.load + ;; CHECK-NEXT: (local.tee $6 + ;; CHECK-NEXT: (i32.sub + ;; CHECK-NEXT: (i32.add + ;; CHECK-NEXT: (local.get $20) + ;; CHECK-NEXT: (i32.shl + ;; CHECK-NEXT: (local.get $8) + ;; CHECK-NEXT: (i32.const 2) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (i32.const 4092) ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (i32.const 4092) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $16 + ;; CHECK-NEXT: (local.set $17 ;; CHECK-NEXT: (if (result i32) ;; CHECK-NEXT: (local.get $12) ;; CHECK-NEXT: (i32.rem_u - ;; CHECK-NEXT: (local.get $16) + ;; CHECK-NEXT: (local.get $8) ;; CHECK-NEXT: (local.get $12) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.const 0) @@ -7046,16 +7024,16 @@ ;; CHECK-NEXT: (local.get $6) ;; CHECK-NEXT: (i32.const 4) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.get $10) + ;; CHECK-NEXT: (local.get $11) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.eqz - ;; CHECK-NEXT: (local.get $16) + ;; CHECK-NEXT: (local.get $17) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (block $do-once81 - ;; CHECK-NEXT: (local.set $36 + ;; CHECK-NEXT: (local.set $35 ;; CHECK-NEXT: (if (result i32) ;; CHECK-NEXT: (local.get $12) ;; CHECK-NEXT: (i32.div_u @@ -7068,8 +7046,8 @@ ;; CHECK-NEXT: (local.set $14 ;; CHECK-NEXT: (if (result f64) ;; CHECK-NEXT: (i32.lt_u - ;; CHECK-NEXT: (local.get $16) - ;; CHECK-NEXT: (local.tee $48 + ;; CHECK-NEXT: (local.get $17) + ;; CHECK-NEXT: (local.tee $45 ;; CHECK-NEXT: (i32.div_s ;; CHECK-NEXT: (local.get $12) ;; CHECK-NEXT: (i32.const 2) @@ -7083,25 +7061,25 @@ ;; CHECK-NEXT: (i32.and ;; CHECK-NEXT: (local.get $26) ;; CHECK-NEXT: (i32.eq - ;; CHECK-NEXT: (local.get $16) - ;; CHECK-NEXT: (local.get $48) + ;; CHECK-NEXT: (local.get $17) + ;; CHECK-NEXT: (local.get $45) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $24 + ;; CHECK-NEXT: (local.set $25 ;; CHECK-NEXT: (select ;; CHECK-NEXT: (f64.const 9007199254740994) ;; CHECK-NEXT: (f64.const 9007199254740992) ;; CHECK-NEXT: (i32.and - ;; CHECK-NEXT: (local.get $36) + ;; CHECK-NEXT: (local.get $35) ;; CHECK-NEXT: (i32.const 1) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (if - ;; CHECK-NEXT: (local.get $27) + ;; CHECK-NEXT: (local.get $28) ;; CHECK-NEXT: (if ;; CHECK-NEXT: (i32.eq ;; CHECK-NEXT: (i32.load8_s @@ -7110,9 +7088,9 @@ ;; CHECK-NEXT: (i32.const 45) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (block - ;; CHECK-NEXT: (local.set $24 + ;; CHECK-NEXT: (local.set $25 ;; CHECK-NEXT: (f64.neg - ;; CHECK-NEXT: (local.get $24) + ;; CHECK-NEXT: (local.get $25) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $14 @@ -7128,17 +7106,17 @@ ;; CHECK-NEXT: (local.tee $8 ;; CHECK-NEXT: (i32.sub ;; CHECK-NEXT: (local.get $8) - ;; CHECK-NEXT: (local.get $16) + ;; CHECK-NEXT: (local.get $17) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (br_if $do-once81 ;; CHECK-NEXT: (f64.eq ;; CHECK-NEXT: (f64.add - ;; CHECK-NEXT: (local.get $24) + ;; CHECK-NEXT: (local.get $25) ;; CHECK-NEXT: (local.get $14) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.get $24) + ;; CHECK-NEXT: (local.get $25) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.store @@ -7258,10 +7236,10 @@ ;; CHECK-NEXT: (i32.const 4) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.get $10) + ;; CHECK-NEXT: (local.get $11) ;; CHECK-NEXT: (i32.lt_u ;; CHECK-NEXT: (local.get $5) - ;; CHECK-NEXT: (local.get $10) + ;; CHECK-NEXT: (local.get $11) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -7272,17 +7250,17 @@ ;; CHECK-NEXT: (local.set $8 ;; CHECK-NEXT: (local.get $7) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.get $10) + ;; CHECK-NEXT: (local.get $11) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $36 + ;; CHECK-NEXT: (local.set $35 ;; CHECK-NEXT: (i32.sub ;; CHECK-NEXT: (i32.const 0) ;; CHECK-NEXT: (local.get $8) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $10 + ;; CHECK-NEXT: (local.set $11 ;; CHECK-NEXT: (loop $while-in90 (result i32) ;; CHECK-NEXT: (block $while-out89 (result i32) ;; CHECK-NEXT: (if @@ -7327,14 +7305,14 @@ ;; CHECK-NEXT: (call $_pad ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: (i32.const 32) - ;; CHECK-NEXT: (local.get $17) + ;; CHECK-NEXT: (local.get $16) ;; CHECK-NEXT: (local.tee $8 ;; CHECK-NEXT: (i32.add ;; CHECK-NEXT: (i32.add ;; CHECK-NEXT: (i32.add ;; CHECK-NEXT: (local.tee $5 ;; CHECK-NEXT: (if (result i32) - ;; CHECK-NEXT: (local.get $35) + ;; CHECK-NEXT: (local.get $34) ;; CHECK-NEXT: (block $do-once91 (result i32) ;; CHECK-NEXT: (local.set $7 ;; CHECK-NEXT: (if (result i32) @@ -7387,7 +7365,7 @@ ;; CHECK-NEXT: (drop ;; CHECK-NEXT: (br_if $do-once91 ;; CHECK-NEXT: (local.get $19) - ;; CHECK-NEXT: (local.tee $16 + ;; CHECK-NEXT: (local.tee $17 ;; CHECK-NEXT: (i32.and ;; CHECK-NEXT: (local.get $9) ;; CHECK-NEXT: (i32.const 8) @@ -7403,7 +7381,7 @@ ;; CHECK-NEXT: (local.tee $15 ;; CHECK-NEXT: (i32.load ;; CHECK-NEXT: (i32.sub - ;; CHECK-NEXT: (local.get $10) + ;; CHECK-NEXT: (local.get $11) ;; CHECK-NEXT: (i32.const 4) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -7446,17 +7424,15 @@ ;; CHECK-NEXT: (br_if $while-in96 ;; CHECK-NEXT: (i32.eqz ;; CHECK-NEXT: (if (result i32) - ;; CHECK-NEXT: (local.tee $16 - ;; CHECK-NEXT: (local.tee $6 - ;; CHECK-NEXT: (i32.mul - ;; CHECK-NEXT: (local.get $6) - ;; CHECK-NEXT: (i32.const 10) - ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (local.tee $6 + ;; CHECK-NEXT: (i32.mul + ;; CHECK-NEXT: (local.get $6) + ;; CHECK-NEXT: (i32.const 10) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.rem_u ;; CHECK-NEXT: (local.get $15) - ;; CHECK-NEXT: (local.get $16) + ;; CHECK-NEXT: (local.get $6) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.const 0) ;; CHECK-NEXT: ) @@ -7473,7 +7449,7 @@ ;; CHECK-NEXT: (i32.mul ;; CHECK-NEXT: (i32.shr_s ;; CHECK-NEXT: (i32.sub - ;; CHECK-NEXT: (local.get $10) + ;; CHECK-NEXT: (local.get $11) ;; CHECK-NEXT: (local.get $20) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.const 2) @@ -7492,7 +7468,7 @@ ;; CHECK-NEXT: (i32.const 102) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (block (result i32) - ;; CHECK-NEXT: (local.set $16 + ;; CHECK-NEXT: (local.set $17 ;; CHECK-NEXT: (i32.const 0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (select @@ -7519,7 +7495,7 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (block (result i32) - ;; CHECK-NEXT: (local.set $16 + ;; CHECK-NEXT: (local.set $17 ;; CHECK-NEXT: (i32.const 0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (select @@ -7551,7 +7527,7 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (block (result i32) - ;; CHECK-NEXT: (local.set $16 + ;; CHECK-NEXT: (local.set $17 ;; CHECK-NEXT: (i32.and ;; CHECK-NEXT: (local.get $9) ;; CHECK-NEXT: (i32.const 8) @@ -7565,7 +7541,7 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.add - ;; CHECK-NEXT: (local.get $27) + ;; CHECK-NEXT: (local.get $28) ;; CHECK-NEXT: (i32.const 1) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -7573,7 +7549,7 @@ ;; CHECK-NEXT: (local.tee $19 ;; CHECK-NEXT: (i32.or ;; CHECK-NEXT: (local.get $5) - ;; CHECK-NEXT: (local.get $16) + ;; CHECK-NEXT: (local.get $17) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.const 0) @@ -7606,12 +7582,12 @@ ;; CHECK-NEXT: (if ;; CHECK-NEXT: (i32.lt_s ;; CHECK-NEXT: (i32.sub - ;; CHECK-NEXT: (local.get $22) + ;; CHECK-NEXT: (local.get $24) ;; CHECK-NEXT: (local.tee $6 ;; CHECK-NEXT: (call $_fmt_u ;; CHECK-NEXT: (local.tee $6 ;; CHECK-NEXT: (select - ;; CHECK-NEXT: (local.get $36) + ;; CHECK-NEXT: (local.get $35) ;; CHECK-NEXT: (local.get $8) ;; CHECK-NEXT: (i32.lt_s ;; CHECK-NEXT: (local.get $8) @@ -7629,7 +7605,7 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.const 31) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.get $22) + ;; CHECK-NEXT: (local.get $24) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -7648,7 +7624,7 @@ ;; CHECK-NEXT: (br_if $while-in98 ;; CHECK-NEXT: (i32.lt_s ;; CHECK-NEXT: (i32.sub - ;; CHECK-NEXT: (local.get $22) + ;; CHECK-NEXT: (local.get $24) ;; CHECK-NEXT: (local.get $6) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.const 2) @@ -7682,7 +7658,7 @@ ;; CHECK-NEXT: (local.get $7) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.sub - ;; CHECK-NEXT: (local.get $22) + ;; CHECK-NEXT: (local.get $24) ;; CHECK-NEXT: (local.get $15) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -7703,7 +7679,7 @@ ;; CHECK-NEXT: (drop ;; CHECK-NEXT: (call $___fwritex ;; CHECK-NEXT: (local.get $30) - ;; CHECK-NEXT: (local.get $27) + ;; CHECK-NEXT: (local.get $28) ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -7711,7 +7687,7 @@ ;; CHECK-NEXT: (call $_pad ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: (i32.const 48) - ;; CHECK-NEXT: (local.get $17) + ;; CHECK-NEXT: (local.get $16) ;; CHECK-NEXT: (local.get $8) ;; CHECK-NEXT: (i32.xor ;; CHECK-NEXT: (local.get $9) @@ -7740,7 +7716,7 @@ ;; CHECK-NEXT: (local.get $6) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.const 0) - ;; CHECK-NEXT: (local.get $29) + ;; CHECK-NEXT: (local.get $27) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (block $do-once103 @@ -7753,7 +7729,7 @@ ;; CHECK-NEXT: (br_if $do-once103 ;; CHECK-NEXT: (i32.ne ;; CHECK-NEXT: (local.get $7) - ;; CHECK-NEXT: (local.get $29) + ;; CHECK-NEXT: (local.get $27) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.store8 @@ -7768,7 +7744,7 @@ ;; CHECK-NEXT: (br_if $do-once103 ;; CHECK-NEXT: (i32.le_u ;; CHECK-NEXT: (local.get $7) - ;; CHECK-NEXT: (local.get $23) + ;; CHECK-NEXT: (local.get $22) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (loop $while-in106 @@ -7784,7 +7760,7 @@ ;; CHECK-NEXT: (br_if $while-in106 ;; CHECK-NEXT: (i32.gt_u ;; CHECK-NEXT: (local.get $7) - ;; CHECK-NEXT: (local.get $23) + ;; CHECK-NEXT: (local.get $22) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -7804,7 +7780,7 @@ ;; CHECK-NEXT: (call $___fwritex ;; CHECK-NEXT: (local.get $7) ;; CHECK-NEXT: (i32.sub - ;; CHECK-NEXT: (local.get $41) + ;; CHECK-NEXT: (local.get $27) ;; CHECK-NEXT: (local.get $7) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.get $0) @@ -7857,7 +7833,7 @@ ;; CHECK-NEXT: (i32.and ;; CHECK-NEXT: (i32.lt_u ;; CHECK-NEXT: (local.get $7) - ;; CHECK-NEXT: (local.get $10) + ;; CHECK-NEXT: (local.get $11) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.gt_s ;; CHECK-NEXT: (local.get $5) @@ -7873,10 +7849,10 @@ ;; CHECK-NEXT: (local.get $7) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.const 0) - ;; CHECK-NEXT: (local.get $29) + ;; CHECK-NEXT: (local.get $27) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.get $23) + ;; CHECK-NEXT: (local.get $22) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (loop $while-in112 ;; CHECK-NEXT: (i32.store8 @@ -7891,7 +7867,7 @@ ;; CHECK-NEXT: (br_if $while-in112 ;; CHECK-NEXT: (i32.gt_u ;; CHECK-NEXT: (local.get $6) - ;; CHECK-NEXT: (local.get $23) + ;; CHECK-NEXT: (local.get $22) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -7935,7 +7911,7 @@ ;; CHECK-NEXT: (i32.const 4) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.get $10) + ;; CHECK-NEXT: (local.get $11) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.gt_s ;; CHECK-NEXT: (local.get $5) @@ -7962,7 +7938,7 @@ ;; CHECK-NEXT: (block $do-once99 ;; CHECK-NEXT: (local.set $20 ;; CHECK-NEXT: (select - ;; CHECK-NEXT: (local.get $10) + ;; CHECK-NEXT: (local.get $11) ;; CHECK-NEXT: (i32.add ;; CHECK-NEXT: (local.get $12) ;; CHECK-NEXT: (i32.const 4) @@ -7980,9 +7956,9 @@ ;; CHECK-NEXT: (i32.const 0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (block (result i32) - ;; CHECK-NEXT: (local.set $16 + ;; CHECK-NEXT: (local.set $17 ;; CHECK-NEXT: (i32.eqz - ;; CHECK-NEXT: (local.get $16) + ;; CHECK-NEXT: (local.get $17) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $6 @@ -8000,10 +7976,10 @@ ;; CHECK-NEXT: (local.get $6) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.const 0) - ;; CHECK-NEXT: (local.get $29) + ;; CHECK-NEXT: (local.get $27) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.get $29) + ;; CHECK-NEXT: (local.get $27) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (block ;; CHECK-NEXT: (i32.store8 @@ -8047,7 +8023,7 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: (br_if $do-once115 ;; CHECK-NEXT: (i32.and - ;; CHECK-NEXT: (local.get $16) + ;; CHECK-NEXT: (local.get $17) ;; CHECK-NEXT: (i32.le_s ;; CHECK-NEXT: (local.get $7) ;; CHECK-NEXT: (i32.const 0) @@ -8074,7 +8050,7 @@ ;; CHECK-NEXT: (br_if $do-once115 ;; CHECK-NEXT: (i32.le_u ;; CHECK-NEXT: (local.get $5) - ;; CHECK-NEXT: (local.get $23) + ;; CHECK-NEXT: (local.get $22) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (loop $while-in118 @@ -8090,16 +8066,16 @@ ;; CHECK-NEXT: (br_if $while-in118 ;; CHECK-NEXT: (i32.gt_u ;; CHECK-NEXT: (local.get $5) - ;; CHECK-NEXT: (local.get $23) + ;; CHECK-NEXT: (local.get $22) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $10 + ;; CHECK-NEXT: (local.set $11 ;; CHECK-NEXT: (i32.sub - ;; CHECK-NEXT: (local.get $41) + ;; CHECK-NEXT: (local.get $27) ;; CHECK-NEXT: (local.get $5) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -8116,11 +8092,11 @@ ;; CHECK-NEXT: (call $___fwritex ;; CHECK-NEXT: (local.get $5) ;; CHECK-NEXT: (select - ;; CHECK-NEXT: (local.get $10) + ;; CHECK-NEXT: (local.get $11) ;; CHECK-NEXT: (local.get $7) ;; CHECK-NEXT: (i32.gt_s ;; CHECK-NEXT: (local.get $7) - ;; CHECK-NEXT: (local.get $10) + ;; CHECK-NEXT: (local.get $11) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.get $0) @@ -8142,7 +8118,7 @@ ;; CHECK-NEXT: (local.tee $7 ;; CHECK-NEXT: (i32.sub ;; CHECK-NEXT: (local.get $7) - ;; CHECK-NEXT: (local.get $10) + ;; CHECK-NEXT: (local.get $11) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.const 0) @@ -8171,7 +8147,7 @@ ;; CHECK-NEXT: (call $___fwritex ;; CHECK-NEXT: (local.get $15) ;; CHECK-NEXT: (i32.sub - ;; CHECK-NEXT: (local.get $22) + ;; CHECK-NEXT: (local.get $24) ;; CHECK-NEXT: (local.get $15) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.get $0) @@ -8182,7 +8158,7 @@ ;; CHECK-NEXT: (call $_pad ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: (i32.const 32) - ;; CHECK-NEXT: (local.get $17) + ;; CHECK-NEXT: (local.get $16) ;; CHECK-NEXT: (local.get $8) ;; CHECK-NEXT: (i32.xor ;; CHECK-NEXT: (local.get $9) @@ -8190,11 +8166,11 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (select - ;; CHECK-NEXT: (local.get $17) + ;; CHECK-NEXT: (local.get $16) ;; CHECK-NEXT: (local.get $8) ;; CHECK-NEXT: (i32.lt_s ;; CHECK-NEXT: (local.get $8) - ;; CHECK-NEXT: (local.get $17) + ;; CHECK-NEXT: (local.get $16) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -8202,13 +8178,13 @@ ;; CHECK-NEXT: (call $_pad ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: (i32.const 32) - ;; CHECK-NEXT: (local.get $17) + ;; CHECK-NEXT: (local.get $16) ;; CHECK-NEXT: (local.tee $7 ;; CHECK-NEXT: (i32.add ;; CHECK-NEXT: (local.tee $8 ;; CHECK-NEXT: (select ;; CHECK-NEXT: (i32.const 0) - ;; CHECK-NEXT: (local.get $27) + ;; CHECK-NEXT: (local.get $28) ;; CHECK-NEXT: (local.tee $6 ;; CHECK-NEXT: (f64.ne ;; CHECK-NEXT: (local.get $14) @@ -8289,7 +8265,7 @@ ;; CHECK-NEXT: (call $_pad ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: (i32.const 32) - ;; CHECK-NEXT: (local.get $17) + ;; CHECK-NEXT: (local.get $16) ;; CHECK-NEXT: (local.get $7) ;; CHECK-NEXT: (i32.xor ;; CHECK-NEXT: (local.get $9) @@ -8297,20 +8273,20 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (select - ;; CHECK-NEXT: (local.get $17) + ;; CHECK-NEXT: (local.get $16) ;; CHECK-NEXT: (local.get $7) ;; CHECK-NEXT: (i32.lt_s ;; CHECK-NEXT: (local.get $7) - ;; CHECK-NEXT: (local.get $17) + ;; CHECK-NEXT: (local.get $16) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $5 - ;; CHECK-NEXT: (local.get $11) + ;; CHECK-NEXT: (local.get $10) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $11 + ;; CHECK-NEXT: (local.set $10 ;; CHECK-NEXT: (local.get $7) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (br $label$continue$L1) @@ -8324,14 +8300,14 @@ ;; CHECK-NEXT: (local.set $8 ;; CHECK-NEXT: (i32.const 0) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $10 + ;; CHECK-NEXT: (local.set $11 ;; CHECK-NEXT: (i32.const 4091) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (br $__rjto$8 - ;; CHECK-NEXT: (local.get $25) + ;; CHECK-NEXT: (local.get $23) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $10 + ;; CHECK-NEXT: (local.set $11 ;; CHECK-NEXT: (i32.and ;; CHECK-NEXT: (local.get $15) ;; CHECK-NEXT: (i32.const 32) @@ -8352,7 +8328,7 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: (block ;; CHECK-NEXT: (local.set $8 - ;; CHECK-NEXT: (local.get $25) + ;; CHECK-NEXT: (local.get $23) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $5 ;; CHECK-NEXT: (loop $while-in123 (result i32) @@ -8373,7 +8349,7 @@ ;; CHECK-NEXT: (i32.const 4075) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.get $10) + ;; CHECK-NEXT: (local.get $11) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (br_if $while-in123 @@ -8414,13 +8390,13 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (block (result i32) - ;; CHECK-NEXT: (local.set $10 + ;; CHECK-NEXT: (local.set $11 ;; CHECK-NEXT: (i32.const 4091) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.const 0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (block (result i32) - ;; CHECK-NEXT: (local.set $10 + ;; CHECK-NEXT: (local.set $11 ;; CHECK-NEXT: (i32.add ;; CHECK-NEXT: (i32.shr_s ;; CHECK-NEXT: (local.get $15) @@ -8436,12 +8412,12 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: (block ;; CHECK-NEXT: (local.set $5 - ;; CHECK-NEXT: (local.get $25) + ;; CHECK-NEXT: (local.get $23) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $8 ;; CHECK-NEXT: (i32.const 0) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $10 + ;; CHECK-NEXT: (local.set $11 ;; CHECK-NEXT: (i32.const 4091) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -8452,7 +8428,7 @@ ;; CHECK-NEXT: (call $_fmt_u ;; CHECK-NEXT: (local.get $5) ;; CHECK-NEXT: (local.get $7) - ;; CHECK-NEXT: (local.get $25) + ;; CHECK-NEXT: (local.get $23) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $7 @@ -8464,7 +8440,7 @@ ;; CHECK-NEXT: (block $__rjti$29 ;; CHECK-NEXT: (if ;; CHECK-NEXT: (i32.and - ;; CHECK-NEXT: (local.tee $10 + ;; CHECK-NEXT: (local.tee $9 ;; CHECK-NEXT: (i32.ne ;; CHECK-NEXT: (local.tee $7 ;; CHECK-NEXT: (local.get $6) @@ -8474,9 +8450,7 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.ne ;; CHECK-NEXT: (i32.and - ;; CHECK-NEXT: (local.tee $9 - ;; CHECK-NEXT: (local.get $5) - ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (local.get $5) ;; CHECK-NEXT: (i32.const 3) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.const 0) @@ -8484,7 +8458,7 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: (block ;; CHECK-NEXT: (local.set $8 - ;; CHECK-NEXT: (local.get $9) + ;; CHECK-NEXT: (local.get $5) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (loop $while-in12 ;; CHECK-NEXT: (br_if $__rjti$29 @@ -8523,13 +8497,8 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (block - ;; CHECK-NEXT: (local.set $8 - ;; CHECK-NEXT: (local.get $9) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $9 - ;; CHECK-NEXT: (local.get $10) - ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (local.set $8 + ;; CHECK-NEXT: (local.get $5) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (br_if $__rjti$29 @@ -8642,7 +8611,7 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $16 + ;; CHECK-NEXT: (local.set $17 ;; CHECK-NEXT: (i32.eqz ;; CHECK-NEXT: (local.tee $15 ;; CHECK-NEXT: (select @@ -8665,13 +8634,13 @@ ;; CHECK-NEXT: (local.get $5) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.get $16) + ;; CHECK-NEXT: (local.get $17) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $8 ;; CHECK-NEXT: (i32.const 0) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $10 + ;; CHECK-NEXT: (local.set $11 ;; CHECK-NEXT: (i32.const 4091) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (br $__rjto$8 @@ -8681,7 +8650,7 @@ ;; CHECK-NEXT: (local.get $6) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.get $15) - ;; CHECK-NEXT: (local.get $16) + ;; CHECK-NEXT: (local.get $17) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -8700,7 +8669,7 @@ ;; CHECK-NEXT: (block $while-out124 ;; CHECK-NEXT: (br_if $while-out124 ;; CHECK-NEXT: (i32.eqz - ;; CHECK-NEXT: (local.tee $10 + ;; CHECK-NEXT: (local.tee $11 ;; CHECK-NEXT: (i32.load ;; CHECK-NEXT: (local.get $6) ;; CHECK-NEXT: ) @@ -8713,7 +8682,7 @@ ;; CHECK-NEXT: (local.tee $7 ;; CHECK-NEXT: (call $_wctomb ;; CHECK-NEXT: (local.get $33) - ;; CHECK-NEXT: (local.get $10) + ;; CHECK-NEXT: (local.get $11) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.const 0) @@ -8761,7 +8730,7 @@ ;; CHECK-NEXT: (call $_pad ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: (i32.const 32) - ;; CHECK-NEXT: (local.get $17) + ;; CHECK-NEXT: (local.get $16) ;; CHECK-NEXT: (local.get $5) ;; CHECK-NEXT: (local.get $9) ;; CHECK-NEXT: ) @@ -8850,15 +8819,15 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $5 - ;; CHECK-NEXT: (local.get $11) + ;; CHECK-NEXT: (local.get $10) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $11 + ;; CHECK-NEXT: (local.set $10 ;; CHECK-NEXT: (select - ;; CHECK-NEXT: (local.get $17) + ;; CHECK-NEXT: (local.get $16) ;; CHECK-NEXT: (local.get $7) ;; CHECK-NEXT: (i32.lt_s ;; CHECK-NEXT: (local.get $7) - ;; CHECK-NEXT: (local.get $17) + ;; CHECK-NEXT: (local.get $16) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -8906,7 +8875,7 @@ ;; CHECK-NEXT: (local.get $12) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.sub - ;; CHECK-NEXT: (local.get $37) + ;; CHECK-NEXT: (local.get $23) ;; CHECK-NEXT: (local.tee $7 ;; CHECK-NEXT: (local.get $5) ;; CHECK-NEXT: ) @@ -8920,13 +8889,13 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: (block (result i32) ;; CHECK-NEXT: (local.set $7 - ;; CHECK-NEXT: (local.get $25) + ;; CHECK-NEXT: (local.get $23) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (i32.const 0) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.get $25) + ;; CHECK-NEXT: (local.get $23) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.get $7) ;; CHECK-NEXT: ) @@ -8941,10 +8910,10 @@ ;; CHECK-NEXT: (local.get $8) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.get $17) + ;; CHECK-NEXT: (local.get $16) ;; CHECK-NEXT: (i32.gt_s ;; CHECK-NEXT: (local.get $5) - ;; CHECK-NEXT: (local.get $17) + ;; CHECK-NEXT: (local.get $16) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -8962,7 +8931,7 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: (drop ;; CHECK-NEXT: (call $___fwritex - ;; CHECK-NEXT: (local.get $10) + ;; CHECK-NEXT: (local.get $11) ;; CHECK-NEXT: (local.get $8) ;; CHECK-NEXT: (local.get $0) ;; CHECK-NEXT: ) @@ -9013,9 +8982,9 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (local.set $5 - ;; CHECK-NEXT: (local.get $11) + ;; CHECK-NEXT: (local.get $10) ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (local.set $11 + ;; CHECK-NEXT: (local.set $10 ;; CHECK-NEXT: (local.get $6) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (br $label$continue$L1) diff --git a/test/passes/converge_O3_metrics.bin.txt b/test/passes/converge_O3_metrics.bin.txt index bf24bb5e2..48cc55541 100644 --- a/test/passes/converge_O3_metrics.bin.txt +++ b/test/passes/converge_O3_metrics.bin.txt @@ -7,7 +7,7 @@ total [table-data] : 429 [tables] : 0 [tags] : 0 - [total] : 552 + [total] : 551 [vars] : 2 Binary : 12 Block : 6 @@ -20,7 +20,7 @@ total If : 2 Load : 16 LocalGet : 16 - LocalSet : 7 + LocalSet : 6 Loop : 1 RefFunc : 429 Store : 5 @@ -114,20 +114,18 @@ total (if (result i32) (i32.load (i32.add - (local.tee $1 - (local.tee $0 - (i32.load - (i32.add - (i32.load - (i32.sub - (i32.load - (i32.const 18100) - ) - (i32.const 12) + (local.tee $0 + (i32.load + (i32.add + (i32.load + (i32.sub + (i32.load + (i32.const 18100) ) + (i32.const 12) ) - (i32.const 18124) ) + (i32.const 18124) ) ) ) @@ -136,7 +134,7 @@ total ) (i32.const 0) (call_indirect (type $i32_i32_=>_i32) - (local.get $1) + (local.get $0) (i32.const 10) (i32.add (i32.load offset=52 @@ -235,7 +233,7 @@ total [table-data] : 429 [tables] : 0 [tags] : 0 - [total] : 548 -4 + [total] : 547 -4 [vars] : 2 Binary : 12 Block : 6 @@ -247,7 +245,7 @@ total If : 2 Load : 16 LocalGet : 14 -2 - LocalSet : 6 -1 + LocalSet : 5 -1 Loop : 1 RefFunc : 429 Store : 5 @@ -340,20 +338,18 @@ total (if (result i32) (i32.load (i32.add - (local.tee $1 - (local.tee $0 - (i32.load - (i32.add - (i32.load - (i32.sub - (i32.load - (i32.const 18100) - ) - (i32.const 12) + (local.tee $0 + (i32.load + (i32.add + (i32.load + (i32.sub + (i32.load + (i32.const 18100) ) + (i32.const 12) ) - (i32.const 18124) ) + (i32.const 18124) ) ) ) @@ -362,7 +358,7 @@ total ) (i32.const 0) (call_indirect (type $i32_i32_=>_i32) - (local.get $1) + (local.get $0) (i32.const 10) (i32.add (i32.load offset=52 @@ -456,7 +452,7 @@ total [table-data] : 429 [tables] : 0 [tags] : 0 - [total] : 548 + [total] : 547 [vars] : 2 Binary : 12 Block : 6 @@ -468,7 +464,7 @@ total If : 2 Load : 16 LocalGet : 14 - LocalSet : 6 + LocalSet : 5 Loop : 1 RefFunc : 429 Store : 5 @@ -561,20 +557,18 @@ total (if (result i32) (i32.load (i32.add - (local.tee $1 - (local.tee $0 - (i32.load - (i32.add - (i32.load - (i32.sub - (i32.load - (i32.const 18100) - ) - (i32.const 12) + (local.tee $0 + (i32.load + (i32.add + (i32.load + (i32.sub + (i32.load + (i32.const 18100) ) + (i32.const 12) ) - (i32.const 18124) ) + (i32.const 18124) ) ) ) @@ -583,7 +577,7 @@ total ) (i32.const 0) (call_indirect (type $i32_i32_=>_i32) - (local.get $1) + (local.get $0) (i32.const 10) (i32.add (i32.load offset=52 diff --git a/test/wasm2js/i64-ctz.2asm.js.opt b/test/wasm2js/i64-ctz.2asm.js.opt index d1659d374..5fc52a8f0 100644 --- a/test/wasm2js/i64-ctz.2asm.js.opt +++ b/test/wasm2js/i64-ctz.2asm.js.opt @@ -17,11 +17,9 @@ function asmFunc(env) { var setTempRet0 = env.setTempRet0; var i64toi32_i32$HIGH_BITS = 0; function legalstub$popcnt64($0, $1) { - var $2 = 0, $3 = 0, $4 = 0, $5 = 0; + var $2 = 0, $3 = 0, $4 = 0; $2 = $1; while (1) { - $1 = $3; - $5 = $4; if ($0 | $2) { $1 = $0; $0 = $0 - 1 & $0; @@ -32,8 +30,8 @@ function asmFunc(env) { } break; }; - i64toi32_i32$HIGH_BITS = $5; - $0 = $1; + i64toi32_i32$HIGH_BITS = $4; + $0 = $3; setTempRet0(i64toi32_i32$HIGH_BITS | 0); return $0; } diff --git a/test/wasm2js/i64-rotate.2asm.js.opt b/test/wasm2js/i64-rotate.2asm.js.opt index 33c3d5350..9aeec1118 100644 --- a/test/wasm2js/i64-rotate.2asm.js.opt +++ b/test/wasm2js/i64-rotate.2asm.js.opt @@ -24,8 +24,7 @@ function asmFunc(env) { if ($6 >>> 0 >= 32) { $3 = -1 >>> $3 | 0 } else { - $6 = -1 >>> $3 | 0; - $0 = $6; + $0 = -1 >>> $3 | 0; $3 = $0 | (1 << $3) - 1 << 32 - $3; } $6 = $3 & $8; @@ -40,9 +39,8 @@ function asmFunc(env) { } $3 = $0; $2 = 0 - $2 & 63; - $7 = $2; - $0 = $7 & 31; - if ($7 >>> 0 >= 32) { + $0 = $2 & 31; + if ($2 >>> 0 >= 32) { $0 = -1 << $0; $7 = 0; } else { @@ -66,7 +64,7 @@ function asmFunc(env) { function legalstub$2($0, $1, $2, $3, $4, $5) { var $6 = 0, $7 = 0, $8 = 0, $9 = 0; - $9 = $0; + $8 = $0; $7 = $2 & 63; $3 = $7; $0 = $3 & 31; @@ -77,7 +75,7 @@ function asmFunc(env) { $3 = -1 << $0; $0 = $3 | (1 << $0) - 1 & -1 >>> 32 - $0; } - $8 = $3 & $9; + $9 = $3 & $8; $6 = $0 & $1; $3 = $7 & 31; if ($7 >>> 0 >= 32) { @@ -85,21 +83,19 @@ function asmFunc(env) { $7 = $6 >>> $3 | 0; } else { $0 = $6 >>> $3 | 0; - $7 = ((1 << $3) - 1 & $6) << 32 - $3 | $8 >>> $3; + $7 = ((1 << $3) - 1 & $6) << 32 - $3 | $9 >>> $3; } $3 = $0; $6 = 0 - $2 & 63; - $0 = $6; - $2 = $0 & 31; - if ($0 >>> 0 >= 32) { + $2 = $6 & 31; + if ($6 >>> 0 >= 32) { $0 = 0; $2 = -1 >>> $2 | 0; } else { - $8 = -1 >>> $2 | 0; - $0 = $8; + $0 = -1 >>> $2 | 0; $2 = $0 | (1 << $2) - 1 << 32 - $2; } - $2 = $2 & $9; + $2 = $2 & $8; $1 = $0 & $1; $0 = $6 & 31; if ($6 >>> 0 >= 32) { diff --git a/test/wasm2js/unary-ops.2asm.js.opt b/test/wasm2js/unary-ops.2asm.js.opt index 86eee0e0a..7bb08bde4 100644 --- a/test/wasm2js/unary-ops.2asm.js.opt +++ b/test/wasm2js/unary-ops.2asm.js.opt @@ -16,9 +16,8 @@ function asmFunc(env) { var i64toi32_i32$HIGH_BITS = 0; function $1($0) { $0 = $0 | 0; - var $1_1 = 0, $2 = 0; + var $1_1 = 0; while (1) { - $2 = $1_1; if ($0) { $0 = $0 - 1 & $0; $1_1 = $1_1 + 1 | 0; @@ -26,7 +25,7 @@ function asmFunc(env) { } break; }; - return $2 | 0; + return $1_1 | 0; } function $6($0) { @@ -45,24 +44,21 @@ function asmFunc(env) { } function legalstub$2($0, $1_1, $2, $3) { - var $4 = 0, $5 = 0, $6_1 = 0, $7_1 = 0; - $5 = $0; - $4 = $1_1; + var $4 = 0, $5 = 0, $6_1 = 0; + $4 = $0; while (1) { - $1_1 = $6_1; - $0 = $7_1; - if ($5 | $4) { - $0 = $5; - $5 = $0 - 1 & $0; - $4 = $4 - !$0 & $4; - $6_1 = $6_1 + 1 | 0; - $7_1 = $6_1 ? $7_1 : $7_1 + 1 | 0; + if ($1_1 | $4) { + $0 = $4; + $4 = $4 - 1 & $4; + $1_1 = $1_1 - !$0 & $1_1; + $5 = $5 + 1 | 0; + $6_1 = $5 ? $6_1 : $6_1 + 1 | 0; continue; } break; }; - i64toi32_i32$HIGH_BITS = $0; - return ($1_1 | 0) == ($2 | 0) & ($3 | 0) == (i64toi32_i32$HIGH_BITS | 0); + i64toi32_i32$HIGH_BITS = $6_1; + return ($2 | 0) == ($5 | 0) & ($3 | 0) == (i64toi32_i32$HIGH_BITS | 0); } function legalstub$3($0, $1_1, $2) { |