summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/passes/CoalesceLocals.cpp188
-rw-r--r--test/lit/passes/Oz.wast6
-rw-r--r--test/lit/passes/coalesce-locals-learning.wast29
-rw-r--r--test/lit/passes/coalesce-locals.wast461
-rw-r--r--test/lit/passes/inlining-optimizing_optimize-level=3.wast733
-rw-r--r--test/passes/converge_O3_metrics.bin.txt78
-rw-r--r--test/wasm2js/i64-ctz.2asm.js.opt8
-rw-r--r--test/wasm2js/i64-rotate.2asm.js.opt24
-rw-r--r--test/wasm2js/unary-ops.2asm.js.opt28
9 files changed, 1025 insertions, 530 deletions
diff --git a/src/passes/CoalesceLocals.cpp b/src/passes/CoalesceLocals.cpp
index d62981d2c..7b2505094 100644
--- a/src/passes/CoalesceLocals.cpp
+++ b/src/passes/CoalesceLocals.cpp
@@ -57,10 +57,10 @@ struct CoalesceLocals
void increaseBackEdgePriorities();
+ // Calculate interferences between locals. This will will fill
+ // the data structure |interferences|.
void calculateInterferences();
- void calculateInterferences(const SetOfLocals& locals);
-
void pickIndicesFromOrder(std::vector<Index>& order,
std::vector<Index>& indices);
void pickIndicesFromOrder(std::vector<Index>& order,
@@ -146,47 +146,180 @@ void CoalesceLocals::increaseBackEdgePriorities() {
void CoalesceLocals::calculateInterferences() {
interferences.resize(numLocals * numLocals);
std::fill(interferences.begin(), interferences.end(), false);
+
+ // We will track the values in each local, using a numbering where each index
+ // represents a unique different value. This array maps a local index to the
+ // value index it contains.
+ //
+ // To avoid reallocating this array all the time, allocate it once outside the
+ // loop.
+ std::vector<Index> values(numLocals);
+
for (auto& curr : basicBlocks) {
if (liveBlocks.count(curr.get()) == 0) {
continue; // ignore dead blocks
}
- // everything coming in might interfere, as it might come from a different
- // block
- auto live = curr->contents.end;
- calculateInterferences(live);
- // scan through the block itself
+
+ // First, find which gets end a live range. While doing so, also calculate
+ // the effectiveness of sets.
auto& actions = curr->contents.actions;
+ std::vector<bool> endsLiveRange(actions.size(), false);
+ auto live = curr->contents.end;
for (int i = int(actions.size()) - 1; i >= 0; i--) {
auto& action = actions[i];
auto index = action.index;
if (action.isGet()) {
- // new live local, interferes with all the rest
- live.insert(index);
- for (auto i : live) {
- interfere(i, index);
+ if (!live.has(index)) {
+ // The local is not live after us, so its liveness ends here.
+ endsLiveRange[i] = true;
+ live.insert(index);
}
} else {
+ // This is a set. Check if the local is alive after it; if it is then
+ // the set if effective as there is some get that can read the value.
if (live.erase(index)) {
action.effective = true;
}
}
}
+
+ // We have processed from the end of the block to the start, updating |live|
+ // as we go, and now it must be equal to the state at the start of the
+ // block. We will also use |live| in the next loop, and assume it begins
+ // in that state.
+ assert(live == curr->contents.start);
+
+ // Now that we know live ranges, check if locals interfere in this block.
+ // Locals interfere if they might contain different values on areas where
+ // their live ranges overlap. To evaluate that, we do an analysis inside
+ // the block that gives each set a unique value number, and as those flow
+ // around through copies between sets we can see when sets are guaranteed to
+ // be equal.
+
+ // Give all default values the same value ID, regardless of their type. This
+ // is valid since we only coalesce locals of the same type anyhow.
+ auto zeroInit = 0;
+ Index nextValue = 1;
+
+ if (curr.get() == entry) {
+ // Each parameter is assumed to have a different value on entry.
+ for (Index i = 0; i < getFunction()->getNumParams(); i++) {
+ values[i] = nextValue++;
+ }
+
+ for (Index i = getFunction()->getNumParams();
+ i < getFunction()->getNumLocals();
+ i++) {
+ values[i] = zeroInit;
+ }
+ } else {
+ // In any block but the entry, assume that each live local might have a
+ // different value at the start.
+ // TODO: Propagating value IDs across blocks could identify more copies,
+ // however, it would also be nonlinear.
+ for (auto index : curr->contents.start) {
+ values[index] = nextValue++;
+ }
+ }
+
+ // Traverse through the block from start to finish. We keep track of both
+ // liveness (in |live|) and the value IDs in each local (in |values|)
+ // while doing so.
+ for (Index i = 0; i < actions.size(); i++) {
+ auto& action = actions[i];
+ auto index = action.index;
+ if (action.isGet()) {
+ if (endsLiveRange[i]) {
+ bool erased = live.erase(action.index);
+ assert(erased);
+ WASM_UNUSED(erased);
+ }
+ continue;
+ }
+
+ // This is a set. Find the value being assigned to the local.
+ auto* set = (*action.origin)->cast<LocalSet>();
+ Index newValue;
+ if (set->value->is<LocalGet>() || set->value->is<LocalSet>()) {
+ // This is a copy: Either it is a get or a tee, that occurs right
+ // before us. Set our new value to theirs.
+ assert(i > 0 && set->value == *actions[i - 1].origin);
+ newValue = values[actions[i - 1].index];
+ } else {
+ // This is not a copy; assign a new unique value.
+ newValue = nextValue++;
+ }
+ values[index] = newValue;
+
+ // If this set has no gets that read from it, then it does not start a
+ // live range, and it cannot cause interference.
+ if (!action.effective) {
+ continue;
+ }
+
+ // Update interferences: This will interfere with any other local that
+ // is currently live and contains a different value.
+ for (auto other : live) {
+ // This index cannot have been live before this set (as we would be
+ // trampling some other set before us, if so; and then that set would
+ // have been ineffective). We will mark this index as live right after
+ // this loop).
+ assert(other != index);
+ if (values[other] != newValue) {
+ interfere(other, index);
+ }
+ }
+ live.insert(action.index);
+ }
+
+ // Note that we do not need to do anything for merges: while in general an
+ // interference can happen either in a block or when control flow merges,
+ // in wasm we have default values for all locals. As a result, if a local is
+ // live at the beginning of a block, it will be live at the ends of *all*
+ // the blocks reaching it: there is no possibility of an "unset local." That
+ // is, imagine we have this merge with a conflict:
+ //
+ // [a is set to some value] ->-
+ // |
+ // |->- [merge block where a and b are used]
+ // |
+ // [b is set to some value] ->-
+ //
+ // It is true that a conflict happens in the merge block, and if we had
+ // unset locals then the top block would have b unset, and the bottom block
+ // would have a unset, and so there would be no conflict there and the
+ // problem would only appear in the merge. But in wasm, that a and b are
+ // used in the merge block means that they are live at the end of both the
+ // top and bottom block, and that liveness will extend all the way back to
+ // *some* set of those values, possibly only the zero-initialization at the
+ // function start. Therefore a conflict will be noticed in both the top and
+ // bottom blocks, and that merge block does not need to reason about merging
+ // its inputs. In other words, a conflict will appear in the middle of a
+ // block, somewhere, and therefore we leave it to that block to identify,
+ // and so blocks only need to reason about their own contents and not what
+ // arrives to them.
+ //
+ // The one exception here is the entry to the function, see below.
}
- // Params have a value on entry, so mark them as live, as variables
- // live at the entry expect their zero-init value.
- SetOfLocals start = entry->contents.start;
+
+ // We must not try to coalesce parameters as they are fixed. Mark them as
+ // "interfering" so that we do not need to special-case them later.
auto numParams = getFunction()->getNumParams();
for (Index i = 0; i < numParams; i++) {
- start.insert(i);
+ for (Index j = i + 1; j < numParams; j++) {
+ interfereLowHigh(i, j);
+ }
}
- calculateInterferences(start);
-}
-void CoalesceLocals::calculateInterferences(const SetOfLocals& locals) {
- Index size = locals.size();
- for (Index i = 0; i < size; i++) {
- for (Index j = i + 1; j < size; j++) {
- interfereLowHigh(locals[i], locals[j]);
+ // We must handle interference between uses of the zero-init value and
+ // parameters manually. A zero initialization represents a set (to a default
+ // value), and that set would be what alerts us to a conflict, but there is no
+ // actual set in the IR since the zero-init value is applied implicitly.
+ for (auto i : entry->contents.start) {
+ if (i >= numParams) {
+ for (Index j = 0; j < numParams; j++) {
+ interfereLowHigh(j, i);
+ }
}
}
}
@@ -376,12 +509,13 @@ void CoalesceLocals::applyIndices(std::vector<Index>& indices,
set->index = indices[set->index];
// in addition, we can optimize out redundant copies and ineffective
// sets
- LocalGet* get;
- if ((get = set->value->dynCast<LocalGet>()) &&
- get->index == set->index) {
- action.removeCopy();
- continue;
+ if (auto* get = set->value->dynCast<LocalGet>()) {
+ if (get->index == set->index) {
+ action.removeCopy();
+ continue;
+ }
}
+ // TODO: do the same for a tee
// remove ineffective actions
if (!action.effective) {
// value may have no side effects, further optimizations can eliminate
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) {