summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xauto_update_tests.py8
-rwxr-xr-xcheck.py150
-rwxr-xr-xscripts/support.py9
-rw-r--r--src/s2wasm.h30
-rw-r--r--src/wasm-linker.cpp19
-rw-r--r--test/dot_s/alias.wast12
-rw-r--r--test/dot_s/alternate-lcomm.wast2
-rw-r--r--test/dot_s/asm_const.wast12
-rw-r--r--test/dot_s/basics.wast76
-rw-r--r--test/dot_s/bcp-1.wast84
-rw-r--r--test/dot_s/data-offset-folding.wast2
-rw-r--r--test/dot_s/debug.wast48
-rw-r--r--test/dot_s/dso_handle.wast4
-rw-r--r--test/dot_s/dyncall.wast44
-rw-r--r--test/dot_s/exit.wast12
-rw-r--r--test/dot_s/export_malloc_free.wast10
-rw-r--r--test/dot_s/fix_em_ehsjlj_names.wast82
-rw-r--r--test/dot_s/function-data-sections.wast8
-rw-r--r--test/dot_s/hostFinalize.wast12
-rw-r--r--test/dot_s/indidx.wast10
-rw-r--r--test/dot_s/indirect-import.s34
-rw-r--r--test/dot_s/indirect-import.wast123
-rw-r--r--test/dot_s/initializers.wast8
-rw-r--r--test/dot_s/lcomm-in-text-segment.wast2
-rw-r--r--test/dot_s/local_align.wast10
-rw-r--r--test/dot_s/macClangMetaData.wast12
-rw-r--r--test/dot_s/memops.s4
-rw-r--r--test/dot_s/memops.wast222
-rw-r--r--test/dot_s/minimal.wast4
-rw-r--r--test/dot_s/permute.wast2
-rw-r--r--test/dot_s/relocation.wast4
-rw-r--r--test/dot_s/return.wast6
-rw-r--r--test/dot_s/start_main0.wast6
-rw-r--r--test/dot_s/start_main2.wast14
-rw-r--r--test/dot_s/symbolic-offset.wast12
-rw-r--r--test/dot_s/text_before_type.wast8
-rw-r--r--test/dot_s/visibilities.wast8
-rw-r--r--test/llvm_autogenerated/byval.s98
-rw-r--r--test/llvm_autogenerated/byval.wast291
-rw-r--r--test/llvm_autogenerated/call.s18
-rw-r--r--test/llvm_autogenerated/call.wast83
-rw-r--r--test/llvm_autogenerated/cfg-stackify.s486
-rw-r--r--test/llvm_autogenerated/cfg-stackify.wast1357
-rw-r--r--test/llvm_autogenerated/comparisons_f32.wast30
-rw-r--r--test/llvm_autogenerated/comparisons_f64.wast30
-rw-r--r--test/llvm_autogenerated/comparisons_i32.wast22
-rw-r--r--test/llvm_autogenerated/comparisons_i64.wast22
-rw-r--r--test/llvm_autogenerated/conv.wast54
-rw-r--r--test/llvm_autogenerated/copysign-casts.wast6
-rw-r--r--test/llvm_autogenerated/cpus.wast4
-rw-r--r--test/llvm_autogenerated/dead-vreg.s43
-rw-r--r--test/llvm_autogenerated/dead-vreg.wast112
-rw-r--r--test/llvm_autogenerated/divrem-constant.wast18
-rw-r--r--test/llvm_autogenerated/f32.wast36
-rw-r--r--test/llvm_autogenerated/f64.wast36
-rw-r--r--test/llvm_autogenerated/fast-isel.wast14
-rw-r--r--test/llvm_autogenerated/frem.wast10
-rw-r--r--test/llvm_autogenerated/func.wast14
-rw-r--r--test/llvm_autogenerated/global.wast8
-rw-r--r--test/llvm_autogenerated/globl.wast4
-rw-r--r--test/llvm_autogenerated/i128.s413
-rw-r--r--test/llvm_autogenerated/i128.wast1603
-rw-r--r--test/llvm_autogenerated/i32-load-store-alignment.wast122
-rw-r--r--test/llvm_autogenerated/i32.wast48
-rw-r--r--test/llvm_autogenerated/i64-load-store-alignment.wast182
-rw-r--r--test/llvm_autogenerated/i64.wast48
-rw-r--r--test/llvm_autogenerated/ident.wast2
-rw-r--r--test/llvm_autogenerated/immediates.wast58
-rw-r--r--test/llvm_autogenerated/irreducible-cfg.wast256
-rw-r--r--test/llvm_autogenerated/legalize.s1354
-rw-r--r--test/llvm_autogenerated/legalize.wast3298
-rw-r--r--test/llvm_autogenerated/load-ext.wast22
-rw-r--r--test/llvm_autogenerated/load-store-i1.wast38
-rw-r--r--test/llvm_autogenerated/load.wast10
-rw-r--r--test/llvm_autogenerated/mem-intrinsics.s28
-rw-r--r--test/llvm_autogenerated/mem-intrinsics.wast112
-rw-r--r--test/llvm_autogenerated/memory-addr32.wast12
-rw-r--r--test/llvm_autogenerated/non-executable-stack.wast2
-rw-r--r--test/llvm_autogenerated/offset.s19
-rw-r--r--test/llvm_autogenerated/offset.wast404
-rw-r--r--test/llvm_autogenerated/phi.wast42
-rw-r--r--test/llvm_autogenerated/reg-stackify.s112
-rw-r--r--test/llvm_autogenerated/reg-stackify.wast490
-rw-r--r--test/llvm_autogenerated/return-int32.wast22
-rw-r--r--test/llvm_autogenerated/return-void.wast22
-rw-r--r--test/llvm_autogenerated/select.wast26
-rw-r--r--test/llvm_autogenerated/signext-zeroext.wast10
-rw-r--r--test/llvm_autogenerated/store-results.s83
-rw-r--r--test/llvm_autogenerated/store-results.wast99
-rw-r--r--test/llvm_autogenerated/store-trunc.wast52
-rw-r--r--test/llvm_autogenerated/store.wast42
-rw-r--r--test/llvm_autogenerated/switch.wast66
-rw-r--r--test/llvm_autogenerated/unreachable.wast14
-rw-r--r--test/llvm_autogenerated/unused-argument.wast14
-rw-r--r--test/llvm_autogenerated/userstack.s189
-rw-r--r--test/llvm_autogenerated/userstack.wast524
-rw-r--r--test/llvm_autogenerated/varargs.s46
-rw-r--r--test/llvm_autogenerated/varargs.wast244
98 files changed, 7273 insertions, 6764 deletions
diff --git a/auto_update_tests.py b/auto_update_tests.py
index 447340886..26c12e2c0 100755
--- a/auto_update_tests.py
+++ b/auto_update_tests.py
@@ -24,14 +24,12 @@ for asm in sorted(os.listdir('test')):
cmd += ['--mem-init=a.mem']
print '..', asm, wasm
print ' ', ' '.join(cmd)
- actual, err = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
+ actual = run_command(cmd)
with open(os.path.join('test', wasm), 'w') as o: o.write(actual)
-'''
for dot_s_dir in ['dot_s', 'llvm_autogenerated']:
for s in sorted(os.listdir(os.path.join('test', dot_s_dir))):
if not s.endswith('.s'): continue
- if s in ['indirect-import.s', 'memops.s', 'byval.s', 'cfg-stackify.s', 'dead-vreg.s', 'i128.s', 'legalize.s', 'mem-intrinsics.s', 'offset.s', 'reg-stackify.s', 'store-results.s', 'userstack.s', 'varargs.s']: continue # tests with invalid drop() code (use return of store)
print '..', s
wasm = s.replace('.s', '.wast')
full = os.path.join('test', dot_s_dir, s)
@@ -39,12 +37,10 @@ for dot_s_dir in ['dot_s', 'llvm_autogenerated']:
cmd = [os.path.join('bin', 's2wasm'), full, '--emscripten-glue'] + stack_alloc
if s.startswith('start_'):
cmd.append('--start')
- actual, err = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
- assert err == '', 'bad err:' + err
+ actual = run_command(cmd, stderr=subprocess.PIPE, expected_err='')
expected_file = os.path.join('test', dot_s_dir, wasm)
with open(expected_file, 'w') as o: o.write(actual)
-'''
'''
for wasm in ['address.wast']:#os.listdir(os.path.join('test', 'spec')):
diff --git a/check.py b/check.py
index 28bdb436b..b94819ea5 100755
--- a/check.py
+++ b/check.py
@@ -464,82 +464,80 @@ if has_node:
if expected not in out:
fail(out, expected)
-if 0: # TODO: figure out the story. will .s files have drops?
- print '\n[ checking .s testcases... ]\n'
-
- for dot_s_dir in ['dot_s', 'llvm_autogenerated']:
- for s in sorted(os.listdir(os.path.join('test', dot_s_dir))):
- if not s.endswith('.s'): continue
- if s in ['indirect-import.s', 'memops.s', 'byval.s', 'cfg-stackify.s', 'dead-vreg.s', 'i128.s', 'legalize.s', 'mem-intrinsics.s', 'offset.s', 'reg-stackify.s', 'store-results.s', 'userstack.s', 'varargs.s']: continue # tests with invalid drop() code (use return of store)
- print '..', s
- wasm = s.replace('.s', '.wast')
- full = os.path.join('test', dot_s_dir, s)
- stack_alloc = ['--allocate-stack=1024'] if dot_s_dir == 'llvm_autogenerated' else []
- cmd = [os.path.join('bin', 's2wasm'), full, '--emscripten-glue'] + stack_alloc
- if s.startswith('start_'):
- cmd.append('--start')
- actual = run_command(cmd)
-
- # verify output
- expected_file = os.path.join('test', dot_s_dir, wasm)
- if not os.path.exists(expected_file):
- print actual
- raise Exception('output ' + expected_file + ' does not exist')
- expected = open(expected_file).read()
- if actual != expected:
- fail(actual, expected)
-
- # verify with options
- cmd = [os.path.join('bin', 's2wasm'), full, '--global-base=1024'] + stack_alloc
- run_command(cmd)
-
- # run wasm-shell on the .wast to verify that it parses
- cmd = [os.path.join('bin', 'wasm-shell'), expected_file]
- run_command(cmd)
-
- print '\n[ running linker tests... ]\n'
- # The {main,foo,bar,baz}.s files were created by running clang over the respective
- # c files. The foobar.bar archive was created by running:
- # llvm-ar -format=gnu rc foobar.a quux.s foo.s bar.s baz.s
- s2wasm = os.path.join('bin', 's2wasm')
- cmd = [s2wasm, os.path.join('test', 'linker', 'main.s'), '-l', os.path.join('test', 'linker', 'archive', 'foobar.a')]
- output = run_command(cmd)
- # foo should come from main.s and return 42
- fail_if_not_contained(output, '(func $foo')
- fail_if_not_contained(output, '(i32.const 42)')
- # bar should be linked in from bar.s
- fail_if_not_contained(output, '(func $bar')
- # quux should be linked in from bar.s even though it comes before bar.s in the archive
- fail_if_not_contained(output, '(func $quux')
- # baz should not be linked in at all
- if 'baz' in output:
- raise Exception('output should not contain "baz": ' + output)
-
- # Test an archive using a string table
- cmd = [s2wasm, os.path.join('test', 'linker', 'main.s'), '-l', os.path.join('test', 'linker', 'archive', 'barlong.a')]
- output = run_command(cmd)
- # bar should be linked from the archive
- fail_if_not_contained(output, '(func $bar')
-
- # Test exporting memory growth function
- cmd = [s2wasm, os.path.join('test', 'linker', 'main.s'), '--emscripten-glue', '--allow-memory-growth']
- output = run_command(cmd)
- fail_if_not_contained(output, '(export "__growWasmMemory" $__growWasmMemory)')
- fail_if_not_contained(output, '(func $__growWasmMemory (param $newSize i32)')
-
- print '\n[ running validation tests... ]\n'
- wasm_as = os.path.join('bin', 'wasm-as')
- # Ensure the tests validate by default
- cmd = [wasm_as, os.path.join('test', 'validator', 'invalid_export.wast')]
- run_command(cmd)
- cmd = [wasm_as, os.path.join('test', 'validator', 'invalid_import.wast')]
- run_command(cmd)
- cmd = [wasm_as, '--validate=web', os.path.join('test', 'validator', 'invalid_export.wast')]
- run_command(cmd, expected_status=1)
- cmd = [wasm_as, '--validate=web', os.path.join('test', 'validator', 'invalid_import.wast')]
- run_command(cmd, expected_status=1)
- cmd = [wasm_as, '--validate=none', os.path.join('test', 'validator', 'invalid_return.wast')]
- run_command(cmd)
+print '\n[ checking .s testcases... ]\n'
+
+for dot_s_dir in ['dot_s', 'llvm_autogenerated']:
+ for s in sorted(os.listdir(os.path.join('test', dot_s_dir))):
+ if not s.endswith('.s'): continue
+ print '..', s
+ wasm = s.replace('.s', '.wast')
+ full = os.path.join('test', dot_s_dir, s)
+ stack_alloc = ['--allocate-stack=1024'] if dot_s_dir == 'llvm_autogenerated' else []
+ cmd = [os.path.join('bin', 's2wasm'), full, '--emscripten-glue'] + stack_alloc
+ if s.startswith('start_'):
+ cmd.append('--start')
+ actual = run_command(cmd)
+
+ # verify output
+ expected_file = os.path.join('test', dot_s_dir, wasm)
+ if not os.path.exists(expected_file):
+ print actual
+ raise Exception('output ' + expected_file + ' does not exist')
+ expected = open(expected_file).read()
+ if actual != expected:
+ fail(actual, expected)
+
+ # verify with options
+ cmd = [os.path.join('bin', 's2wasm'), full, '--global-base=1024'] + stack_alloc
+ run_command(cmd)
+
+ # run wasm-shell on the .wast to verify that it parses
+ cmd = [os.path.join('bin', 'wasm-shell'), expected_file]
+ run_command(cmd)
+
+print '\n[ running linker tests... ]\n'
+# The {main,foo,bar,baz}.s files were created by running clang over the respective
+# c files. The foobar.bar archive was created by running:
+# llvm-ar -format=gnu rc foobar.a quux.s foo.s bar.s baz.s
+s2wasm = os.path.join('bin', 's2wasm')
+cmd = [s2wasm, os.path.join('test', 'linker', 'main.s'), '-l', os.path.join('test', 'linker', 'archive', 'foobar.a')]
+output = run_command(cmd)
+# foo should come from main.s and return 42
+fail_if_not_contained(output, '(func $foo')
+fail_if_not_contained(output, '(i32.const 42)')
+# bar should be linked in from bar.s
+fail_if_not_contained(output, '(func $bar')
+# quux should be linked in from bar.s even though it comes before bar.s in the archive
+fail_if_not_contained(output, '(func $quux')
+# baz should not be linked in at all
+if 'baz' in output:
+ raise Exception('output should not contain "baz": ' + output)
+
+# Test an archive using a string table
+cmd = [s2wasm, os.path.join('test', 'linker', 'main.s'), '-l', os.path.join('test', 'linker', 'archive', 'barlong.a')]
+output = run_command(cmd)
+# bar should be linked from the archive
+fail_if_not_contained(output, '(func $bar')
+
+# Test exporting memory growth function
+cmd = [s2wasm, os.path.join('test', 'linker', 'main.s'), '--emscripten-glue', '--allow-memory-growth']
+output = run_command(cmd)
+fail_if_not_contained(output, '(export "__growWasmMemory" (func $__growWasmMemory))')
+fail_if_not_contained(output, '(func $__growWasmMemory (param $newSize i32)')
+
+print '\n[ running validation tests... ]\n'
+wasm_as = os.path.join('bin', 'wasm-as')
+# Ensure the tests validate by default
+cmd = [wasm_as, os.path.join('test', 'validator', 'invalid_export.wast')]
+run_command(cmd)
+cmd = [wasm_as, os.path.join('test', 'validator', 'invalid_import.wast')]
+run_command(cmd)
+cmd = [wasm_as, '--validate=web', os.path.join('test', 'validator', 'invalid_export.wast')]
+run_command(cmd, expected_status=1)
+cmd = [wasm_as, '--validate=web', os.path.join('test', 'validator', 'invalid_import.wast')]
+run_command(cmd, expected_status=1)
+cmd = [wasm_as, '--validate=none', os.path.join('test', 'validator', 'invalid_return.wast')]
+run_command(cmd)
if torture and 0:
diff --git a/scripts/support.py b/scripts/support.py
index 7b61d5a03..43762fffa 100755
--- a/scripts/support.py
+++ b/scripts/support.py
@@ -142,10 +142,17 @@ def split_wast(wast):
return ret
-def run_command(cmd, expected_status=0, stderr=None):
+def run_command(cmd, expected_status=0, stderr=None, expected_err=None):
+ if expected_err is not None:
+ assert stderr == subprocess.PIPE or stderr is None,\
+ "Can't redirect stderr if using expected_err"
+ stderr = subprocess.PIPE
print 'executing: ', ' '.join(cmd)
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=stderr)
out, err = proc.communicate()
if proc.returncode != expected_status:
raise Exception(('run_command failed', err))
+ if expected_err is not None and err != expected_err:
+ raise Exception(('run_command unexpected stderr',
+ "expected '%s', actual '%s'" % (expected_err, err)))
return out
diff --git a/src/s2wasm.h b/src/s2wasm.h
index 8c04f7891..5b7cd1fa4 100644
--- a/src/s2wasm.h
+++ b/src/s2wasm.h
@@ -745,7 +745,7 @@ class S2WasmBuilder {
};
auto setOutput = [&](Expression* curr, Name assign) {
if (assign.isNull() || assign.str[0] == 'd') { // drop
- addToBlock(curr);
+ addToBlock(builder.makeDrop(curr));
} else if (assign.str[0] == 'p') { // push
push(curr);
} else { // set to a local
@@ -1067,8 +1067,6 @@ class S2WasmBuilder {
return target->cast<Loop>()->name;
}
};
- // fixups
- std::vector<Block*> loopBlocks; // we need to clear their names
// main loop
while (1) {
skipWhitespace();
@@ -1097,21 +1095,27 @@ class S2WasmBuilder {
recordLabel();
} else s = strchr(s, '\n');
} else if (match("loop")) {
+ // Allocate an explicit block. This replaces the exit label that was previously on the loop.
+ // Do this for now to keep LLVM's output compatible with both 0xb and 0xc Binaryen.
+ // TODO: Update LLVM to model the 0xc loop behavior
+ auto* explicitBlock = allocator->alloc<Block>();
+ addToBlock(explicitBlock);
+ bstack.push_back(explicitBlock);
auto curr = allocator->alloc<Loop>();
addToBlock(curr);
curr->name = getNextLabel();
- auto block = allocator->alloc<Block>();
- block->name = getNextLabel();
- curr->body = block;
- loopBlocks.push_back(block);
- bstack.push_back(block);
+ explicitBlock->name = getNextLabel();
+ auto implicitBlock = allocator->alloc<Block>();
+ curr->body = implicitBlock;
bstack.push_back(curr);
} else if (match("end_loop")) {
auto* loop = bstack.back()->cast<Loop>();
bstack.pop_back();
- auto* implicitBlock = bstack.back()->cast<Block>();
+ auto* explicitBlock = bstack.back()->cast<Block>();
bstack.pop_back();
- implicitBlock->finalize();
+
+ explicitBlock->finalize();
+ loop->body->finalize();
loop->finalize();
} else if (match("br_table")) {
auto curr = allocator->alloc<Switch>();
@@ -1147,11 +1151,10 @@ class S2WasmBuilder {
Name assign = getAssign();
skipComma();
auto curr = allocator->alloc<SetLocal>();
- curr->setTee(true);
curr->index = func->getLocalIndex(getAssign());
skipComma();
curr->value = getInput();
- curr->type = curr->value->type;
+ curr->setTee(true);
setOutput(curr, assign);
} else if (match("return")) {
addToBlock(builder.makeReturn(*s == '$' ? getInput() : nullptr));
@@ -1198,9 +1201,6 @@ class S2WasmBuilder {
bstack.pop_back(); // remove the base block for the function body
assert(bstack.empty());
assert(estack.empty());
- for (auto block : loopBlocks) {
- block->name = Name();
- }
func->body->dynCast<Block>()->finalize();
wasm->addFunction(func);
}
diff --git a/src/wasm-linker.cpp b/src/wasm-linker.cpp
index 527ff80ee..80374c1e4 100644
--- a/src/wasm-linker.cpp
+++ b/src/wasm-linker.cpp
@@ -193,23 +193,24 @@ void Linker::layout() {
out.wasm.addFunction(func);
exportFunction(start, true);
out.wasm.addStart(start);
- auto* block = out.wasm.allocator.alloc<Block>();
+ Builder builder(out.wasm);
+ auto* block = builder.makeBlock();
func->body = block;
{
// Create the call, matching its parameters.
// TODO allow calling with non-default values.
- auto* call = out.wasm.allocator.alloc<Call>();
- call->target = startFunction;
- size_t paramNum = 0;
+ std::vector<Expression*> args;
+ Index paramNum = 0;
for (WasmType type : target->params) {
Name name = Name::fromInt(paramNum++);
Builder::addVar(func, name, type);
- auto* param = out.wasm.allocator.alloc<GetLocal>();
- param->index = func->getLocalIndex(name);
- param->type = type;
- call->operands.push_back(param);
+ auto* param = builder.makeGetLocal(func->getLocalIndex(name), type);
+ args.push_back(param);
}
- block->list.push_back(call);
+ auto* call = builder.makeCall(startFunction, args, target->result);
+ Expression* e = call;
+ if (target->result != none) e = builder.makeDrop(call);
+ block->list.push_back(e);
block->finalize();
}
}
diff --git a/test/dot_s/alias.wast b/test/dot_s/alias.wast
index 8ba469564..af613b4ea 100644
--- a/test/dot_s/alias.wast
+++ b/test/dot_s/alias.wast
@@ -1,11 +1,11 @@
(module
(memory 1)
(data (i32.const 16) "\d2\04\00\00\00\00\00\00)\t\00\00")
- (export "memory" memory)
(type $FUNCSIG$v (func))
- (export "__exit" $__exit)
- (export "__needs_exit" $__needs_exit)
- (export "dynCall_v" $dynCall_v)
+ (export "memory" (memory $0))
+ (export "__exit" (func $__exit))
+ (export "__needs_exit" (func $__needs_exit))
+ (export "dynCall_v" (func $dynCall_v))
(table 2 2 anyfunc)
(elem (i32.const 0) $__wasm_nullptr $__exit)
(func $__exit (type $FUNCSIG$v)
@@ -21,7 +21,9 @@
)
)
(func $__needs_exit (result i32)
- (call $__exit)
+ (drop
+ (call $__exit)
+ )
(return
(i32.const 1)
)
diff --git a/test/dot_s/alternate-lcomm.wast b/test/dot_s/alternate-lcomm.wast
index 844c23a03..43286691f 100644
--- a/test/dot_s/alternate-lcomm.wast
+++ b/test/dot_s/alternate-lcomm.wast
@@ -1,5 +1,5 @@
(module
(memory 1)
- (export "memory" memory)
+ (export "memory" (memory $0))
)
;; METADATA: { "asmConsts": {},"staticBump": 16, "initializers": [] }
diff --git a/test/dot_s/asm_const.wast b/test/dot_s/asm_const.wast
index 564a565ef..2561d174f 100644
--- a/test/dot_s/asm_const.wast
+++ b/test/dot_s/asm_const.wast
@@ -1,13 +1,15 @@
(module
(memory 1)
(data (i32.const 16) "{ Module.print(\"hello, world!\"); }\00")
- (export "memory" memory)
(type $FUNCSIG$vi (func (param i32)))
- (import $emscripten_asm_const_vi "env" "emscripten_asm_const_vi" (param i32))
- (export "main" $main)
+ (import "env" "emscripten_asm_const_vi" (func $emscripten_asm_const_vi (param i32)))
+ (export "memory" (memory $0))
+ (export "main" (func $main))
(func $main (result i32)
- (call_import $emscripten_asm_const_vi
- (i32.const 0)
+ (drop
+ (call_import $emscripten_asm_const_vi
+ (i32.const 0)
+ )
)
(return
(i32.const 0)
diff --git a/test/dot_s/basics.wast b/test/dot_s/basics.wast
index 3562140fb..e3801612f 100644
--- a/test/dot_s/basics.wast
+++ b/test/dot_s/basics.wast
@@ -3,18 +3,20 @@
(data (i32.const 16) "hello, world!\n\00")
(data (i32.const 32) "vcq")
(data (i32.const 48) "\16\00\00\00")
- (export "memory" memory)
(type $FUNCSIG$vi (func (param i32)))
(type $FUNCSIG$v (func))
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
- (import $puts "env" "puts" (param i32))
- (export "main" $main)
- (export "dynCall_iii" $dynCall_iii)
+ (import "env" "puts" (func $puts (param i32)))
+ (export "memory" (memory $0))
+ (export "main" (func $main))
+ (export "dynCall_iii" (func $dynCall_iii))
(table 2 2 anyfunc)
(elem (i32.const 0) $__wasm_nullptr $main)
(func $main (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
- (call_import $puts
- (i32.const 16)
+ (drop
+ (call_import $puts
+ (i32.const 16)
+ )
)
(block $label$0
(block $label$1
@@ -39,46 +41,48 @@
(i32.const 1)
)
)
- (loop $label$3 $label$2
- (set_local $0
- (i32.add
- (i32.gt_s
+ (block $label$3
+ (loop $label$2
+ (set_local $0
+ (i32.add
+ (i32.gt_s
+ (get_local $0)
+ (i32.const 10)
+ )
(get_local $0)
- (i32.const 10)
)
- (get_local $0)
)
- )
- (block $label$4
- (br_if $label$4
- (i32.ne
- (i32.rem_s
+ (block $label$4
+ (br_if $label$4
+ (i32.ne
+ (i32.rem_s
+ (get_local $0)
+ (i32.const 5)
+ )
+ (i32.const 3)
+ )
+ )
+ (set_local $0
+ (i32.add
+ (i32.rem_s
+ (get_local $0)
+ (i32.const 111)
+ )
(get_local $0)
- (i32.const 5)
)
- (i32.const 3)
)
)
- (set_local $0
- (i32.add
+ (br_if $label$1
+ (i32.eq
(i32.rem_s
(get_local $0)
- (i32.const 111)
+ (i32.const 7)
)
- (get_local $0)
+ (i32.const 0)
)
)
+ (br $label$2)
)
- (br_if $label$1
- (i32.eq
- (i32.rem_s
- (get_local $0)
- (i32.const 7)
- )
- (i32.const 0)
- )
- )
- (br $label$2)
)
)
(set_local $0
@@ -87,7 +91,9 @@
(i32.const -12)
)
)
- (i32.const 1)
+ (drop
+ (i32.const 1)
+ )
)
(get_local $0)
)
@@ -96,9 +102,9 @@
)
(func $dynCall_iii (param $fptr i32) (param $0 i32) (param $1 i32) (result i32)
(call_indirect $FUNCSIG$iii
- (get_local $fptr)
(get_local $0)
(get_local $1)
+ (get_local $fptr)
)
)
)
diff --git a/test/dot_s/bcp-1.wast b/test/dot_s/bcp-1.wast
index 1b76a98af..3833bc742 100644
--- a/test/dot_s/bcp-1.wast
+++ b/test/dot_s/bcp-1.wast
@@ -7,33 +7,33 @@
(data (i32.const 72) "\0f\00\00\00\10\00\00\00\11\00\00\00")
(data (i32.const 96) "hi\00")
(data (i32.const 100) "\00\00\00\00")
- (export "memory" memory)
(type $FUNCSIG$i (func (result i32)))
(type $FUNCSIG$ii (func (param i32) (result i32)))
(type $FUNCSIG$v (func))
(type $FUNCSIG$vi (func (param i32)))
- (import $abort "env" "abort")
- (import $exit "env" "exit" (param i32))
- (export "bad0" $bad0)
- (export "bad1" $bad1)
- (export "bad2" $bad2)
- (export "bad3" $bad3)
- (export "bad4" $bad4)
- (export "bad5" $bad5)
- (export "bad6" $bad6)
- (export "bad7" $bad7)
- (export "bad8" $bad8)
- (export "bad9" $bad9)
- (export "bad10" $bad10)
- (export "good0" $good0)
- (export "good1" $good1)
- (export "good2" $good2)
- (export "opt0" $opt0)
- (export "opt1" $opt1)
- (export "opt2" $opt2)
- (export "main" $main)
- (export "dynCall_i" $dynCall_i)
- (export "dynCall_ii" $dynCall_ii)
+ (import "env" "abort" (func $abort))
+ (import "env" "exit" (func $exit (param i32)))
+ (export "memory" (memory $0))
+ (export "bad0" (func $bad0))
+ (export "bad1" (func $bad1))
+ (export "bad2" (func $bad2))
+ (export "bad3" (func $bad3))
+ (export "bad4" (func $bad4))
+ (export "bad5" (func $bad5))
+ (export "bad6" (func $bad6))
+ (export "bad7" (func $bad7))
+ (export "bad8" (func $bad8))
+ (export "bad9" (func $bad9))
+ (export "bad10" (func $bad10))
+ (export "good0" (func $good0))
+ (export "good1" (func $good1))
+ (export "good2" (func $good2))
+ (export "opt0" (func $opt0))
+ (export "opt1" (func $opt1))
+ (export "opt2" (func $opt2))
+ (export "main" (func $main))
+ (export "dynCall_i" (func $dynCall_i))
+ (export "dynCall_ii" (func $dynCall_ii))
(table 18 18 anyfunc)
(elem (i32.const 0) $__wasm_nullptr $bad0 $bad1 $bad5 $bad7 $bad8 $bad10 $bad2 $bad3 $bad6 $bad4 $bad9 $good0 $good1 $good2 $opt0 $opt1 $opt2)
(func $bad0 (type $FUNCSIG$i) (result i32)
@@ -182,24 +182,24 @@
(block $label$1
(br_if $label$1
(call_indirect $FUNCSIG$ii
- (get_local $1)
(get_local $2)
+ (get_local $1)
)
)
(br_if $label$1
(call_indirect $FUNCSIG$ii
+ (get_local $2)
(i32.load offset=44
(get_local $0)
)
- (get_local $2)
)
)
(br_if $label$1
(call_indirect $FUNCSIG$ii
+ (get_local $2)
(i32.load offset=48
(get_local $0)
)
- (get_local $2)
)
)
(set_local $1
@@ -213,16 +213,16 @@
(block $label$2
(br_if $label$2
(call_indirect $FUNCSIG$ii
- (get_local $1)
(get_local $2)
+ (get_local $1)
)
)
(br_if $label$2
(call_indirect $FUNCSIG$ii
+ (get_local $2)
(i32.load offset=56
(get_local $0)
)
- (get_local $2)
)
)
(block $label$3
@@ -287,24 +287,36 @@
(i32.const 0)
)
)
- (call_import $exit
- (get_local $0)
+ (drop
+ (call_import $exit
+ (get_local $0)
+ )
)
(unreachable)
)
- (call_import $abort)
+ (drop
+ (call_import $abort)
+ )
(unreachable)
)
- (call_import $abort)
+ (drop
+ (call_import $abort)
+ )
(unreachable)
)
- (call_import $abort)
+ (drop
+ (call_import $abort)
+ )
(unreachable)
)
- (call_import $abort)
+ (drop
+ (call_import $abort)
+ )
(unreachable)
)
- (call_import $abort)
+ (drop
+ (call_import $abort)
+ )
(unreachable)
)
(func $__wasm_nullptr (type $FUNCSIG$v)
@@ -317,8 +329,8 @@
)
(func $dynCall_ii (param $fptr i32) (param $0 i32) (result i32)
(call_indirect $FUNCSIG$ii
- (get_local $fptr)
(get_local $0)
+ (get_local $fptr)
)
)
)
diff --git a/test/dot_s/data-offset-folding.wast b/test/dot_s/data-offset-folding.wast
index 9cdacd60b..d68e812bd 100644
--- a/test/dot_s/data-offset-folding.wast
+++ b/test/dot_s/data-offset-folding.wast
@@ -2,6 +2,6 @@
(memory 1)
(data (i32.const 12) "\00\00\00\00")
(data (i32.const 416) "`\00\00\00")
- (export "memory" memory)
+ (export "memory" (memory $0))
)
;; METADATA: { "asmConsts": {},"staticBump": 420, "initializers": [] }
diff --git a/test/dot_s/debug.wast b/test/dot_s/debug.wast
index 3a859fd0d..ecd8c79a2 100644
--- a/test/dot_s/debug.wast
+++ b/test/dot_s/debug.wast
@@ -1,7 +1,7 @@
(module
(memory 1)
- (export "memory" memory)
- (export "fib" $fib)
+ (export "memory" (memory $0))
+ (export "fib" (func $fib))
(func $fib (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
@@ -16,32 +16,34 @@
(set_local $4
(i32.const 1)
)
- (loop $label$1 $label$0
- (set_local $2
- (i32.add
- (get_local $2)
- (i32.const 1)
+ (block $label$1
+ (loop $label$0
+ (set_local $2
+ (i32.add
+ (get_local $2)
+ (i32.const 1)
+ )
)
- )
- (br_if $label$1
- (i32.ge_s
- (get_local $2)
- (get_local $0)
+ (br_if $label$1
+ (i32.ge_s
+ (get_local $2)
+ (get_local $0)
+ )
)
- )
- (set_local $1
- (i32.add
+ (set_local $1
+ (i32.add
+ (get_local $4)
+ (get_local $3)
+ )
+ )
+ (set_local $3
(get_local $4)
- (get_local $3)
)
+ (set_local $4
+ (get_local $1)
+ )
+ (br $label$0)
)
- (set_local $3
- (get_local $4)
- )
- (set_local $4
- (get_local $1)
- )
- (br $label$0)
)
(return
(get_local $4)
diff --git a/test/dot_s/dso_handle.wast b/test/dot_s/dso_handle.wast
index 621a0fe3b..2e69ce3b2 100644
--- a/test/dot_s/dso_handle.wast
+++ b/test/dot_s/dso_handle.wast
@@ -1,7 +1,7 @@
(module
(memory 1)
- (export "memory" memory)
- (export "main" $main)
+ (export "memory" (memory $0))
+ (export "main" (func $main))
(func $main (result i32)
(return
(i32.const 8)
diff --git a/test/dot_s/dyncall.wast b/test/dot_s/dyncall.wast
index c6dae687a..e879838f8 100644
--- a/test/dot_s/dyncall.wast
+++ b/test/dot_s/dyncall.wast
@@ -1,20 +1,20 @@
(module
(memory 1)
- (export "memory" memory)
(type $FUNCSIG$v (func))
(type $FUNCSIG$i (func (result i32)))
(type $FUNCSIG$if (func (param f32) (result i32)))
(type $FUNCSIG$vd (func (param f64)))
(type $FUNCSIG$ffjjdi (func (param f32 i64 i64 f64 i32) (result f32)))
- (export "i" $i)
- (export "i_f" $i_f)
- (export "vd" $vd)
- (export "ffjjdi" $ffjjdi)
- (export "vd2" $vd2)
- (export "main" $main)
- (export "dynCall_i" $dynCall_i)
- (export "dynCall_if" $dynCall_if)
- (export "dynCall_vd" $dynCall_vd)
+ (export "memory" (memory $0))
+ (export "i" (func $i))
+ (export "i_f" (func $i_f))
+ (export "vd" (func $vd))
+ (export "ffjjdi" (func $ffjjdi))
+ (export "vd2" (func $vd2))
+ (export "main" (func $main))
+ (export "dynCall_i" (func $dynCall_i))
+ (export "dynCall_if" (func $dynCall_if))
+ (export "dynCall_vd" (func $dynCall_vd))
(table 6 6 anyfunc)
(elem (i32.const 0) $__wasm_nullptr $i $i_f $vd $ffjjdi $vd2)
(func $i (type $FUNCSIG$i) (result i32)
@@ -31,11 +31,21 @@
(func $vd2 (type $FUNCSIG$vd) (param $0 f64)
)
(func $main (result i32)
- (i32.const 1)
- (i32.const 2)
- (i32.const 3)
- (i32.const 4)
- (i32.const 5)
+ (drop
+ (i32.const 1)
+ )
+ (drop
+ (i32.const 2)
+ )
+ (drop
+ (i32.const 3)
+ )
+ (drop
+ (i32.const 4)
+ )
+ (drop
+ (i32.const 5)
+ )
(i32.const 0)
)
(func $__wasm_nullptr (type $FUNCSIG$v)
@@ -48,14 +58,14 @@
)
(func $dynCall_if (param $fptr i32) (param $0 f32) (result i32)
(call_indirect $FUNCSIG$if
- (get_local $fptr)
(get_local $0)
+ (get_local $fptr)
)
)
(func $dynCall_vd (param $fptr i32) (param $0 f64)
(call_indirect $FUNCSIG$vd
- (get_local $fptr)
(get_local $0)
+ (get_local $fptr)
)
)
)
diff --git a/test/dot_s/exit.wast b/test/dot_s/exit.wast
index 445021b56..8850a5bb4 100644
--- a/test/dot_s/exit.wast
+++ b/test/dot_s/exit.wast
@@ -1,13 +1,15 @@
(module
(memory 1)
- (export "memory" memory)
(type $FUNCSIG$vi (func (param i32)))
- (import $exit "env" "exit" (param i32))
- (export "main" $main)
+ (import "env" "exit" (func $exit (param i32)))
+ (export "memory" (memory $0))
+ (export "main" (func $main))
(func $main (result i32)
(local $0 i32)
- (call_import $exit
- (i32.const 0)
+ (drop
+ (call_import $exit
+ (i32.const 0)
+ )
)
(unreachable)
)
diff --git a/test/dot_s/export_malloc_free.wast b/test/dot_s/export_malloc_free.wast
index 465049e16..39929d58a 100644
--- a/test/dot_s/export_malloc_free.wast
+++ b/test/dot_s/export_malloc_free.wast
@@ -1,10 +1,10 @@
(module
(memory 1)
- (export "memory" memory)
- (export "main" $main)
- (export "malloc" $malloc)
- (export "free" $free)
- (export "realloc" $realloc)
+ (export "memory" (memory $0))
+ (export "main" (func $main))
+ (export "malloc" (func $malloc))
+ (export "free" (func $free))
+ (export "realloc" (func $realloc))
(func $main (result i32)
(i32.const 0)
)
diff --git a/test/dot_s/fix_em_ehsjlj_names.wast b/test/dot_s/fix_em_ehsjlj_names.wast
index 61ae5ef5e..6f4a5471b 100644
--- a/test/dot_s/fix_em_ehsjlj_names.wast
+++ b/test/dot_s/fix_em_ehsjlj_names.wast
@@ -1,6 +1,5 @@
(module
(memory 1)
- (export "memory" memory)
(type $FUNCSIG$vi (func (param i32)))
(type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32)))
(type $FUNCSIG$fifd (func (param i32 f32 f64) (result f32)))
@@ -9,16 +8,17 @@
(type $FUNCSIG$v (func))
(type $FUNCSIG$ffd (func (param f32 f64) (result f32)))
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
- (import $emscripten_longjmp "env" "emscripten_longjmp" (param i32 i32))
- (import $invoke_ffd "env" "invoke_ffd" (param i32 f32 f64) (result f32))
- (import $invoke_iii "env" "invoke_iii" (param i32 i32 i32) (result i32))
- (import $invoke_iiii "env" "invoke_iiii" (param i32 i32 i32 i32) (result i32))
- (import $invoke_v "env" "invoke_v" (param i32))
- (export "main" $main)
- (export "dynCall_v" $dynCall_v)
- (export "dynCall_iiii" $dynCall_iiii)
- (export "dynCall_ffd" $dynCall_ffd)
- (export "dynCall_iii" $dynCall_iii)
+ (import "env" "emscripten_longjmp" (func $emscripten_longjmp (param i32 i32)))
+ (import "env" "invoke_ffd" (func $invoke_ffd (param i32 f32 f64) (result f32)))
+ (import "env" "invoke_iii" (func $invoke_iii (param i32 i32 i32) (result i32)))
+ (import "env" "invoke_iiii" (func $invoke_iiii (param i32 i32 i32 i32) (result i32)))
+ (import "env" "invoke_v" (func $invoke_v (param i32)))
+ (export "memory" (memory $0))
+ (export "main" (func $main))
+ (export "dynCall_v" (func $dynCall_v))
+ (export "dynCall_iiii" (func $dynCall_iiii))
+ (export "dynCall_ffd" (func $dynCall_ffd))
+ (export "dynCall_iii" (func $dynCall_iii))
(table 5 5 anyfunc)
(elem (i32.const 0) $__wasm_nullptr $_Z5func1v $_Z5func2iii $_Z5func3fd $_Z5func4P8mystructS_)
(func $_Z5func1v (type $FUNCSIG$v)
@@ -37,34 +37,44 @@
(local $1 i32)
(local $2 i32)
(local $3 i32)
- (call_import $invoke_v
- (i32.const 1)
- )
- (call_import $invoke_iiii
- (i32.const 2)
- (i32.const 1)
- (i32.const 2)
- (i32.const 3)
+ (drop
+ (call_import $invoke_v
+ (i32.const 1)
+ )
)
- (call_import $invoke_ffd
- (i32.const 3)
- (f32.const 1.5)
- (f64.const 3.4)
+ (drop
+ (call_import $invoke_iiii
+ (i32.const 2)
+ (i32.const 1)
+ (i32.const 2)
+ (i32.const 3)
+ )
)
- (call_import $invoke_iii
- (i32.const 4)
- (i32.add
- (get_local $1)
- (i32.const 32)
+ (drop
+ (call_import $invoke_ffd
+ (i32.const 3)
+ (f32.const 1.5)
+ (f64.const 3.4)
)
- (i32.add
- (get_local $1)
+ )
+ (drop
+ (call_import $invoke_iii
(i32.const 4)
+ (i32.add
+ (get_local $1)
+ (i32.const 32)
+ )
+ (i32.add
+ (get_local $1)
+ (i32.const 4)
+ )
)
)
- (call_import $emscripten_longjmp
- (i32.const 5)
- (i32.const 6)
+ (drop
+ (call_import $emscripten_longjmp
+ (i32.const 5)
+ (i32.const 6)
+ )
)
(i32.const 0)
)
@@ -78,24 +88,24 @@
)
(func $dynCall_iiii (param $fptr i32) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(call_indirect $FUNCSIG$iiii
- (get_local $fptr)
(get_local $0)
(get_local $1)
(get_local $2)
+ (get_local $fptr)
)
)
(func $dynCall_ffd (param $fptr i32) (param $0 f32) (param $1 f64) (result f32)
(call_indirect $FUNCSIG$ffd
- (get_local $fptr)
(get_local $0)
(get_local $1)
+ (get_local $fptr)
)
)
(func $dynCall_iii (param $fptr i32) (param $0 i32) (param $1 i32) (result i32)
(call_indirect $FUNCSIG$iii
- (get_local $fptr)
(get_local $0)
(get_local $1)
+ (get_local $fptr)
)
)
)
diff --git a/test/dot_s/function-data-sections.wast b/test/dot_s/function-data-sections.wast
index 43947a3cc..83548c2cc 100644
--- a/test/dot_s/function-data-sections.wast
+++ b/test/dot_s/function-data-sections.wast
@@ -3,10 +3,10 @@
(data (i32.const 12) "\00\00\00\00")
(data (i32.const 16) "\01\00\00\00")
(data (i32.const 20) "33\13@")
- (export "memory" memory)
- (export "foo" $foo)
- (export "bar" $bar)
- (export "qux" $qux)
+ (export "memory" (memory $0))
+ (export "foo" (func $foo))
+ (export "bar" (func $bar))
+ (export "qux" (func $qux))
(func $foo
(return)
)
diff --git a/test/dot_s/hostFinalize.wast b/test/dot_s/hostFinalize.wast
index 8b7f96dc6..396575a3b 100644
--- a/test/dot_s/hostFinalize.wast
+++ b/test/dot_s/hostFinalize.wast
@@ -1,11 +1,13 @@
(module
(memory 1)
- (export "memory" memory)
+ (export "memory" (memory $0))
(func $_main
- (grow_memory
- (i32.add
- (current_memory)
- (i32.const 1)
+ (drop
+ (grow_memory
+ (i32.add
+ (current_memory)
+ (i32.const 1)
+ )
)
)
)
diff --git a/test/dot_s/indidx.wast b/test/dot_s/indidx.wast
index 6cdb6c4ce..6be1df73f 100644
--- a/test/dot_s/indidx.wast
+++ b/test/dot_s/indidx.wast
@@ -1,12 +1,12 @@
(module
(memory 1)
(data (i32.const 16) "\04\00\00\00\02\00\00\00\01\00\00\00\03\00\00\00")
- (export "memory" memory)
(type $FUNCSIG$i (func (result i32)))
(type $FUNCSIG$v (func))
- (import $getchar "env" "getchar" (result i32))
- (export "main" $main)
- (export "dynCall_i" $dynCall_i)
+ (import "env" "getchar" (func $getchar (result i32)))
+ (export "memory" (memory $0))
+ (export "main" (func $main))
+ (export "dynCall_i" (func $dynCall_i))
(table 5 5 anyfunc)
(elem (i32.const 0) $__wasm_nullptr $c $b $d $a)
(func $a (type $FUNCSIG$i) (result i32)
@@ -26,7 +26,7 @@
(block $label$0
(br_if $label$0
(i32.ge_u
- (set_local $2
+ (tee_local $2
(i32.load
(i32.add
(i32.shl
diff --git a/test/dot_s/indirect-import.s b/test/dot_s/indirect-import.s
index f09291d84..93ba9bbfa 100644
--- a/test/dot_s/indirect-import.s
+++ b/test/dot_s/indirect-import.s
@@ -1,5 +1,5 @@
.text
- .file "indirect-import.ll"
+ .file "test/dot_s/indirect-import.ll"
.hidden bar
.globl bar
.type bar,@function
@@ -11,36 +11,36 @@ bar: # @bar
i32.const $push10=, 0
i32.load $push11=, __stack_pointer($pop10)
i32.const $push12=, 32
- i32.sub $push17=, $pop11, $pop12
- i32.store $push20=, __stack_pointer($pop13), $pop17
- tee_local $push19=, $0=, $pop20
+ i32.sub $push19=, $pop11, $pop12
+ tee_local $push18=, $1=, $pop19
+ i32.store $drop=, __stack_pointer($pop13), $pop18
i32.const $push0=, extern_fd@FUNCTION
- i32.store $drop=, 28($pop19), $pop0
+ i32.store $drop=, 28($1), $pop0
i32.const $push1=, extern_vj@FUNCTION
- i32.store $drop=, 24($0), $pop1
+ i32.store $drop=, 24($1), $pop1
i64.const $push2=, 1
call extern_vj@FUNCTION, $pop2
i32.const $push3=, extern_v@FUNCTION
- i32.store $drop=, 20($0), $pop3
+ i32.store $drop=, 20($1), $pop3
call extern_v@FUNCTION
i32.const $push4=, extern_ijidf@FUNCTION
- i32.store $drop=, 16($0), $pop4
- i64.const $push18=, 1
+ i32.store $drop=, 16($1), $pop4
+ i64.const $push17=, 1
i32.const $push7=, 2
f64.const $push6=, 0x1.8p1
f32.const $push5=, 0x1p2
- i32.call $drop=, extern_ijidf@FUNCTION, $pop18, $pop7, $pop6, $pop5
+ i32.call $drop=, extern_ijidf@FUNCTION, $pop17, $pop7, $pop6, $pop5
i32.const $push8=, extern_struct@FUNCTION
- i32.store $drop=, 12($0), $pop8
+ i32.store $drop=, 12($1), $pop8
i32.const $push9=, extern_sret@FUNCTION
- i32.store $drop=, 8($0), $pop9
- i32.load $1=, 28($0)
+ i32.store $drop=, 8($1), $pop9
+ i32.load $0=, 28($1)
i32.const $push16=, 0
i32.const $push14=, 32
- i32.add $push15=, $0, $pop14
+ i32.add $push15=, $1, $pop14
i32.store $drop=, __stack_pointer($pop16), $pop15
- copy_local $push21=, $1
- # fallthrough-return: $pop21
+ copy_local $push20=, $0
+ # fallthrough-return: $pop20
.endfunc
.Lfunc_end0:
.size bar, .Lfunc_end0-bar
@@ -58,7 +58,7 @@ baz: # @baz
.size baz, .Lfunc_end1-baz
- .ident "clang version 3.9.0 (trunk 271579) (llvm/trunk 271699)"
+ .ident "clang version 4.0.0 (trunk 281345) (llvm/trunk 281343)"
.functype extern_fd, f32, f64
.functype extern_vj, void, i64
.functype extern_v, void
diff --git a/test/dot_s/indirect-import.wast b/test/dot_s/indirect-import.wast
index 86c8ded00..0d8434ebe 100644
--- a/test/dot_s/indirect-import.wast
+++ b/test/dot_s/indirect-import.wast
@@ -1,31 +1,31 @@
(module
(memory 1)
- (export "memory" memory)
(type $FUNCSIG$fd (func (param f64) (result f32)))
(type $FUNCSIG$vj (func (param i64)))
(type $FUNCSIG$v (func))
(type $FUNCSIG$ijidf (func (param i64 i32 f64 f32) (result i32)))
(type $FUNCSIG$vi (func (param i32)))
- (import $extern_ijidf "env" "extern_ijidf" (param i64 i32 f64 f32) (result i32))
- (import $extern_v "env" "extern_v")
- (import $extern_vj "env" "extern_vj" (param i64))
- (import $extern_fd "env" "extern_fd" (param f64) (result f32))
- (import $extern_struct "env" "extern_struct" (param i32))
- (import $extern_sret "env" "extern_sret" (param i32))
- (export "bar" $bar)
- (export "baz" $baz)
- (export "dynCall_fd" $dynCall_fd)
- (export "dynCall_v" $dynCall_v)
- (export "dynCall_vi" $dynCall_vi)
+ (import "env" "extern_ijidf" (func $extern_ijidf (param i64 i32 f64 f32) (result i32)))
+ (import "env" "extern_v" (func $extern_v))
+ (import "env" "extern_vj" (func $extern_vj (param i64)))
+ (import "env" "extern_fd" (func $extern_fd (param f64) (result f32)))
+ (import "env" "extern_struct" (func $extern_struct (param i32)))
+ (import "env" "extern_sret" (func $extern_sret (param i32)))
+ (export "memory" (memory $0))
+ (export "bar" (func $bar))
+ (export "baz" (func $baz))
+ (export "dynCall_fd" (func $dynCall_fd))
+ (export "dynCall_v" (func $dynCall_v))
+ (export "dynCall_vi" (func $dynCall_vi))
(table 7 7 anyfunc)
(elem (i32.const 0) $__wasm_nullptr $__importThunk_extern_fd $__importThunk_extern_vj $__importThunk_extern_v $__importThunk_extern_ijidf $__importThunk_extern_struct $__importThunk_extern_sret)
(func $bar (result i32)
(local $0 i32)
(local $1 i32)
- (i32.store offset=28
- (set_local $0
- (i32.store offset=4
- (i32.const 0)
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (tee_local $1
(i32.sub
(i32.load offset=4
(i32.const 0)
@@ -34,51 +34,74 @@
)
)
)
- (i32.const 1)
)
- (i32.store offset=24
- (get_local $0)
- (i32.const 2)
+ (drop
+ (i32.store offset=28
+ (get_local $1)
+ (i32.const 1)
+ )
)
- (call_import $extern_vj
- (i64.const 1)
+ (drop
+ (i32.store offset=24
+ (get_local $1)
+ (i32.const 2)
+ )
)
- (i32.store offset=20
- (get_local $0)
- (i32.const 3)
+ (drop
+ (call_import $extern_vj
+ (i64.const 1)
+ )
)
- (call_import $extern_v)
- (i32.store offset=16
- (get_local $0)
- (i32.const 4)
+ (drop
+ (i32.store offset=20
+ (get_local $1)
+ (i32.const 3)
+ )
)
- (call_import $extern_ijidf
- (i64.const 1)
- (i32.const 2)
- (f64.const 3)
- (f32.const 4)
+ (drop
+ (call_import $extern_v)
)
- (i32.store offset=12
- (get_local $0)
- (i32.const 5)
+ (drop
+ (i32.store offset=16
+ (get_local $1)
+ (i32.const 4)
+ )
)
- (i32.store offset=8
- (get_local $0)
- (i32.const 6)
+ (drop
+ (call_import $extern_ijidf
+ (i64.const 1)
+ (i32.const 2)
+ (f64.const 3)
+ (f32.const 4)
+ )
+ )
+ (drop
+ (i32.store offset=12
+ (get_local $1)
+ (i32.const 5)
+ )
+ )
+ (drop
+ (i32.store offset=8
+ (get_local $1)
+ (i32.const 6)
+ )
)
- (set_local $1
+ (set_local $0
(i32.load offset=28
- (get_local $0)
+ (get_local $1)
)
)
- (i32.store offset=4
- (i32.const 0)
- (i32.add
- (get_local $0)
- (i32.const 32)
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (i32.add
+ (get_local $1)
+ (i32.const 32)
+ )
)
)
- (get_local $1)
+ (get_local $0)
)
(func $baz (result i32)
(i32.const 3)
@@ -119,8 +142,8 @@
)
(func $dynCall_fd (param $fptr i32) (param $0 f64) (result f32)
(call_indirect $FUNCSIG$fd
- (get_local $fptr)
(get_local $0)
+ (get_local $fptr)
)
)
(func $dynCall_v (param $fptr i32)
@@ -130,8 +153,8 @@
)
(func $dynCall_vi (param $fptr i32) (param $0 i32)
(call_indirect $FUNCSIG$vi
- (get_local $fptr)
(get_local $0)
+ (get_local $fptr)
)
)
)
diff --git a/test/dot_s/initializers.wast b/test/dot_s/initializers.wast
index c73fccc73..1afc16054 100644
--- a/test/dot_s/initializers.wast
+++ b/test/dot_s/initializers.wast
@@ -1,9 +1,9 @@
(module
(memory 1)
- (export "memory" memory)
- (export "main" $main)
- (export "f1" $f1)
- (export "f2" $f2)
+ (export "memory" (memory $0))
+ (export "main" (func $main))
+ (export "f1" (func $f1))
+ (export "f2" (func $f2))
(func $main (result i32)
(return
(i32.const 5)
diff --git a/test/dot_s/lcomm-in-text-segment.wast b/test/dot_s/lcomm-in-text-segment.wast
index e154c6c78..98edb78db 100644
--- a/test/dot_s/lcomm-in-text-segment.wast
+++ b/test/dot_s/lcomm-in-text-segment.wast
@@ -1,6 +1,6 @@
(module
(memory 1)
(data (i32.const 20) "\10\00\00\00")
- (export "memory" memory)
+ (export "memory" (memory $0))
)
;; METADATA: { "asmConsts": {},"staticBump": 24, "initializers": [] }
diff --git a/test/dot_s/local_align.wast b/test/dot_s/local_align.wast
index 85900cbed..05363615c 100644
--- a/test/dot_s/local_align.wast
+++ b/test/dot_s/local_align.wast
@@ -1,12 +1,14 @@
(module
(memory 1)
- (export "memory" memory)
- (export "main" $main)
+ (export "memory" (memory $0))
+ (export "main" (func $main))
(func $foo (param $0 i32)
)
(func $main (result i32)
- (call $foo
- (i32.const 16)
+ (drop
+ (call $foo
+ (i32.const 16)
+ )
)
(i32.const 0)
)
diff --git a/test/dot_s/macClangMetaData.wast b/test/dot_s/macClangMetaData.wast
index 2d1b5a68f..9f8fcc61a 100644
--- a/test/dot_s/macClangMetaData.wast
+++ b/test/dot_s/macClangMetaData.wast
@@ -1,13 +1,15 @@
(module
(memory 1)
(data (i32.const 16) "Hello, World!\00")
- (export "memory" memory)
(type $FUNCSIG$ii (func (param i32) (result i32)))
- (import $puts "env" "puts" (param i32) (result i32))
- (export "main" $main)
+ (import "env" "puts" (func $puts (param i32) (result i32)))
+ (export "memory" (memory $0))
+ (export "main" (func $main))
(func $main (param $0 i32) (param $1 i32) (result i32)
- (call_import $puts
- (i32.const 16)
+ (drop
+ (call_import $puts
+ (i32.const 16)
+ )
)
(return
(i32.const 0)
diff --git a/test/dot_s/memops.s b/test/dot_s/memops.s
index 2d5cabdf6..87636971d 100644
--- a/test/dot_s/memops.s
+++ b/test/dot_s/memops.s
@@ -24,7 +24,7 @@ main: # @main
i32.const $8=, 1048576
i32.sub $12=, $7, $8
i32.const $8=, 0
- i32.store $12=, 0($8), $12
+ i32.store $drop=, 0($8), $12
i32.const $1=, 0
copy_local $0=, $1
copy_local $6=, $1
@@ -79,7 +79,7 @@ main: # @main
i32.const $9=, 1048576
i32.add $12=, $12, $9
i32.const $9=, 0
- i32.store $12=, 0($9), $12
+ i32.store $drop=, 0($9), $12
return $pop17
.endfunc
.Lfunc_end1:
diff --git a/test/dot_s/memops.wast b/test/dot_s/memops.wast
index 12a13372e..221ccbae2 100644
--- a/test/dot_s/memops.wast
+++ b/test/dot_s/memops.wast
@@ -1,17 +1,21 @@
(module
(memory 1)
(data (i32.const 16) "{ Module.print(\"hello, world! \" + HEAP32[8>>2]); }\00")
- (export "memory" memory)
(type $FUNCSIG$vi (func (param i32)))
- (import $emscripten_asm_const_vi "env" "emscripten_asm_const_vi" (param i32))
- (export "main" $main)
+ (import "env" "emscripten_asm_const_vi" (func $emscripten_asm_const_vi (param i32)))
+ (export "memory" (memory $0))
+ (export "main" (func $main))
(func $_Z6reporti (param $0 i32)
- (i32.store
- (i32.const 8)
- (get_local $0)
+ (drop
+ (i32.store
+ (i32.const 8)
+ (get_local $0)
+ )
)
- (call_import $emscripten_asm_const_vi
- (i32.const 0)
+ (drop
+ (call_import $emscripten_asm_const_vi
+ (i32.const 0)
+ )
)
(return)
)
@@ -49,7 +53,7 @@
(set_local $8
(i32.const 0)
)
- (set_local $12
+ (drop
(i32.store
(get_local $8)
(get_local $12)
@@ -64,122 +68,132 @@
(set_local $6
(get_local $1)
)
- (loop $label$1 $label$0
- (set_local $4
- (get_local $1)
- )
- (loop $label$3 $label$2
- (set_local $10
- (i32.const 0)
- )
- (set_local $10
- (i32.add
- (get_local $12)
- (get_local $10)
- )
- )
- (i32.store8
- (i32.add
- (get_local $10)
- (get_local $4)
- )
- (i32.add
- (get_local $6)
- (get_local $4)
- )
- )
- (set_local $2
- (i32.const 1)
- )
+ (block $label$1
+ (loop $label$0
(set_local $4
- (i32.add
- (get_local $4)
- (get_local $2)
- )
- )
- (set_local $3
- (i32.const 1048576)
- )
- (set_local $5
(get_local $1)
)
- (br_if $label$2
- (i32.ne
- (get_local $4)
- (get_local $3)
+ (block $label$3
+ (loop $label$2
+ (set_local $10
+ (i32.const 0)
+ )
+ (set_local $10
+ (i32.add
+ (get_local $12)
+ (get_local $10)
+ )
+ )
+ (drop
+ (i32.store8
+ (i32.add
+ (get_local $10)
+ (get_local $4)
+ )
+ (i32.add
+ (get_local $6)
+ (get_local $4)
+ )
+ )
+ )
+ (set_local $2
+ (i32.const 1)
+ )
+ (set_local $4
+ (i32.add
+ (get_local $4)
+ (get_local $2)
+ )
+ )
+ (set_local $3
+ (i32.const 1048576)
+ )
+ (set_local $5
+ (get_local $1)
+ )
+ (br_if $label$2
+ (i32.ne
+ (get_local $4)
+ (get_local $3)
+ )
+ )
)
)
- )
- (loop $label$5 $label$4
- (set_local $11
- (i32.const 0)
- )
- (set_local $11
- (i32.add
- (get_local $12)
- (get_local $11)
+ (block $label$5
+ (loop $label$4
+ (set_local $11
+ (i32.const 0)
+ )
+ (set_local $11
+ (i32.add
+ (get_local $12)
+ (get_local $11)
+ )
+ )
+ (set_local $6
+ (i32.add
+ (i32.and
+ (i32.load8_u
+ (i32.add
+ (get_local $11)
+ (get_local $5)
+ )
+ )
+ (get_local $2)
+ )
+ (get_local $6)
+ )
+ )
+ (set_local $5
+ (i32.add
+ (get_local $5)
+ (get_local $2)
+ )
+ )
+ (br_if $label$4
+ (i32.ne
+ (get_local $5)
+ (get_local $3)
+ )
+ )
)
)
(set_local $6
- (i32.add
- (i32.and
- (i32.load8_u
- (i32.add
- (get_local $11)
- (get_local $5)
+ (i32.and
+ (i32.add
+ (i32.add
+ (i32.mul
+ (get_local $6)
+ (i32.const 3)
+ )
+ (i32.div_s
+ (get_local $6)
+ (i32.const 5)
)
)
- (get_local $2)
+ (i32.const 17)
)
- (get_local $6)
+ (i32.const 65535)
)
)
- (set_local $5
+ (set_local $0
(i32.add
- (get_local $5)
+ (get_local $0)
(get_local $2)
)
)
- (br_if $label$4
+ (br_if $label$0
(i32.ne
- (get_local $5)
- (get_local $3)
- )
- )
- )
- (set_local $6
- (i32.and
- (i32.add
- (i32.add
- (i32.mul
- (get_local $6)
- (i32.const 3)
- )
- (i32.div_s
- (get_local $6)
- (i32.const 5)
- )
- )
- (i32.const 17)
+ (get_local $0)
+ (i32.const 100)
)
- (i32.const 65535)
- )
- )
- (set_local $0
- (i32.add
- (get_local $0)
- (get_local $2)
- )
- )
- (br_if $label$0
- (i32.ne
- (get_local $0)
- (i32.const 100)
)
)
)
- (call $_Z6reporti
- (get_local $6)
+ (drop
+ (call $_Z6reporti
+ (get_local $6)
+ )
)
(set_local $9
(i32.const 1048576)
@@ -193,7 +207,7 @@
(set_local $9
(i32.const 0)
)
- (set_local $12
+ (drop
(i32.store
(get_local $9)
(get_local $12)
diff --git a/test/dot_s/minimal.wast b/test/dot_s/minimal.wast
index 6650e897b..77f1241a4 100644
--- a/test/dot_s/minimal.wast
+++ b/test/dot_s/minimal.wast
@@ -1,7 +1,7 @@
(module
(memory 1)
- (export "memory" memory)
- (export "main" $main)
+ (export "memory" (memory $0))
+ (export "main" (func $main))
(func $main (result i32)
(return
(i32.const 5)
diff --git a/test/dot_s/permute.wast b/test/dot_s/permute.wast
index a58bc21c8..29f3932e7 100644
--- a/test/dot_s/permute.wast
+++ b/test/dot_s/permute.wast
@@ -1,6 +1,6 @@
(module
(memory 1)
(data (i32.const 16) "hE?\8ds\0e7\db[g\8f\955it\c4k\0b\e2\ef\bcld\e0\fd\8c\9e\86&~\d8\94\89+\c8\a4\c2\f2\fb\12\1cej\d99\b7\b3W\c6w\af\ae\caM>\92ub\96\84\b6\b0N\ec;q\11\f7\bf\e31\e6\a7\90\fc\03\e4\aa\d7\cc- \15\83DH\80r\fa\01X\eb:_\00A\cd\e9o`n\ac(\ad\ba0\dcyS#\f4$\"\82\7f}\8e\f6\93L\'\bb\bdZ\ed4\18\f3\c0\cf\ff\a3\f8\07\05\9c\d3\0f\a0\06m%\\\f9^B<\e7\b1\17\98]\0c\dd\c5\f5p\e5\fezJ\ab,F\a5@\08R\85!\b8\1a\ce\d5\04\nI\a6\d1\9f\8a\c9\a9|\97\9aG\be8Y\8b\c1\1b\d4\ea\b9\19\14\9b\9163\d0\1d\d2\df=C\1f\0dc\e1\c7QUv\02\b5aK\b4\tV\c3x\e8\a1\1e\81\de/{\da\d6Pf\10T\f0)\88\16\ee\a8\9d\f1\cbO*\b2\99\132\87.\a2")
- (export "memory" memory)
+ (export "memory" (memory $0))
)
;; METADATA: { "asmConsts": {},"staticBump": 272, "initializers": [] }
diff --git a/test/dot_s/relocation.wast b/test/dot_s/relocation.wast
index eb00bac89..9d870432a 100644
--- a/test/dot_s/relocation.wast
+++ b/test/dot_s/relocation.wast
@@ -2,8 +2,8 @@
(memory 1)
(data (i32.const 12) "\10\00\00\00")
(data (i32.const 16) "\0c\00\00\00")
- (export "memory" memory)
- (export "main" $main)
+ (export "memory" (memory $0))
+ (export "main" (func $main))
(func $main (result i32)
(local $0 i32)
(return
diff --git a/test/dot_s/return.wast b/test/dot_s/return.wast
index 421ee48c0..fe3e867bf 100644
--- a/test/dot_s/return.wast
+++ b/test/dot_s/return.wast
@@ -1,8 +1,8 @@
(module
(memory 1)
- (export "memory" memory)
- (export "return_i32" $return_i32)
- (export "return_void" $return_void)
+ (export "memory" (memory $0))
+ (export "return_i32" (func $return_i32))
+ (export "return_void" (func $return_void))
(func $return_i32 (result i32)
(i32.const 5)
)
diff --git a/test/dot_s/start_main0.wast b/test/dot_s/start_main0.wast
index 52624291b..fd496686b 100644
--- a/test/dot_s/start_main0.wast
+++ b/test/dot_s/start_main0.wast
@@ -1,9 +1,9 @@
(module
(memory 1)
- (export "memory" memory)
(start $_start)
- (export "main" $main)
- (export "_start" $_start)
+ (export "memory" (memory $0))
+ (export "main" (func $main))
+ (export "_start" (func $_start))
(func $main
)
(func $_start
diff --git a/test/dot_s/start_main2.wast b/test/dot_s/start_main2.wast
index ab8bc56dd..28b3beb8e 100644
--- a/test/dot_s/start_main2.wast
+++ b/test/dot_s/start_main2.wast
@@ -1,9 +1,9 @@
(module
(memory 1)
- (export "memory" memory)
(start $_start)
- (export "main" $main)
- (export "_start" $_start)
+ (export "memory" (memory $0))
+ (export "main" (func $main))
+ (export "_start" (func $_start))
(func $main (param $0 i32) (param $1 i32) (result i32)
(return
(get_local $0)
@@ -12,9 +12,11 @@
(func $_start
(local $0 i32)
(local $1 i32)
- (call $main
- (get_local $0)
- (get_local $1)
+ (drop
+ (call $main
+ (get_local $0)
+ (get_local $1)
+ )
)
)
)
diff --git a/test/dot_s/symbolic-offset.wast b/test/dot_s/symbolic-offset.wast
index 51879232a..462b7971a 100644
--- a/test/dot_s/symbolic-offset.wast
+++ b/test/dot_s/symbolic-offset.wast
@@ -1,12 +1,14 @@
(module
(memory 1)
(data (i32.const 12) "\01\00\00\00\00\00\00\00\00\00\00\00")
- (export "memory" memory)
- (export "f" $f)
+ (export "memory" (memory $0))
+ (export "f" (func $f))
(func $f (param $0 i32) (param $1 i32)
- (i32.store offset=16
- (get_local $0)
- (get_local $1)
+ (drop
+ (i32.store offset=16
+ (get_local $0)
+ (get_local $1)
+ )
)
(return)
)
diff --git a/test/dot_s/text_before_type.wast b/test/dot_s/text_before_type.wast
index 7238f7b7b..d80360b21 100644
--- a/test/dot_s/text_before_type.wast
+++ b/test/dot_s/text_before_type.wast
@@ -1,9 +1,11 @@
(module
(memory 1)
- (export "memory" memory)
- (export "main" $main)
+ (export "memory" (memory $0))
+ (export "main" (func $main))
(func $main (result i32)
- (call $foo)
+ (drop
+ (call $foo)
+ )
(i32.const 0)
)
(func $foo
diff --git a/test/dot_s/visibilities.wast b/test/dot_s/visibilities.wast
index cfd504026..5bc934baa 100644
--- a/test/dot_s/visibilities.wast
+++ b/test/dot_s/visibilities.wast
@@ -1,9 +1,9 @@
(module
(memory 1)
- (export "memory" memory)
- (export "foo" $foo)
- (export "bar" $bar)
- (export "qux" $qux)
+ (export "memory" (memory $0))
+ (export "foo" (func $foo))
+ (export "bar" (func $bar))
+ (export "qux" (func $qux))
(func $foo
(return)
)
diff --git a/test/llvm_autogenerated/byval.s b/test/llvm_autogenerated/byval.s
index 2fdba767c..b9e9a7d5c 100644
--- a/test/llvm_autogenerated/byval.s
+++ b/test/llvm_autogenerated/byval.s
@@ -1,26 +1,26 @@
.text
- .file "/s/llvm/llvm/test/CodeGen/WebAssembly/byval.ll"
+ .file "/s/llvm-upstream/llvm/test/CodeGen/WebAssembly/byval.ll"
.globl byval_arg
.type byval_arg,@function
byval_arg:
.param i32
.local i32
- i32.const $push4=, __stack_pointer
- i32.const $push1=, __stack_pointer
- i32.load $push2=, 0($pop1)
+ i32.const $push4=, 0
+ i32.const $push1=, 0
+ i32.load $push2=, __stack_pointer($pop1)
i32.const $push3=, 16
- i32.sub $push10=, $pop2, $pop3
- i32.store $push12=, 0($pop4), $pop10
- tee_local $push11=, $1=, $pop12
+ i32.sub $push11=, $pop2, $pop3
+ tee_local $push10=, $1=, $pop11
+ i32.store $drop=, __stack_pointer($pop4), $pop10
i32.load $push0=, 0($0)
- i32.store $drop=, 12($pop11), $pop0
+ i32.store $drop=, 12($1), $pop0
i32.const $push8=, 12
i32.add $push9=, $1, $pop8
call ext_byval_func@FUNCTION, $pop9
- i32.const $push7=, __stack_pointer
+ i32.const $push7=, 0
i32.const $push5=, 16
i32.add $push6=, $1, $pop5
- i32.store $drop=, 0($pop7), $pop6
+ i32.store $drop=, __stack_pointer($pop7), $pop6
return
.endfunc
.Lfunc_end0:
@@ -31,22 +31,22 @@ byval_arg:
byval_arg_align8:
.param i32
.local i32
- i32.const $push4=, __stack_pointer
- i32.const $push1=, __stack_pointer
- i32.load $push2=, 0($pop1)
+ i32.const $push4=, 0
+ i32.const $push1=, 0
+ i32.load $push2=, __stack_pointer($pop1)
i32.const $push3=, 16
- i32.sub $push10=, $pop2, $pop3
- i32.store $push12=, 0($pop4), $pop10
- tee_local $push11=, $1=, $pop12
+ i32.sub $push11=, $pop2, $pop3
+ tee_local $push10=, $1=, $pop11
+ i32.store $drop=, __stack_pointer($pop4), $pop10
i32.load $push0=, 0($0)
- i32.store $drop=, 8($pop11), $pop0
+ i32.store $drop=, 8($1), $pop0
i32.const $push8=, 8
i32.add $push9=, $1, $pop8
call ext_byval_func_align8@FUNCTION, $pop9
- i32.const $push7=, __stack_pointer
+ i32.const $push7=, 0
i32.const $push5=, 16
i32.add $push6=, $1, $pop5
- i32.store $drop=, 0($pop7), $pop6
+ i32.store $drop=, __stack_pointer($pop7), $pop6
return
.endfunc
.Lfunc_end1:
@@ -57,26 +57,26 @@ byval_arg_align8:
byval_arg_double:
.param i32
.local i32
- i32.const $push8=, __stack_pointer
- i32.const $push5=, __stack_pointer
- i32.load $push6=, 0($pop5)
+ i32.const $push8=, 0
+ i32.const $push5=, 0
+ i32.load $push6=, __stack_pointer($pop5)
i32.const $push7=, 16
- i32.sub $push12=, $pop6, $pop7
- i32.store $push15=, 0($pop8), $pop12
- tee_local $push14=, $1=, $pop15
+ i32.sub $push14=, $pop6, $pop7
+ tee_local $push13=, $1=, $pop14
+ i32.store $drop=, __stack_pointer($pop8), $pop13
i32.const $push0=, 8
- i32.add $push3=, $pop14, $pop0
- i32.const $push13=, 8
- i32.add $push1=, $0, $pop13
+ i32.add $push3=, $1, $pop0
+ i32.const $push12=, 8
+ i32.add $push1=, $0, $pop12
i64.load $push2=, 0($pop1)
i64.store $drop=, 0($pop3), $pop2
i64.load $push4=, 0($0)
i64.store $drop=, 0($1), $pop4
call ext_byval_func_alignedstruct@FUNCTION, $1
- i32.const $push11=, __stack_pointer
+ i32.const $push11=, 0
i32.const $push9=, 16
i32.add $push10=, $1, $pop9
- i32.store $drop=, 0($pop11), $pop10
+ i32.store $drop=, __stack_pointer($pop11), $pop10
return
.endfunc
.Lfunc_end2:
@@ -116,23 +116,33 @@ byval_empty_callee:
.type big_byval,@function
big_byval:
.param i32
- i32.const $push5=, __stack_pointer
- i32.const $push2=, __stack_pointer
- i32.load $push3=, 0($pop2)
- i32.const $push4=, 131072
- i32.sub $push9=, $pop3, $pop4
- i32.store $push0=, 0($pop5), $pop9
- i32.const $push1=, 131072
- i32.call $push11=, memcpy@FUNCTION, $pop0, $0, $pop1
- tee_local $push10=, $0=, $pop11
- call big_byval_callee@FUNCTION, $pop10
- i32.const $push8=, __stack_pointer
- i32.const $push6=, 131072
- i32.add $push7=, $0, $pop6
- i32.store $drop=, 0($pop8), $pop7
+ .local i32
+ i32.const $push4=, 0
+ i32.const $push1=, 0
+ i32.load $push2=, __stack_pointer($pop1)
+ i32.const $push3=, 131072
+ i32.sub $push11=, $pop2, $pop3
+ tee_local $push10=, $1=, $pop11
+ i32.store $drop=, __stack_pointer($pop4), $pop10
+ i32.const $push0=, 131072
+ i32.call $push9=, memcpy@FUNCTION, $1, $0, $pop0
+ tee_local $push8=, $0=, $pop9
+ call big_byval_callee@FUNCTION, $pop8
+ i32.const $push7=, 0
+ i32.const $push5=, 131072
+ i32.add $push6=, $0, $pop5
+ i32.store $drop=, __stack_pointer($pop7), $pop6
return
.endfunc
.Lfunc_end6:
.size big_byval, .Lfunc_end6-big_byval
+ .functype ext_func, void, i32
+ .functype ext_func_empty, void, i32
+ .functype ext_byval_func, void, i32
+ .functype ext_byval_func_align8, void, i32
+ .functype ext_byval_func_alignedstruct, void, i32
+ .functype ext_byval_func_bigarray, void, i32
+ .functype ext_byval_func_empty, void, i32
+ .functype big_byval_callee, void, i32
diff --git a/test/llvm_autogenerated/byval.wast b/test/llvm_autogenerated/byval.wast
index 9ef6f368c..122446985 100644
--- a/test/llvm_autogenerated/byval.wast
+++ b/test/llvm_autogenerated/byval.wast
@@ -1,209 +1,218 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
(type $FUNCSIG$vi (func (param i32)))
(type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32)))
- (import $big_byval_callee "env" "big_byval_callee" (param i32))
- (import $ext_byval_func "env" "ext_byval_func" (param i32))
- (import $ext_byval_func_align8 "env" "ext_byval_func_align8" (param i32))
- (import $ext_byval_func_alignedstruct "env" "ext_byval_func_alignedstruct" (param i32))
- (import $ext_byval_func_empty "env" "ext_byval_func_empty" (param i32))
- (import $ext_func "env" "ext_func" (param i32))
- (import $ext_func_empty "env" "ext_func_empty" (param i32))
- (import $memcpy "env" "memcpy" (param i32 i32 i32) (result i32))
- (export "byval_arg" $byval_arg)
- (export "byval_arg_align8" $byval_arg_align8)
- (export "byval_arg_double" $byval_arg_double)
- (export "byval_param" $byval_param)
- (export "byval_empty_caller" $byval_empty_caller)
- (export "byval_empty_callee" $byval_empty_callee)
- (export "big_byval" $big_byval)
- (func $byval_arg (type $FUNCSIG$vi) (param $0 i32)
+ (import "env" "big_byval_callee" (func $big_byval_callee (param i32)))
+ (import "env" "ext_byval_func" (func $ext_byval_func (param i32)))
+ (import "env" "ext_byval_func_align8" (func $ext_byval_func_align8 (param i32)))
+ (import "env" "ext_byval_func_alignedstruct" (func $ext_byval_func_alignedstruct (param i32)))
+ (import "env" "ext_byval_func_empty" (func $ext_byval_func_empty (param i32)))
+ (import "env" "ext_func" (func $ext_func (param i32)))
+ (import "env" "ext_func_empty" (func $ext_func_empty (param i32)))
+ (import "env" "memcpy" (func $memcpy (param i32 i32 i32) (result i32)))
+ (export "memory" (memory $0))
+ (export "byval_arg" (func $byval_arg))
+ (export "byval_arg_align8" (func $byval_arg_align8))
+ (export "byval_arg_double" (func $byval_arg_double))
+ (export "byval_param" (func $byval_param))
+ (export "byval_empty_caller" (func $byval_empty_caller))
+ (export "byval_empty_callee" (func $byval_empty_callee))
+ (export "big_byval" (func $big_byval))
+ (func $byval_arg (param $0 i32)
(local $1 i32)
- (local $2 i32)
- (i32.store offset=12
- (tee_local $1
- (block
- (block
- (set_local $2
- (i32.sub
- (i32.load
- (i32.const 4)
- )
- (i32.const 16)
- )
- )
- (i32.store
- (i32.const 4)
- (get_local $2)
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (tee_local $1
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
)
+ (i32.const 16)
)
- (get_local $2)
)
)
- (i32.load
- (get_local $0)
- )
)
- (call_import $ext_byval_func
- (i32.add
+ (drop
+ (i32.store offset=12
(get_local $1)
- (i32.const 12)
+ (i32.load
+ (get_local $0)
+ )
)
)
- (i32.store
- (i32.const 4)
- (i32.add
- (get_local $1)
- (i32.const 16)
+ (drop
+ (call_import $ext_byval_func
+ (i32.add
+ (get_local $1)
+ (i32.const 12)
+ )
+ )
+ )
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (i32.add
+ (get_local $1)
+ (i32.const 16)
+ )
)
)
(return)
)
- (func $byval_arg_align8 (type $FUNCSIG$vi) (param $0 i32)
+ (func $byval_arg_align8 (param $0 i32)
(local $1 i32)
- (local $2 i32)
- (i32.store offset=8
- (tee_local $1
- (block
- (block
- (set_local $2
- (i32.sub
- (i32.load
- (i32.const 4)
- )
- (i32.const 16)
- )
- )
- (i32.store
- (i32.const 4)
- (get_local $2)
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (tee_local $1
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
)
+ (i32.const 16)
)
- (get_local $2)
)
)
- (i32.load
- (get_local $0)
- )
)
- (call_import $ext_byval_func_align8
- (i32.add
+ (drop
+ (i32.store offset=8
(get_local $1)
- (i32.const 8)
+ (i32.load
+ (get_local $0)
+ )
)
)
- (i32.store
- (i32.const 4)
- (i32.add
- (get_local $1)
- (i32.const 16)
+ (drop
+ (call_import $ext_byval_func_align8
+ (i32.add
+ (get_local $1)
+ (i32.const 8)
+ )
+ )
+ )
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (i32.add
+ (get_local $1)
+ (i32.const 16)
+ )
)
)
(return)
)
- (func $byval_arg_double (type $FUNCSIG$vi) (param $0 i32)
+ (func $byval_arg_double (param $0 i32)
(local $1 i32)
- (local $2 i32)
- (i64.store
- (i32.add
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
(tee_local $1
- (block
- (block
- (set_local $2
- (i32.sub
- (i32.load
- (i32.const 4)
- )
- (i32.const 16)
- )
- )
- (i32.store
- (i32.const 4)
- (get_local $2)
- )
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
)
- (get_local $2)
+ (i32.const 16)
)
)
- (i32.const 8)
)
- (i64.load
+ )
+ (drop
+ (i64.store
(i32.add
- (get_local $0)
+ (get_local $1)
(i32.const 8)
)
+ (i64.load
+ (i32.add
+ (get_local $0)
+ (i32.const 8)
+ )
+ )
)
)
- (i64.store
- (get_local $1)
- (i64.load
- (get_local $0)
+ (drop
+ (i64.store
+ (get_local $1)
+ (i64.load
+ (get_local $0)
+ )
)
)
- (call_import $ext_byval_func_alignedstruct
- (get_local $1)
- )
- (i32.store
- (i32.const 4)
- (i32.add
+ (drop
+ (call_import $ext_byval_func_alignedstruct
(get_local $1)
- (i32.const 16)
+ )
+ )
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (i32.add
+ (get_local $1)
+ (i32.const 16)
+ )
)
)
(return)
)
- (func $byval_param (type $FUNCSIG$vi) (param $0 i32)
- (call_import $ext_func
- (get_local $0)
+ (func $byval_param (param $0 i32)
+ (drop
+ (call_import $ext_func
+ (get_local $0)
+ )
)
(return)
)
- (func $byval_empty_caller (type $FUNCSIG$vi) (param $0 i32)
- (call_import $ext_byval_func_empty
- (get_local $0)
+ (func $byval_empty_caller (param $0 i32)
+ (drop
+ (call_import $ext_byval_func_empty
+ (get_local $0)
+ )
)
(return)
)
- (func $byval_empty_callee (type $FUNCSIG$vi) (param $0 i32)
- (call_import $ext_func_empty
- (get_local $0)
+ (func $byval_empty_callee (param $0 i32)
+ (drop
+ (call_import $ext_func_empty
+ (get_local $0)
+ )
)
(return)
)
- (func $big_byval (type $FUNCSIG$vi) (param $0 i32)
+ (func $big_byval (param $0 i32)
(local $1 i32)
- (call_import $big_byval_callee
- (tee_local $0
- (call_import $memcpy
- (block
- (block
- (set_local $1
- (i32.sub
- (i32.load
- (i32.const 4)
- )
- (i32.const 131072)
- )
- )
- (i32.store
- (i32.const 4)
- (get_local $1)
- )
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (tee_local $1
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
)
+ (i32.const 131072)
+ )
+ )
+ )
+ )
+ (drop
+ (call_import $big_byval_callee
+ (tee_local $0
+ (call_import $memcpy
(get_local $1)
+ (get_local $0)
+ (i32.const 131072)
)
- (get_local $0)
- (i32.const 131072)
)
)
)
- (i32.store
- (i32.const 4)
- (i32.add
- (get_local $0)
- (i32.const 131072)
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (i32.add
+ (get_local $0)
+ (i32.const 131072)
+ )
)
)
(return)
diff --git a/test/llvm_autogenerated/call.s b/test/llvm_autogenerated/call.s
index 52f99b2cf..627230d7b 100644
--- a/test/llvm_autogenerated/call.s
+++ b/test/llvm_autogenerated/call.s
@@ -1,5 +1,5 @@
.text
- .file "/s/llvm/llvm/test/CodeGen/WebAssembly/call.ll"
+ .file "/s/llvm-upstream/llvm/test/CodeGen/WebAssembly/call.ll"
.globl call_i32_nullary
.type call_i32_nullary,@function
call_i32_nullary:
@@ -119,4 +119,20 @@ coldcc_tail_call_void_nullary:
.Lfunc_end11:
.size coldcc_tail_call_void_nullary, .Lfunc_end11-coldcc_tail_call_void_nullary
+ .hidden addr_void_nullary
+ .type addr_void_nullary,@object
+ .data
+ .globl addr_void_nullary
+ .p2align 2
+addr_void_nullary:
+ .int32 void_nullary@FUNCTION
+ .size addr_void_nullary, 4
+
+ .functype i32_nullary, i32
+ .functype i32_unary, i32, i32
+ .functype i32_binary, i32, i32, i32
+ .functype i64_nullary, i64
+ .functype float_nullary, f32
+ .functype double_nullary, f64
+ .functype void_nullary, void
diff --git a/test/llvm_autogenerated/call.wast b/test/llvm_autogenerated/call.wast
index 8dc92ff80..5e91ea75f 100644
--- a/test/llvm_autogenerated/call.wast
+++ b/test/llvm_autogenerated/call.wast
@@ -1,33 +1,37 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
+ (data (i32.const 12) "\01\00\00\00")
(type $FUNCSIG$v (func))
(type $FUNCSIG$i (func (result i32)))
- (type $FUNCSIG$d (func (result f64)))
- (type $FUNCSIG$f (func (result f32)))
- (type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(type $FUNCSIG$ii (func (param i32) (result i32)))
+ (type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(type $FUNCSIG$j (func (result i64)))
- (import $double_nullary "env" "double_nullary" (result f64))
- (import $float_nullary "env" "float_nullary" (result f32))
- (import $i32_binary "env" "i32_binary" (param i32 i32) (result i32))
- (import $i32_nullary "env" "i32_nullary" (result i32))
- (import $i32_unary "env" "i32_unary" (param i32) (result i32))
- (import $i64_nullary "env" "i64_nullary" (result i64))
- (import $void_nullary "env" "void_nullary")
- (export "call_i32_nullary" $call_i32_nullary)
- (export "call_i64_nullary" $call_i64_nullary)
- (export "call_float_nullary" $call_float_nullary)
- (export "call_double_nullary" $call_double_nullary)
- (export "call_void_nullary" $call_void_nullary)
- (export "call_i32_unary" $call_i32_unary)
- (export "call_i32_binary" $call_i32_binary)
- (export "call_indirect_void" $call_indirect_void)
- (export "call_indirect_i32" $call_indirect_i32)
- (export "tail_call_void_nullary" $tail_call_void_nullary)
- (export "fastcc_tail_call_void_nullary" $fastcc_tail_call_void_nullary)
- (export "coldcc_tail_call_void_nullary" $coldcc_tail_call_void_nullary)
+ (type $FUNCSIG$f (func (result f32)))
+ (type $FUNCSIG$d (func (result f64)))
+ (import "env" "double_nullary" (func $double_nullary (result f64)))
+ (import "env" "float_nullary" (func $float_nullary (result f32)))
+ (import "env" "i32_binary" (func $i32_binary (param i32 i32) (result i32)))
+ (import "env" "i32_nullary" (func $i32_nullary (result i32)))
+ (import "env" "i32_unary" (func $i32_unary (param i32) (result i32)))
+ (import "env" "i64_nullary" (func $i64_nullary (result i64)))
+ (import "env" "void_nullary" (func $void_nullary))
+ (export "memory" (memory $0))
+ (export "call_i32_nullary" (func $call_i32_nullary))
+ (export "call_i64_nullary" (func $call_i64_nullary))
+ (export "call_float_nullary" (func $call_float_nullary))
+ (export "call_double_nullary" (func $call_double_nullary))
+ (export "call_void_nullary" (func $call_void_nullary))
+ (export "call_i32_unary" (func $call_i32_unary))
+ (export "call_i32_binary" (func $call_i32_binary))
+ (export "call_indirect_void" (func $call_indirect_void))
+ (export "call_indirect_i32" (func $call_indirect_i32))
+ (export "tail_call_void_nullary" (func $tail_call_void_nullary))
+ (export "fastcc_tail_call_void_nullary" (func $fastcc_tail_call_void_nullary))
+ (export "coldcc_tail_call_void_nullary" (func $coldcc_tail_call_void_nullary))
+ (export "dynCall_v" (func $dynCall_v))
+ (table 2 2 anyfunc)
+ (elem (i32.const 0) $__wasm_nullptr $__importThunk_void_nullary)
(func $call_i32_nullary (result i32)
(return
(call_import $i32_nullary)
@@ -49,7 +53,9 @@
)
)
(func $call_void_nullary
- (call_import $void_nullary)
+ (drop
+ (call_import $void_nullary)
+ )
(return)
)
(func $call_i32_unary (param $0 i32) (result i32)
@@ -68,8 +74,10 @@
)
)
(func $call_indirect_void (param $0 i32)
- (call_indirect $FUNCSIG$v
- (get_local $0)
+ (drop
+ (call_indirect $FUNCSIG$v
+ (get_local $0)
+ )
)
(return)
)
@@ -81,16 +89,33 @@
)
)
(func $tail_call_void_nullary
- (call_import $void_nullary)
+ (drop
+ (call_import $void_nullary)
+ )
(return)
)
(func $fastcc_tail_call_void_nullary
- (call_import $void_nullary)
+ (drop
+ (call_import $void_nullary)
+ )
(return)
)
(func $coldcc_tail_call_void_nullary
- (call_import $void_nullary)
+ (drop
+ (call_import $void_nullary)
+ )
(return)
)
+ (func $__wasm_nullptr (type $FUNCSIG$v)
+ (unreachable)
+ )
+ (func $__importThunk_void_nullary (type $FUNCSIG$v)
+ (call_import $void_nullary)
+ )
+ (func $dynCall_v (param $fptr i32)
+ (call_indirect $FUNCSIG$v
+ (get_local $fptr)
+ )
+ )
)
;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] }
diff --git a/test/llvm_autogenerated/cfg-stackify.s b/test/llvm_autogenerated/cfg-stackify.s
index f921cb4ba..8aa105d2c 100644
--- a/test/llvm_autogenerated/cfg-stackify.s
+++ b/test/llvm_autogenerated/cfg-stackify.s
@@ -1,26 +1,22 @@
.text
- .file "/s/llvm/llvm/test/CodeGen/WebAssembly/cfg-stackify.ll"
+ .file "/s/llvm-upstream/llvm/test/CodeGen/WebAssembly/cfg-stackify.ll"
.globl test0
.type test0,@function
test0:
.param i32
.local i32
- i32.const $1=, 0
+ i32.const $1=, 1
.LBB0_1:
loop
- block
- i32.const $push3=, 1
- i32.add $push2=, $1, $pop3
- tee_local $push1=, $1=, $pop2
- i32.lt_s $push0=, $pop1, $0
- br_if 0, $pop0
- return
-.LBB0_3:
- end_block
+ i32.ge_s $push0=, $1, $0
+ br_if 1, $pop0
+ i32.const $push1=, 1
+ i32.add $1=, $1, $pop1
call something@FUNCTION
br 0
-.LBB0_4:
+.LBB0_3:
end_loop
+ return
.endfunc
.Lfunc_end0:
.size test0, .Lfunc_end0-test0
@@ -30,22 +26,18 @@ test0:
test1:
.param i32
.local i32
- i32.const $1=, 0
+ i32.const $1=, 1
.LBB1_1:
loop
- block
- i32.const $push3=, 1
- i32.add $push2=, $1, $pop3
- tee_local $push1=, $1=, $pop2
- i32.lt_s $push0=, $pop1, $0
- br_if 0, $pop0
- return
-.LBB1_3:
- end_block
+ i32.ge_s $push0=, $1, $0
+ br_if 1, $pop0
+ i32.const $push1=, 1
+ i32.add $1=, $1, $pop1
call something@FUNCTION
br 0
-.LBB1_4:
+.LBB1_3:
end_loop
+ return
.endfunc
.Lfunc_end1:
.size test1, .Lfunc_end1-test1
@@ -87,23 +79,25 @@ doublediamond:
i32.store $drop=, 0($2), $pop0
block
block
- br_if 0, $0
+ block
+ i32.eqz $push7=, $0
+ br_if 0, $pop7
+ i32.const $push1=, 2
+ i32.store $drop=, 0($2), $pop1
+ i32.eqz $push8=, $1
+ br_if 1, $pop8
+ i32.const $push2=, 4
+ i32.store $drop=, 0($2), $pop2
+ br 2
+.LBB3_3:
+ end_block
i32.const $push4=, 1
i32.store $drop=, 0($2), $pop4
br 1
-.LBB3_2:
+.LBB3_4:
end_block
- i32.const $push1=, 2
- i32.store $drop=, 0($2), $pop1
- block
- br_if 0, $1
i32.const $push3=, 3
i32.store $drop=, 0($2), $pop3
- br 1
-.LBB3_4:
- end_block
- i32.const $push2=, 4
- i32.store $drop=, 0($2), $pop2
.LBB3_5:
end_block
i32.const $push5=, 5
@@ -119,18 +113,18 @@ doublediamond:
triangle:
.param i32, i32
.result i32
- .local i32
- i32.const $push0=, 0
- i32.store $2=, 0($0), $pop0
+ i32.const $push2=, 0
+ i32.store $drop=, 0($0), $pop2
block
br_if 0, $1
- i32.const $push1=, 1
- i32.store $drop=, 0($0), $pop1
+ i32.const $push0=, 1
+ i32.store $drop=, 0($0), $pop0
.LBB4_2:
end_block
- i32.const $push2=, 2
- i32.store $drop=, 0($0), $pop2
- return $2
+ i32.const $push1=, 2
+ i32.store $drop=, 0($0), $pop1
+ i32.const $push3=, 0
+ return $pop3
.endfunc
.Lfunc_end4:
.size triangle, .Lfunc_end4-triangle
@@ -144,14 +138,15 @@ diamond:
i32.store $drop=, 0($0), $pop0
block
block
- br_if 0, $1
- i32.const $push2=, 1
- i32.store $drop=, 0($0), $pop2
+ i32.eqz $push5=, $1
+ br_if 0, $pop5
+ i32.const $push1=, 2
+ i32.store $drop=, 0($0), $pop1
br 1
.LBB5_2:
end_block
- i32.const $push1=, 2
- i32.store $drop=, 0($0), $pop1
+ i32.const $push2=, 1
+ i32.store $drop=, 0($0), $pop2
.LBB5_3:
end_block
i32.const $push3=, 3
@@ -167,9 +162,10 @@ diamond:
single_block:
.param i32
.result i32
+ i32.const $push0=, 0
+ i32.store $drop=, 0($0), $pop0
i32.const $push1=, 0
- i32.store $push0=, 0($0), $pop1
- return $pop0
+ return $pop1
.endfunc
.Lfunc_end6:
.size single_block, .Lfunc_end6-single_block
@@ -178,7 +174,6 @@ single_block:
.type minimal_loop,@function
minimal_loop:
.param i32
- .result i32
i32.const $push0=, 0
i32.store $drop=, 0($0), $pop0
.LBB7_1:
@@ -219,26 +214,26 @@ simple_loop:
doubletriangle:
.param i32, i32, i32
.result i32
- .local i32
- i32.const $push0=, 0
- i32.store $3=, 0($2), $pop0
+ i32.const $push4=, 0
+ i32.store $drop=, 0($2), $pop4
block
br_if 0, $0
- i32.const $push1=, 2
- i32.store $drop=, 0($2), $pop1
+ i32.const $push0=, 2
+ i32.store $drop=, 0($2), $pop0
block
br_if 0, $1
- i32.const $push2=, 3
- i32.store $drop=, 0($2), $pop2
+ i32.const $push1=, 3
+ i32.store $drop=, 0($2), $pop1
.LBB9_3:
end_block
- i32.const $push3=, 4
- i32.store $drop=, 0($2), $pop3
+ i32.const $push2=, 4
+ i32.store $drop=, 0($2), $pop2
.LBB9_4:
end_block
- i32.const $push4=, 5
- i32.store $drop=, 0($2), $pop4
- return $3
+ i32.const $push3=, 5
+ i32.store $drop=, 0($2), $pop3
+ i32.const $push5=, 0
+ return $pop5
.endfunc
.Lfunc_end9:
.size doubletriangle, .Lfunc_end9-doubletriangle
@@ -252,17 +247,18 @@ ifelse_earlyexits:
i32.store $drop=, 0($2), $pop0
block
block
- br_if 0, $0
- i32.const $push3=, 1
- i32.store $drop=, 0($2), $pop3
- br 1
-.LBB10_2:
- end_block
+ i32.eqz $push6=, $0
+ br_if 0, $pop6
i32.const $push1=, 2
i32.store $drop=, 0($2), $pop1
- br_if 0, $1
+ br_if 1, $1
i32.const $push2=, 3
i32.store $drop=, 0($2), $pop2
+ br 1
+.LBB10_3:
+ end_block
+ i32.const $push3=, 1
+ i32.store $drop=, 0($2), $pop3
.LBB10_4:
end_block
i32.const $push4=, 4
@@ -277,24 +273,25 @@ ifelse_earlyexits:
.type doublediamond_in_a_loop,@function
doublediamond_in_a_loop:
.param i32, i32, i32
- .result i32
.LBB11_1:
loop
- i32.const $push0=, 0
- i32.store $drop=, 0($2), $pop0
- block
- br_if 0, $0
- i32.const $push2=, 1
+ i32.const $push2=, 0
i32.store $drop=, 0($2), $pop2
- i32.const $push1=, 5
- i32.store $drop=, 0($2), $pop1
- br 1
-.LBB11_3:
- end_block
+ block
+ i32.eqz $push8=, $0
+ br_if 0, $pop8
i32.const $push3=, 2
i32.store $drop=, 0($2), $pop3
block
- br_if 0, $1
+ i32.eqz $push9=, $1
+ br_if 0, $pop9
+ i32.const $push1=, 4
+ i32.store $drop=, 0($2), $pop1
+ i32.const $push0=, 5
+ i32.store $drop=, 0($2), $pop0
+ br 2
+.LBB11_4:
+ end_block
i32.const $push5=, 3
i32.store $drop=, 0($2), $pop5
i32.const $push4=, 5
@@ -302,7 +299,7 @@ doublediamond_in_a_loop:
br 1
.LBB11_5:
end_block
- i32.const $push7=, 4
+ i32.const $push7=, 1
i32.store $drop=, 0($2), $pop7
i32.const $push6=, 5
i32.store $drop=, 0($2), $pop6
@@ -323,18 +320,24 @@ test3:
i32.eq $0=, $0, $0
.LBB12_2:
loop
- br_if 1, $0
+ block
+ block
+ br_if 0, $0
.LBB12_3:
loop
i32.eqz $push1=, $0
br_if 0, $pop1
+ br 3
+.LBB12_4:
end_loop
+ end_block
+ unreachable
+.LBB12_5:
+ end_block
call bar@FUNCTION
br 0
-.LBB12_5:
- end_loop
- unreachable
.LBB12_6:
+ end_loop
end_block
return
.endfunc
@@ -378,9 +381,8 @@ test4:
.type test5,@function
test5:
.param i32, i32
- .local i32
i32.const $push5=, 1
- i32.and $2=, $0, $pop5
+ i32.and $0=, $0, $pop5
i32.const $push4=, 1
i32.and $1=, $1, $pop4
.LBB14_1:
@@ -388,11 +390,12 @@ test5:
loop
i32.const $push7=, 0
i32.const $push6=, 0
- i32.store $0=, 0($pop7), $pop6
- i32.eqz $push9=, $2
- br_if 2, $pop9
+ i32.store $drop=, 0($pop7), $pop6
+ i32.eqz $push10=, $0
+ br_if 2, $pop10
+ i32.const $push9=, 0
i32.const $push8=, 1
- i32.store $drop=, 0($0), $pop8
+ i32.store $drop=, 0($pop9), $pop8
br_if 0, $1
end_loop
i32.const $push3=, 0
@@ -413,27 +416,30 @@ test5:
.type test6,@function
test6:
.param i32, i32
- .local i32, i32, i32
+ .local i32
i32.const $push6=, 1
- i32.and $3=, $0, $pop6
+ i32.and $2=, $0, $pop6
.LBB15_1:
block
block
loop
i32.const $push8=, 0
i32.const $push7=, 0
- i32.store $0=, 0($pop8), $pop7
- i32.eqz $push14=, $3
- br_if 3, $pop14
- i32.const $push13=, 1
- i32.store $push12=, 0($0), $pop13
- tee_local $push11=, $2=, $pop12
+ i32.store $drop=, 0($pop8), $pop7
+ i32.eqz $push16=, $2
+ br_if 3, $pop16
+ i32.const $push13=, 0
+ i32.const $push12=, 1
+ i32.store $drop=, 0($pop13), $pop12
+ i32.const $push11=, 1
i32.and $push10=, $1, $pop11
- tee_local $push9=, $4=, $pop10
- i32.eqz $push15=, $pop9
- br_if 2, $pop15
- i32.store $drop=, 0($0), $2
- br_if 0, $4
+ tee_local $push9=, $0=, $pop10
+ i32.eqz $push17=, $pop9
+ br_if 2, $pop17
+ i32.const $push15=, 0
+ i32.const $push14=, 1
+ i32.store $drop=, 0($pop15), $pop14
+ br_if 0, $0
end_loop
i32.const $push5=, 0
i32.const $push4=, 2
@@ -458,36 +464,45 @@ test6:
.type test7,@function
test7:
.param i32, i32
- .local i32, i32
- i32.const $push0=, 0
i32.const $push8=, 0
- i32.store $2=, 0($pop0), $pop8
- i32.const $push7=, 1
- i32.and $3=, $0, $pop7
+ i32.const $push7=, 0
+ i32.store $drop=, 0($pop8), $pop7
+ i32.const $push6=, 1
+ i32.and $0=, $0, $pop6
.LBB16_1:
+ block
loop
+ i32.const $push10=, 0
i32.const $push9=, 1
- i32.store $0=, 0($2), $pop9
+ i32.store $drop=, 0($pop10), $pop9
block
- br_if 0, $3
- i32.const $push10=, 2
- i32.store $drop=, 0($2), $pop10
- i32.and $push1=, $1, $0
- br_if 1, $pop1
- i32.const $push3=, 0
- i32.const $push2=, 4
- i32.store $drop=, 0($pop3), $pop2
- unreachable
-.LBB16_4:
+ i32.eqz $push17=, $0
+ br_if 0, $pop17
+ i32.const $push13=, 0
+ i32.const $push12=, 3
+ i32.store $drop=, 0($pop13), $pop12
+ i32.const $push11=, 1
+ i32.and $push3=, $1, $pop11
+ br_if 1, $pop3
+ br 3
+.LBB16_3:
end_block
- i32.const $push11=, 3
- i32.store $drop=, 0($2), $pop11
- i32.and $push4=, $1, $0
- br_if 0, $pop4
+ i32.const $push16=, 0
+ i32.const $push15=, 2
+ i32.store $drop=, 0($pop16), $pop15
+ i32.const $push14=, 1
+ i32.and $push0=, $1, $pop14
+ br_if 0, $pop0
end_loop
- i32.const $push6=, 0
- i32.const $push5=, 5
- i32.store $drop=, 0($pop6), $pop5
+ i32.const $push2=, 0
+ i32.const $push1=, 4
+ i32.store $drop=, 0($pop2), $pop1
+ unreachable
+.LBB16_5:
+ end_block
+ i32.const $push5=, 0
+ i32.const $push4=, 5
+ i32.store $drop=, 0($pop5), $pop4
unreachable
.endfunc
.Lfunc_end16:
@@ -496,7 +511,6 @@ test7:
.globl test8
.type test8,@function
test8:
- .result i32
.LBB17_1:
loop
i32.const $push0=, 0
@@ -511,50 +525,54 @@ test8:
.globl test9
.type test9,@function
test9:
- .local i32, i32
- i32.const $push0=, 0
i32.const $push11=, 0
- i32.store $0=, 0($pop0), $pop11
+ i32.const $push10=, 0
+ i32.store $drop=, 0($pop11), $pop10
.LBB18_1:
loop
- i32.const $push14=, 1
- i32.store $push13=, 0($0), $pop14
- tee_local $push12=, $1=, $pop13
- i32.call $push1=, a@FUNCTION
- i32.and $push2=, $pop12, $pop1
- i32.eqz $push18=, $pop2
- br_if 1, $pop18
+ i32.const $push23=, 0
+ i32.const $push22=, 1
+ i32.store $drop=, 0($pop23), $pop22
+ i32.call $push0=, a@FUNCTION
+ i32.const $push21=, 1
+ i32.and $push1=, $pop0, $pop21
+ i32.eqz $push24=, $pop1
+ br_if 1, $pop24
.LBB18_2:
loop
- i32.const $push15=, 2
- i32.store $drop=, 0($0), $pop15
+ i32.const $push14=, 0
+ i32.const $push13=, 2
+ i32.store $drop=, 0($pop14), $pop13
block
- i32.call $push5=, a@FUNCTION
- i32.and $push6=, $pop5, $1
- i32.eqz $push19=, $pop6
- br_if 0, $pop19
+ i32.call $push4=, a@FUNCTION
+ i32.const $push12=, 1
+ i32.and $push5=, $pop4, $pop12
+ i32.eqz $push25=, $pop5
+ br_if 0, $pop25
+ i32.const $push17=, 0
i32.const $push16=, 3
- i32.store $drop=, 0($0), $pop16
- i32.call $push9=, a@FUNCTION
- i32.and $push10=, $pop9, $1
- i32.eqz $push20=, $pop10
- br_if 3, $pop20
- br 1
+ i32.store $drop=, 0($pop17), $pop16
+ i32.call $push8=, a@FUNCTION
+ i32.const $push15=, 1
+ i32.and $push9=, $pop8, $pop15
+ br_if 1, $pop9
+ br 3
.LBB18_4:
end_block
- i32.const $push17=, 4
- i32.store $drop=, 0($0), $pop17
- i32.call $push7=, a@FUNCTION
- i32.and $push8=, $pop7, $1
- i32.eqz $push21=, $pop8
- br_if 2, $pop21
- br 0
+ i32.const $push20=, 0
+ i32.const $push19=, 4
+ i32.store $drop=, 0($pop20), $pop19
+ i32.call $push6=, a@FUNCTION
+ i32.const $push18=, 1
+ i32.and $push7=, $pop6, $pop18
+ br_if 0, $pop7
+ br 2
.LBB18_5:
end_loop
end_loop
- i32.const $push4=, 0
- i32.const $push3=, 5
- i32.store $drop=, 0($pop4), $pop3
+ i32.const $push3=, 0
+ i32.const $push2=, 5
+ i32.store $drop=, 0($pop3), $pop2
return
.endfunc
.Lfunc_end18:
@@ -604,59 +622,59 @@ test10:
.globl test11
.type test11,@function
test11:
- .local i32
- block
+ i32.const $push14=, 0
+ i32.const $push13=, 0
+ i32.store $drop=, 0($pop14), $pop13
block
block
+ i32.const $push12=, 0
+ br_if 0, $pop12
+ i32.const $push16=, 0
+ i32.const $push5=, 1
+ i32.store $drop=, 0($pop16), $pop5
block
- i32.const $push0=, 0
i32.const $push15=, 0
- i32.store $push14=, 0($pop0), $pop15
- tee_local $push13=, $0=, $pop14
- br_if 0, $pop13
- i32.const $push6=, 1
- i32.store $drop=, 0($0), $pop6
- block
- br_if 0, $0
- i32.const $push8=, 0
- i32.const $push7=, 2
- i32.store $drop=, 0($pop8), $pop7
- i32.const $push16=, 0
- br_if 2, $pop16
+ br_if 0, $pop15
+ i32.const $push7=, 0
+ i32.const $push6=, 2
+ i32.store $drop=, 0($pop7), $pop6
+ i32.const $push17=, 0
+ br_if 2, $pop17
.LBB20_3:
end_block
- i32.const $push12=, 0
- i32.const $push11=, 3
- i32.store $drop=, 0($pop12), $pop11
+ i32.const $push11=, 0
+ i32.const $push10=, 3
+ i32.store $drop=, 0($pop11), $pop10
return
.LBB20_4:
end_block
- i32.const $push1=, 4
- i32.store $drop=, 0($0), $pop1
- br_if 1, $0
+ i32.const $push19=, 0
+ i32.const $push0=, 4
+ i32.store $drop=, 0($pop19), $pop0
+ block
i32.const $push18=, 0
- i32.const $push2=, 5
- i32.store $drop=, 0($pop18), $pop2
- i32.const $push17=, 0
- i32.eqz $push20=, $pop17
- br_if 2, $pop20
-.LBB20_6:
- end_block
- i32.const $push10=, 0
- i32.const $push9=, 7
- i32.store $drop=, 0($pop10), $pop9
+ i32.eqz $push23=, $pop18
+ br_if 0, $pop23
+ i32.const $push4=, 0
+ i32.const $push3=, 8
+ i32.store $drop=, 0($pop4), $pop3
return
-.LBB20_7:
+.LBB20_6:
end_block
- i32.const $push5=, 0
- i32.const $push4=, 8
- i32.store $drop=, 0($pop5), $pop4
+ i32.const $push21=, 0
+ i32.const $push1=, 5
+ i32.store $drop=, 0($pop21), $pop1
+ i32.const $push20=, 0
+ br_if 0, $pop20
+ i32.const $push22=, 0
+ i32.const $push2=, 6
+ i32.store $drop=, 0($pop22), $pop2
return
.LBB20_8:
end_block
- i32.const $push19=, 0
- i32.const $push3=, 6
- i32.store $drop=, 0($pop19), $pop3
+ i32.const $push9=, 0
+ i32.const $push8=, 7
+ i32.store $drop=, 0($pop9), $pop8
return
.endfunc
.Lfunc_end20:
@@ -671,30 +689,30 @@ test12:
loop
block
block
- i32.load8_u $push7=, 0($0)
- tee_local $push6=, $1=, $pop7
- i32.const $push5=, 103
- i32.gt_s $push0=, $pop6, $pop5
+ i32.load8_u $push8=, 0($0)
+ tee_local $push7=, $1=, $pop8
+ i32.const $push6=, 103
+ i32.gt_s $push0=, $pop7, $pop6
br_if 0, $pop0
- i32.const $push8=, 42
- i32.eq $push3=, $1, $pop8
+ i32.const $push9=, 42
+ i32.eq $push3=, $1, $pop9
br_if 1, $pop3
- i32.const $push9=, 76
- i32.eq $push4=, $1, $pop9
+ i32.const $push10=, 76
+ i32.eq $push4=, $1, $pop10
br_if 1, $pop4
br 3
.LBB21_4:
end_block
- i32.const $push10=, 108
- i32.eq $push1=, $1, $pop10
+ i32.const $push11=, 108
+ i32.eq $push1=, $1, $pop11
br_if 0, $pop1
- i32.const $push11=, 104
- i32.ne $push2=, $1, $pop11
+ i32.const $push12=, 104
+ i32.ne $push2=, $1, $pop12
br_if 2, $pop2
.LBB21_6:
end_block
- i32.const $push12=, 1
- i32.add $0=, $0, $pop12
+ i32.const $push5=, 1
+ i32.add $0=, $0, $pop5
br 0
.LBB21_7:
end_loop
@@ -709,18 +727,21 @@ test13:
.local i32
block
block
- i32.const $push0=, 0
- br_if 0, $pop0
+ i32.const $push0=, 1
+ i32.and $push1=, $0, $pop0
+ br_if 0, $pop1
i32.const $0=, 0
block
- i32.const $push3=, 0
- br_if 0, $pop3
+ i32.const $push2=, 1
+ i32.and $push3=, $0, $pop2
+ i32.eqz $push6=, $pop3
+ br_if 0, $pop6
i32.const $0=, 0
.LBB22_3:
end_block
- i32.const $push1=, 1
- i32.and $push2=, $0, $pop1
- br_if 1, $pop2
+ i32.const $push4=, 1
+ i32.and $push5=, $0, $pop4
+ br_if 1, $pop5
br 1
.LBB22_4:
end_block
@@ -757,9 +778,14 @@ test15:
block
block
i32.const $push0=, 1
- br_if 0, $pop0
- i32.const $0=, 0
+ i32.eqz $push5=, $pop0
+ br_if 0, $pop5
+ call test15_callee1@FUNCTION
+ br 1
.LBB24_2:
+ end_block
+ i32.const $0=, 0
+.LBB24_3:
block
loop
i32.const $push1=, 1
@@ -770,18 +796,15 @@ test15:
tee_local $push2=, $0=, $pop3
br_if 0, $pop2
br 2
-.LBB24_4:
+.LBB24_5:
end_loop
i32.const $1=, 0
-.LBB24_5:
+.LBB24_6:
end_block
- i32.eqz $push5=, $1
- br_if 1, $pop5
+ i32.eqz $push6=, $1
+ br_if 0, $pop6
call test15_callee0@FUNCTION
return
-.LBB24_7:
- end_block
- call test15_callee1@FUNCTION
.LBB24_8:
end_block
return
@@ -790,3 +813,8 @@ test15:
.size test15, .Lfunc_end24-test15
+ .functype something, void
+ .functype bar, void
+ .functype a, i32
+ .functype test15_callee0, void
+ .functype test15_callee1, void
diff --git a/test/llvm_autogenerated/cfg-stackify.wast b/test/llvm_autogenerated/cfg-stackify.wast
index 2831cf9ab..bfea4a853 100644
--- a/test/llvm_autogenerated/cfg-stackify.wast
+++ b/test/llvm_autogenerated/cfg-stackify.wast
@@ -1,93 +1,94 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
- (type $FUNCSIG$i (func (result i32)))
(type $FUNCSIG$v (func))
- (type $2 (func (param i32)))
- (type $3 (func (param i32 i32)))
- (type $4 (func (param i32 i32 i32) (result i32)))
- (type $5 (func (param i32 i32) (result i32)))
- (type $6 (func (param i32) (result i32)))
- (import $a "env" "a" (result i32))
- (import $bar "env" "bar")
- (import $something "env" "something")
- (import $test15_callee0 "env" "test15_callee0")
- (import $test15_callee1 "env" "test15_callee1")
- (export "test0" $test0)
- (export "test1" $test1)
- (export "test2" $test2)
- (export "doublediamond" $doublediamond)
- (export "triangle" $triangle)
- (export "diamond" $diamond)
- (export "single_block" $single_block)
- (export "minimal_loop" $minimal_loop)
- (export "simple_loop" $simple_loop)
- (export "doubletriangle" $doubletriangle)
- (export "ifelse_earlyexits" $ifelse_earlyexits)
- (export "doublediamond_in_a_loop" $doublediamond_in_a_loop)
- (export "test3" $test3)
- (export "test4" $test4)
- (export "test5" $test5)
- (export "test6" $test6)
- (export "test7" $test7)
- (export "test8" $test8)
- (export "test9" $test9)
- (export "test10" $test10)
- (export "test11" $test11)
- (export "test12" $test12)
- (export "test13" $test13)
- (export "test14" $test14)
- (export "test15" $test15)
- (func $test0 (type $2) (param $0 i32)
+ (type $FUNCSIG$i (func (result i32)))
+ (import "env" "a" (func $a (result i32)))
+ (import "env" "bar" (func $bar))
+ (import "env" "something" (func $something))
+ (import "env" "test15_callee0" (func $test15_callee0))
+ (import "env" "test15_callee1" (func $test15_callee1))
+ (export "memory" (memory $0))
+ (export "test0" (func $test0))
+ (export "test1" (func $test1))
+ (export "test2" (func $test2))
+ (export "doublediamond" (func $doublediamond))
+ (export "triangle" (func $triangle))
+ (export "diamond" (func $diamond))
+ (export "single_block" (func $single_block))
+ (export "minimal_loop" (func $minimal_loop))
+ (export "simple_loop" (func $simple_loop))
+ (export "doubletriangle" (func $doubletriangle))
+ (export "ifelse_earlyexits" (func $ifelse_earlyexits))
+ (export "doublediamond_in_a_loop" (func $doublediamond_in_a_loop))
+ (export "test3" (func $test3))
+ (export "test4" (func $test4))
+ (export "test5" (func $test5))
+ (export "test6" (func $test6))
+ (export "test7" (func $test7))
+ (export "test8" (func $test8))
+ (export "test9" (func $test9))
+ (export "test10" (func $test10))
+ (export "test11" (func $test11))
+ (export "test12" (func $test12))
+ (export "test13" (func $test13))
+ (export "test14" (func $test14))
+ (export "test15" (func $test15))
+ (func $test0 (param $0 i32)
(local $1 i32)
(set_local $1
- (i32.const 0)
+ (i32.const 1)
)
- (loop $label$1 $label$0
- (block $label$2
- (br_if $label$2
- (i32.lt_s
- (tee_local $1
- (i32.add
- (get_local $1)
- (i32.const 1)
- )
- )
+ (block $label$1
+ (loop $label$0
+ (br_if $label$1
+ (i32.ge_s
+ (get_local $1)
(get_local $0)
)
)
- (return)
+ (set_local $1
+ (i32.add
+ (get_local $1)
+ (i32.const 1)
+ )
+ )
+ (drop
+ (call_import $something)
+ )
+ (br $label$0)
)
- (call_import $something)
- (br $label$0)
)
+ (return)
)
- (func $test1 (type $2) (param $0 i32)
+ (func $test1 (param $0 i32)
(local $1 i32)
(set_local $1
- (i32.const 0)
+ (i32.const 1)
)
- (loop $label$1 $label$0
- (block $label$2
- (br_if $label$2
- (i32.lt_s
- (tee_local $1
- (i32.add
- (get_local $1)
- (i32.const 1)
- )
- )
+ (block $label$1
+ (loop $label$0
+ (br_if $label$1
+ (i32.ge_s
+ (get_local $1)
(get_local $0)
)
)
- (return)
+ (set_local $1
+ (i32.add
+ (get_local $1)
+ (i32.const 1)
+ )
+ )
+ (drop
+ (call_import $something)
+ )
+ (br $label$0)
)
- (call_import $something)
- (br $label$0)
)
+ (return)
)
- (func $test2 (type $3) (param $0 i32) (param $1 i32)
+ (func $test2 (param $0 i32) (param $1 i32)
(block $label$0
(br_if $label$0
(i32.lt_s
@@ -95,27 +96,31 @@
(i32.const 1)
)
)
- (loop $label$2 $label$1
- (f64.store
- (get_local $0)
- (f64.mul
- (f64.load
+ (block $label$2
+ (loop $label$1
+ (drop
+ (f64.store
(get_local $0)
+ (f64.mul
+ (f64.load
+ (get_local $0)
+ )
+ (f64.const 3.2)
+ )
)
- (f64.const 3.2)
- )
- )
- (set_local $0
- (i32.add
- (get_local $0)
- (i32.const 8)
)
- )
- (br_if $label$1
- (tee_local $1
+ (set_local $0
(i32.add
- (get_local $1)
- (i32.const -1)
+ (get_local $0)
+ (i32.const 8)
+ )
+ )
+ (br_if $label$1
+ (tee_local $1
+ (i32.add
+ (get_local $1)
+ (i32.const -1)
+ )
)
)
)
@@ -123,299 +128,359 @@
)
(return)
)
- (func $doublediamond (type $4) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
- (i32.store
- (get_local $2)
- (i32.const 0)
+ (func $doublediamond (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (drop
+ (i32.store
+ (get_local $2)
+ (i32.const 0)
+ )
)
(block $label$0
(block $label$1
- (br_if $label$1
- (get_local $0)
+ (block $label$2
+ (br_if $label$2
+ (i32.eqz
+ (get_local $0)
+ )
+ )
+ (drop
+ (i32.store
+ (get_local $2)
+ (i32.const 2)
+ )
+ )
+ (br_if $label$1
+ (i32.eqz
+ (get_local $1)
+ )
+ )
+ (drop
+ (i32.store
+ (get_local $2)
+ (i32.const 4)
+ )
+ )
+ (br $label$0)
)
- (i32.store
- (get_local $2)
- (i32.const 1)
+ (drop
+ (i32.store
+ (get_local $2)
+ (i32.const 1)
+ )
)
(br $label$0)
)
- (i32.store
- (get_local $2)
- (i32.const 2)
- )
- (block $label$2
- (br_if $label$2
- (get_local $1)
- )
+ (drop
(i32.store
(get_local $2)
(i32.const 3)
)
- (br $label$0)
)
+ )
+ (drop
(i32.store
(get_local $2)
- (i32.const 4)
+ (i32.const 5)
)
)
- (i32.store
- (get_local $2)
- (i32.const 5)
- )
(return
(i32.const 0)
)
)
- (func $triangle (type $5) (param $0 i32) (param $1 i32) (result i32)
- (local $2 i32)
- (local $3 i32)
- (set_local $2
- (block
- (block
- (set_local $3
- (i32.const 0)
- )
- (i32.store
- (get_local $0)
- (get_local $3)
- )
- )
- (get_local $3)
+ (func $triangle (param $0 i32) (param $1 i32) (result i32)
+ (drop
+ (i32.store
+ (get_local $0)
+ (i32.const 0)
)
)
(block $label$0
(br_if $label$0
(get_local $1)
)
+ (drop
+ (i32.store
+ (get_local $0)
+ (i32.const 1)
+ )
+ )
+ )
+ (drop
(i32.store
(get_local $0)
- (i32.const 1)
+ (i32.const 2)
)
)
- (i32.store
- (get_local $0)
- (i32.const 2)
- )
(return
- (get_local $2)
+ (i32.const 0)
)
)
- (func $diamond (type $5) (param $0 i32) (param $1 i32) (result i32)
- (i32.store
- (get_local $0)
- (i32.const 0)
+ (func $diamond (param $0 i32) (param $1 i32) (result i32)
+ (drop
+ (i32.store
+ (get_local $0)
+ (i32.const 0)
+ )
)
(block $label$0
(block $label$1
(br_if $label$1
- (get_local $1)
+ (i32.eqz
+ (get_local $1)
+ )
+ )
+ (drop
+ (i32.store
+ (get_local $0)
+ (i32.const 2)
+ )
)
+ (br $label$0)
+ )
+ (drop
(i32.store
(get_local $0)
(i32.const 1)
)
- (br $label$0)
)
+ )
+ (drop
(i32.store
(get_local $0)
- (i32.const 2)
+ (i32.const 3)
)
)
- (i32.store
- (get_local $0)
- (i32.const 3)
- )
(return
(i32.const 0)
)
)
- (func $single_block (type $6) (param $0 i32) (result i32)
- (local $1 i32)
+ (func $single_block (param $0 i32) (result i32)
+ (drop
+ (i32.store
+ (get_local $0)
+ (i32.const 0)
+ )
+ )
(return
- (block
- (block
- (set_local $1
- (i32.const 0)
- )
+ (i32.const 0)
+ )
+ )
+ (func $minimal_loop (param $0 i32)
+ (drop
+ (i32.store
+ (get_local $0)
+ (i32.const 0)
+ )
+ )
+ (block $label$1
+ (loop $label$0
+ (drop
(i32.store
(get_local $0)
- (get_local $1)
+ (i32.const 1)
)
)
- (get_local $1)
+ (br $label$0)
)
)
)
- (func $minimal_loop (type $6) (param $0 i32) (result i32)
- (i32.store
- (get_local $0)
- (i32.const 0)
- )
- (loop $label$1 $label$0
+ (func $simple_loop (param $0 i32) (param $1 i32) (result i32)
+ (drop
(i32.store
(get_local $0)
- (i32.const 1)
+ (i32.const 0)
)
- (br $label$0)
)
- )
- (func $simple_loop (type $5) (param $0 i32) (param $1 i32) (result i32)
- (i32.store
- (get_local $0)
- (i32.const 0)
+ (block $label$1
+ (loop $label$0
+ (drop
+ (i32.store
+ (get_local $0)
+ (i32.const 1)
+ )
+ )
+ (br_if $label$0
+ (i32.eqz
+ (get_local $1)
+ )
+ )
+ )
)
- (loop $label$1 $label$0
+ (drop
(i32.store
(get_local $0)
- (i32.const 1)
- )
- (br_if $label$0
- (i32.eqz
- (get_local $1)
- )
+ (i32.const 2)
)
)
- (i32.store
- (get_local $0)
- (i32.const 2)
- )
(return
(i32.const 0)
)
)
- (func $doubletriangle (type $4) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
- (local $3 i32)
- (local $4 i32)
- (set_local $3
- (block
- (block
- (set_local $4
- (i32.const 0)
- )
- (i32.store
- (get_local $2)
- (get_local $4)
- )
- )
- (get_local $4)
+ (func $doubletriangle (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (drop
+ (i32.store
+ (get_local $2)
+ (i32.const 0)
)
)
(block $label$0
(br_if $label$0
(get_local $0)
)
- (i32.store
- (get_local $2)
- (i32.const 2)
+ (drop
+ (i32.store
+ (get_local $2)
+ (i32.const 2)
+ )
)
(block $label$1
(br_if $label$1
(get_local $1)
)
+ (drop
+ (i32.store
+ (get_local $2)
+ (i32.const 3)
+ )
+ )
+ )
+ (drop
(i32.store
(get_local $2)
- (i32.const 3)
+ (i32.const 4)
)
)
+ )
+ (drop
(i32.store
(get_local $2)
- (i32.const 4)
+ (i32.const 5)
)
)
- (i32.store
- (get_local $2)
- (i32.const 5)
- )
(return
- (get_local $3)
+ (i32.const 0)
)
)
- (func $ifelse_earlyexits (type $4) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
- (i32.store
- (get_local $2)
- (i32.const 0)
+ (func $ifelse_earlyexits (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (drop
+ (i32.store
+ (get_local $2)
+ (i32.const 0)
+ )
)
(block $label$0
(block $label$1
(br_if $label$1
- (get_local $0)
+ (i32.eqz
+ (get_local $0)
+ )
)
+ (drop
+ (i32.store
+ (get_local $2)
+ (i32.const 2)
+ )
+ )
+ (br_if $label$0
+ (get_local $1)
+ )
+ (drop
+ (i32.store
+ (get_local $2)
+ (i32.const 3)
+ )
+ )
+ (br $label$0)
+ )
+ (drop
(i32.store
(get_local $2)
(i32.const 1)
)
- (br $label$0)
- )
- (i32.store
- (get_local $2)
- (i32.const 2)
- )
- (br_if $label$0
- (get_local $1)
)
+ )
+ (drop
(i32.store
(get_local $2)
- (i32.const 3)
+ (i32.const 4)
)
)
- (i32.store
- (get_local $2)
- (i32.const 4)
- )
(return
(i32.const 0)
)
)
- (func $doublediamond_in_a_loop (type $4) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
- (loop $label$1 $label$0
- (i32.store
- (get_local $2)
- (i32.const 0)
- )
- (block $label$2
- (br_if $label$2
- (get_local $0)
- )
- (i32.store
- (get_local $2)
- (i32.const 1)
- )
- (i32.store
- (get_local $2)
- (i32.const 5)
+ (func $doublediamond_in_a_loop (param $0 i32) (param $1 i32) (param $2 i32)
+ (block $label$1
+ (loop $label$0
+ (drop
+ (i32.store
+ (get_local $2)
+ (i32.const 0)
+ )
)
- (br $label$0)
- )
- (i32.store
- (get_local $2)
- (i32.const 2)
- )
- (block $label$3
- (br_if $label$3
- (get_local $1)
+ (block $label$2
+ (br_if $label$2
+ (i32.eqz
+ (get_local $0)
+ )
+ )
+ (drop
+ (i32.store
+ (get_local $2)
+ (i32.const 2)
+ )
+ )
+ (block $label$3
+ (br_if $label$3
+ (i32.eqz
+ (get_local $1)
+ )
+ )
+ (drop
+ (i32.store
+ (get_local $2)
+ (i32.const 4)
+ )
+ )
+ (drop
+ (i32.store
+ (get_local $2)
+ (i32.const 5)
+ )
+ )
+ (br $label$0)
+ )
+ (drop
+ (i32.store
+ (get_local $2)
+ (i32.const 3)
+ )
+ )
+ (drop
+ (i32.store
+ (get_local $2)
+ (i32.const 5)
+ )
+ )
+ (br $label$0)
)
- (i32.store
- (get_local $2)
- (i32.const 3)
+ (drop
+ (i32.store
+ (get_local $2)
+ (i32.const 1)
+ )
)
- (i32.store
- (get_local $2)
- (i32.const 5)
+ (drop
+ (i32.store
+ (get_local $2)
+ (i32.const 5)
+ )
)
(br $label$0)
)
- (i32.store
- (get_local $2)
- (i32.const 4)
- )
- (i32.store
- (get_local $2)
- (i32.const 5)
- )
- (br $label$0)
)
)
- (func $test3 (type $2) (param $0 i32)
+ (func $test3 (param $0 i32)
(block $label$0
(br_if $label$0
(i32.const 0)
@@ -426,25 +491,36 @@
(get_local $0)
)
)
- (loop $label$2 $label$1
- (br_if $label$2
- (get_local $0)
- )
- (loop $label$4 $label$3
- (br_if $label$3
- (i32.eqz
- (get_local $0)
+ (block $label$2
+ (loop $label$1
+ (block $label$3
+ (block $label$4
+ (br_if $label$4
+ (get_local $0)
+ )
+ (block $label$6
+ (loop $label$5
+ (br_if $label$5
+ (i32.eqz
+ (get_local $0)
+ )
+ )
+ (br $label$3)
+ )
+ )
)
+ (unreachable)
+ )
+ (drop
+ (call_import $bar)
)
+ (br $label$1)
)
- (call_import $bar)
- (br $label$1)
)
- (unreachable)
)
(return)
)
- (func $test4 (type $2) (param $0 i32)
+ (func $test4 (param $0 i32)
(block $label$0
(block $label$1
(br_if $label$1
@@ -484,10 +560,8 @@
)
(return)
)
- (func $test5 (type $3) (param $0 i32) (param $1 i32)
- (local $2 i32)
- (local $3 i32)
- (set_local $2
+ (func $test5 (param $0 i32) (param $1 i32)
+ (set_local $0
(i32.and
(get_local $0)
(i32.const 1)
@@ -500,53 +574,49 @@
)
)
(block $label$0
- (loop $label$2 $label$1
- (set_local $0
- (block
- (block
- (set_local $3
- (i32.const 0)
- )
- (i32.store
- (i32.const 0)
- (get_local $3)
- )
+ (block $label$2
+ (loop $label$1
+ (drop
+ (i32.store
+ (i32.const 0)
+ (i32.const 0)
)
- (get_local $3)
)
- )
- (br_if $label$0
- (i32.eqz
- (get_local $2)
+ (br_if $label$0
+ (i32.eqz
+ (get_local $0)
+ )
+ )
+ (drop
+ (i32.store
+ (i32.const 0)
+ (i32.const 1)
+ )
+ )
+ (br_if $label$1
+ (get_local $1)
)
)
+ )
+ (drop
(i32.store
- (get_local $0)
- (i32.const 1)
- )
- (br_if $label$1
- (get_local $1)
+ (i32.const 0)
+ (i32.const 3)
)
)
+ (return)
+ )
+ (drop
(i32.store
(i32.const 0)
- (i32.const 3)
+ (i32.const 2)
)
- (return)
- )
- (i32.store
- (i32.const 0)
- (i32.const 2)
)
(return)
)
- (func $test6 (type $3) (param $0 i32) (param $1 i32)
+ (func $test6 (param $0 i32) (param $1 i32)
(local $2 i32)
- (local $3 i32)
- (local $4 i32)
- (local $5 i32)
- (local $6 i32)
- (set_local $3
+ (set_local $2
(i32.and
(get_local $0)
(i32.const 1)
@@ -554,250 +624,231 @@
)
(block $label$0
(block $label$1
- (loop $label$3 $label$2
- (set_local $0
- (block
- (block
- (set_local $5
- (i32.const 0)
- )
- (i32.store
- (i32.const 0)
- (get_local $5)
- )
+ (block $label$3
+ (loop $label$2
+ (drop
+ (i32.store
+ (i32.const 0)
+ (i32.const 0)
)
- (get_local $5)
)
- )
- (br_if $label$0
- (i32.eqz
- (get_local $3)
+ (br_if $label$0
+ (i32.eqz
+ (get_local $2)
+ )
)
- )
- (br_if $label$1
- (i32.eqz
- (tee_local $4
- (i32.and
- (get_local $1)
- (tee_local $2
- (block
- (block
- (set_local $6
- (i32.const 1)
- )
- (i32.store
- (get_local $0)
- (get_local $6)
- )
- )
- (get_local $6)
- )
+ (drop
+ (i32.store
+ (i32.const 0)
+ (i32.const 1)
+ )
+ )
+ (br_if $label$1
+ (i32.eqz
+ (tee_local $0
+ (i32.and
+ (get_local $1)
+ (i32.const 1)
)
)
)
)
+ (drop
+ (i32.store
+ (i32.const 0)
+ (i32.const 1)
+ )
+ )
+ (br_if $label$2
+ (get_local $0)
+ )
)
+ )
+ (drop
(i32.store
- (get_local $0)
- (get_local $2)
- )
- (br_if $label$2
- (get_local $4)
+ (i32.const 0)
+ (i32.const 2)
)
)
+ (return)
+ )
+ (drop
(i32.store
(i32.const 0)
- (i32.const 2)
+ (i32.const 3)
)
- (return)
)
+ )
+ (drop
(i32.store
(i32.const 0)
- (i32.const 3)
+ (i32.const 4)
)
)
- (i32.store
- (i32.const 0)
- (i32.const 4)
- )
(return)
)
- (func $test7 (type $3) (param $0 i32) (param $1 i32)
- (local $2 i32)
- (local $3 i32)
- (local $4 i32)
- (local $5 i32)
- (set_local $2
- (block
- (block
- (set_local $4
- (i32.const 0)
- )
- (i32.store
- (i32.const 0)
- (get_local $4)
- )
- )
- (get_local $4)
+ (func $test7 (param $0 i32) (param $1 i32)
+ (drop
+ (i32.store
+ (i32.const 0)
+ (i32.const 0)
)
)
- (set_local $3
+ (set_local $0
(i32.and
(get_local $0)
(i32.const 1)
)
)
- (loop $label$1 $label$0
- (set_local $0
- (block
- (block
- (set_local $5
+ (block $label$0
+ (block $label$2
+ (loop $label$1
+ (drop
+ (i32.store
+ (i32.const 0)
(i32.const 1)
)
+ )
+ (block $label$3
+ (br_if $label$3
+ (i32.eqz
+ (get_local $0)
+ )
+ )
+ (drop
+ (i32.store
+ (i32.const 0)
+ (i32.const 3)
+ )
+ )
+ (br_if $label$1
+ (i32.and
+ (get_local $1)
+ (i32.const 1)
+ )
+ )
+ (br $label$0)
+ )
+ (drop
(i32.store
- (get_local $2)
- (get_local $5)
+ (i32.const 0)
+ (i32.const 2)
)
)
- (get_local $5)
- )
- )
- (block $label$2
- (br_if $label$2
- (get_local $3)
- )
- (i32.store
- (get_local $2)
- (i32.const 2)
- )
- (br_if $label$0
- (i32.and
- (get_local $1)
- (get_local $0)
+ (br_if $label$1
+ (i32.and
+ (get_local $1)
+ (i32.const 1)
+ )
)
)
+ )
+ (drop
(i32.store
(i32.const 0)
(i32.const 4)
)
- (unreachable)
)
+ (unreachable)
+ )
+ (drop
(i32.store
- (get_local $2)
- (i32.const 3)
+ (i32.const 0)
+ (i32.const 5)
)
- (br_if $label$0
- (i32.and
- (get_local $1)
- (get_local $0)
+ )
+ (unreachable)
+ )
+ (func $test8
+ (block $label$1
+ (loop $label$0
+ (br_if $label$0
+ (i32.const 0)
)
+ (br $label$0)
)
)
- (i32.store
- (i32.const 0)
- (i32.const 5)
- )
- (unreachable)
)
- (func $test8 (type $FUNCSIG$i) (result i32)
- (loop $label$1 $label$0
- (br_if $label$0
+ (func $test9
+ (drop
+ (i32.store
+ (i32.const 0)
(i32.const 0)
)
- (br $label$0)
)
- )
- (func $test9 (type $FUNCSIG$v)
- (local $0 i32)
- (local $1 i32)
- (local $2 i32)
- (local $3 i32)
- (set_local $0
- (block
- (block
- (set_local $2
- (i32.const 0)
- )
+ (block $label$1
+ (loop $label$0
+ (drop
(i32.store
(i32.const 0)
- (get_local $2)
+ (i32.const 1)
)
)
- (get_local $2)
- )
- )
- (loop $label$1 $label$0
- (br_if $label$1
- (i32.eqz
- (i32.and
- (tee_local $1
- (block
- (block
- (set_local $3
+ (br_if $label$1
+ (i32.eqz
+ (i32.and
+ (call_import $a)
+ (i32.const 1)
+ )
+ )
+ )
+ (block $label$3
+ (loop $label$2
+ (drop
+ (i32.store
+ (i32.const 0)
+ (i32.const 2)
+ )
+ )
+ (block $label$4
+ (br_if $label$4
+ (i32.eqz
+ (i32.and
+ (call_import $a)
(i32.const 1)
)
- (i32.store
- (get_local $0)
- (get_local $3)
- )
)
- (get_local $3)
)
+ (drop
+ (i32.store
+ (i32.const 0)
+ (i32.const 3)
+ )
+ )
+ (br_if $label$2
+ (i32.and
+ (call_import $a)
+ (i32.const 1)
+ )
+ )
+ (br $label$0)
)
- (call_import $a)
- )
- )
- )
- (loop $label$3 $label$2
- (i32.store
- (get_local $0)
- (i32.const 2)
- )
- (block $label$4
- (br_if $label$4
- (i32.eqz
- (i32.and
- (call_import $a)
- (get_local $1)
+ (drop
+ (i32.store
+ (i32.const 0)
+ (i32.const 4)
)
)
- )
- (i32.store
- (get_local $0)
- (i32.const 3)
- )
- (br_if $label$0
- (i32.eqz
+ (br_if $label$2
(i32.and
(call_import $a)
- (get_local $1)
+ (i32.const 1)
)
)
+ (br $label$0)
)
- (br $label$2)
)
- (i32.store
- (get_local $0)
- (i32.const 4)
- )
- (br_if $label$0
- (i32.eqz
- (i32.and
- (call_import $a)
- (get_local $1)
- )
- )
- )
- (br $label$2)
)
)
- (i32.store
- (i32.const 0)
- (i32.const 5)
+ (drop
+ (i32.store
+ (i32.const 0)
+ (i32.const 5)
+ )
)
(return)
)
- (func $test10 (type $FUNCSIG$v)
+ (func $test10
(local $0 i32)
(local $1 i32)
(local $2 i32)
@@ -806,203 +857,224 @@
(set_local $0
(i32.const 2)
)
- (loop $label$1 $label$0
- (set_local $2
- (get_local $1)
- )
- (set_local $3
- (get_local $0)
- )
- (set_local $1
- (i32.const 0)
- )
- (set_local $0
- (i32.const 3)
- )
- (br_if $label$0
- (get_local $2)
- )
- (set_local $2
- (i32.const 4)
- )
- (block $label$2
- (loop $label$4 $label$3
- (set_local $4
- (get_local $3)
- )
- (set_local $3
- (get_local $2)
- )
- (loop $label$6 $label$5
- (br_if $label$0
- (i32.gt_u
- (tee_local $2
- (get_local $4)
+ (block $label$1
+ (loop $label$0
+ (set_local $2
+ (get_local $1)
+ )
+ (set_local $3
+ (get_local $0)
+ )
+ (set_local $1
+ (i32.const 0)
+ )
+ (set_local $0
+ (i32.const 3)
+ )
+ (br_if $label$0
+ (get_local $2)
+ )
+ (set_local $2
+ (i32.const 4)
+ )
+ (block $label$2
+ (block $label$4
+ (loop $label$3
+ (set_local $4
+ (get_local $3)
+ )
+ (set_local $3
+ (get_local $2)
+ )
+ (block $label$6
+ (loop $label$5
+ (br_if $label$0
+ (i32.gt_u
+ (tee_local $2
+ (get_local $4)
+ )
+ (i32.const 4)
+ )
+ )
+ (set_local $4
+ (get_local $3)
+ )
+ (br_table $label$5 $label$6 $label$0 $label$3 $label$2 $label$5
+ (get_local $2)
+ )
)
- (i32.const 4)
)
)
- (set_local $4
- (get_local $3)
- )
- (br_table $label$5 $label$6 $label$0 $label$3 $label$2 $label$5
- (get_local $2)
- )
)
+ (return)
)
- (return)
- )
- (set_local $1
- (i32.const 1)
+ (set_local $1
+ (i32.const 1)
+ )
+ (br $label$0)
)
- (br $label$0)
)
)
- (func $test11 (type $FUNCSIG$v)
- (local $0 i32)
- (local $1 i32)
+ (func $test11
+ (drop
+ (i32.store
+ (i32.const 0)
+ (i32.const 0)
+ )
+ )
(block $label$0
(block $label$1
+ (br_if $label$1
+ (i32.const 0)
+ )
+ (drop
+ (i32.store
+ (i32.const 0)
+ (i32.const 1)
+ )
+ )
(block $label$2
- (block $label$3
- (br_if $label$3
- (tee_local $0
- (block
- (block
- (set_local $1
- (i32.const 0)
- )
- (i32.store
- (i32.const 0)
- (get_local $1)
- )
- )
- (get_local $1)
- )
- )
- )
- (i32.store
- (get_local $0)
- (i32.const 1)
- )
- (block $label$4
- (br_if $label$4
- (get_local $0)
- )
- (i32.store
- (i32.const 0)
- (i32.const 2)
- )
- (br_if $label$2
- (i32.const 0)
- )
- )
+ (br_if $label$2
+ (i32.const 0)
+ )
+ (drop
(i32.store
(i32.const 0)
- (i32.const 3)
+ (i32.const 2)
)
- (return)
)
+ (br_if $label$0
+ (i32.const 0)
+ )
+ )
+ (drop
(i32.store
- (get_local $0)
- (i32.const 4)
+ (i32.const 0)
+ (i32.const 3)
)
- (br_if $label$1
- (get_local $0)
+ )
+ (return)
+ )
+ (drop
+ (i32.store
+ (i32.const 0)
+ (i32.const 4)
+ )
+ )
+ (block $label$3
+ (br_if $label$3
+ (i32.eqz
+ (i32.const 0)
)
+ )
+ (drop
(i32.store
(i32.const 0)
- (i32.const 5)
- )
- (br_if $label$0
- (i32.eqz
- (i32.const 0)
- )
+ (i32.const 8)
)
)
+ (return)
+ )
+ (drop
(i32.store
(i32.const 0)
- (i32.const 7)
+ (i32.const 5)
)
- (return)
)
- (i32.store
+ (br_if $label$0
(i32.const 0)
- (i32.const 8)
+ )
+ (drop
+ (i32.store
+ (i32.const 0)
+ (i32.const 6)
+ )
)
(return)
)
- (i32.store
- (i32.const 0)
- (i32.const 6)
+ (drop
+ (i32.store
+ (i32.const 0)
+ (i32.const 7)
+ )
)
(return)
)
- (func $test12 (type $2) (param $0 i32)
+ (func $test12 (param $0 i32)
(local $1 i32)
- (loop $label$1 $label$0
- (block $label$2
- (block $label$3
- (br_if $label$3
- (i32.gt_s
- (tee_local $1
- (i32.load8_u
- (get_local $0)
+ (block $label$1
+ (loop $label$0
+ (block $label$2
+ (block $label$3
+ (br_if $label$3
+ (i32.gt_s
+ (tee_local $1
+ (i32.load8_u
+ (get_local $0)
+ )
)
+ (i32.const 103)
+ )
+ )
+ (br_if $label$2
+ (i32.eq
+ (get_local $1)
+ (i32.const 42)
+ )
+ )
+ (br_if $label$2
+ (i32.eq
+ (get_local $1)
+ (i32.const 76)
)
- (i32.const 103)
)
+ (br $label$1)
)
(br_if $label$2
(i32.eq
(get_local $1)
- (i32.const 42)
+ (i32.const 108)
)
)
- (br_if $label$2
- (i32.eq
+ (br_if $label$1
+ (i32.ne
(get_local $1)
- (i32.const 76)
+ (i32.const 104)
)
)
- (br $label$1)
)
- (br_if $label$2
- (i32.eq
- (get_local $1)
- (i32.const 108)
- )
- )
- (br_if $label$1
- (i32.ne
- (get_local $1)
- (i32.const 104)
+ (set_local $0
+ (i32.add
+ (get_local $0)
+ (i32.const 1)
)
)
+ (br $label$0)
)
- (set_local $0
- (i32.add
- (get_local $0)
- (i32.const 1)
- )
- )
- (br $label$0)
)
(return)
)
- (func $test13 (type $FUNCSIG$v)
+ (func $test13
(local $0 i32)
(block $label$0
(block $label$1
(br_if $label$1
- (i32.const 0)
+ (i32.and
+ (get_local $0)
+ (i32.const 1)
+ )
)
(set_local $0
(i32.const 0)
)
(block $label$2
(br_if $label$2
- (i32.const 0)
+ (i32.eqz
+ (i32.and
+ (get_local $0)
+ (i32.const 1)
+ )
+ )
)
(set_local $0
(i32.const 0)
@@ -1020,32 +1092,44 @@
)
(unreachable)
)
- (func $test14 (type $FUNCSIG$v)
- (loop $label$1 $label$0
- (br_if $label$0
- (i32.const 0)
+ (func $test14
+ (block $label$1
+ (loop $label$0
+ (br_if $label$0
+ (i32.const 0)
+ )
)
)
- (loop $label$3 $label$2
- (br_if $label$2
- (i32.const 0)
+ (block $label$3
+ (loop $label$2
+ (br_if $label$2
+ (i32.const 0)
+ )
)
)
(return)
)
- (func $test15 (type $FUNCSIG$v)
+ (func $test15
(local $0 i32)
(local $1 i32)
(block $label$0
(block $label$1
(br_if $label$1
- (i32.const 1)
+ (i32.eqz
+ (i32.const 1)
+ )
)
- (set_local $0
- (i32.const 0)
+ (drop
+ (call_import $test15_callee1)
)
- (block $label$2
- (loop $label$4 $label$3
+ (br $label$0)
+ )
+ (set_local $0
+ (i32.const 0)
+ )
+ (block $label$2
+ (block $label$4
+ (loop $label$3
(br_if $label$4
(i32.const 1)
)
@@ -1062,19 +1146,20 @@
)
(br $label$2)
)
- (set_local $1
- (i32.const 0)
- )
)
- (br_if $label$0
- (i32.eqz
- (get_local $1)
- )
+ (set_local $1
+ (i32.const 0)
)
+ )
+ (br_if $label$0
+ (i32.eqz
+ (get_local $1)
+ )
+ )
+ (drop
(call_import $test15_callee0)
- (return)
)
- (call_import $test15_callee1)
+ (return)
)
(return)
)
diff --git a/test/llvm_autogenerated/comparisons_f32.wast b/test/llvm_autogenerated/comparisons_f32.wast
index 9d9898846..279b724c6 100644
--- a/test/llvm_autogenerated/comparisons_f32.wast
+++ b/test/llvm_autogenerated/comparisons_f32.wast
@@ -1,21 +1,21 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
- (export "ord_f32" $ord_f32)
- (export "uno_f32" $uno_f32)
- (export "oeq_f32" $oeq_f32)
- (export "une_f32" $une_f32)
- (export "olt_f32" $olt_f32)
- (export "ole_f32" $ole_f32)
- (export "ogt_f32" $ogt_f32)
- (export "oge_f32" $oge_f32)
- (export "ueq_f32" $ueq_f32)
- (export "one_f32" $one_f32)
- (export "ult_f32" $ult_f32)
- (export "ule_f32" $ule_f32)
- (export "ugt_f32" $ugt_f32)
- (export "uge_f32" $uge_f32)
+ (export "memory" (memory $0))
+ (export "ord_f32" (func $ord_f32))
+ (export "uno_f32" (func $uno_f32))
+ (export "oeq_f32" (func $oeq_f32))
+ (export "une_f32" (func $une_f32))
+ (export "olt_f32" (func $olt_f32))
+ (export "ole_f32" (func $ole_f32))
+ (export "ogt_f32" (func $ogt_f32))
+ (export "oge_f32" (func $oge_f32))
+ (export "ueq_f32" (func $ueq_f32))
+ (export "one_f32" (func $one_f32))
+ (export "ult_f32" (func $ult_f32))
+ (export "ule_f32" (func $ule_f32))
+ (export "ugt_f32" (func $ugt_f32))
+ (export "uge_f32" (func $uge_f32))
(func $ord_f32 (param $0 f32) (param $1 f32) (result i32)
(return
(i32.and
diff --git a/test/llvm_autogenerated/comparisons_f64.wast b/test/llvm_autogenerated/comparisons_f64.wast
index edd3cd9b7..3d100c168 100644
--- a/test/llvm_autogenerated/comparisons_f64.wast
+++ b/test/llvm_autogenerated/comparisons_f64.wast
@@ -1,21 +1,21 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
- (export "ord_f64" $ord_f64)
- (export "uno_f64" $uno_f64)
- (export "oeq_f64" $oeq_f64)
- (export "une_f64" $une_f64)
- (export "olt_f64" $olt_f64)
- (export "ole_f64" $ole_f64)
- (export "ogt_f64" $ogt_f64)
- (export "oge_f64" $oge_f64)
- (export "ueq_f64" $ueq_f64)
- (export "one_f64" $one_f64)
- (export "ult_f64" $ult_f64)
- (export "ule_f64" $ule_f64)
- (export "ugt_f64" $ugt_f64)
- (export "uge_f64" $uge_f64)
+ (export "memory" (memory $0))
+ (export "ord_f64" (func $ord_f64))
+ (export "uno_f64" (func $uno_f64))
+ (export "oeq_f64" (func $oeq_f64))
+ (export "une_f64" (func $une_f64))
+ (export "olt_f64" (func $olt_f64))
+ (export "ole_f64" (func $ole_f64))
+ (export "ogt_f64" (func $ogt_f64))
+ (export "oge_f64" (func $oge_f64))
+ (export "ueq_f64" (func $ueq_f64))
+ (export "one_f64" (func $one_f64))
+ (export "ult_f64" (func $ult_f64))
+ (export "ule_f64" (func $ule_f64))
+ (export "ugt_f64" (func $ugt_f64))
+ (export "uge_f64" (func $uge_f64))
(func $ord_f64 (param $0 f64) (param $1 f64) (result i32)
(return
(i32.and
diff --git a/test/llvm_autogenerated/comparisons_i32.wast b/test/llvm_autogenerated/comparisons_i32.wast
index 2657cabd1..c6b027436 100644
--- a/test/llvm_autogenerated/comparisons_i32.wast
+++ b/test/llvm_autogenerated/comparisons_i32.wast
@@ -1,17 +1,17 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
- (export "eq_i32" $eq_i32)
- (export "ne_i32" $ne_i32)
- (export "slt_i32" $slt_i32)
- (export "sle_i32" $sle_i32)
- (export "ult_i32" $ult_i32)
- (export "ule_i32" $ule_i32)
- (export "sgt_i32" $sgt_i32)
- (export "sge_i32" $sge_i32)
- (export "ugt_i32" $ugt_i32)
- (export "uge_i32" $uge_i32)
+ (export "memory" (memory $0))
+ (export "eq_i32" (func $eq_i32))
+ (export "ne_i32" (func $ne_i32))
+ (export "slt_i32" (func $slt_i32))
+ (export "sle_i32" (func $sle_i32))
+ (export "ult_i32" (func $ult_i32))
+ (export "ule_i32" (func $ule_i32))
+ (export "sgt_i32" (func $sgt_i32))
+ (export "sge_i32" (func $sge_i32))
+ (export "ugt_i32" (func $ugt_i32))
+ (export "uge_i32" (func $uge_i32))
(func $eq_i32 (param $0 i32) (param $1 i32) (result i32)
(return
(i32.eq
diff --git a/test/llvm_autogenerated/comparisons_i64.wast b/test/llvm_autogenerated/comparisons_i64.wast
index 0ce7ab530..9e23d4d04 100644
--- a/test/llvm_autogenerated/comparisons_i64.wast
+++ b/test/llvm_autogenerated/comparisons_i64.wast
@@ -1,17 +1,17 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
- (export "eq_i64" $eq_i64)
- (export "ne_i64" $ne_i64)
- (export "slt_i64" $slt_i64)
- (export "sle_i64" $sle_i64)
- (export "ult_i64" $ult_i64)
- (export "ule_i64" $ule_i64)
- (export "sgt_i64" $sgt_i64)
- (export "sge_i64" $sge_i64)
- (export "ugt_i64" $ugt_i64)
- (export "uge_i64" $uge_i64)
+ (export "memory" (memory $0))
+ (export "eq_i64" (func $eq_i64))
+ (export "ne_i64" (func $ne_i64))
+ (export "slt_i64" (func $slt_i64))
+ (export "sle_i64" (func $sle_i64))
+ (export "ult_i64" (func $ult_i64))
+ (export "ule_i64" (func $ule_i64))
+ (export "sgt_i64" (func $sgt_i64))
+ (export "sge_i64" (func $sge_i64))
+ (export "ugt_i64" (func $ugt_i64))
+ (export "uge_i64" (func $uge_i64))
(func $eq_i64 (param $0 i64) (param $1 i64) (result i32)
(return
(i64.eq
diff --git a/test/llvm_autogenerated/conv.wast b/test/llvm_autogenerated/conv.wast
index 0ee43f493..13e2b3273 100644
--- a/test/llvm_autogenerated/conv.wast
+++ b/test/llvm_autogenerated/conv.wast
@@ -1,33 +1,33 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
- (export "i32_wrap_i64" $i32_wrap_i64)
- (export "i64_extend_s_i32" $i64_extend_s_i32)
- (export "i64_extend_u_i32" $i64_extend_u_i32)
- (export "i32_trunc_s_f32" $i32_trunc_s_f32)
- (export "i32_trunc_u_f32" $i32_trunc_u_f32)
- (export "i32_trunc_s_f64" $i32_trunc_s_f64)
- (export "i32_trunc_u_f64" $i32_trunc_u_f64)
- (export "i64_trunc_s_f32" $i64_trunc_s_f32)
- (export "i64_trunc_u_f32" $i64_trunc_u_f32)
- (export "i64_trunc_s_f64" $i64_trunc_s_f64)
- (export "i64_trunc_u_f64" $i64_trunc_u_f64)
- (export "f32_convert_s_i32" $f32_convert_s_i32)
- (export "f32_convert_u_i32" $f32_convert_u_i32)
- (export "f64_convert_s_i32" $f64_convert_s_i32)
- (export "f64_convert_u_i32" $f64_convert_u_i32)
- (export "f32_convert_s_i64" $f32_convert_s_i64)
- (export "f32_convert_u_i64" $f32_convert_u_i64)
- (export "f64_convert_s_i64" $f64_convert_s_i64)
- (export "f64_convert_u_i64" $f64_convert_u_i64)
- (export "f64_promote_f32" $f64_promote_f32)
- (export "f32_demote_f64" $f32_demote_f64)
- (export "anyext" $anyext)
- (export "bitcast_i32_to_float" $bitcast_i32_to_float)
- (export "bitcast_float_to_i32" $bitcast_float_to_i32)
- (export "bitcast_i64_to_double" $bitcast_i64_to_double)
- (export "bitcast_double_to_i64" $bitcast_double_to_i64)
+ (export "memory" (memory $0))
+ (export "i32_wrap_i64" (func $i32_wrap_i64))
+ (export "i64_extend_s_i32" (func $i64_extend_s_i32))
+ (export "i64_extend_u_i32" (func $i64_extend_u_i32))
+ (export "i32_trunc_s_f32" (func $i32_trunc_s_f32))
+ (export "i32_trunc_u_f32" (func $i32_trunc_u_f32))
+ (export "i32_trunc_s_f64" (func $i32_trunc_s_f64))
+ (export "i32_trunc_u_f64" (func $i32_trunc_u_f64))
+ (export "i64_trunc_s_f32" (func $i64_trunc_s_f32))
+ (export "i64_trunc_u_f32" (func $i64_trunc_u_f32))
+ (export "i64_trunc_s_f64" (func $i64_trunc_s_f64))
+ (export "i64_trunc_u_f64" (func $i64_trunc_u_f64))
+ (export "f32_convert_s_i32" (func $f32_convert_s_i32))
+ (export "f32_convert_u_i32" (func $f32_convert_u_i32))
+ (export "f64_convert_s_i32" (func $f64_convert_s_i32))
+ (export "f64_convert_u_i32" (func $f64_convert_u_i32))
+ (export "f32_convert_s_i64" (func $f32_convert_s_i64))
+ (export "f32_convert_u_i64" (func $f32_convert_u_i64))
+ (export "f64_convert_s_i64" (func $f64_convert_s_i64))
+ (export "f64_convert_u_i64" (func $f64_convert_u_i64))
+ (export "f64_promote_f32" (func $f64_promote_f32))
+ (export "f32_demote_f64" (func $f32_demote_f64))
+ (export "anyext" (func $anyext))
+ (export "bitcast_i32_to_float" (func $bitcast_i32_to_float))
+ (export "bitcast_float_to_i32" (func $bitcast_float_to_i32))
+ (export "bitcast_i64_to_double" (func $bitcast_i64_to_double))
+ (export "bitcast_double_to_i64" (func $bitcast_double_to_i64))
(func $i32_wrap_i64 (param $0 i64) (result i32)
(return
(i32.wrap/i64
diff --git a/test/llvm_autogenerated/copysign-casts.wast b/test/llvm_autogenerated/copysign-casts.wast
index 853cce958..2c8064227 100644
--- a/test/llvm_autogenerated/copysign-casts.wast
+++ b/test/llvm_autogenerated/copysign-casts.wast
@@ -1,9 +1,9 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
- (export "fold_promote" $fold_promote)
- (export "fold_demote" $fold_demote)
+ (export "memory" (memory $0))
+ (export "fold_promote" (func $fold_promote))
+ (export "fold_demote" (func $fold_demote))
(func $fold_promote (param $0 f64) (param $1 f32) (result f64)
(f64.copysign
(get_local $0)
diff --git a/test/llvm_autogenerated/cpus.wast b/test/llvm_autogenerated/cpus.wast
index ce2ace210..0810e5528 100644
--- a/test/llvm_autogenerated/cpus.wast
+++ b/test/llvm_autogenerated/cpus.wast
@@ -1,8 +1,8 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
- (export "f" $f)
+ (export "memory" (memory $0))
+ (export "f" (func $f))
(func $f (param $0 i32) (result i32)
(get_local $0)
)
diff --git a/test/llvm_autogenerated/dead-vreg.s b/test/llvm_autogenerated/dead-vreg.s
index 69198d1e7..12daed803 100644
--- a/test/llvm_autogenerated/dead-vreg.s
+++ b/test/llvm_autogenerated/dead-vreg.s
@@ -1,19 +1,19 @@
.text
- .file "/s/llvm/llvm/test/CodeGen/WebAssembly/dead-vreg.ll"
+ .file "/s/llvm-upstream/llvm/test/CodeGen/WebAssembly/dead-vreg.ll"
.globl foo
.type foo,@function
foo:
.param i32, i32, i32
.local i32, i32, i32, i32, i32, i32
block
- i32.const $push4=, 1
- i32.lt_s $push1=, $2, $pop4
- br_if 0, $pop1
- i32.const $push2=, 2
- i32.shl $3=, $1, $pop2
+ i32.const $push3=, 1
+ i32.lt_s $push0=, $2, $pop3
+ br_if 0, $pop0
+ i32.const $push1=, 2
+ i32.shl $3=, $1, $pop1
i32.const $5=, 0
- i32.const $push5=, 1
- i32.lt_s $4=, $1, $pop5
+ i32.const $push4=, 1
+ i32.lt_s $4=, $1, $pop4
.LBB0_2:
loop
block
@@ -23,26 +23,27 @@ foo:
copy_local $8=, $1
.LBB0_4:
loop
- i32.store $push0=, 0($7), $6
- i32.add $6=, $pop0, $5
- i32.const $push9=, 4
- i32.add $7=, $7, $pop9
- i32.const $push8=, -1
- i32.add $push7=, $8, $pop8
- tee_local $push6=, $8=, $pop7
- br_if 0, $pop6
+ i32.store $drop=, 0($7), $6
+ i32.add $6=, $6, $5
+ i32.const $push8=, 4
+ i32.add $7=, $7, $pop8
+ i32.const $push7=, -1
+ i32.add $push6=, $8, $pop7
+ tee_local $push5=, $8=, $pop6
+ br_if 0, $pop5
.LBB0_5:
end_loop
end_block
i32.add $0=, $0, $3
- i32.const $push12=, 1
- i32.add $push11=, $5, $pop12
- tee_local $push10=, $5=, $pop11
- i32.ne $push3=, $pop10, $2
- br_if 0, $pop3
+ i32.const $push11=, 1
+ i32.add $push10=, $5, $pop11
+ tee_local $push9=, $5=, $pop10
+ i32.ne $push2=, $pop9, $2
+ br_if 0, $pop2
.LBB0_6:
end_loop
end_block
+ return
.endfunc
.Lfunc_end0:
.size foo, .Lfunc_end0-foo
diff --git a/test/llvm_autogenerated/dead-vreg.wast b/test/llvm_autogenerated/dead-vreg.wast
index 171f3c388..d2b85220f 100644
--- a/test/llvm_autogenerated/dead-vreg.wast
+++ b/test/llvm_autogenerated/dead-vreg.wast
@@ -1,17 +1,15 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
- (type $0 (func (param i32 i32 i32)))
- (export "foo" $foo)
- (func $foo (type $0) (param $0 i32) (param $1 i32) (param $2 i32)
+ (export "memory" (memory $0))
+ (export "foo" (func $foo))
+ (func $foo (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
- (local $9 i32)
(block $label$0
(br_if $label$0
(i32.lt_s
@@ -34,73 +32,73 @@
(i32.const 1)
)
)
- (loop $label$2 $label$1
- (block $label$3
- (br_if $label$3
- (get_local $4)
- )
- (set_local $6
- (i32.const 0)
- )
- (set_local $7
- (get_local $0)
- )
- (set_local $8
- (get_local $1)
- )
- (loop $label$5 $label$4
+ (block $label$2
+ (loop $label$1
+ (block $label$3
+ (br_if $label$3
+ (get_local $4)
+ )
(set_local $6
- (i32.add
- (block
- (block
- (set_local $9
- (get_local $6)
- )
- (i32.store
- (get_local $7)
- (get_local $9)
- )
- )
- (get_local $9)
- )
- (get_local $5)
- )
+ (i32.const 0)
)
(set_local $7
- (i32.add
- (get_local $7)
- (i32.const 4)
- )
+ (get_local $0)
)
- (br_if $label$4
- (tee_local $8
- (i32.add
- (get_local $8)
- (i32.const -1)
+ (set_local $8
+ (get_local $1)
+ )
+ (block $label$5
+ (loop $label$4
+ (drop
+ (i32.store
+ (get_local $7)
+ (get_local $6)
+ )
+ )
+ (set_local $6
+ (i32.add
+ (get_local $6)
+ (get_local $5)
+ )
+ )
+ (set_local $7
+ (i32.add
+ (get_local $7)
+ (i32.const 4)
+ )
+ )
+ (br_if $label$4
+ (tee_local $8
+ (i32.add
+ (get_local $8)
+ (i32.const -1)
+ )
+ )
)
)
)
)
- )
- (set_local $0
- (i32.add
- (get_local $0)
- (get_local $3)
+ (set_local $0
+ (i32.add
+ (get_local $0)
+ (get_local $3)
+ )
)
- )
- (br_if $label$1
- (i32.ne
- (tee_local $5
- (i32.add
- (get_local $5)
- (i32.const 1)
+ (br_if $label$1
+ (i32.ne
+ (tee_local $5
+ (i32.add
+ (get_local $5)
+ (i32.const 1)
+ )
)
+ (get_local $2)
)
- (get_local $2)
)
)
)
)
+ (return)
)
)
;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] }
diff --git a/test/llvm_autogenerated/divrem-constant.wast b/test/llvm_autogenerated/divrem-constant.wast
index 358ecdbf3..e1c33bf9d 100644
--- a/test/llvm_autogenerated/divrem-constant.wast
+++ b/test/llvm_autogenerated/divrem-constant.wast
@@ -1,15 +1,15 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
- (export "test_udiv_2" $test_udiv_2)
- (export "test_udiv_5" $test_udiv_5)
- (export "test_sdiv_2" $test_sdiv_2)
- (export "test_sdiv_5" $test_sdiv_5)
- (export "test_urem_2" $test_urem_2)
- (export "test_urem_5" $test_urem_5)
- (export "test_srem_2" $test_srem_2)
- (export "test_srem_5" $test_srem_5)
+ (export "memory" (memory $0))
+ (export "test_udiv_2" (func $test_udiv_2))
+ (export "test_udiv_5" (func $test_udiv_5))
+ (export "test_sdiv_2" (func $test_sdiv_2))
+ (export "test_sdiv_5" (func $test_sdiv_5))
+ (export "test_urem_2" (func $test_urem_2))
+ (export "test_urem_5" (func $test_urem_5))
+ (export "test_srem_2" (func $test_srem_2))
+ (export "test_srem_5" (func $test_srem_5))
(func $test_udiv_2 (param $0 i32) (result i32)
(i32.shr_u
(get_local $0)
diff --git a/test/llvm_autogenerated/f32.wast b/test/llvm_autogenerated/f32.wast
index 466ce049a..f660676e5 100644
--- a/test/llvm_autogenerated/f32.wast
+++ b/test/llvm_autogenerated/f32.wast
@@ -1,25 +1,25 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
(type $FUNCSIG$ffff (func (param f32 f32 f32) (result f32)))
- (import $fmaf "env" "fmaf" (param f32 f32 f32) (result f32))
- (export "fadd32" $fadd32)
- (export "fsub32" $fsub32)
- (export "fmul32" $fmul32)
- (export "fdiv32" $fdiv32)
- (export "fabs32" $fabs32)
- (export "fneg32" $fneg32)
- (export "copysign32" $copysign32)
- (export "sqrt32" $sqrt32)
- (export "ceil32" $ceil32)
- (export "floor32" $floor32)
- (export "trunc32" $trunc32)
- (export "nearest32" $nearest32)
- (export "nearest32_via_rint" $nearest32_via_rint)
- (export "fmin32" $fmin32)
- (export "fmax32" $fmax32)
- (export "fma32" $fma32)
+ (import "env" "fmaf" (func $fmaf (param f32 f32 f32) (result f32)))
+ (export "memory" (memory $0))
+ (export "fadd32" (func $fadd32))
+ (export "fsub32" (func $fsub32))
+ (export "fmul32" (func $fmul32))
+ (export "fdiv32" (func $fdiv32))
+ (export "fabs32" (func $fabs32))
+ (export "fneg32" (func $fneg32))
+ (export "copysign32" (func $copysign32))
+ (export "sqrt32" (func $sqrt32))
+ (export "ceil32" (func $ceil32))
+ (export "floor32" (func $floor32))
+ (export "trunc32" (func $trunc32))
+ (export "nearest32" (func $nearest32))
+ (export "nearest32_via_rint" (func $nearest32_via_rint))
+ (export "fmin32" (func $fmin32))
+ (export "fmax32" (func $fmax32))
+ (export "fma32" (func $fma32))
(func $fadd32 (param $0 f32) (param $1 f32) (result f32)
(return
(f32.add
diff --git a/test/llvm_autogenerated/f64.wast b/test/llvm_autogenerated/f64.wast
index 0c74c17ea..07a49840b 100644
--- a/test/llvm_autogenerated/f64.wast
+++ b/test/llvm_autogenerated/f64.wast
@@ -1,25 +1,25 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
(type $FUNCSIG$dddd (func (param f64 f64 f64) (result f64)))
- (import $fma "env" "fma" (param f64 f64 f64) (result f64))
- (export "fadd64" $fadd64)
- (export "fsub64" $fsub64)
- (export "fmul64" $fmul64)
- (export "fdiv64" $fdiv64)
- (export "fabs64" $fabs64)
- (export "fneg64" $fneg64)
- (export "copysign64" $copysign64)
- (export "sqrt64" $sqrt64)
- (export "ceil64" $ceil64)
- (export "floor64" $floor64)
- (export "trunc64" $trunc64)
- (export "nearest64" $nearest64)
- (export "nearest64_via_rint" $nearest64_via_rint)
- (export "fmin64" $fmin64)
- (export "fmax64" $fmax64)
- (export "fma64" $fma64)
+ (import "env" "fma" (func $fma (param f64 f64 f64) (result f64)))
+ (export "memory" (memory $0))
+ (export "fadd64" (func $fadd64))
+ (export "fsub64" (func $fsub64))
+ (export "fmul64" (func $fmul64))
+ (export "fdiv64" (func $fdiv64))
+ (export "fabs64" (func $fabs64))
+ (export "fneg64" (func $fneg64))
+ (export "copysign64" (func $copysign64))
+ (export "sqrt64" (func $sqrt64))
+ (export "ceil64" (func $ceil64))
+ (export "floor64" (func $floor64))
+ (export "trunc64" (func $trunc64))
+ (export "nearest64" (func $nearest64))
+ (export "nearest64_via_rint" (func $nearest64_via_rint))
+ (export "fmin64" (func $fmin64))
+ (export "fmax64" (func $fmax64))
+ (export "fma64" (func $fma64))
(func $fadd64 (param $0 f64) (param $1 f64) (result f64)
(return
(f64.add
diff --git a/test/llvm_autogenerated/fast-isel.wast b/test/llvm_autogenerated/fast-isel.wast
index 50cdb5469..3fe9c40b6 100644
--- a/test/llvm_autogenerated/fast-isel.wast
+++ b/test/llvm_autogenerated/fast-isel.wast
@@ -1,13 +1,13 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
- (export "immediate_f32" $immediate_f32)
- (export "immediate_f64" $immediate_f64)
- (export "bitcast_i32_f32" $bitcast_i32_f32)
- (export "bitcast_f32_i32" $bitcast_f32_i32)
- (export "bitcast_i64_f64" $bitcast_i64_f64)
- (export "bitcast_f64_i64" $bitcast_f64_i64)
+ (export "memory" (memory $0))
+ (export "immediate_f32" (func $immediate_f32))
+ (export "immediate_f64" (func $immediate_f64))
+ (export "bitcast_i32_f32" (func $bitcast_i32_f32))
+ (export "bitcast_f32_i32" (func $bitcast_f32_i32))
+ (export "bitcast_i64_f64" (func $bitcast_i64_f64))
+ (export "bitcast_f64_i64" (func $bitcast_f64_i64))
(func $immediate_f32 (result f32)
(f32.const 2.5)
)
diff --git a/test/llvm_autogenerated/frem.wast b/test/llvm_autogenerated/frem.wast
index b7f784d2d..bc69d93f1 100644
--- a/test/llvm_autogenerated/frem.wast
+++ b/test/llvm_autogenerated/frem.wast
@@ -1,13 +1,13 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
(type $FUNCSIG$ddd (func (param f64 f64) (result f64)))
(type $FUNCSIG$fff (func (param f32 f32) (result f32)))
- (import $fmod "env" "fmod" (param f64 f64) (result f64))
- (import $fmodf "env" "fmodf" (param f32 f32) (result f32))
- (export "frem32" $frem32)
- (export "frem64" $frem64)
+ (import "env" "fmod" (func $fmod (param f64 f64) (result f64)))
+ (import "env" "fmodf" (func $fmodf (param f32 f32) (result f32)))
+ (export "memory" (memory $0))
+ (export "frem32" (func $frem32))
+ (export "frem64" (func $frem64))
(func $frem32 (param $0 f32) (param $1 f32) (result f32)
(return
(call_import $fmodf
diff --git a/test/llvm_autogenerated/func.wast b/test/llvm_autogenerated/func.wast
index b4298e449..4535b632a 100644
--- a/test/llvm_autogenerated/func.wast
+++ b/test/llvm_autogenerated/func.wast
@@ -1,13 +1,13 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
- (export "f0" $f0)
- (export "f1" $f1)
- (export "f2" $f2)
- (export "f3" $f3)
- (export "f4" $f4)
- (export "f5" $f5)
+ (export "memory" (memory $0))
+ (export "f0" (func $f0))
+ (export "f1" (func $f1))
+ (export "f2" (func $f2))
+ (export "f3" (func $f3))
+ (export "f4" (func $f4))
+ (export "f5" (func $f5))
(func $f0
(return)
)
diff --git a/test/llvm_autogenerated/global.wast b/test/llvm_autogenerated/global.wast
index 85c50ff03..57aca9ffc 100644
--- a/test/llvm_autogenerated/global.wast
+++ b/test/llvm_autogenerated/global.wast
@@ -13,11 +13,11 @@
(data (i32.const 136) "\00\00\00\00\00\00\00@")
(data (i32.const 656) "\e0\00\00\00")
(data (i32.const 1192) "\a4\04\00\00")
- (export "memory" memory)
(type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32)))
- (import $memcpy "env" "memcpy" (param i32 i32 i32) (result i32))
- (export "foo" $foo)
- (export "call_memcpy" $call_memcpy)
+ (import "env" "memcpy" (func $memcpy (param i32 i32 i32) (result i32)))
+ (export "memory" (memory $0))
+ (export "foo" (func $foo))
+ (export "call_memcpy" (func $call_memcpy))
(func $foo (result i32)
(return
(i32.load offset=32
diff --git a/test/llvm_autogenerated/globl.wast b/test/llvm_autogenerated/globl.wast
index cf493cb12..60636c5fd 100644
--- a/test/llvm_autogenerated/globl.wast
+++ b/test/llvm_autogenerated/globl.wast
@@ -1,8 +1,8 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
- (export "foo" $foo)
+ (export "memory" (memory $0))
+ (export "foo" (func $foo))
(func $foo
)
)
diff --git a/test/llvm_autogenerated/i128.s b/test/llvm_autogenerated/i128.s
index 4fb17621b..316f57797 100644
--- a/test/llvm_autogenerated/i128.s
+++ b/test/llvm_autogenerated/i128.s
@@ -1,22 +1,23 @@
.text
- .file "/s/llvm/llvm/test/CodeGen/WebAssembly/i128.ll"
+ .file "/s/llvm-upstream/llvm/test/CodeGen/WebAssembly/i128.ll"
.globl add128
.type add128,@function
add128:
.param i32, i64, i64, i64, i64
- i32.const $push8=, 8
- i32.add $push9=, $0, $pop8
- i64.add $push6=, $2, $4
- i64.const $push4=, 1
- i64.add $push0=, $1, $3
- i64.store $push11=, 0($0), $pop0
- tee_local $push10=, $2=, $pop11
- i64.lt_u $push2=, $pop10, $1
- i64.extend_u/i32 $push3=, $pop2
- i64.lt_u $push1=, $2, $3
- i64.select $push5=, $pop4, $pop3, $pop1
- i64.add $push7=, $pop6, $pop5
- i64.store $drop=, 0($pop9), $pop7
+ .local i64
+ i64.add $push10=, $1, $3
+ tee_local $push9=, $5=, $pop10
+ i64.store $drop=, 0($0), $pop9
+ i32.const $push7=, 8
+ i32.add $push8=, $0, $pop7
+ i64.add $push5=, $2, $4
+ i64.const $push3=, 1
+ i64.lt_u $push1=, $5, $1
+ i64.extend_u/i32 $push2=, $pop1
+ i64.lt_u $push0=, $5, $3
+ i64.select $push4=, $pop3, $pop2, $pop0
+ i64.add $push6=, $pop5, $pop4
+ i64.store $drop=, 0($pop8), $pop6
return
.endfunc
.Lfunc_end0:
@@ -45,26 +46,26 @@ sub128:
mul128:
.param i32, i64, i64, i64, i64
.local i32
- i32.const $push8=, __stack_pointer
- i32.const $push5=, __stack_pointer
- i32.load $push6=, 0($pop5)
+ i32.const $push8=, 0
+ i32.const $push5=, 0
+ i32.load $push6=, __stack_pointer($pop5)
i32.const $push7=, 16
- i32.sub $push12=, $pop6, $pop7
- i32.store $push15=, 0($pop8), $pop12
- tee_local $push14=, $5=, $pop15
- call __multi3@FUNCTION, $pop14, $1, $2, $3, $4
+ i32.sub $push14=, $pop6, $pop7
+ tee_local $push13=, $5=, $pop14
+ i32.store $drop=, __stack_pointer($pop8), $pop13
+ call __multi3@FUNCTION, $5, $1, $2, $3, $4
i32.const $push0=, 8
i32.add $push1=, $0, $pop0
- i32.const $push13=, 8
- i32.add $push2=, $5, $pop13
+ i32.const $push12=, 8
+ i32.add $push2=, $5, $pop12
i64.load $push3=, 0($pop2)
i64.store $drop=, 0($pop1), $pop3
i64.load $push4=, 0($5)
i64.store $drop=, 0($0), $pop4
- i32.const $push11=, __stack_pointer
+ i32.const $push11=, 0
i32.const $push9=, 16
i32.add $push10=, $5, $pop9
- i32.store $drop=, 0($pop11), $pop10
+ i32.store $drop=, __stack_pointer($pop11), $pop10
return
.endfunc
.Lfunc_end2:
@@ -75,26 +76,26 @@ mul128:
sdiv128:
.param i32, i64, i64, i64, i64
.local i32
- i32.const $push8=, __stack_pointer
- i32.const $push5=, __stack_pointer
- i32.load $push6=, 0($pop5)
+ i32.const $push8=, 0
+ i32.const $push5=, 0
+ i32.load $push6=, __stack_pointer($pop5)
i32.const $push7=, 16
- i32.sub $push12=, $pop6, $pop7
- i32.store $push15=, 0($pop8), $pop12
- tee_local $push14=, $5=, $pop15
- call __divti3@FUNCTION, $pop14, $1, $2, $3, $4
+ i32.sub $push14=, $pop6, $pop7
+ tee_local $push13=, $5=, $pop14
+ i32.store $drop=, __stack_pointer($pop8), $pop13
+ call __divti3@FUNCTION, $5, $1, $2, $3, $4
i32.const $push0=, 8
i32.add $push1=, $0, $pop0
- i32.const $push13=, 8
- i32.add $push2=, $5, $pop13
+ i32.const $push12=, 8
+ i32.add $push2=, $5, $pop12
i64.load $push3=, 0($pop2)
i64.store $drop=, 0($pop1), $pop3
i64.load $push4=, 0($5)
i64.store $drop=, 0($0), $pop4
- i32.const $push11=, __stack_pointer
+ i32.const $push11=, 0
i32.const $push9=, 16
i32.add $push10=, $5, $pop9
- i32.store $drop=, 0($pop11), $pop10
+ i32.store $drop=, __stack_pointer($pop11), $pop10
return
.endfunc
.Lfunc_end3:
@@ -105,26 +106,26 @@ sdiv128:
udiv128:
.param i32, i64, i64, i64, i64
.local i32
- i32.const $push8=, __stack_pointer
- i32.const $push5=, __stack_pointer
- i32.load $push6=, 0($pop5)
+ i32.const $push8=, 0
+ i32.const $push5=, 0
+ i32.load $push6=, __stack_pointer($pop5)
i32.const $push7=, 16
- i32.sub $push12=, $pop6, $pop7
- i32.store $push15=, 0($pop8), $pop12
- tee_local $push14=, $5=, $pop15
- call __udivti3@FUNCTION, $pop14, $1, $2, $3, $4
+ i32.sub $push14=, $pop6, $pop7
+ tee_local $push13=, $5=, $pop14
+ i32.store $drop=, __stack_pointer($pop8), $pop13
+ call __udivti3@FUNCTION, $5, $1, $2, $3, $4
i32.const $push0=, 8
i32.add $push1=, $0, $pop0
- i32.const $push13=, 8
- i32.add $push2=, $5, $pop13
+ i32.const $push12=, 8
+ i32.add $push2=, $5, $pop12
i64.load $push3=, 0($pop2)
i64.store $drop=, 0($pop1), $pop3
i64.load $push4=, 0($5)
i64.store $drop=, 0($0), $pop4
- i32.const $push11=, __stack_pointer
+ i32.const $push11=, 0
i32.const $push9=, 16
i32.add $push10=, $5, $pop9
- i32.store $drop=, 0($pop11), $pop10
+ i32.store $drop=, __stack_pointer($pop11), $pop10
return
.endfunc
.Lfunc_end4:
@@ -135,26 +136,26 @@ udiv128:
srem128:
.param i32, i64, i64, i64, i64
.local i32
- i32.const $push8=, __stack_pointer
- i32.const $push5=, __stack_pointer
- i32.load $push6=, 0($pop5)
+ i32.const $push8=, 0
+ i32.const $push5=, 0
+ i32.load $push6=, __stack_pointer($pop5)
i32.const $push7=, 16
- i32.sub $push12=, $pop6, $pop7
- i32.store $push15=, 0($pop8), $pop12
- tee_local $push14=, $5=, $pop15
- call __modti3@FUNCTION, $pop14, $1, $2, $3, $4
+ i32.sub $push14=, $pop6, $pop7
+ tee_local $push13=, $5=, $pop14
+ i32.store $drop=, __stack_pointer($pop8), $pop13
+ call __modti3@FUNCTION, $5, $1, $2, $3, $4
i32.const $push0=, 8
i32.add $push1=, $0, $pop0
- i32.const $push13=, 8
- i32.add $push2=, $5, $pop13
+ i32.const $push12=, 8
+ i32.add $push2=, $5, $pop12
i64.load $push3=, 0($pop2)
i64.store $drop=, 0($pop1), $pop3
i64.load $push4=, 0($5)
i64.store $drop=, 0($0), $pop4
- i32.const $push11=, __stack_pointer
+ i32.const $push11=, 0
i32.const $push9=, 16
i32.add $push10=, $5, $pop9
- i32.store $drop=, 0($pop11), $pop10
+ i32.store $drop=, __stack_pointer($pop11), $pop10
return
.endfunc
.Lfunc_end5:
@@ -165,26 +166,26 @@ srem128:
urem128:
.param i32, i64, i64, i64, i64
.local i32
- i32.const $push8=, __stack_pointer
- i32.const $push5=, __stack_pointer
- i32.load $push6=, 0($pop5)
+ i32.const $push8=, 0
+ i32.const $push5=, 0
+ i32.load $push6=, __stack_pointer($pop5)
i32.const $push7=, 16
- i32.sub $push12=, $pop6, $pop7
- i32.store $push15=, 0($pop8), $pop12
- tee_local $push14=, $5=, $pop15
- call __umodti3@FUNCTION, $pop14, $1, $2, $3, $4
+ i32.sub $push14=, $pop6, $pop7
+ tee_local $push13=, $5=, $pop14
+ i32.store $drop=, __stack_pointer($pop8), $pop13
+ call __umodti3@FUNCTION, $5, $1, $2, $3, $4
i32.const $push0=, 8
i32.add $push1=, $0, $pop0
- i32.const $push13=, 8
- i32.add $push2=, $5, $pop13
+ i32.const $push12=, 8
+ i32.add $push2=, $5, $pop12
i64.load $push3=, 0($pop2)
i64.store $drop=, 0($pop1), $pop3
i64.load $push4=, 0($5)
i64.store $drop=, 0($0), $pop4
- i32.const $push11=, __stack_pointer
+ i32.const $push11=, 0
i32.const $push9=, 16
i32.add $push10=, $5, $pop9
- i32.store $drop=, 0($pop11), $pop10
+ i32.store $drop=, __stack_pointer($pop11), $pop10
return
.endfunc
.Lfunc_end6:
@@ -240,27 +241,27 @@ xor128:
shl128:
.param i32, i64, i64, i64, i64
.local i32
- i32.const $push9=, __stack_pointer
- i32.const $push6=, __stack_pointer
- i32.load $push7=, 0($pop6)
+ i32.const $push9=, 0
+ i32.const $push6=, 0
+ i32.load $push7=, __stack_pointer($pop6)
i32.const $push8=, 16
- i32.sub $push13=, $pop7, $pop8
- i32.store $push16=, 0($pop9), $pop13
- tee_local $push15=, $5=, $pop16
+ i32.sub $push15=, $pop7, $pop8
+ tee_local $push14=, $5=, $pop15
+ i32.store $drop=, __stack_pointer($pop9), $pop14
i32.wrap/i64 $push0=, $3
- call __ashlti3@FUNCTION, $pop15, $1, $2, $pop0
+ call __ashlti3@FUNCTION, $5, $1, $2, $pop0
i32.const $push1=, 8
i32.add $push2=, $0, $pop1
- i32.const $push14=, 8
- i32.add $push3=, $5, $pop14
+ i32.const $push13=, 8
+ i32.add $push3=, $5, $pop13
i64.load $push4=, 0($pop3)
i64.store $drop=, 0($pop2), $pop4
i64.load $push5=, 0($5)
i64.store $drop=, 0($0), $pop5
- i32.const $push12=, __stack_pointer
+ i32.const $push12=, 0
i32.const $push10=, 16
i32.add $push11=, $5, $pop10
- i32.store $drop=, 0($pop12), $pop11
+ i32.store $drop=, __stack_pointer($pop12), $pop11
return
.endfunc
.Lfunc_end10:
@@ -271,27 +272,27 @@ shl128:
shr128:
.param i32, i64, i64, i64, i64
.local i32
- i32.const $push9=, __stack_pointer
- i32.const $push6=, __stack_pointer
- i32.load $push7=, 0($pop6)
+ i32.const $push9=, 0
+ i32.const $push6=, 0
+ i32.load $push7=, __stack_pointer($pop6)
i32.const $push8=, 16
- i32.sub $push13=, $pop7, $pop8
- i32.store $push16=, 0($pop9), $pop13
- tee_local $push15=, $5=, $pop16
+ i32.sub $push15=, $pop7, $pop8
+ tee_local $push14=, $5=, $pop15
+ i32.store $drop=, __stack_pointer($pop9), $pop14
i32.wrap/i64 $push0=, $3
- call __lshrti3@FUNCTION, $pop15, $1, $2, $pop0
+ call __lshrti3@FUNCTION, $5, $1, $2, $pop0
i32.const $push1=, 8
i32.add $push2=, $0, $pop1
- i32.const $push14=, 8
- i32.add $push3=, $5, $pop14
+ i32.const $push13=, 8
+ i32.add $push3=, $5, $pop13
i64.load $push4=, 0($pop3)
i64.store $drop=, 0($pop2), $pop4
i64.load $push5=, 0($5)
i64.store $drop=, 0($0), $pop5
- i32.const $push12=, __stack_pointer
+ i32.const $push12=, 0
i32.const $push10=, 16
i32.add $push11=, $5, $pop10
- i32.store $drop=, 0($pop12), $pop11
+ i32.store $drop=, __stack_pointer($pop12), $pop11
return
.endfunc
.Lfunc_end11:
@@ -302,27 +303,27 @@ shr128:
sar128:
.param i32, i64, i64, i64, i64
.local i32
- i32.const $push9=, __stack_pointer
- i32.const $push6=, __stack_pointer
- i32.load $push7=, 0($pop6)
+ i32.const $push9=, 0
+ i32.const $push6=, 0
+ i32.load $push7=, __stack_pointer($pop6)
i32.const $push8=, 16
- i32.sub $push13=, $pop7, $pop8
- i32.store $push16=, 0($pop9), $pop13
- tee_local $push15=, $5=, $pop16
+ i32.sub $push15=, $pop7, $pop8
+ tee_local $push14=, $5=, $pop15
+ i32.store $drop=, __stack_pointer($pop9), $pop14
i32.wrap/i64 $push0=, $3
- call __ashrti3@FUNCTION, $pop15, $1, $2, $pop0
+ call __ashrti3@FUNCTION, $5, $1, $2, $pop0
i32.const $push1=, 8
i32.add $push2=, $0, $pop1
- i32.const $push14=, 8
- i32.add $push3=, $5, $pop14
+ i32.const $push13=, 8
+ i32.add $push3=, $5, $pop13
i64.load $push4=, 0($pop3)
i64.store $drop=, 0($pop2), $pop4
i64.load $push5=, 0($5)
i64.store $drop=, 0($0), $pop5
- i32.const $push12=, __stack_pointer
+ i32.const $push12=, 0
i32.const $push10=, 16
i32.add $push11=, $5, $pop10
- i32.store $drop=, 0($pop12), $pop11
+ i32.store $drop=, __stack_pointer($pop12), $pop11
return
.endfunc
.Lfunc_end12:
@@ -332,17 +333,18 @@ sar128:
.type clz128,@function
clz128:
.param i32, i64, i64
- i64.clz $push8=, $2
- i64.clz $push5=, $1
- i64.const $push6=, 64
- i64.add $push7=, $pop5, $pop6
- i32.const $push1=, 8
- i32.add $push2=, $0, $pop1
- i64.const $push3=, 0
- i64.store $push0=, 0($pop2), $pop3
- i64.ne $push4=, $2, $pop0
- i64.select $push9=, $pop8, $pop7, $pop4
- i64.store $drop=, 0($0), $pop9
+ i32.const $push0=, 8
+ i32.add $push1=, $0, $pop0
+ i64.const $push2=, 0
+ i64.store $drop=, 0($pop1), $pop2
+ i64.clz $push7=, $2
+ i64.clz $push4=, $1
+ i64.const $push5=, 64
+ i64.add $push6=, $pop4, $pop5
+ i64.const $push9=, 0
+ i64.ne $push3=, $2, $pop9
+ i64.select $push8=, $pop7, $pop6, $pop3
+ i64.store $drop=, 0($0), $pop8
return
.endfunc
.Lfunc_end13:
@@ -352,17 +354,18 @@ clz128:
.type clz128_zero_undef,@function
clz128_zero_undef:
.param i32, i64, i64
- i64.clz $push8=, $2
- i64.clz $push5=, $1
- i64.const $push6=, 64
- i64.add $push7=, $pop5, $pop6
- i32.const $push1=, 8
- i32.add $push2=, $0, $pop1
- i64.const $push3=, 0
- i64.store $push0=, 0($pop2), $pop3
- i64.ne $push4=, $2, $pop0
- i64.select $push9=, $pop8, $pop7, $pop4
- i64.store $drop=, 0($0), $pop9
+ i32.const $push0=, 8
+ i32.add $push1=, $0, $pop0
+ i64.const $push2=, 0
+ i64.store $drop=, 0($pop1), $pop2
+ i64.clz $push7=, $2
+ i64.clz $push4=, $1
+ i64.const $push5=, 64
+ i64.add $push6=, $pop4, $pop5
+ i64.const $push9=, 0
+ i64.ne $push3=, $2, $pop9
+ i64.select $push8=, $pop7, $pop6, $pop3
+ i64.store $drop=, 0($0), $pop8
return
.endfunc
.Lfunc_end14:
@@ -372,17 +375,18 @@ clz128_zero_undef:
.type ctz128,@function
ctz128:
.param i32, i64, i64
- i64.ctz $push8=, $1
- i64.ctz $push5=, $2
- i64.const $push6=, 64
- i64.add $push7=, $pop5, $pop6
- i32.const $push1=, 8
- i32.add $push2=, $0, $pop1
- i64.const $push3=, 0
- i64.store $push0=, 0($pop2), $pop3
- i64.ne $push4=, $1, $pop0
- i64.select $push9=, $pop8, $pop7, $pop4
- i64.store $drop=, 0($0), $pop9
+ i32.const $push0=, 8
+ i32.add $push1=, $0, $pop0
+ i64.const $push2=, 0
+ i64.store $drop=, 0($pop1), $pop2
+ i64.ctz $push7=, $1
+ i64.ctz $push4=, $2
+ i64.const $push5=, 64
+ i64.add $push6=, $pop4, $pop5
+ i64.const $push9=, 0
+ i64.ne $push3=, $1, $pop9
+ i64.select $push8=, $pop7, $pop6, $pop3
+ i64.store $drop=, 0($0), $pop8
return
.endfunc
.Lfunc_end15:
@@ -392,17 +396,18 @@ ctz128:
.type ctz128_zero_undef,@function
ctz128_zero_undef:
.param i32, i64, i64
- i64.ctz $push8=, $1
- i64.ctz $push5=, $2
- i64.const $push6=, 64
- i64.add $push7=, $pop5, $pop6
- i32.const $push1=, 8
- i32.add $push2=, $0, $pop1
- i64.const $push3=, 0
- i64.store $push0=, 0($pop2), $pop3
- i64.ne $push4=, $1, $pop0
- i64.select $push9=, $pop8, $pop7, $pop4
- i64.store $drop=, 0($0), $pop9
+ i32.const $push0=, 8
+ i32.add $push1=, $0, $pop0
+ i64.const $push2=, 0
+ i64.store $drop=, 0($pop1), $pop2
+ i64.ctz $push7=, $1
+ i64.ctz $push4=, $2
+ i64.const $push5=, 64
+ i64.add $push6=, $pop4, $pop5
+ i64.const $push9=, 0
+ i64.ne $push3=, $1, $pop9
+ i64.select $push8=, $pop7, $pop6, $pop3
+ i64.store $drop=, 0($0), $pop8
return
.endfunc
.Lfunc_end16:
@@ -442,15 +447,15 @@ eqz128:
rotl:
.param i32, i64, i64, i64, i64
.local i32
- i32.const $push17=, __stack_pointer
- i32.const $push14=, __stack_pointer
- i32.load $push15=, 0($pop14)
+ i32.const $push17=, 0
+ i32.const $push14=, 0
+ i32.load $push15=, __stack_pointer($pop14)
i32.const $push16=, 32
- i32.sub $push25=, $pop15, $pop16
- i32.store $push29=, 0($pop17), $pop25
- tee_local $push28=, $5=, $pop29
+ i32.sub $push28=, $pop15, $pop16
+ tee_local $push27=, $5=, $pop28
+ i32.store $drop=, __stack_pointer($pop17), $pop27
i32.const $push21=, 16
- i32.add $push22=, $pop28, $pop21
+ i32.add $push22=, $5, $pop21
i32.wrap/i64 $push0=, $3
call __ashlti3@FUNCTION, $pop22, $1, $2, $pop0
i64.const $push1=, 128
@@ -461,11 +466,11 @@ rotl:
i32.add $push5=, $0, $pop4
i32.const $push23=, 16
i32.add $push24=, $5, $pop23
- i32.const $push27=, 8
- i32.add $push6=, $pop24, $pop27
- i64.load $push7=, 0($pop6)
i32.const $push26=, 8
- i32.add $push8=, $5, $pop26
+ i32.add $push6=, $pop24, $pop26
+ i64.load $push7=, 0($pop6)
+ i32.const $push25=, 8
+ i32.add $push8=, $5, $pop25
i64.load $push9=, 0($pop8)
i64.or $push10=, $pop7, $pop9
i64.store $drop=, 0($pop5), $pop10
@@ -473,10 +478,10 @@ rotl:
i64.load $push12=, 0($5)
i64.or $push13=, $pop11, $pop12
i64.store $drop=, 0($0), $pop13
- i32.const $push20=, __stack_pointer
+ i32.const $push20=, 0
i32.const $push18=, 32
i32.add $push19=, $5, $pop18
- i32.store $drop=, 0($pop20), $pop19
+ i32.store $drop=, __stack_pointer($pop20), $pop19
return
.endfunc
.Lfunc_end19:
@@ -487,19 +492,19 @@ rotl:
masked_rotl:
.param i32, i64, i64, i64, i64
.local i32
- i32.const $push18=, __stack_pointer
- i32.const $push15=, __stack_pointer
- i32.load $push16=, 0($pop15)
+ i32.const $push18=, 0
+ i32.const $push15=, 0
+ i32.load $push16=, __stack_pointer($pop15)
i32.const $push17=, 32
- i32.sub $push26=, $pop16, $pop17
- i32.store $push32=, 0($pop18), $pop26
- tee_local $push31=, $5=, $pop32
+ i32.sub $push31=, $pop16, $pop17
+ tee_local $push30=, $5=, $pop31
+ i32.store $drop=, __stack_pointer($pop18), $pop30
i32.const $push22=, 16
- i32.add $push23=, $pop31, $pop22
+ i32.add $push23=, $5, $pop22
i64.const $push0=, 127
- i64.and $push30=, $3, $pop0
- tee_local $push29=, $3=, $pop30
- i32.wrap/i64 $push1=, $pop29
+ i64.and $push29=, $3, $pop0
+ tee_local $push28=, $3=, $pop29
+ i32.wrap/i64 $push1=, $pop28
call __ashlti3@FUNCTION, $pop23, $1, $2, $pop1
i64.const $push2=, 128
i64.sub $push3=, $pop2, $3
@@ -509,11 +514,11 @@ masked_rotl:
i32.add $push6=, $0, $pop5
i32.const $push24=, 16
i32.add $push25=, $5, $pop24
- i32.const $push28=, 8
- i32.add $push7=, $pop25, $pop28
- i64.load $push8=, 0($pop7)
i32.const $push27=, 8
- i32.add $push9=, $5, $pop27
+ i32.add $push7=, $pop25, $pop27
+ i64.load $push8=, 0($pop7)
+ i32.const $push26=, 8
+ i32.add $push9=, $5, $pop26
i64.load $push10=, 0($pop9)
i64.or $push11=, $pop8, $pop10
i64.store $drop=, 0($pop6), $pop11
@@ -521,10 +526,10 @@ masked_rotl:
i64.load $push13=, 0($5)
i64.or $push14=, $pop12, $pop13
i64.store $drop=, 0($0), $pop14
- i32.const $push21=, __stack_pointer
+ i32.const $push21=, 0
i32.const $push19=, 32
i32.add $push20=, $5, $pop19
- i32.store $drop=, 0($pop21), $pop20
+ i32.store $drop=, __stack_pointer($pop21), $pop20
return
.endfunc
.Lfunc_end20:
@@ -535,15 +540,15 @@ masked_rotl:
rotr:
.param i32, i64, i64, i64, i64
.local i32
- i32.const $push17=, __stack_pointer
- i32.const $push14=, __stack_pointer
- i32.load $push15=, 0($pop14)
+ i32.const $push17=, 0
+ i32.const $push14=, 0
+ i32.load $push15=, __stack_pointer($pop14)
i32.const $push16=, 32
- i32.sub $push25=, $pop15, $pop16
- i32.store $push29=, 0($pop17), $pop25
- tee_local $push28=, $5=, $pop29
+ i32.sub $push28=, $pop15, $pop16
+ tee_local $push27=, $5=, $pop28
+ i32.store $drop=, __stack_pointer($pop17), $pop27
i32.const $push21=, 16
- i32.add $push22=, $pop28, $pop21
+ i32.add $push22=, $5, $pop21
i32.wrap/i64 $push0=, $3
call __lshrti3@FUNCTION, $pop22, $1, $2, $pop0
i64.const $push1=, 128
@@ -554,11 +559,11 @@ rotr:
i32.add $push5=, $0, $pop4
i32.const $push23=, 16
i32.add $push24=, $5, $pop23
- i32.const $push27=, 8
- i32.add $push6=, $pop24, $pop27
- i64.load $push7=, 0($pop6)
i32.const $push26=, 8
- i32.add $push8=, $5, $pop26
+ i32.add $push6=, $pop24, $pop26
+ i64.load $push7=, 0($pop6)
+ i32.const $push25=, 8
+ i32.add $push8=, $5, $pop25
i64.load $push9=, 0($pop8)
i64.or $push10=, $pop7, $pop9
i64.store $drop=, 0($pop5), $pop10
@@ -566,10 +571,10 @@ rotr:
i64.load $push12=, 0($5)
i64.or $push13=, $pop11, $pop12
i64.store $drop=, 0($0), $pop13
- i32.const $push20=, __stack_pointer
+ i32.const $push20=, 0
i32.const $push18=, 32
i32.add $push19=, $5, $pop18
- i32.store $drop=, 0($pop20), $pop19
+ i32.store $drop=, __stack_pointer($pop20), $pop19
return
.endfunc
.Lfunc_end21:
@@ -580,19 +585,19 @@ rotr:
masked_rotr:
.param i32, i64, i64, i64, i64
.local i32
- i32.const $push18=, __stack_pointer
- i32.const $push15=, __stack_pointer
- i32.load $push16=, 0($pop15)
+ i32.const $push18=, 0
+ i32.const $push15=, 0
+ i32.load $push16=, __stack_pointer($pop15)
i32.const $push17=, 32
- i32.sub $push26=, $pop16, $pop17
- i32.store $push32=, 0($pop18), $pop26
- tee_local $push31=, $5=, $pop32
+ i32.sub $push31=, $pop16, $pop17
+ tee_local $push30=, $5=, $pop31
+ i32.store $drop=, __stack_pointer($pop18), $pop30
i32.const $push22=, 16
- i32.add $push23=, $pop31, $pop22
+ i32.add $push23=, $5, $pop22
i64.const $push0=, 127
- i64.and $push30=, $3, $pop0
- tee_local $push29=, $3=, $pop30
- i32.wrap/i64 $push1=, $pop29
+ i64.and $push29=, $3, $pop0
+ tee_local $push28=, $3=, $pop29
+ i32.wrap/i64 $push1=, $pop28
call __lshrti3@FUNCTION, $pop23, $1, $2, $pop1
i64.const $push2=, 128
i64.sub $push3=, $pop2, $3
@@ -602,11 +607,11 @@ masked_rotr:
i32.add $push6=, $0, $pop5
i32.const $push24=, 16
i32.add $push25=, $5, $pop24
- i32.const $push28=, 8
- i32.add $push7=, $pop25, $pop28
- i64.load $push8=, 0($pop7)
i32.const $push27=, 8
- i32.add $push9=, $5, $pop27
+ i32.add $push7=, $pop25, $pop27
+ i64.load $push8=, 0($pop7)
+ i32.const $push26=, 8
+ i32.add $push9=, $5, $pop26
i64.load $push10=, 0($pop9)
i64.or $push11=, $pop8, $pop10
i64.store $drop=, 0($pop6), $pop11
@@ -614,10 +619,10 @@ masked_rotr:
i64.load $push13=, 0($5)
i64.or $push14=, $pop12, $pop13
i64.store $drop=, 0($0), $pop14
- i32.const $push21=, __stack_pointer
+ i32.const $push21=, 0
i32.const $push19=, 32
i32.add $push20=, $5, $pop19
- i32.store $drop=, 0($pop21), $pop20
+ i32.store $drop=, __stack_pointer($pop21), $pop20
return
.endfunc
.Lfunc_end22:
diff --git a/test/llvm_autogenerated/i128.wast b/test/llvm_autogenerated/i128.wast
index d76ae4df8..9b4fd8970 100644
--- a/test/llvm_autogenerated/i128.wast
+++ b/test/llvm_autogenerated/i128.wast
@@ -1,784 +1,799 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
(type $FUNCSIG$vijji (func (param i32 i64 i64 i32)))
(type $FUNCSIG$vijjjj (func (param i32 i64 i64 i64 i64)))
- (type $2 (func (param i32 i64 i64)))
- (type $3 (func (param i64 i64) (result i32)))
- (import $__ashlti3 "env" "__ashlti3" (param i32 i64 i64 i32))
- (import $__ashrti3 "env" "__ashrti3" (param i32 i64 i64 i32))
- (import $__divti3 "env" "__divti3" (param i32 i64 i64 i64 i64))
- (import $__lshrti3 "env" "__lshrti3" (param i32 i64 i64 i32))
- (import $__modti3 "env" "__modti3" (param i32 i64 i64 i64 i64))
- (import $__multi3 "env" "__multi3" (param i32 i64 i64 i64 i64))
- (import $__udivti3 "env" "__udivti3" (param i32 i64 i64 i64 i64))
- (import $__umodti3 "env" "__umodti3" (param i32 i64 i64 i64 i64))
- (export "add128" $add128)
- (export "sub128" $sub128)
- (export "mul128" $mul128)
- (export "sdiv128" $sdiv128)
- (export "udiv128" $udiv128)
- (export "srem128" $srem128)
- (export "urem128" $urem128)
- (export "and128" $and128)
- (export "or128" $or128)
- (export "xor128" $xor128)
- (export "shl128" $shl128)
- (export "shr128" $shr128)
- (export "sar128" $sar128)
- (export "clz128" $clz128)
- (export "clz128_zero_undef" $clz128_zero_undef)
- (export "ctz128" $ctz128)
- (export "ctz128_zero_undef" $ctz128_zero_undef)
- (export "popcnt128" $popcnt128)
- (export "eqz128" $eqz128)
- (export "rotl" $rotl)
- (export "masked_rotl" $masked_rotl)
- (export "rotr" $rotr)
- (export "masked_rotr" $masked_rotr)
- (func $add128 (type $FUNCSIG$vijjjj) (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64)
+ (import "env" "__ashlti3" (func $__ashlti3 (param i32 i64 i64 i32)))
+ (import "env" "__ashrti3" (func $__ashrti3 (param i32 i64 i64 i32)))
+ (import "env" "__divti3" (func $__divti3 (param i32 i64 i64 i64 i64)))
+ (import "env" "__lshrti3" (func $__lshrti3 (param i32 i64 i64 i32)))
+ (import "env" "__modti3" (func $__modti3 (param i32 i64 i64 i64 i64)))
+ (import "env" "__multi3" (func $__multi3 (param i32 i64 i64 i64 i64)))
+ (import "env" "__udivti3" (func $__udivti3 (param i32 i64 i64 i64 i64)))
+ (import "env" "__umodti3" (func $__umodti3 (param i32 i64 i64 i64 i64)))
+ (export "memory" (memory $0))
+ (export "add128" (func $add128))
+ (export "sub128" (func $sub128))
+ (export "mul128" (func $mul128))
+ (export "sdiv128" (func $sdiv128))
+ (export "udiv128" (func $udiv128))
+ (export "srem128" (func $srem128))
+ (export "urem128" (func $urem128))
+ (export "and128" (func $and128))
+ (export "or128" (func $or128))
+ (export "xor128" (func $xor128))
+ (export "shl128" (func $shl128))
+ (export "shr128" (func $shr128))
+ (export "sar128" (func $sar128))
+ (export "clz128" (func $clz128))
+ (export "clz128_zero_undef" (func $clz128_zero_undef))
+ (export "ctz128" (func $ctz128))
+ (export "ctz128_zero_undef" (func $ctz128_zero_undef))
+ (export "popcnt128" (func $popcnt128))
+ (export "eqz128" (func $eqz128))
+ (export "rotl" (func $rotl))
+ (export "masked_rotl" (func $masked_rotl))
+ (export "rotr" (func $rotr))
+ (export "masked_rotr" (func $masked_rotr))
+ (func $add128 (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64)
(local $5 i64)
- (i64.store
- (i32.add
+ (drop
+ (i64.store
(get_local $0)
- (i32.const 8)
+ (tee_local $5
+ (i64.add
+ (get_local $1)
+ (get_local $3)
+ )
+ )
)
- (i64.add
- (i64.add
- (get_local $2)
- (get_local $4)
+ )
+ (drop
+ (i64.store
+ (i32.add
+ (get_local $0)
+ (i32.const 8)
)
- (select
- (i64.const 1)
- (i64.extend_u/i32
- (i64.lt_u
- (tee_local $2
- (block
- (block
- (set_local $5
- (i64.add
- (get_local $1)
- (get_local $3)
- )
- )
- (i64.store
- (get_local $0)
- (get_local $5)
- )
- )
- (get_local $5)
- )
+ (i64.add
+ (i64.add
+ (get_local $2)
+ (get_local $4)
+ )
+ (select
+ (i64.const 1)
+ (i64.extend_u/i32
+ (i64.lt_u
+ (get_local $5)
+ (get_local $1)
)
- (get_local $1)
)
- )
- (i64.lt_u
- (get_local $2)
- (get_local $3)
+ (i64.lt_u
+ (get_local $5)
+ (get_local $3)
+ )
)
)
)
)
(return)
)
- (func $sub128 (type $FUNCSIG$vijjjj) (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64)
- (i64.store
- (get_local $0)
- (i64.sub
- (get_local $1)
- (get_local $3)
- )
- )
- (i64.store
- (i32.add
+ (func $sub128 (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64)
+ (drop
+ (i64.store
(get_local $0)
- (i32.const 8)
- )
- (i64.sub
(i64.sub
- (get_local $2)
- (get_local $4)
+ (get_local $1)
+ (get_local $3)
)
- (i64.extend_u/i32
- (i64.lt_u
- (get_local $1)
- (get_local $3)
+ )
+ )
+ (drop
+ (i64.store
+ (i32.add
+ (get_local $0)
+ (i32.const 8)
+ )
+ (i64.sub
+ (i64.sub
+ (get_local $2)
+ (get_local $4)
+ )
+ (i64.extend_u/i32
+ (i64.lt_u
+ (get_local $1)
+ (get_local $3)
+ )
)
)
)
)
(return)
)
- (func $mul128 (type $FUNCSIG$vijjjj) (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64)
+ (func $mul128 (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64)
(local $5 i32)
- (local $6 i32)
- (call_import $__multi3
- (tee_local $5
- (block
- (block
- (set_local $6
- (i32.sub
- (i32.load
- (i32.const 4)
- )
- (i32.const 16)
- )
- )
- (i32.store
- (i32.const 4)
- (get_local $6)
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (tee_local $5
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
)
+ (i32.const 16)
)
- (get_local $6)
)
)
- (get_local $1)
- (get_local $2)
- (get_local $3)
- (get_local $4)
)
- (i64.store
- (i32.add
- (get_local $0)
- (i32.const 8)
+ (drop
+ (call_import $__multi3
+ (get_local $5)
+ (get_local $1)
+ (get_local $2)
+ (get_local $3)
+ (get_local $4)
)
- (i64.load
+ )
+ (drop
+ (i64.store
(i32.add
- (get_local $5)
+ (get_local $0)
(i32.const 8)
)
+ (i64.load
+ (i32.add
+ (get_local $5)
+ (i32.const 8)
+ )
+ )
)
)
- (i64.store
- (get_local $0)
- (i64.load
- (get_local $5)
+ (drop
+ (i64.store
+ (get_local $0)
+ (i64.load
+ (get_local $5)
+ )
)
)
- (i32.store
- (i32.const 4)
- (i32.add
- (get_local $5)
- (i32.const 16)
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (i32.add
+ (get_local $5)
+ (i32.const 16)
+ )
)
)
(return)
)
- (func $sdiv128 (type $FUNCSIG$vijjjj) (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64)
+ (func $sdiv128 (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64)
(local $5 i32)
- (local $6 i32)
- (call_import $__divti3
- (tee_local $5
- (block
- (block
- (set_local $6
- (i32.sub
- (i32.load
- (i32.const 4)
- )
- (i32.const 16)
- )
- )
- (i32.store
- (i32.const 4)
- (get_local $6)
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (tee_local $5
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
)
+ (i32.const 16)
)
- (get_local $6)
)
)
- (get_local $1)
- (get_local $2)
- (get_local $3)
- (get_local $4)
)
- (i64.store
- (i32.add
- (get_local $0)
- (i32.const 8)
+ (drop
+ (call_import $__divti3
+ (get_local $5)
+ (get_local $1)
+ (get_local $2)
+ (get_local $3)
+ (get_local $4)
)
- (i64.load
+ )
+ (drop
+ (i64.store
(i32.add
- (get_local $5)
+ (get_local $0)
(i32.const 8)
)
+ (i64.load
+ (i32.add
+ (get_local $5)
+ (i32.const 8)
+ )
+ )
)
)
- (i64.store
- (get_local $0)
- (i64.load
- (get_local $5)
+ (drop
+ (i64.store
+ (get_local $0)
+ (i64.load
+ (get_local $5)
+ )
)
)
- (i32.store
- (i32.const 4)
- (i32.add
- (get_local $5)
- (i32.const 16)
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (i32.add
+ (get_local $5)
+ (i32.const 16)
+ )
)
)
(return)
)
- (func $udiv128 (type $FUNCSIG$vijjjj) (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64)
+ (func $udiv128 (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64)
(local $5 i32)
- (local $6 i32)
- (call_import $__udivti3
- (tee_local $5
- (block
- (block
- (set_local $6
- (i32.sub
- (i32.load
- (i32.const 4)
- )
- (i32.const 16)
- )
- )
- (i32.store
- (i32.const 4)
- (get_local $6)
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (tee_local $5
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
)
+ (i32.const 16)
)
- (get_local $6)
)
)
- (get_local $1)
- (get_local $2)
- (get_local $3)
- (get_local $4)
)
- (i64.store
- (i32.add
- (get_local $0)
- (i32.const 8)
+ (drop
+ (call_import $__udivti3
+ (get_local $5)
+ (get_local $1)
+ (get_local $2)
+ (get_local $3)
+ (get_local $4)
)
- (i64.load
+ )
+ (drop
+ (i64.store
(i32.add
- (get_local $5)
+ (get_local $0)
(i32.const 8)
)
+ (i64.load
+ (i32.add
+ (get_local $5)
+ (i32.const 8)
+ )
+ )
)
)
- (i64.store
- (get_local $0)
- (i64.load
- (get_local $5)
+ (drop
+ (i64.store
+ (get_local $0)
+ (i64.load
+ (get_local $5)
+ )
)
)
- (i32.store
- (i32.const 4)
- (i32.add
- (get_local $5)
- (i32.const 16)
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (i32.add
+ (get_local $5)
+ (i32.const 16)
+ )
)
)
(return)
)
- (func $srem128 (type $FUNCSIG$vijjjj) (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64)
+ (func $srem128 (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64)
(local $5 i32)
- (local $6 i32)
- (call_import $__modti3
- (tee_local $5
- (block
- (block
- (set_local $6
- (i32.sub
- (i32.load
- (i32.const 4)
- )
- (i32.const 16)
- )
- )
- (i32.store
- (i32.const 4)
- (get_local $6)
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (tee_local $5
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
)
+ (i32.const 16)
)
- (get_local $6)
)
)
- (get_local $1)
- (get_local $2)
- (get_local $3)
- (get_local $4)
)
- (i64.store
- (i32.add
- (get_local $0)
- (i32.const 8)
+ (drop
+ (call_import $__modti3
+ (get_local $5)
+ (get_local $1)
+ (get_local $2)
+ (get_local $3)
+ (get_local $4)
)
- (i64.load
+ )
+ (drop
+ (i64.store
(i32.add
- (get_local $5)
+ (get_local $0)
(i32.const 8)
)
+ (i64.load
+ (i32.add
+ (get_local $5)
+ (i32.const 8)
+ )
+ )
)
)
- (i64.store
- (get_local $0)
- (i64.load
- (get_local $5)
+ (drop
+ (i64.store
+ (get_local $0)
+ (i64.load
+ (get_local $5)
+ )
)
)
- (i32.store
- (i32.const 4)
- (i32.add
- (get_local $5)
- (i32.const 16)
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (i32.add
+ (get_local $5)
+ (i32.const 16)
+ )
)
)
(return)
)
- (func $urem128 (type $FUNCSIG$vijjjj) (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64)
+ (func $urem128 (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64)
(local $5 i32)
- (local $6 i32)
- (call_import $__umodti3
- (tee_local $5
- (block
- (block
- (set_local $6
- (i32.sub
- (i32.load
- (i32.const 4)
- )
- (i32.const 16)
- )
- )
- (i32.store
- (i32.const 4)
- (get_local $6)
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (tee_local $5
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
)
+ (i32.const 16)
)
- (get_local $6)
)
)
- (get_local $1)
- (get_local $2)
- (get_local $3)
- (get_local $4)
)
- (i64.store
- (i32.add
- (get_local $0)
- (i32.const 8)
+ (drop
+ (call_import $__umodti3
+ (get_local $5)
+ (get_local $1)
+ (get_local $2)
+ (get_local $3)
+ (get_local $4)
)
- (i64.load
+ )
+ (drop
+ (i64.store
(i32.add
- (get_local $5)
+ (get_local $0)
(i32.const 8)
)
+ (i64.load
+ (i32.add
+ (get_local $5)
+ (i32.const 8)
+ )
+ )
)
)
- (i64.store
- (get_local $0)
- (i64.load
- (get_local $5)
+ (drop
+ (i64.store
+ (get_local $0)
+ (i64.load
+ (get_local $5)
+ )
)
)
- (i32.store
- (i32.const 4)
- (i32.add
- (get_local $5)
- (i32.const 16)
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (i32.add
+ (get_local $5)
+ (i32.const 16)
+ )
)
)
(return)
)
- (func $and128 (type $FUNCSIG$vijjjj) (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64)
- (i64.store
- (i32.add
- (get_local $0)
- (i32.const 8)
- )
- (i64.and
- (get_local $2)
- (get_local $4)
+ (func $and128 (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64)
+ (drop
+ (i64.store
+ (i32.add
+ (get_local $0)
+ (i32.const 8)
+ )
+ (i64.and
+ (get_local $2)
+ (get_local $4)
+ )
)
)
- (i64.store
- (get_local $0)
- (i64.and
- (get_local $1)
- (get_local $3)
+ (drop
+ (i64.store
+ (get_local $0)
+ (i64.and
+ (get_local $1)
+ (get_local $3)
+ )
)
)
(return)
)
- (func $or128 (type $FUNCSIG$vijjjj) (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64)
- (i64.store
- (i32.add
- (get_local $0)
- (i32.const 8)
- )
- (i64.or
- (get_local $2)
- (get_local $4)
+ (func $or128 (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64)
+ (drop
+ (i64.store
+ (i32.add
+ (get_local $0)
+ (i32.const 8)
+ )
+ (i64.or
+ (get_local $2)
+ (get_local $4)
+ )
)
)
- (i64.store
- (get_local $0)
- (i64.or
- (get_local $1)
- (get_local $3)
+ (drop
+ (i64.store
+ (get_local $0)
+ (i64.or
+ (get_local $1)
+ (get_local $3)
+ )
)
)
(return)
)
- (func $xor128 (type $FUNCSIG$vijjjj) (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64)
- (i64.store
- (i32.add
- (get_local $0)
- (i32.const 8)
- )
- (i64.xor
- (get_local $2)
- (get_local $4)
+ (func $xor128 (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64)
+ (drop
+ (i64.store
+ (i32.add
+ (get_local $0)
+ (i32.const 8)
+ )
+ (i64.xor
+ (get_local $2)
+ (get_local $4)
+ )
)
)
- (i64.store
- (get_local $0)
- (i64.xor
- (get_local $1)
- (get_local $3)
+ (drop
+ (i64.store
+ (get_local $0)
+ (i64.xor
+ (get_local $1)
+ (get_local $3)
+ )
)
)
(return)
)
- (func $shl128 (type $FUNCSIG$vijjjj) (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64)
+ (func $shl128 (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64)
(local $5 i32)
- (local $6 i32)
- (call_import $__ashlti3
- (tee_local $5
- (block
- (block
- (set_local $6
- (i32.sub
- (i32.load
- (i32.const 4)
- )
- (i32.const 16)
- )
- )
- (i32.store
- (i32.const 4)
- (get_local $6)
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (tee_local $5
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
)
+ (i32.const 16)
)
- (get_local $6)
)
)
- (get_local $1)
- (get_local $2)
- (i32.wrap/i64
- (get_local $3)
- )
)
- (i64.store
- (i32.add
- (get_local $0)
- (i32.const 8)
+ (drop
+ (call_import $__ashlti3
+ (get_local $5)
+ (get_local $1)
+ (get_local $2)
+ (i32.wrap/i64
+ (get_local $3)
+ )
)
- (i64.load
+ )
+ (drop
+ (i64.store
(i32.add
- (get_local $5)
+ (get_local $0)
(i32.const 8)
)
+ (i64.load
+ (i32.add
+ (get_local $5)
+ (i32.const 8)
+ )
+ )
)
)
- (i64.store
- (get_local $0)
- (i64.load
- (get_local $5)
+ (drop
+ (i64.store
+ (get_local $0)
+ (i64.load
+ (get_local $5)
+ )
)
)
- (i32.store
- (i32.const 4)
- (i32.add
- (get_local $5)
- (i32.const 16)
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (i32.add
+ (get_local $5)
+ (i32.const 16)
+ )
)
)
(return)
)
- (func $shr128 (type $FUNCSIG$vijjjj) (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64)
+ (func $shr128 (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64)
(local $5 i32)
- (local $6 i32)
- (call_import $__lshrti3
- (tee_local $5
- (block
- (block
- (set_local $6
- (i32.sub
- (i32.load
- (i32.const 4)
- )
- (i32.const 16)
- )
- )
- (i32.store
- (i32.const 4)
- (get_local $6)
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (tee_local $5
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
)
+ (i32.const 16)
)
- (get_local $6)
)
)
- (get_local $1)
- (get_local $2)
- (i32.wrap/i64
- (get_local $3)
- )
)
- (i64.store
- (i32.add
- (get_local $0)
- (i32.const 8)
+ (drop
+ (call_import $__lshrti3
+ (get_local $5)
+ (get_local $1)
+ (get_local $2)
+ (i32.wrap/i64
+ (get_local $3)
+ )
)
- (i64.load
+ )
+ (drop
+ (i64.store
(i32.add
- (get_local $5)
+ (get_local $0)
(i32.const 8)
)
+ (i64.load
+ (i32.add
+ (get_local $5)
+ (i32.const 8)
+ )
+ )
)
)
- (i64.store
- (get_local $0)
- (i64.load
- (get_local $5)
+ (drop
+ (i64.store
+ (get_local $0)
+ (i64.load
+ (get_local $5)
+ )
)
)
- (i32.store
- (i32.const 4)
- (i32.add
- (get_local $5)
- (i32.const 16)
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (i32.add
+ (get_local $5)
+ (i32.const 16)
+ )
)
)
(return)
)
- (func $sar128 (type $FUNCSIG$vijjjj) (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64)
+ (func $sar128 (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64)
(local $5 i32)
- (local $6 i32)
- (call_import $__ashrti3
- (tee_local $5
- (block
- (block
- (set_local $6
- (i32.sub
- (i32.load
- (i32.const 4)
- )
- (i32.const 16)
- )
- )
- (i32.store
- (i32.const 4)
- (get_local $6)
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (tee_local $5
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
)
+ (i32.const 16)
)
- (get_local $6)
)
)
- (get_local $1)
- (get_local $2)
- (i32.wrap/i64
- (get_local $3)
- )
)
- (i64.store
- (i32.add
- (get_local $0)
- (i32.const 8)
+ (drop
+ (call_import $__ashrti3
+ (get_local $5)
+ (get_local $1)
+ (get_local $2)
+ (i32.wrap/i64
+ (get_local $3)
+ )
)
- (i64.load
+ )
+ (drop
+ (i64.store
(i32.add
- (get_local $5)
+ (get_local $0)
(i32.const 8)
)
+ (i64.load
+ (i32.add
+ (get_local $5)
+ (i32.const 8)
+ )
+ )
)
)
- (i64.store
- (get_local $0)
- (i64.load
- (get_local $5)
+ (drop
+ (i64.store
+ (get_local $0)
+ (i64.load
+ (get_local $5)
+ )
)
)
- (i32.store
- (i32.const 4)
- (i32.add
- (get_local $5)
- (i32.const 16)
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (i32.add
+ (get_local $5)
+ (i32.const 16)
+ )
)
)
(return)
)
- (func $clz128 (type $2) (param $0 i32) (param $1 i64) (param $2 i64)
- (local $3 i64)
- (i64.store
- (get_local $0)
- (select
- (i64.clz
- (get_local $2)
+ (func $clz128 (param $0 i32) (param $1 i64) (param $2 i64)
+ (drop
+ (i64.store
+ (i32.add
+ (get_local $0)
+ (i32.const 8)
)
- (i64.add
+ (i64.const 0)
+ )
+ )
+ (drop
+ (i64.store
+ (get_local $0)
+ (select
(i64.clz
- (get_local $1)
+ (get_local $2)
)
- (i64.const 64)
- )
- (i64.ne
- (get_local $2)
- (block
- (block
- (set_local $3
- (i64.const 0)
- )
- (i64.store
- (i32.add
- (get_local $0)
- (i32.const 8)
- )
- (get_local $3)
- )
+ (i64.add
+ (i64.clz
+ (get_local $1)
)
- (get_local $3)
+ (i64.const 64)
+ )
+ (i64.ne
+ (get_local $2)
+ (i64.const 0)
)
)
)
)
(return)
)
- (func $clz128_zero_undef (type $2) (param $0 i32) (param $1 i64) (param $2 i64)
- (local $3 i64)
- (i64.store
- (get_local $0)
- (select
- (i64.clz
- (get_local $2)
+ (func $clz128_zero_undef (param $0 i32) (param $1 i64) (param $2 i64)
+ (drop
+ (i64.store
+ (i32.add
+ (get_local $0)
+ (i32.const 8)
)
- (i64.add
+ (i64.const 0)
+ )
+ )
+ (drop
+ (i64.store
+ (get_local $0)
+ (select
(i64.clz
- (get_local $1)
+ (get_local $2)
)
- (i64.const 64)
- )
- (i64.ne
- (get_local $2)
- (block
- (block
- (set_local $3
- (i64.const 0)
- )
- (i64.store
- (i32.add
- (get_local $0)
- (i32.const 8)
- )
- (get_local $3)
- )
+ (i64.add
+ (i64.clz
+ (get_local $1)
)
- (get_local $3)
+ (i64.const 64)
+ )
+ (i64.ne
+ (get_local $2)
+ (i64.const 0)
)
)
)
)
(return)
)
- (func $ctz128 (type $2) (param $0 i32) (param $1 i64) (param $2 i64)
- (local $3 i64)
- (i64.store
- (get_local $0)
- (select
- (i64.ctz
- (get_local $1)
+ (func $ctz128 (param $0 i32) (param $1 i64) (param $2 i64)
+ (drop
+ (i64.store
+ (i32.add
+ (get_local $0)
+ (i32.const 8)
)
- (i64.add
+ (i64.const 0)
+ )
+ )
+ (drop
+ (i64.store
+ (get_local $0)
+ (select
(i64.ctz
- (get_local $2)
+ (get_local $1)
)
- (i64.const 64)
- )
- (i64.ne
- (get_local $1)
- (block
- (block
- (set_local $3
- (i64.const 0)
- )
- (i64.store
- (i32.add
- (get_local $0)
- (i32.const 8)
- )
- (get_local $3)
- )
+ (i64.add
+ (i64.ctz
+ (get_local $2)
)
- (get_local $3)
+ (i64.const 64)
+ )
+ (i64.ne
+ (get_local $1)
+ (i64.const 0)
)
)
)
)
(return)
)
- (func $ctz128_zero_undef (type $2) (param $0 i32) (param $1 i64) (param $2 i64)
- (local $3 i64)
- (i64.store
- (get_local $0)
- (select
- (i64.ctz
- (get_local $1)
+ (func $ctz128_zero_undef (param $0 i32) (param $1 i64) (param $2 i64)
+ (drop
+ (i64.store
+ (i32.add
+ (get_local $0)
+ (i32.const 8)
)
- (i64.add
+ (i64.const 0)
+ )
+ )
+ (drop
+ (i64.store
+ (get_local $0)
+ (select
(i64.ctz
- (get_local $2)
+ (get_local $1)
)
- (i64.const 64)
- )
- (i64.ne
- (get_local $1)
- (block
- (block
- (set_local $3
- (i64.const 0)
- )
- (i64.store
- (i32.add
- (get_local $0)
- (i32.const 8)
- )
- (get_local $3)
- )
+ (i64.add
+ (i64.ctz
+ (get_local $2)
)
- (get_local $3)
+ (i64.const 64)
+ )
+ (i64.ne
+ (get_local $1)
+ (i64.const 0)
)
)
)
)
(return)
)
- (func $popcnt128 (type $2) (param $0 i32) (param $1 i64) (param $2 i64)
- (i64.store
- (i32.add
- (get_local $0)
- (i32.const 8)
+ (func $popcnt128 (param $0 i32) (param $1 i64) (param $2 i64)
+ (drop
+ (i64.store
+ (i32.add
+ (get_local $0)
+ (i32.const 8)
+ )
+ (i64.const 0)
)
- (i64.const 0)
)
- (i64.store
- (get_local $0)
- (i64.add
- (i64.popcnt
- (get_local $1)
- )
- (i64.popcnt
- (get_local $2)
+ (drop
+ (i64.store
+ (get_local $0)
+ (i64.add
+ (i64.popcnt
+ (get_local $1)
+ )
+ (i64.popcnt
+ (get_local $2)
+ )
)
)
)
(return)
)
- (func $eqz128 (type $3) (param $0 i64) (param $1 i64) (result i32)
+ (func $eqz128 (param $0 i64) (param $1 i64) (result i32)
(return
(i64.eqz
(i64.or
@@ -788,358 +803,374 @@
)
)
)
- (func $rotl (type $FUNCSIG$vijjjj) (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64)
+ (func $rotl (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64)
(local $5 i32)
- (local $6 i32)
- (call_import $__ashlti3
- (i32.add
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
(tee_local $5
- (block
- (block
- (set_local $6
- (i32.sub
- (i32.load
- (i32.const 4)
- )
- (i32.const 32)
- )
- )
- (i32.store
- (i32.const 4)
- (get_local $6)
- )
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
)
- (get_local $6)
+ (i32.const 32)
)
)
- (i32.const 16)
- )
- (get_local $1)
- (get_local $2)
- (i32.wrap/i64
- (get_local $3)
)
)
- (call_import $__lshrti3
- (get_local $5)
- (get_local $1)
- (get_local $2)
- (i32.wrap/i64
- (i64.sub
- (i64.const 128)
+ (drop
+ (call_import $__ashlti3
+ (i32.add
+ (get_local $5)
+ (i32.const 16)
+ )
+ (get_local $1)
+ (get_local $2)
+ (i32.wrap/i64
(get_local $3)
)
)
)
- (i64.store
- (i32.add
- (get_local $0)
- (i32.const 8)
+ (drop
+ (call_import $__lshrti3
+ (get_local $5)
+ (get_local $1)
+ (get_local $2)
+ (i32.wrap/i64
+ (i64.sub
+ (i64.const 128)
+ (get_local $3)
+ )
+ )
)
- (i64.or
- (i64.load
- (i32.add
+ )
+ (drop
+ (i64.store
+ (i32.add
+ (get_local $0)
+ (i32.const 8)
+ )
+ (i64.or
+ (i64.load
+ (i32.add
+ (i32.add
+ (get_local $5)
+ (i32.const 16)
+ )
+ (i32.const 8)
+ )
+ )
+ (i64.load
(i32.add
(get_local $5)
- (i32.const 16)
+ (i32.const 8)
)
- (i32.const 8)
)
)
- (i64.load
- (i32.add
+ )
+ )
+ (drop
+ (i64.store
+ (get_local $0)
+ (i64.or
+ (i64.load offset=16
+ (get_local $5)
+ )
+ (i64.load
(get_local $5)
- (i32.const 8)
)
)
)
)
- (i64.store
- (get_local $0)
- (i64.or
- (i64.load offset=16
- (get_local $5)
- )
- (i64.load
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (i32.add
(get_local $5)
+ (i32.const 32)
)
)
)
- (i32.store
- (i32.const 4)
- (i32.add
- (get_local $5)
- (i32.const 32)
- )
- )
(return)
)
- (func $masked_rotl (type $FUNCSIG$vijjjj) (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64)
+ (func $masked_rotl (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64)
(local $5 i32)
- (local $6 i32)
- (call_import $__ashlti3
- (i32.add
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
(tee_local $5
- (block
- (block
- (set_local $6
- (i32.sub
- (i32.load
- (i32.const 4)
- )
- (i32.const 32)
- )
- )
- (i32.store
- (i32.const 4)
- (get_local $6)
- )
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
)
- (get_local $6)
+ (i32.const 32)
)
)
- (i32.const 16)
)
- (get_local $1)
- (get_local $2)
- (i32.wrap/i64
- (tee_local $3
- (i64.and
- (get_local $3)
- (i64.const 127)
+ )
+ (drop
+ (call_import $__ashlti3
+ (i32.add
+ (get_local $5)
+ (i32.const 16)
+ )
+ (get_local $1)
+ (get_local $2)
+ (i32.wrap/i64
+ (tee_local $3
+ (i64.and
+ (get_local $3)
+ (i64.const 127)
+ )
)
)
)
)
- (call_import $__lshrti3
- (get_local $5)
- (get_local $1)
- (get_local $2)
- (i32.wrap/i64
- (i64.sub
- (i64.const 128)
- (get_local $3)
+ (drop
+ (call_import $__lshrti3
+ (get_local $5)
+ (get_local $1)
+ (get_local $2)
+ (i32.wrap/i64
+ (i64.sub
+ (i64.const 128)
+ (get_local $3)
+ )
)
)
)
- (i64.store
- (i32.add
- (get_local $0)
- (i32.const 8)
- )
- (i64.or
- (i64.load
- (i32.add
+ (drop
+ (i64.store
+ (i32.add
+ (get_local $0)
+ (i32.const 8)
+ )
+ (i64.or
+ (i64.load
+ (i32.add
+ (i32.add
+ (get_local $5)
+ (i32.const 16)
+ )
+ (i32.const 8)
+ )
+ )
+ (i64.load
(i32.add
(get_local $5)
- (i32.const 16)
+ (i32.const 8)
)
- (i32.const 8)
)
)
- (i64.load
- (i32.add
+ )
+ )
+ (drop
+ (i64.store
+ (get_local $0)
+ (i64.or
+ (i64.load offset=16
+ (get_local $5)
+ )
+ (i64.load
(get_local $5)
- (i32.const 8)
)
)
)
)
- (i64.store
- (get_local $0)
- (i64.or
- (i64.load offset=16
- (get_local $5)
- )
- (i64.load
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (i32.add
(get_local $5)
+ (i32.const 32)
)
)
)
- (i32.store
- (i32.const 4)
- (i32.add
- (get_local $5)
- (i32.const 32)
- )
- )
(return)
)
- (func $rotr (type $FUNCSIG$vijjjj) (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64)
+ (func $rotr (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64)
(local $5 i32)
- (local $6 i32)
- (call_import $__lshrti3
- (i32.add
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
(tee_local $5
- (block
- (block
- (set_local $6
- (i32.sub
- (i32.load
- (i32.const 4)
- )
- (i32.const 32)
- )
- )
- (i32.store
- (i32.const 4)
- (get_local $6)
- )
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
)
- (get_local $6)
+ (i32.const 32)
)
)
- (i32.const 16)
- )
- (get_local $1)
- (get_local $2)
- (i32.wrap/i64
- (get_local $3)
)
)
- (call_import $__ashlti3
- (get_local $5)
- (get_local $1)
- (get_local $2)
- (i32.wrap/i64
- (i64.sub
- (i64.const 128)
+ (drop
+ (call_import $__lshrti3
+ (i32.add
+ (get_local $5)
+ (i32.const 16)
+ )
+ (get_local $1)
+ (get_local $2)
+ (i32.wrap/i64
(get_local $3)
)
)
)
- (i64.store
- (i32.add
- (get_local $0)
- (i32.const 8)
+ (drop
+ (call_import $__ashlti3
+ (get_local $5)
+ (get_local $1)
+ (get_local $2)
+ (i32.wrap/i64
+ (i64.sub
+ (i64.const 128)
+ (get_local $3)
+ )
+ )
)
- (i64.or
- (i64.load
- (i32.add
+ )
+ (drop
+ (i64.store
+ (i32.add
+ (get_local $0)
+ (i32.const 8)
+ )
+ (i64.or
+ (i64.load
+ (i32.add
+ (i32.add
+ (get_local $5)
+ (i32.const 16)
+ )
+ (i32.const 8)
+ )
+ )
+ (i64.load
(i32.add
(get_local $5)
- (i32.const 16)
+ (i32.const 8)
)
- (i32.const 8)
)
)
- (i64.load
- (i32.add
+ )
+ )
+ (drop
+ (i64.store
+ (get_local $0)
+ (i64.or
+ (i64.load offset=16
+ (get_local $5)
+ )
+ (i64.load
(get_local $5)
- (i32.const 8)
)
)
)
)
- (i64.store
- (get_local $0)
- (i64.or
- (i64.load offset=16
- (get_local $5)
- )
- (i64.load
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (i32.add
(get_local $5)
+ (i32.const 32)
)
)
)
- (i32.store
- (i32.const 4)
- (i32.add
- (get_local $5)
- (i32.const 32)
- )
- )
(return)
)
- (func $masked_rotr (type $FUNCSIG$vijjjj) (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64)
+ (func $masked_rotr (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64)
(local $5 i32)
- (local $6 i32)
- (call_import $__lshrti3
- (i32.add
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
(tee_local $5
- (block
- (block
- (set_local $6
- (i32.sub
- (i32.load
- (i32.const 4)
- )
- (i32.const 32)
- )
- )
- (i32.store
- (i32.const 4)
- (get_local $6)
- )
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
)
- (get_local $6)
+ (i32.const 32)
)
)
- (i32.const 16)
)
- (get_local $1)
- (get_local $2)
- (i32.wrap/i64
- (tee_local $3
- (i64.and
- (get_local $3)
- (i64.const 127)
+ )
+ (drop
+ (call_import $__lshrti3
+ (i32.add
+ (get_local $5)
+ (i32.const 16)
+ )
+ (get_local $1)
+ (get_local $2)
+ (i32.wrap/i64
+ (tee_local $3
+ (i64.and
+ (get_local $3)
+ (i64.const 127)
+ )
)
)
)
)
- (call_import $__ashlti3
- (get_local $5)
- (get_local $1)
- (get_local $2)
- (i32.wrap/i64
- (i64.sub
- (i64.const 128)
- (get_local $3)
+ (drop
+ (call_import $__ashlti3
+ (get_local $5)
+ (get_local $1)
+ (get_local $2)
+ (i32.wrap/i64
+ (i64.sub
+ (i64.const 128)
+ (get_local $3)
+ )
)
)
)
- (i64.store
- (i32.add
- (get_local $0)
- (i32.const 8)
- )
- (i64.or
- (i64.load
- (i32.add
+ (drop
+ (i64.store
+ (i32.add
+ (get_local $0)
+ (i32.const 8)
+ )
+ (i64.or
+ (i64.load
+ (i32.add
+ (i32.add
+ (get_local $5)
+ (i32.const 16)
+ )
+ (i32.const 8)
+ )
+ )
+ (i64.load
(i32.add
(get_local $5)
- (i32.const 16)
+ (i32.const 8)
)
- (i32.const 8)
)
)
- (i64.load
- (i32.add
+ )
+ )
+ (drop
+ (i64.store
+ (get_local $0)
+ (i64.or
+ (i64.load offset=16
+ (get_local $5)
+ )
+ (i64.load
(get_local $5)
- (i32.const 8)
)
)
)
)
- (i64.store
- (get_local $0)
- (i64.or
- (i64.load offset=16
- (get_local $5)
- )
- (i64.load
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (i32.add
(get_local $5)
+ (i32.const 32)
)
)
)
- (i32.store
- (i32.const 4)
- (i32.add
- (get_local $5)
- (i32.const 32)
- )
- )
(return)
)
)
diff --git a/test/llvm_autogenerated/i32-load-store-alignment.wast b/test/llvm_autogenerated/i32-load-store-alignment.wast
index e1ef2f5e8..e111b7110 100644
--- a/test/llvm_autogenerated/i32-load-store-alignment.wast
+++ b/test/llvm_autogenerated/i32-load-store-alignment.wast
@@ -1,27 +1,27 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
- (export "ldi32_a1" $ldi32_a1)
- (export "ldi32_a2" $ldi32_a2)
- (export "ldi32_a4" $ldi32_a4)
- (export "ldi32" $ldi32)
- (export "ldi32_a8" $ldi32_a8)
- (export "ldi8_a1" $ldi8_a1)
- (export "ldi8_a2" $ldi8_a2)
- (export "ldi16_a1" $ldi16_a1)
- (export "ldi16_a2" $ldi16_a2)
- (export "ldi16_a4" $ldi16_a4)
- (export "sti32_a1" $sti32_a1)
- (export "sti32_a2" $sti32_a2)
- (export "sti32_a4" $sti32_a4)
- (export "sti32" $sti32)
- (export "sti32_a8" $sti32_a8)
- (export "sti8_a1" $sti8_a1)
- (export "sti8_a2" $sti8_a2)
- (export "sti16_a1" $sti16_a1)
- (export "sti16_a2" $sti16_a2)
- (export "sti16_a4" $sti16_a4)
+ (export "memory" (memory $0))
+ (export "ldi32_a1" (func $ldi32_a1))
+ (export "ldi32_a2" (func $ldi32_a2))
+ (export "ldi32_a4" (func $ldi32_a4))
+ (export "ldi32" (func $ldi32))
+ (export "ldi32_a8" (func $ldi32_a8))
+ (export "ldi8_a1" (func $ldi8_a1))
+ (export "ldi8_a2" (func $ldi8_a2))
+ (export "ldi16_a1" (func $ldi16_a1))
+ (export "ldi16_a2" (func $ldi16_a2))
+ (export "ldi16_a4" (func $ldi16_a4))
+ (export "sti32_a1" (func $sti32_a1))
+ (export "sti32_a2" (func $sti32_a2))
+ (export "sti32_a4" (func $sti32_a4))
+ (export "sti32" (func $sti32))
+ (export "sti32_a8" (func $sti32_a8))
+ (export "sti8_a1" (func $sti8_a1))
+ (export "sti8_a2" (func $sti8_a2))
+ (export "sti16_a1" (func $sti16_a1))
+ (export "sti16_a2" (func $sti16_a2))
+ (export "sti16_a4" (func $sti16_a4))
(func $ldi32_a1 (param $0 i32) (result i32)
(return
(i32.load align=1
@@ -93,72 +93,92 @@
)
)
(func $sti32_a1 (param $0 i32) (param $1 i32)
- (i32.store align=1
- (get_local $0)
- (get_local $1)
+ (drop
+ (i32.store align=1
+ (get_local $0)
+ (get_local $1)
+ )
)
(return)
)
(func $sti32_a2 (param $0 i32) (param $1 i32)
- (i32.store align=2
- (get_local $0)
- (get_local $1)
+ (drop
+ (i32.store align=2
+ (get_local $0)
+ (get_local $1)
+ )
)
(return)
)
(func $sti32_a4 (param $0 i32) (param $1 i32)
- (i32.store
- (get_local $0)
- (get_local $1)
+ (drop
+ (i32.store
+ (get_local $0)
+ (get_local $1)
+ )
)
(return)
)
(func $sti32 (param $0 i32) (param $1 i32)
- (i32.store
- (get_local $0)
- (get_local $1)
+ (drop
+ (i32.store
+ (get_local $0)
+ (get_local $1)
+ )
)
(return)
)
(func $sti32_a8 (param $0 i32) (param $1 i32)
- (i32.store
- (get_local $0)
- (get_local $1)
+ (drop
+ (i32.store
+ (get_local $0)
+ (get_local $1)
+ )
)
(return)
)
(func $sti8_a1 (param $0 i32) (param $1 i32)
- (i32.store8
- (get_local $0)
- (get_local $1)
+ (drop
+ (i32.store8
+ (get_local $0)
+ (get_local $1)
+ )
)
(return)
)
(func $sti8_a2 (param $0 i32) (param $1 i32)
- (i32.store8
- (get_local $0)
- (get_local $1)
+ (drop
+ (i32.store8
+ (get_local $0)
+ (get_local $1)
+ )
)
(return)
)
(func $sti16_a1 (param $0 i32) (param $1 i32)
- (i32.store16 align=1
- (get_local $0)
- (get_local $1)
+ (drop
+ (i32.store16 align=1
+ (get_local $0)
+ (get_local $1)
+ )
)
(return)
)
(func $sti16_a2 (param $0 i32) (param $1 i32)
- (i32.store16
- (get_local $0)
- (get_local $1)
+ (drop
+ (i32.store16
+ (get_local $0)
+ (get_local $1)
+ )
)
(return)
)
(func $sti16_a4 (param $0 i32) (param $1 i32)
- (i32.store16
- (get_local $0)
- (get_local $1)
+ (drop
+ (i32.store16
+ (get_local $0)
+ (get_local $1)
+ )
)
(return)
)
diff --git a/test/llvm_autogenerated/i32.wast b/test/llvm_autogenerated/i32.wast
index 72d5b14a8..9357999ee 100644
--- a/test/llvm_autogenerated/i32.wast
+++ b/test/llvm_autogenerated/i32.wast
@@ -1,30 +1,30 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
- (export "add32" $add32)
- (export "sub32" $sub32)
- (export "mul32" $mul32)
- (export "sdiv32" $sdiv32)
- (export "udiv32" $udiv32)
- (export "srem32" $srem32)
- (export "urem32" $urem32)
- (export "and32" $and32)
- (export "or32" $or32)
- (export "xor32" $xor32)
- (export "shl32" $shl32)
- (export "shr32" $shr32)
- (export "sar32" $sar32)
- (export "clz32" $clz32)
- (export "clz32_zero_undef" $clz32_zero_undef)
- (export "ctz32" $ctz32)
- (export "ctz32_zero_undef" $ctz32_zero_undef)
- (export "popcnt32" $popcnt32)
- (export "eqz32" $eqz32)
- (export "rotl" $rotl)
- (export "masked_rotl" $masked_rotl)
- (export "rotr" $rotr)
- (export "masked_rotr" $masked_rotr)
+ (export "memory" (memory $0))
+ (export "add32" (func $add32))
+ (export "sub32" (func $sub32))
+ (export "mul32" (func $mul32))
+ (export "sdiv32" (func $sdiv32))
+ (export "udiv32" (func $udiv32))
+ (export "srem32" (func $srem32))
+ (export "urem32" (func $urem32))
+ (export "and32" (func $and32))
+ (export "or32" (func $or32))
+ (export "xor32" (func $xor32))
+ (export "shl32" (func $shl32))
+ (export "shr32" (func $shr32))
+ (export "sar32" (func $sar32))
+ (export "clz32" (func $clz32))
+ (export "clz32_zero_undef" (func $clz32_zero_undef))
+ (export "ctz32" (func $ctz32))
+ (export "ctz32_zero_undef" (func $ctz32_zero_undef))
+ (export "popcnt32" (func $popcnt32))
+ (export "eqz32" (func $eqz32))
+ (export "rotl" (func $rotl))
+ (export "masked_rotl" (func $masked_rotl))
+ (export "rotr" (func $rotr))
+ (export "masked_rotr" (func $masked_rotr))
(func $add32 (param $0 i32) (param $1 i32) (result i32)
(return
(i32.add
diff --git a/test/llvm_autogenerated/i64-load-store-alignment.wast b/test/llvm_autogenerated/i64-load-store-alignment.wast
index 981e552c9..40987cba8 100644
--- a/test/llvm_autogenerated/i64-load-store-alignment.wast
+++ b/test/llvm_autogenerated/i64-load-store-alignment.wast
@@ -1,37 +1,37 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
- (export "ldi64_a1" $ldi64_a1)
- (export "ldi64_a2" $ldi64_a2)
- (export "ldi64_a4" $ldi64_a4)
- (export "ldi64_a8" $ldi64_a8)
- (export "ldi64" $ldi64)
- (export "ldi64_a16" $ldi64_a16)
- (export "ldi8_a1" $ldi8_a1)
- (export "ldi8_a2" $ldi8_a2)
- (export "ldi16_a1" $ldi16_a1)
- (export "ldi16_a2" $ldi16_a2)
- (export "ldi16_a4" $ldi16_a4)
- (export "ldi32_a1" $ldi32_a1)
- (export "ldi32_a2" $ldi32_a2)
- (export "ldi32_a4" $ldi32_a4)
- (export "ldi32_a8" $ldi32_a8)
- (export "sti64_a1" $sti64_a1)
- (export "sti64_a2" $sti64_a2)
- (export "sti64_a4" $sti64_a4)
- (export "sti64_a8" $sti64_a8)
- (export "sti64" $sti64)
- (export "sti64_a16" $sti64_a16)
- (export "sti8_a1" $sti8_a1)
- (export "sti8_a2" $sti8_a2)
- (export "sti16_a1" $sti16_a1)
- (export "sti16_a2" $sti16_a2)
- (export "sti16_a4" $sti16_a4)
- (export "sti32_a1" $sti32_a1)
- (export "sti32_a2" $sti32_a2)
- (export "sti32_a4" $sti32_a4)
- (export "sti32_a8" $sti32_a8)
+ (export "memory" (memory $0))
+ (export "ldi64_a1" (func $ldi64_a1))
+ (export "ldi64_a2" (func $ldi64_a2))
+ (export "ldi64_a4" (func $ldi64_a4))
+ (export "ldi64_a8" (func $ldi64_a8))
+ (export "ldi64" (func $ldi64))
+ (export "ldi64_a16" (func $ldi64_a16))
+ (export "ldi8_a1" (func $ldi8_a1))
+ (export "ldi8_a2" (func $ldi8_a2))
+ (export "ldi16_a1" (func $ldi16_a1))
+ (export "ldi16_a2" (func $ldi16_a2))
+ (export "ldi16_a4" (func $ldi16_a4))
+ (export "ldi32_a1" (func $ldi32_a1))
+ (export "ldi32_a2" (func $ldi32_a2))
+ (export "ldi32_a4" (func $ldi32_a4))
+ (export "ldi32_a8" (func $ldi32_a8))
+ (export "sti64_a1" (func $sti64_a1))
+ (export "sti64_a2" (func $sti64_a2))
+ (export "sti64_a4" (func $sti64_a4))
+ (export "sti64_a8" (func $sti64_a8))
+ (export "sti64" (func $sti64))
+ (export "sti64_a16" (func $sti64_a16))
+ (export "sti8_a1" (func $sti8_a1))
+ (export "sti8_a2" (func $sti8_a2))
+ (export "sti16_a1" (func $sti16_a1))
+ (export "sti16_a2" (func $sti16_a2))
+ (export "sti16_a4" (func $sti16_a4))
+ (export "sti32_a1" (func $sti32_a1))
+ (export "sti32_a2" (func $sti32_a2))
+ (export "sti32_a4" (func $sti32_a4))
+ (export "sti32_a8" (func $sti32_a8))
(func $ldi64_a1 (param $0 i32) (result i64)
(return
(i64.load align=1
@@ -138,107 +138,137 @@
)
)
(func $sti64_a1 (param $0 i32) (param $1 i64)
- (i64.store align=1
- (get_local $0)
- (get_local $1)
+ (drop
+ (i64.store align=1
+ (get_local $0)
+ (get_local $1)
+ )
)
(return)
)
(func $sti64_a2 (param $0 i32) (param $1 i64)
- (i64.store align=2
- (get_local $0)
- (get_local $1)
+ (drop
+ (i64.store align=2
+ (get_local $0)
+ (get_local $1)
+ )
)
(return)
)
(func $sti64_a4 (param $0 i32) (param $1 i64)
- (i64.store align=4
- (get_local $0)
- (get_local $1)
+ (drop
+ (i64.store align=4
+ (get_local $0)
+ (get_local $1)
+ )
)
(return)
)
(func $sti64_a8 (param $0 i32) (param $1 i64)
- (i64.store
- (get_local $0)
- (get_local $1)
+ (drop
+ (i64.store
+ (get_local $0)
+ (get_local $1)
+ )
)
(return)
)
(func $sti64 (param $0 i32) (param $1 i64)
- (i64.store
- (get_local $0)
- (get_local $1)
+ (drop
+ (i64.store
+ (get_local $0)
+ (get_local $1)
+ )
)
(return)
)
(func $sti64_a16 (param $0 i32) (param $1 i64)
- (i64.store
- (get_local $0)
- (get_local $1)
+ (drop
+ (i64.store
+ (get_local $0)
+ (get_local $1)
+ )
)
(return)
)
(func $sti8_a1 (param $0 i32) (param $1 i64)
- (i64.store8
- (get_local $0)
- (get_local $1)
+ (drop
+ (i64.store8
+ (get_local $0)
+ (get_local $1)
+ )
)
(return)
)
(func $sti8_a2 (param $0 i32) (param $1 i64)
- (i64.store8
- (get_local $0)
- (get_local $1)
+ (drop
+ (i64.store8
+ (get_local $0)
+ (get_local $1)
+ )
)
(return)
)
(func $sti16_a1 (param $0 i32) (param $1 i64)
- (i64.store16 align=1
- (get_local $0)
- (get_local $1)
+ (drop
+ (i64.store16 align=1
+ (get_local $0)
+ (get_local $1)
+ )
)
(return)
)
(func $sti16_a2 (param $0 i32) (param $1 i64)
- (i64.store16
- (get_local $0)
- (get_local $1)
+ (drop
+ (i64.store16
+ (get_local $0)
+ (get_local $1)
+ )
)
(return)
)
(func $sti16_a4 (param $0 i32) (param $1 i64)
- (i64.store16
- (get_local $0)
- (get_local $1)
+ (drop
+ (i64.store16
+ (get_local $0)
+ (get_local $1)
+ )
)
(return)
)
(func $sti32_a1 (param $0 i32) (param $1 i64)
- (i64.store align=1
- (get_local $0)
- (get_local $1)
+ (drop
+ (i64.store align=1
+ (get_local $0)
+ (get_local $1)
+ )
)
(return)
)
(func $sti32_a2 (param $0 i32) (param $1 i64)
- (i64.store align=2
- (get_local $0)
- (get_local $1)
+ (drop
+ (i64.store align=2
+ (get_local $0)
+ (get_local $1)
+ )
)
(return)
)
(func $sti32_a4 (param $0 i32) (param $1 i64)
- (i64.store
- (get_local $0)
- (get_local $1)
+ (drop
+ (i64.store
+ (get_local $0)
+ (get_local $1)
+ )
)
(return)
)
(func $sti32_a8 (param $0 i32) (param $1 i64)
- (i64.store
- (get_local $0)
- (get_local $1)
+ (drop
+ (i64.store
+ (get_local $0)
+ (get_local $1)
+ )
)
(return)
)
diff --git a/test/llvm_autogenerated/i64.wast b/test/llvm_autogenerated/i64.wast
index fa50edd5f..1d457299c 100644
--- a/test/llvm_autogenerated/i64.wast
+++ b/test/llvm_autogenerated/i64.wast
@@ -1,30 +1,30 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
- (export "add64" $add64)
- (export "sub64" $sub64)
- (export "mul64" $mul64)
- (export "sdiv64" $sdiv64)
- (export "udiv64" $udiv64)
- (export "srem64" $srem64)
- (export "urem64" $urem64)
- (export "and64" $and64)
- (export "or64" $or64)
- (export "xor64" $xor64)
- (export "shl64" $shl64)
- (export "shr64" $shr64)
- (export "sar64" $sar64)
- (export "clz64" $clz64)
- (export "clz64_zero_undef" $clz64_zero_undef)
- (export "ctz64" $ctz64)
- (export "ctz64_zero_undef" $ctz64_zero_undef)
- (export "popcnt64" $popcnt64)
- (export "eqz64" $eqz64)
- (export "rotl" $rotl)
- (export "masked_rotl" $masked_rotl)
- (export "rotr" $rotr)
- (export "masked_rotr" $masked_rotr)
+ (export "memory" (memory $0))
+ (export "add64" (func $add64))
+ (export "sub64" (func $sub64))
+ (export "mul64" (func $mul64))
+ (export "sdiv64" (func $sdiv64))
+ (export "udiv64" (func $udiv64))
+ (export "srem64" (func $srem64))
+ (export "urem64" (func $urem64))
+ (export "and64" (func $and64))
+ (export "or64" (func $or64))
+ (export "xor64" (func $xor64))
+ (export "shl64" (func $shl64))
+ (export "shr64" (func $shr64))
+ (export "sar64" (func $sar64))
+ (export "clz64" (func $clz64))
+ (export "clz64_zero_undef" (func $clz64_zero_undef))
+ (export "ctz64" (func $ctz64))
+ (export "ctz64_zero_undef" (func $ctz64_zero_undef))
+ (export "popcnt64" (func $popcnt64))
+ (export "eqz64" (func $eqz64))
+ (export "rotl" (func $rotl))
+ (export "masked_rotl" (func $masked_rotl))
+ (export "rotr" (func $rotr))
+ (export "masked_rotr" (func $masked_rotr))
(func $add64 (param $0 i64) (param $1 i64) (result i64)
(return
(i64.add
diff --git a/test/llvm_autogenerated/ident.wast b/test/llvm_autogenerated/ident.wast
index 20a88f29f..6ef9977d2 100644
--- a/test/llvm_autogenerated/ident.wast
+++ b/test/llvm_autogenerated/ident.wast
@@ -1,6 +1,6 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
+ (export "memory" (memory $0))
)
;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] }
diff --git a/test/llvm_autogenerated/immediates.wast b/test/llvm_autogenerated/immediates.wast
index 89820cdf1..2dcf51dcd 100644
--- a/test/llvm_autogenerated/immediates.wast
+++ b/test/llvm_autogenerated/immediates.wast
@@ -1,35 +1,35 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
- (export "zero_i32" $zero_i32)
- (export "one_i32" $one_i32)
- (export "max_i32" $max_i32)
- (export "min_i32" $min_i32)
- (export "zero_i64" $zero_i64)
- (export "one_i64" $one_i64)
- (export "max_i64" $max_i64)
- (export "min_i64" $min_i64)
- (export "negzero_f32" $negzero_f32)
- (export "zero_f32" $zero_f32)
- (export "one_f32" $one_f32)
- (export "two_f32" $two_f32)
- (export "nan_f32" $nan_f32)
- (export "negnan_f32" $negnan_f32)
- (export "inf_f32" $inf_f32)
- (export "neginf_f32" $neginf_f32)
- (export "custom_nan_f32" $custom_nan_f32)
- (export "custom_nans_f32" $custom_nans_f32)
- (export "negzero_f64" $negzero_f64)
- (export "zero_f64" $zero_f64)
- (export "one_f64" $one_f64)
- (export "two_f64" $two_f64)
- (export "nan_f64" $nan_f64)
- (export "negnan_f64" $negnan_f64)
- (export "inf_f64" $inf_f64)
- (export "neginf_f64" $neginf_f64)
- (export "custom_nan_f64" $custom_nan_f64)
- (export "custom_nans_f64" $custom_nans_f64)
+ (export "memory" (memory $0))
+ (export "zero_i32" (func $zero_i32))
+ (export "one_i32" (func $one_i32))
+ (export "max_i32" (func $max_i32))
+ (export "min_i32" (func $min_i32))
+ (export "zero_i64" (func $zero_i64))
+ (export "one_i64" (func $one_i64))
+ (export "max_i64" (func $max_i64))
+ (export "min_i64" (func $min_i64))
+ (export "negzero_f32" (func $negzero_f32))
+ (export "zero_f32" (func $zero_f32))
+ (export "one_f32" (func $one_f32))
+ (export "two_f32" (func $two_f32))
+ (export "nan_f32" (func $nan_f32))
+ (export "negnan_f32" (func $negnan_f32))
+ (export "inf_f32" (func $inf_f32))
+ (export "neginf_f32" (func $neginf_f32))
+ (export "custom_nan_f32" (func $custom_nan_f32))
+ (export "custom_nans_f32" (func $custom_nans_f32))
+ (export "negzero_f64" (func $negzero_f64))
+ (export "zero_f64" (func $zero_f64))
+ (export "one_f64" (func $one_f64))
+ (export "two_f64" (func $two_f64))
+ (export "nan_f64" (func $nan_f64))
+ (export "negnan_f64" (func $negnan_f64))
+ (export "inf_f64" (func $inf_f64))
+ (export "neginf_f64" (func $neginf_f64))
+ (export "custom_nan_f64" (func $custom_nan_f64))
+ (export "custom_nans_f64" (func $custom_nans_f64))
(func $zero_i32 (result i32)
(return
(i32.const 0)
diff --git a/test/llvm_autogenerated/irreducible-cfg.wast b/test/llvm_autogenerated/irreducible-cfg.wast
index 3e7dbd28f..c1816bf3e 100644
--- a/test/llvm_autogenerated/irreducible-cfg.wast
+++ b/test/llvm_autogenerated/irreducible-cfg.wast
@@ -1,9 +1,9 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
- (export "test0" $test0)
- (export "test1" $test1)
+ (export "memory" (memory $0))
+ (export "test0" (func $test0))
+ (export "test1" (func $test1))
(func $test0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32)
(local $4 f64)
(local $5 i32)
@@ -38,30 +38,57 @@
(i32.const 1)
)
)
- (loop $label$3 $label$2
- (block $label$4
- (block $label$5
- (block $label$6
- (block $label$7
- (block $label$8
- (block $label$9
- (br_table $label$7 $label$9 $label$6 $label$8 $label$8
- (get_local $6)
+ (block $label$3
+ (loop $label$2
+ (block $label$4
+ (block $label$5
+ (block $label$6
+ (block $label$7
+ (block $label$8
+ (block $label$9
+ (br_table $label$7 $label$9 $label$6 $label$8 $label$8
+ (get_local $6)
+ )
+ )
+ (br_if $label$4
+ (i32.ge_s
+ (get_local $5)
+ (get_local $1)
+ )
+ )
+ (set_local $6
+ (i32.const 3)
)
+ (br $label$2)
)
- (br_if $label$4
- (i32.ge_s
- (get_local $5)
- (get_local $1)
+ (drop
+ (f64.store align=4
+ (tee_local $2
+ (i32.add
+ (get_local $0)
+ (i32.shl
+ (get_local $5)
+ (i32.const 3)
+ )
+ )
+ )
+ (tee_local $4
+ (f64.mul
+ (f64.load align=4
+ (get_local $2)
+ )
+ (f64.const 2.3)
+ )
+ )
)
)
(set_local $6
- (i32.const 3)
+ (i32.const 0)
)
(br $label$2)
)
- (f64.store align=4
- (set_local $2
+ (drop
+ (f64.store align=4
(i32.add
(get_local $0)
(i32.shl
@@ -69,53 +96,32 @@
(i32.const 3)
)
)
- )
- (set_local $4
- (f64.mul
- (f64.load align=4
- (get_local $2)
- )
- (f64.const 2.3)
+ (f64.add
+ (get_local $4)
+ (f64.const 1.3)
)
)
)
- (set_local $6
- (i32.const 0)
- )
- (br $label$2)
- )
- (f64.store align=4
- (i32.add
- (get_local $0)
- (i32.shl
+ (set_local $5
+ (i32.add
(get_local $5)
- (i32.const 3)
+ (i32.const 1)
)
)
- (f64.add
- (get_local $4)
- (f64.const 1.3)
- )
- )
- (set_local $5
- (i32.add
- (get_local $5)
- (i32.const 1)
- )
+ (br $label$5)
)
- (br $label$5)
+ (return)
+ )
+ (set_local $6
+ (i32.const 1)
)
- (return)
+ (br $label$2)
)
(set_local $6
- (i32.const 1)
+ (i32.const 2)
)
(br $label$2)
)
- (set_local $6
- (i32.const 2)
- )
- (br $label$2)
)
)
(func $test1 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32)
@@ -152,110 +158,116 @@
(i32.const 1)
)
)
- (loop $label$3 $label$2
- (block $label$4
- (block $label$5
- (block $label$6
- (block $label$7
- (block $label$8
- (block $label$9
- (block $label$10
- (block $label$11
- (br_table $label$8 $label$11 $label$7 $label$10 $label$9 $label$9
- (get_local $6)
+ (block $label$3
+ (loop $label$2
+ (block $label$4
+ (block $label$5
+ (block $label$6
+ (block $label$7
+ (block $label$8
+ (block $label$9
+ (block $label$10
+ (block $label$11
+ (br_table $label$8 $label$11 $label$7 $label$10 $label$9 $label$9
+ (get_local $6)
+ )
+ )
+ (br_if $label$4
+ (i32.ge_s
+ (get_local $5)
+ (get_local $1)
+ )
+ )
+ (set_local $6
+ (i32.const 3)
)
+ (br $label$2)
)
- (br_if $label$4
- (i32.ge_s
- (get_local $5)
- (get_local $1)
+ (drop
+ (f64.store align=4
+ (tee_local $2
+ (i32.add
+ (get_local $0)
+ (i32.shl
+ (get_local $5)
+ (i32.const 3)
+ )
+ )
+ )
+ (tee_local $4
+ (f64.mul
+ (f64.load align=4
+ (get_local $2)
+ )
+ (f64.const 2.3)
+ )
+ )
)
)
+ (set_local $2
+ (i32.const 0)
+ )
(set_local $6
- (i32.const 3)
+ (i32.const 4)
)
(br $label$2)
)
- (f64.store align=4
- (set_local $2
- (i32.add
- (get_local $0)
- (i32.shl
- (get_local $5)
- (i32.const 3)
- )
- )
- )
- (set_local $4
- (f64.mul
- (f64.load align=4
+ (br_if $label$5
+ (i32.lt_s
+ (tee_local $2
+ (i32.add
(get_local $2)
+ (i32.const 1)
)
- (f64.const 2.3)
)
+ (i32.const 256)
)
)
- (set_local $2
- (i32.const 0)
- )
(set_local $6
- (i32.const 4)
+ (i32.const 0)
)
(br $label$2)
)
- (br_if $label$5
- (i32.lt_s
- (set_local $2
- (i32.add
- (get_local $2)
- (i32.const 1)
+ (drop
+ (f64.store align=4
+ (i32.add
+ (get_local $0)
+ (i32.shl
+ (get_local $5)
+ (i32.const 3)
)
)
- (i32.const 256)
+ (f64.add
+ (get_local $4)
+ (f64.const 1.3)
+ )
)
)
- (set_local $6
- (i32.const 0)
- )
- (br $label$2)
- )
- (f64.store align=4
- (i32.add
- (get_local $0)
- (i32.shl
+ (set_local $5
+ (i32.add
(get_local $5)
- (i32.const 3)
+ (i32.const 1)
)
)
- (f64.add
- (get_local $4)
- (f64.const 1.3)
- )
+ (br $label$6)
)
- (set_local $5
- (i32.add
- (get_local $5)
- (i32.const 1)
- )
- )
- (br $label$6)
+ (return)
)
- (return)
+ (set_local $6
+ (i32.const 1)
+ )
+ (br $label$2)
)
(set_local $6
- (i32.const 1)
+ (i32.const 4)
)
(br $label$2)
)
(set_local $6
- (i32.const 4)
+ (i32.const 2)
)
(br $label$2)
)
- (set_local $6
- (i32.const 2)
- )
- (br $label$2)
)
)
)
diff --git a/test/llvm_autogenerated/legalize.s b/test/llvm_autogenerated/legalize.s
index b3fd8f6f1..daf708f48 100644
--- a/test/llvm_autogenerated/legalize.s
+++ b/test/llvm_autogenerated/legalize.s
@@ -1,5 +1,5 @@
.text
- .file "/s/llvm/llvm/test/CodeGen/WebAssembly/legalize.ll"
+ .file "/s/llvm-upstream/llvm/test/CodeGen/WebAssembly/legalize.ll"
.globl shl_i3
.type shl_i3,@function
shl_i3:
@@ -69,1008 +69,1008 @@ fpconv_f64_f32:
bigshift:
.param i32, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64
.local i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32
- i32.const $push469=, __stack_pointer
- i32.const $push466=, __stack_pointer
- i32.load $push467=, 0($pop466)
+ i32.const $push469=, 0
+ i32.const $push466=, 0
+ i32.load $push467=, __stack_pointer($pop466)
i32.const $push468=, 1024
- i32.sub $push725=, $pop467, $pop468
- i32.store $push920=, 0($pop469), $pop725
- tee_local $push919=, $33=, $pop920
+ i32.sub $push919=, $pop467, $pop468
+ tee_local $push918=, $52=, $pop919
+ i32.store $drop=, __stack_pointer($pop469), $pop918
i32.const $push473=, 512
- i32.add $push474=, $pop919, $pop473
- i32.wrap/i64 $push918=, $17
- tee_local $push917=, $34=, $pop918
- call __ashlti3@FUNCTION, $pop474, $1, $2, $pop917
+ i32.add $push474=, $52, $pop473
+ i32.wrap/i64 $push917=, $17
+ tee_local $push916=, $33=, $pop917
+ call __ashlti3@FUNCTION, $pop474, $1, $2, $pop916
i32.const $push475=, 528
- i32.add $push476=, $33, $pop475
- call __ashlti3@FUNCTION, $pop476, $3, $4, $34
+ i32.add $push476=, $52, $pop475
+ call __ashlti3@FUNCTION, $pop476, $3, $4, $33
i32.const $push477=, 544
- i32.add $push478=, $33, $pop477
+ i32.add $push478=, $52, $pop477
i32.const $push0=, 128
- i32.sub $push916=, $pop0, $34
- tee_local $push915=, $42=, $pop916
- call __lshrti3@FUNCTION, $pop478, $1, $2, $pop915
+ i32.sub $push915=, $pop0, $33
+ tee_local $push914=, $41=, $pop915
+ call __lshrti3@FUNCTION, $pop478, $1, $2, $pop914
i32.const $push479=, 560
- i32.add $push480=, $33, $pop479
+ i32.add $push480=, $52, $pop479
i32.const $push1=, -128
- i32.add $push914=, $34, $pop1
- tee_local $push913=, $43=, $pop914
- call __ashlti3@FUNCTION, $pop480, $1, $2, $pop913
+ i32.add $push913=, $33, $pop1
+ tee_local $push912=, $42=, $pop913
+ call __ashlti3@FUNCTION, $pop480, $1, $2, $pop912
i32.const $push481=, 736
- i32.add $push482=, $33, $pop481
+ i32.add $push482=, $52, $pop481
i32.const $push2=, 384
- i32.sub $push912=, $pop2, $34
- tee_local $push911=, $44=, $pop912
- call __lshrti3@FUNCTION, $pop482, $1, $2, $pop911
+ i32.sub $push911=, $pop2, $33
+ tee_local $push910=, $43=, $pop911
+ call __lshrti3@FUNCTION, $pop482, $1, $2, $pop910
i32.const $push483=, 720
- i32.add $push484=, $33, $pop483
+ i32.add $push484=, $52, $pop483
i32.const $push3=, -256
- i32.add $push910=, $34, $pop3
- tee_local $push909=, $35=, $pop910
- call __ashlti3@FUNCTION, $pop484, $3, $4, $pop909
+ i32.add $push909=, $33, $pop3
+ tee_local $push908=, $34=, $pop909
+ call __ashlti3@FUNCTION, $pop484, $3, $4, $pop908
i32.const $push485=, 752
- i32.add $push486=, $33, $pop485
+ i32.add $push486=, $52, $pop485
i32.const $push4=, -384
- i32.add $push908=, $34, $pop4
- tee_local $push907=, $40=, $pop908
- call __ashlti3@FUNCTION, $pop486, $1, $2, $pop907
+ i32.add $push907=, $33, $pop4
+ tee_local $push906=, $39=, $pop907
+ call __ashlti3@FUNCTION, $pop486, $1, $2, $pop906
i32.const $push487=, 592
- i32.add $push488=, $33, $pop487
- call __ashlti3@FUNCTION, $pop488, $7, $8, $34
+ i32.add $push488=, $52, $pop487
+ call __ashlti3@FUNCTION, $pop488, $7, $8, $33
i32.const $push489=, 608
- i32.add $push490=, $33, $pop489
- call __lshrti3@FUNCTION, $pop490, $5, $6, $42
+ i32.add $push490=, $52, $pop489
+ call __lshrti3@FUNCTION, $pop490, $5, $6, $41
i32.const $push491=, 624
- i32.add $push492=, $33, $pop491
- call __ashlti3@FUNCTION, $pop492, $5, $6, $43
+ i32.add $push492=, $52, $pop491
+ call __ashlti3@FUNCTION, $pop492, $5, $6, $42
i32.const $push493=, 688
- i32.add $push494=, $33, $pop493
+ i32.add $push494=, $52, $pop493
i32.const $push5=, 256
- i32.sub $push906=, $pop5, $34
- tee_local $push905=, $36=, $pop906
- call __lshrti3@FUNCTION, $pop494, $3, $4, $pop905
+ i32.sub $push905=, $pop5, $33
+ tee_local $push904=, $35=, $pop905
+ call __lshrti3@FUNCTION, $pop494, $3, $4, $pop904
i32.const $push495=, 640
- i32.add $push496=, $33, $pop495
- call __lshrti3@FUNCTION, $pop496, $1, $2, $36
+ i32.add $push496=, $52, $pop495
+ call __lshrti3@FUNCTION, $pop496, $1, $2, $35
i32.const $push497=, 656
- i32.add $push498=, $33, $pop497
- i32.const $push904=, 128
- i32.sub $push903=, $pop904, $36
- tee_local $push902=, $51=, $pop903
- call __ashlti3@FUNCTION, $pop498, $3, $4, $pop902
+ i32.add $push498=, $52, $pop497
+ i32.const $push903=, 128
+ i32.sub $push902=, $pop903, $35
+ tee_local $push901=, $50=, $pop902
+ call __ashlti3@FUNCTION, $pop498, $3, $4, $pop901
i32.const $push499=, 672
- i32.add $push500=, $33, $pop499
- call __lshrti3@FUNCTION, $pop500, $3, $4, $42
+ i32.add $push500=, $52, $pop499
+ call __lshrti3@FUNCTION, $pop500, $3, $4, $41
i32.const $push501=, 576
- i32.add $push502=, $33, $pop501
- call __ashlti3@FUNCTION, $pop502, $5, $6, $34
+ i32.add $push502=, $52, $pop501
+ call __ashlti3@FUNCTION, $pop502, $5, $6, $33
i32.const $push503=, 704
- i32.add $push504=, $33, $pop503
- call __ashlti3@FUNCTION, $pop504, $1, $2, $35
+ i32.add $push504=, $52, $pop503
+ call __ashlti3@FUNCTION, $pop504, $1, $2, $34
i32.const $push505=, 480
- i32.add $push506=, $33, $pop505
+ i32.add $push506=, $52, $pop505
i32.const $push6=, 896
- i32.sub $push7=, $pop6, $34
+ i32.sub $push7=, $pop6, $33
call __lshrti3@FUNCTION, $pop506, $1, $2, $pop7
i32.const $push507=, 464
- i32.add $push508=, $33, $pop507
+ i32.add $push508=, $52, $pop507
i32.const $push8=, -768
- i32.add $push901=, $34, $pop8
- tee_local $push900=, $37=, $pop901
- call __ashlti3@FUNCTION, $pop508, $3, $4, $pop900
+ i32.add $push900=, $33, $pop8
+ tee_local $push899=, $36=, $pop900
+ call __ashlti3@FUNCTION, $pop508, $3, $4, $pop899
i32.const $push509=, 496
- i32.add $push510=, $33, $pop509
+ i32.add $push510=, $52, $pop509
i32.const $push9=, -896
- i32.add $push10=, $34, $pop9
+ i32.add $push10=, $33, $pop9
call __ashlti3@FUNCTION, $pop510, $1, $2, $pop10
i32.const $push511=, 352
- i32.add $push512=, $33, $pop511
+ i32.add $push512=, $52, $pop511
i32.const $push11=, 640
- i32.sub $push899=, $pop11, $34
- tee_local $push898=, $46=, $pop899
- call __lshrti3@FUNCTION, $pop512, $5, $6, $pop898
+ i32.sub $push898=, $pop11, $33
+ tee_local $push897=, $45=, $pop898
+ call __lshrti3@FUNCTION, $pop512, $5, $6, $pop897
i32.const $push513=, 336
- i32.add $push514=, $33, $pop513
+ i32.add $push514=, $52, $pop513
i32.const $push12=, -512
- i32.add $push897=, $34, $pop12
- tee_local $push896=, $38=, $pop897
- call __ashlti3@FUNCTION, $pop514, $7, $8, $pop896
+ i32.add $push896=, $33, $pop12
+ tee_local $push895=, $37=, $pop896
+ call __ashlti3@FUNCTION, $pop514, $7, $8, $pop895
i32.const $push515=, 368
- i32.add $push516=, $33, $pop515
+ i32.add $push516=, $52, $pop515
i32.const $push13=, -640
- i32.add $push895=, $34, $pop13
- tee_local $push894=, $52=, $pop895
- call __ashlti3@FUNCTION, $pop516, $5, $6, $pop894
+ i32.add $push894=, $33, $pop13
+ tee_local $push893=, $51=, $pop894
+ call __ashlti3@FUNCTION, $pop516, $5, $6, $pop893
i32.const $push517=, 432
- i32.add $push518=, $33, $pop517
+ i32.add $push518=, $52, $pop517
i32.const $push14=, 768
- i32.sub $push893=, $pop14, $34
- tee_local $push892=, $39=, $pop893
- call __lshrti3@FUNCTION, $pop518, $3, $4, $pop892
+ i32.sub $push892=, $pop14, $33
+ tee_local $push891=, $38=, $pop892
+ call __lshrti3@FUNCTION, $pop518, $3, $4, $pop891
i32.const $push519=, 864
- i32.add $push520=, $33, $pop519
- call __lshrti3@FUNCTION, $pop520, $9, $10, $44
+ i32.add $push520=, $52, $pop519
+ call __lshrti3@FUNCTION, $pop520, $9, $10, $43
i32.const $push521=, 848
- i32.add $push522=, $33, $pop521
- call __ashlti3@FUNCTION, $pop522, $11, $12, $35
+ i32.add $push522=, $52, $pop521
+ call __ashlti3@FUNCTION, $pop522, $11, $12, $34
i32.const $push523=, 880
- i32.add $push524=, $33, $pop523
- call __ashlti3@FUNCTION, $pop524, $9, $10, $40
+ i32.add $push524=, $52, $pop523
+ call __ashlti3@FUNCTION, $pop524, $9, $10, $39
i32.const $push525=, 1008
- i32.add $push526=, $33, $pop525
- call __ashlti3@FUNCTION, $pop526, $15, $16, $34
+ i32.add $push526=, $52, $pop525
+ call __ashlti3@FUNCTION, $pop526, $15, $16, $33
i32.const $push527=, 960
- i32.add $push528=, $33, $pop527
- call __lshrti3@FUNCTION, $pop528, $13, $14, $42
+ i32.add $push528=, $52, $pop527
+ call __lshrti3@FUNCTION, $pop528, $13, $14, $41
i32.const $push529=, 976
- i32.add $push530=, $33, $pop529
- call __ashlti3@FUNCTION, $pop530, $13, $14, $43
+ i32.add $push530=, $52, $pop529
+ call __ashlti3@FUNCTION, $pop530, $13, $14, $42
i32.const $push531=, 816
- i32.add $push532=, $33, $pop531
- call __lshrti3@FUNCTION, $pop532, $11, $12, $36
+ i32.add $push532=, $52, $pop531
+ call __lshrti3@FUNCTION, $pop532, $11, $12, $35
i32.const $push533=, 240
- i32.add $push534=, $33, $pop533
+ i32.add $push534=, $52, $pop533
i32.const $push15=, 512
- i32.sub $push891=, $pop15, $34
- tee_local $push890=, $40=, $pop891
- call __lshrti3@FUNCTION, $pop534, $7, $8, $pop890
+ i32.sub $push890=, $pop15, $33
+ tee_local $push889=, $39=, $pop890
+ call __lshrti3@FUNCTION, $pop534, $7, $8, $pop889
i32.const $push535=, 192
- i32.add $push536=, $33, $pop535
- call __lshrti3@FUNCTION, $pop536, $5, $6, $40
+ i32.add $push536=, $52, $pop535
+ call __lshrti3@FUNCTION, $pop536, $5, $6, $39
i32.const $push537=, 208
- i32.add $push538=, $33, $pop537
- i32.const $push889=, 128
- i32.sub $push888=, $pop889, $40
- tee_local $push887=, $45=, $pop888
- call __ashlti3@FUNCTION, $pop538, $7, $8, $pop887
+ i32.add $push538=, $52, $pop537
+ i32.const $push888=, 128
+ i32.sub $push887=, $pop888, $39
+ tee_local $push886=, $44=, $pop887
+ call __ashlti3@FUNCTION, $pop538, $7, $8, $pop886
i32.const $push539=, 224
- i32.add $push540=, $33, $pop539
- call __lshrti3@FUNCTION, $pop540, $7, $8, $44
+ i32.add $push540=, $52, $pop539
+ call __lshrti3@FUNCTION, $pop540, $7, $8, $43
i32.const $push541=, 768
- i32.add $push542=, $33, $pop541
- call __lshrti3@FUNCTION, $pop542, $9, $10, $36
+ i32.add $push542=, $52, $pop541
+ call __lshrti3@FUNCTION, $pop542, $9, $10, $35
i32.const $push543=, 784
- i32.add $push544=, $33, $pop543
- call __ashlti3@FUNCTION, $pop544, $11, $12, $51
+ i32.add $push544=, $52, $pop543
+ call __ashlti3@FUNCTION, $pop544, $11, $12, $50
i32.const $push545=, 800
- i32.add $push546=, $33, $pop545
- call __lshrti3@FUNCTION, $pop546, $11, $12, $42
+ i32.add $push546=, $52, $pop545
+ call __lshrti3@FUNCTION, $pop546, $11, $12, $41
i32.const $push547=, 992
- i32.add $push548=, $33, $pop547
- call __ashlti3@FUNCTION, $pop548, $13, $14, $34
+ i32.add $push548=, $52, $pop547
+ call __ashlti3@FUNCTION, $pop548, $13, $14, $33
i32.const $push549=, 832
- i32.add $push550=, $33, $pop549
- call __ashlti3@FUNCTION, $pop550, $9, $10, $35
+ i32.add $push550=, $52, $pop549
+ call __ashlti3@FUNCTION, $pop550, $9, $10, $34
i32.const $push551=, 384
- i32.add $push552=, $33, $pop551
- call __lshrti3@FUNCTION, $pop552, $1, $2, $39
+ i32.add $push552=, $52, $pop551
+ call __lshrti3@FUNCTION, $pop552, $1, $2, $38
i32.const $push553=, 400
- i32.add $push554=, $33, $pop553
- i32.const $push886=, 128
- i32.sub $push16=, $pop886, $39
+ i32.add $push554=, $52, $pop553
+ i32.const $push885=, 128
+ i32.sub $push16=, $pop885, $38
call __ashlti3@FUNCTION, $pop554, $3, $4, $pop16
i32.const $push555=, 416
- i32.add $push556=, $33, $pop555
- call __lshrti3@FUNCTION, $pop556, $3, $4, $46
+ i32.add $push556=, $52, $pop555
+ call __lshrti3@FUNCTION, $pop556, $3, $4, $45
i32.const $push557=, 320
- i32.add $push558=, $33, $pop557
- call __ashlti3@FUNCTION, $pop558, $5, $6, $38
+ i32.add $push558=, $52, $pop557
+ call __ashlti3@FUNCTION, $pop558, $5, $6, $37
i32.const $push559=, 448
- i32.add $push560=, $33, $pop559
- call __ashlti3@FUNCTION, $pop560, $1, $2, $37
+ i32.add $push560=, $52, $pop559
+ call __ashlti3@FUNCTION, $pop560, $1, $2, $36
i32.const $push561=, 128
- i32.add $push562=, $33, $pop561
- call __lshrti3@FUNCTION, $pop562, $5, $6, $36
+ i32.add $push562=, $52, $pop561
+ call __lshrti3@FUNCTION, $pop562, $5, $6, $35
i32.const $push563=, 144
- i32.add $push564=, $33, $pop563
- i32.const $push885=, 384
- i32.sub $push17=, $pop885, $40
+ i32.add $push564=, $52, $pop563
+ i32.const $push884=, 384
+ i32.sub $push17=, $pop884, $39
call __ashlti3@FUNCTION, $pop564, $7, $8, $pop17
i32.const $push565=, 160
- i32.add $push566=, $33, $pop565
- call __lshrti3@FUNCTION, $pop566, $7, $8, $42
- call __lshrti3@FUNCTION, $33, $1, $2, $40
+ i32.add $push566=, $52, $pop565
+ call __lshrti3@FUNCTION, $pop566, $7, $8, $41
+ call __lshrti3@FUNCTION, $52, $1, $2, $39
i32.const $push567=, 16
- i32.add $push568=, $33, $pop567
- call __ashlti3@FUNCTION, $pop568, $3, $4, $45
+ i32.add $push568=, $52, $pop567
+ call __ashlti3@FUNCTION, $pop568, $3, $4, $44
i32.const $push569=, 32
- i32.add $push570=, $33, $pop569
- call __lshrti3@FUNCTION, $pop570, $3, $4, $44
+ i32.add $push570=, $52, $pop569
+ call __lshrti3@FUNCTION, $pop570, $3, $4, $43
i32.const $push571=, 64
- i32.add $push572=, $33, $pop571
- i32.const $push884=, 256
- i32.sub $push883=, $pop884, $40
- tee_local $push882=, $41=, $pop883
- call __ashlti3@FUNCTION, $pop572, $5, $6, $pop882
+ i32.add $push572=, $52, $pop571
+ i32.const $push883=, 256
+ i32.sub $push882=, $pop883, $39
+ tee_local $push881=, $40=, $pop882
+ call __ashlti3@FUNCTION, $pop572, $5, $6, $pop881
i32.const $push573=, 896
- i32.add $push574=, $33, $pop573
- call __ashlti3@FUNCTION, $pop574, $9, $10, $34
+ i32.add $push574=, $52, $pop573
+ call __ashlti3@FUNCTION, $pop574, $9, $10, $33
i32.const $push575=, 256
- i32.add $push576=, $33, $pop575
- call __ashlti3@FUNCTION, $pop576, $1, $2, $38
+ i32.add $push576=, $52, $pop575
+ call __ashlti3@FUNCTION, $pop576, $1, $2, $37
i32.const $push577=, 912
- i32.add $push578=, $33, $pop577
- call __ashlti3@FUNCTION, $pop578, $11, $12, $34
+ i32.add $push578=, $52, $pop577
+ call __ashlti3@FUNCTION, $pop578, $11, $12, $33
i32.const $push579=, 928
- i32.add $push580=, $33, $pop579
- call __lshrti3@FUNCTION, $pop580, $9, $10, $42
+ i32.add $push580=, $52, $pop579
+ call __lshrti3@FUNCTION, $pop580, $9, $10, $41
i32.const $push581=, 944
- i32.add $push582=, $33, $pop581
- call __ashlti3@FUNCTION, $pop582, $9, $10, $43
+ i32.add $push582=, $52, $pop581
+ call __ashlti3@FUNCTION, $pop582, $9, $10, $42
i32.const $push583=, 80
- i32.add $push584=, $33, $pop583
- call __ashlti3@FUNCTION, $pop584, $7, $8, $41
+ i32.add $push584=, $52, $pop583
+ call __ashlti3@FUNCTION, $pop584, $7, $8, $40
i32.const $push585=, 96
- i32.add $push586=, $33, $pop585
- i32.const $push881=, 128
- i32.sub $push18=, $pop881, $41
+ i32.add $push586=, $52, $pop585
+ i32.const $push880=, 128
+ i32.sub $push18=, $pop880, $40
call __lshrti3@FUNCTION, $pop586, $5, $6, $pop18
i32.const $push587=, 112
- i32.add $push588=, $33, $pop587
- call __ashlti3@FUNCTION, $pop588, $5, $6, $45
+ i32.add $push588=, $52, $pop587
+ call __ashlti3@FUNCTION, $pop588, $5, $6, $44
i32.const $push589=, 48
- i32.add $push590=, $33, $pop589
- call __lshrti3@FUNCTION, $pop590, $3, $4, $40
+ i32.add $push590=, $52, $pop589
+ call __lshrti3@FUNCTION, $pop590, $3, $4, $39
i32.const $push591=, 176
- i32.add $push592=, $33, $pop591
- call __lshrti3@FUNCTION, $pop592, $7, $8, $36
+ i32.add $push592=, $52, $pop591
+ call __lshrti3@FUNCTION, $pop592, $7, $8, $35
i32.const $push593=, 288
- i32.add $push594=, $33, $pop593
- call __lshrti3@FUNCTION, $pop594, $1, $2, $46
+ i32.add $push594=, $52, $pop593
+ call __lshrti3@FUNCTION, $pop594, $1, $2, $45
i32.const $push595=, 272
- i32.add $push596=, $33, $pop595
- call __ashlti3@FUNCTION, $pop596, $3, $4, $38
+ i32.add $push596=, $52, $pop595
+ call __ashlti3@FUNCTION, $pop596, $3, $4, $37
i32.const $push597=, 304
- i32.add $push598=, $33, $pop597
- call __ashlti3@FUNCTION, $pop598, $1, $2, $52
+ i32.add $push598=, $52, $pop597
+ call __ashlti3@FUNCTION, $pop598, $1, $2, $51
i32.const $push19=, 8
i32.add $push26=, $0, $pop19
i32.const $push599=, 512
- i32.add $push600=, $33, $pop599
- i32.const $push880=, 8
- i32.add $push20=, $pop600, $pop880
+ i32.add $push600=, $52, $pop599
+ i32.const $push879=, 8
+ i32.add $push20=, $pop600, $pop879
i64.load $push21=, 0($pop20)
i64.const $push22=, 0
- i32.const $push879=, 128
- i32.lt_u $push878=, $34, $pop879
- tee_local $push877=, $42=, $pop878
- i64.select $push23=, $pop21, $pop22, $pop877
- i64.const $push876=, 0
- i32.const $push875=, 256
- i32.lt_u $push874=, $34, $pop875
- tee_local $push873=, $43=, $pop874
- i64.select $push24=, $pop23, $pop876, $pop873
- i64.const $push872=, 0
- i32.const $push871=, 512
- i32.lt_u $push870=, $34, $pop871
- tee_local $push869=, $44=, $pop870
- i64.select $push25=, $pop24, $pop872, $pop869
+ i32.const $push878=, 128
+ i32.lt_u $push877=, $33, $pop878
+ tee_local $push876=, $41=, $pop877
+ i64.select $push23=, $pop21, $pop22, $pop876
+ i64.const $push875=, 0
+ i32.const $push874=, 256
+ i32.lt_u $push873=, $33, $pop874
+ tee_local $push872=, $42=, $pop873
+ i64.select $push24=, $pop23, $pop875, $pop872
+ i64.const $push871=, 0
+ i32.const $push870=, 512
+ i32.lt_u $push869=, $33, $pop870
+ tee_local $push868=, $43=, $pop869
+ i64.select $push25=, $pop24, $pop871, $pop868
i64.store $drop=, 0($pop26), $pop25
- i64.load $push27=, 512($33)
- i64.const $push868=, 0
- i64.select $push28=, $pop27, $pop868, $42
+ i64.load $push27=, 512($52)
i64.const $push867=, 0
- i64.select $push29=, $pop28, $pop867, $43
+ i64.select $push28=, $pop27, $pop867, $41
i64.const $push866=, 0
- i64.select $push30=, $pop29, $pop866, $44
+ i64.select $push29=, $pop28, $pop866, $42
+ i64.const $push865=, 0
+ i64.select $push30=, $pop29, $pop865, $43
i64.store $drop=, 0($0), $pop30
i32.const $push42=, 24
i32.add $push43=, $0, $pop42
i32.const $push601=, 528
- i32.add $push602=, $33, $pop601
- i32.const $push865=, 8
- i32.add $push31=, $pop602, $pop865
+ i32.add $push602=, $52, $pop601
+ i32.const $push864=, 8
+ i32.add $push31=, $pop602, $pop864
i64.load $push32=, 0($pop31)
i32.const $push603=, 544
- i32.add $push604=, $33, $pop603
- i32.const $push864=, 8
- i32.add $push33=, $pop604, $pop864
+ i32.add $push604=, $52, $pop603
+ i32.const $push863=, 8
+ i32.add $push33=, $pop604, $pop863
i64.load $push34=, 0($pop33)
i64.or $push35=, $pop32, $pop34
i32.const $push605=, 560
- i32.add $push606=, $33, $pop605
- i32.const $push863=, 8
- i32.add $push36=, $pop606, $pop863
+ i32.add $push606=, $52, $pop605
+ i32.const $push862=, 8
+ i32.add $push36=, $pop606, $pop862
i64.load $push37=, 0($pop36)
- i64.select $push38=, $pop35, $pop37, $42
- i64.select $push39=, $pop38, $4, $34
- i64.const $push862=, 0
- i64.select $push40=, $pop39, $pop862, $43
+ i64.select $push38=, $pop35, $pop37, $41
+ i64.select $push39=, $pop38, $4, $33
i64.const $push861=, 0
- i64.select $push41=, $pop40, $pop861, $44
+ i64.select $push40=, $pop39, $pop861, $42
+ i64.const $push860=, 0
+ i64.select $push41=, $pop40, $pop860, $43
i64.store $drop=, 0($pop43), $pop41
i32.const $push52=, 16
i32.add $push53=, $0, $pop52
- i64.load $push44=, 528($33)
- i64.load $push45=, 544($33)
+ i64.load $push44=, 528($52)
+ i64.load $push45=, 544($52)
i64.or $push46=, $pop44, $pop45
- i64.load $push47=, 560($33)
- i64.select $push48=, $pop46, $pop47, $42
- i64.select $push49=, $pop48, $3, $34
- i64.const $push860=, 0
- i64.select $push50=, $pop49, $pop860, $43
+ i64.load $push47=, 560($52)
+ i64.select $push48=, $pop46, $pop47, $41
+ i64.select $push49=, $pop48, $3, $33
i64.const $push859=, 0
- i64.select $push51=, $pop50, $pop859, $44
+ i64.select $push50=, $pop49, $pop859, $42
+ i64.const $push858=, 0
+ i64.select $push51=, $pop50, $pop858, $43
i64.store $drop=, 0($pop53), $pop51
i32.const $push79=, 56
i32.add $push80=, $0, $pop79
i32.const $push613=, 592
- i32.add $push614=, $33, $pop613
- i32.const $push858=, 8
- i32.add $push63=, $pop614, $pop858
+ i32.add $push614=, $52, $pop613
+ i32.const $push857=, 8
+ i32.add $push63=, $pop614, $pop857
i64.load $push64=, 0($pop63)
i32.const $push615=, 608
- i32.add $push616=, $33, $pop615
- i32.const $push857=, 8
- i32.add $push65=, $pop616, $pop857
+ i32.add $push616=, $52, $pop615
+ i32.const $push856=, 8
+ i32.add $push65=, $pop616, $pop856
i64.load $push66=, 0($pop65)
i64.or $push67=, $pop64, $pop66
i32.const $push617=, 624
- i32.add $push618=, $33, $pop617
- i32.const $push856=, 8
- i32.add $push68=, $pop618, $pop856
+ i32.add $push618=, $52, $pop617
+ i32.const $push855=, 8
+ i32.add $push68=, $pop618, $pop855
i64.load $push69=, 0($pop68)
- i64.select $push70=, $pop67, $pop69, $42
- i64.select $push71=, $pop70, $8, $34
+ i64.select $push70=, $pop67, $pop69, $41
+ i64.select $push71=, $pop70, $8, $33
i32.const $push619=, 688
- i32.add $push620=, $33, $pop619
- i32.const $push855=, 8
- i32.add $push72=, $pop620, $pop855
+ i32.add $push620=, $52, $pop619
+ i32.const $push854=, 8
+ i32.add $push72=, $pop620, $pop854
i64.load $push73=, 0($pop72)
- i64.const $push854=, 0
- i32.const $push853=, 128
- i32.lt_u $push852=, $36, $pop853
- tee_local $push851=, $46=, $pop852
- i64.select $push74=, $pop73, $pop854, $pop851
+ i64.const $push853=, 0
+ i32.const $push852=, 128
+ i32.lt_u $push851=, $35, $pop852
+ tee_local $push850=, $45=, $pop851
+ i64.select $push74=, $pop73, $pop853, $pop850
i64.or $push75=, $pop71, $pop74
i32.const $push609=, 720
- i32.add $push610=, $33, $pop609
- i32.const $push850=, 8
- i32.add $push56=, $pop610, $pop850
+ i32.add $push610=, $52, $pop609
+ i32.const $push849=, 8
+ i32.add $push56=, $pop610, $pop849
i64.load $push57=, 0($pop56)
i32.const $push607=, 736
- i32.add $push608=, $33, $pop607
- i32.const $push849=, 8
- i32.add $push54=, $pop608, $pop849
+ i32.add $push608=, $52, $pop607
+ i32.const $push848=, 8
+ i32.add $push54=, $pop608, $pop848
i64.load $push55=, 0($pop54)
i64.or $push58=, $pop57, $pop55
i32.const $push611=, 752
- i32.add $push612=, $33, $pop611
- i32.const $push848=, 8
- i32.add $push59=, $pop612, $pop848
+ i32.add $push612=, $52, $pop611
+ i32.const $push847=, 8
+ i32.add $push59=, $pop612, $pop847
i64.load $push60=, 0($pop59)
- i32.const $push847=, 128
- i32.lt_u $push846=, $35, $pop847
- tee_local $push845=, $45=, $pop846
- i64.select $push61=, $pop58, $pop60, $pop845
- i64.select $push62=, $pop61, $4, $35
- i64.select $push76=, $pop75, $pop62, $43
- i64.select $push77=, $pop76, $8, $34
- i64.const $push844=, 0
- i64.select $push78=, $pop77, $pop844, $44
+ i32.const $push846=, 128
+ i32.lt_u $push845=, $34, $pop846
+ tee_local $push844=, $44=, $pop845
+ i64.select $push61=, $pop58, $pop60, $pop844
+ i64.select $push62=, $pop61, $4, $34
+ i64.select $push76=, $pop75, $pop62, $42
+ i64.select $push77=, $pop76, $8, $33
+ i64.const $push843=, 0
+ i64.select $push78=, $pop77, $pop843, $43
i64.store $drop=, 0($pop80), $pop78
i32.const $push99=, 48
i32.add $push100=, $0, $pop99
- i64.load $push87=, 592($33)
- i64.load $push88=, 608($33)
+ i64.load $push87=, 592($52)
+ i64.load $push88=, 608($52)
i64.or $push89=, $pop87, $pop88
- i64.load $push90=, 624($33)
- i64.select $push91=, $pop89, $pop90, $42
- i64.select $push92=, $pop91, $7, $34
- i64.load $push93=, 688($33)
- i64.const $push843=, 0
- i64.select $push94=, $pop93, $pop843, $46
+ i64.load $push90=, 624($52)
+ i64.select $push91=, $pop89, $pop90, $41
+ i64.select $push92=, $pop91, $7, $33
+ i64.load $push93=, 688($52)
+ i64.const $push842=, 0
+ i64.select $push94=, $pop93, $pop842, $45
i64.or $push95=, $pop92, $pop94
- i64.load $push82=, 720($33)
- i64.load $push81=, 736($33)
+ i64.load $push82=, 720($52)
+ i64.load $push81=, 736($52)
i64.or $push83=, $pop82, $pop81
- i64.load $push84=, 752($33)
- i64.select $push85=, $pop83, $pop84, $45
- i64.select $push86=, $pop85, $3, $35
- i64.select $push96=, $pop95, $pop86, $43
- i64.select $push97=, $pop96, $7, $34
- i64.const $push842=, 0
- i64.select $push98=, $pop97, $pop842, $44
+ i64.load $push84=, 752($52)
+ i64.select $push85=, $pop83, $pop84, $44
+ i64.select $push86=, $pop85, $3, $34
+ i64.select $push96=, $pop95, $pop86, $42
+ i64.select $push97=, $pop96, $7, $33
+ i64.const $push841=, 0
+ i64.select $push98=, $pop97, $pop841, $43
i64.store $drop=, 0($pop100), $pop98
i32.const $push120=, 40
i32.add $push121=, $0, $pop120
i32.const $push627=, 576
- i32.add $push628=, $33, $pop627
- i32.const $push841=, 8
- i32.add $push110=, $pop628, $pop841
+ i32.add $push628=, $52, $pop627
+ i32.const $push840=, 8
+ i32.add $push110=, $pop628, $pop840
i64.load $push111=, 0($pop110)
- i64.const $push840=, 0
- i64.select $push112=, $pop111, $pop840, $42
+ i64.const $push839=, 0
+ i64.select $push112=, $pop111, $pop839, $41
i32.const $push621=, 640
- i32.add $push622=, $33, $pop621
- i32.const $push839=, 8
- i32.add $push101=, $pop622, $pop839
+ i32.add $push622=, $52, $pop621
+ i32.const $push838=, 8
+ i32.add $push101=, $pop622, $pop838
i64.load $push102=, 0($pop101)
i32.const $push623=, 656
- i32.add $push624=, $33, $pop623
- i32.const $push838=, 8
- i32.add $push103=, $pop624, $pop838
+ i32.add $push624=, $52, $pop623
+ i32.const $push837=, 8
+ i32.add $push103=, $pop624, $pop837
i64.load $push104=, 0($pop103)
i64.or $push105=, $pop102, $pop104
i32.const $push625=, 672
- i32.add $push626=, $33, $pop625
- i32.const $push837=, 8
- i32.add $push106=, $pop626, $pop837
+ i32.add $push626=, $52, $pop625
+ i32.const $push836=, 8
+ i32.add $push106=, $pop626, $pop836
i64.load $push107=, 0($pop106)
- i64.select $push108=, $pop105, $pop107, $46
- i64.select $push109=, $pop108, $2, $36
+ i64.select $push108=, $pop105, $pop107, $45
+ i64.select $push109=, $pop108, $2, $35
i64.or $push113=, $pop112, $pop109
i32.const $push629=, 704
- i32.add $push630=, $33, $pop629
- i32.const $push836=, 8
- i32.add $push114=, $pop630, $pop836
+ i32.add $push630=, $52, $pop629
+ i32.const $push835=, 8
+ i32.add $push114=, $pop630, $pop835
i64.load $push115=, 0($pop114)
- i64.const $push835=, 0
- i64.select $push116=, $pop115, $pop835, $45
- i64.select $push117=, $pop113, $pop116, $43
- i64.select $push118=, $pop117, $6, $34
i64.const $push834=, 0
- i64.select $push119=, $pop118, $pop834, $44
+ i64.select $push116=, $pop115, $pop834, $44
+ i64.select $push117=, $pop113, $pop116, $42
+ i64.select $push118=, $pop117, $6, $33
+ i64.const $push833=, 0
+ i64.select $push119=, $pop118, $pop833, $43
i64.store $drop=, 0($pop121), $pop119
i32.const $push136=, 32
i32.add $push137=, $0, $pop136
- i64.load $push128=, 576($33)
- i64.const $push833=, 0
- i64.select $push129=, $pop128, $pop833, $42
- i64.load $push122=, 640($33)
- i64.load $push123=, 656($33)
+ i64.load $push128=, 576($52)
+ i64.const $push832=, 0
+ i64.select $push129=, $pop128, $pop832, $41
+ i64.load $push122=, 640($52)
+ i64.load $push123=, 656($52)
i64.or $push124=, $pop122, $pop123
- i64.load $push125=, 672($33)
- i64.select $push126=, $pop124, $pop125, $46
- i64.select $push127=, $pop126, $1, $36
+ i64.load $push125=, 672($52)
+ i64.select $push126=, $pop124, $pop125, $45
+ i64.select $push127=, $pop126, $1, $35
i64.or $push130=, $pop129, $pop127
- i64.load $push131=, 704($33)
- i64.const $push832=, 0
- i64.select $push132=, $pop131, $pop832, $45
- i64.select $push133=, $pop130, $pop132, $43
- i64.select $push134=, $pop133, $5, $34
+ i64.load $push131=, 704($52)
i64.const $push831=, 0
- i64.select $push135=, $pop134, $pop831, $44
+ i64.select $push132=, $pop131, $pop831, $44
+ i64.select $push133=, $pop130, $pop132, $42
+ i64.select $push134=, $pop133, $5, $33
+ i64.const $push830=, 0
+ i64.select $push135=, $pop134, $pop830, $43
i64.store $drop=, 0($pop137), $pop135
i32.const $push193=, 120
i32.add $push194=, $0, $pop193
i32.const $push651=, 1008
- i32.add $push652=, $33, $pop651
- i32.const $push830=, 8
- i32.add $push171=, $pop652, $pop830
+ i32.add $push652=, $52, $pop651
+ i32.const $push829=, 8
+ i32.add $push171=, $pop652, $pop829
i64.load $push172=, 0($pop171)
i32.const $push653=, 960
- i32.add $push654=, $33, $pop653
- i32.const $push829=, 8
- i32.add $push173=, $pop654, $pop829
+ i32.add $push654=, $52, $pop653
+ i32.const $push828=, 8
+ i32.add $push173=, $pop654, $pop828
i64.load $push174=, 0($pop173)
i64.or $push175=, $pop172, $pop174
i32.const $push655=, 976
- i32.add $push656=, $33, $pop655
- i32.const $push828=, 8
- i32.add $push176=, $pop656, $pop828
+ i32.add $push656=, $52, $pop655
+ i32.const $push827=, 8
+ i32.add $push176=, $pop656, $pop827
i64.load $push177=, 0($pop176)
- i64.select $push178=, $pop175, $pop177, $42
- i64.select $push179=, $pop178, $16, $34
+ i64.select $push178=, $pop175, $pop177, $41
+ i64.select $push179=, $pop178, $16, $33
i32.const $push657=, 816
- i32.add $push658=, $33, $pop657
- i32.const $push827=, 8
- i32.add $push180=, $pop658, $pop827
+ i32.add $push658=, $52, $pop657
+ i32.const $push826=, 8
+ i32.add $push180=, $pop658, $pop826
i64.load $push181=, 0($pop180)
- i64.const $push826=, 0
- i64.select $push182=, $pop181, $pop826, $46
+ i64.const $push825=, 0
+ i64.select $push182=, $pop181, $pop825, $45
i64.or $push183=, $pop179, $pop182
i32.const $push647=, 848
- i32.add $push648=, $33, $pop647
- i32.const $push825=, 8
- i32.add $push164=, $pop648, $pop825
+ i32.add $push648=, $52, $pop647
+ i32.const $push824=, 8
+ i32.add $push164=, $pop648, $pop824
i64.load $push165=, 0($pop164)
i32.const $push645=, 864
- i32.add $push646=, $33, $pop645
- i32.const $push824=, 8
- i32.add $push162=, $pop646, $pop824
+ i32.add $push646=, $52, $pop645
+ i32.const $push823=, 8
+ i32.add $push162=, $pop646, $pop823
i64.load $push163=, 0($pop162)
i64.or $push166=, $pop165, $pop163
i32.const $push649=, 880
- i32.add $push650=, $33, $pop649
- i32.const $push823=, 8
- i32.add $push167=, $pop650, $pop823
+ i32.add $push650=, $52, $pop649
+ i32.const $push822=, 8
+ i32.add $push167=, $pop650, $pop822
i64.load $push168=, 0($pop167)
- i64.select $push169=, $pop166, $pop168, $45
- i64.select $push170=, $pop169, $12, $35
- i64.select $push184=, $pop183, $pop170, $43
- i64.select $push185=, $pop184, $16, $34
+ i64.select $push169=, $pop166, $pop168, $44
+ i64.select $push170=, $pop169, $12, $34
+ i64.select $push184=, $pop183, $pop170, $42
+ i64.select $push185=, $pop184, $16, $33
i32.const $push659=, 240
- i32.add $push660=, $33, $pop659
- i32.const $push822=, 8
- i32.add $push186=, $pop660, $pop822
+ i32.add $push660=, $52, $pop659
+ i32.const $push821=, 8
+ i32.add $push186=, $pop660, $pop821
i64.load $push187=, 0($pop186)
- i64.const $push821=, 0
- i32.const $push820=, 128
- i32.lt_u $push819=, $40, $pop820
- tee_local $push818=, $51=, $pop819
- i64.select $push188=, $pop187, $pop821, $pop818
- i64.const $push817=, 0
- i32.const $push816=, 256
- i32.lt_u $push815=, $40, $pop816
- tee_local $push814=, $52=, $pop815
- i64.select $push189=, $pop188, $pop817, $pop814
+ i64.const $push820=, 0
+ i32.const $push819=, 128
+ i32.lt_u $push818=, $39, $pop819
+ tee_local $push817=, $50=, $pop818
+ i64.select $push188=, $pop187, $pop820, $pop817
+ i64.const $push816=, 0
+ i32.const $push815=, 256
+ i32.lt_u $push814=, $39, $pop815
+ tee_local $push813=, $51=, $pop814
+ i64.select $push189=, $pop188, $pop816, $pop813
i64.or $push190=, $pop185, $pop189
i32.const $push639=, 336
- i32.add $push640=, $33, $pop639
- i32.const $push813=, 8
- i32.add $push149=, $pop640, $pop813
+ i32.add $push640=, $52, $pop639
+ i32.const $push812=, 8
+ i32.add $push149=, $pop640, $pop812
i64.load $push150=, 0($pop149)
i32.const $push637=, 352
- i32.add $push638=, $33, $pop637
- i32.const $push812=, 8
- i32.add $push147=, $pop638, $pop812
+ i32.add $push638=, $52, $pop637
+ i32.const $push811=, 8
+ i32.add $push147=, $pop638, $pop811
i64.load $push148=, 0($pop147)
i64.or $push151=, $pop150, $pop148
i32.const $push641=, 368
- i32.add $push642=, $33, $pop641
- i32.const $push811=, 8
- i32.add $push152=, $pop642, $pop811
+ i32.add $push642=, $52, $pop641
+ i32.const $push810=, 8
+ i32.add $push152=, $pop642, $pop810
i64.load $push153=, 0($pop152)
- i32.const $push810=, 128
- i32.lt_u $push809=, $38, $pop810
- tee_local $push808=, $48=, $pop809
- i64.select $push154=, $pop151, $pop153, $pop808
- i64.select $push155=, $pop154, $8, $38
+ i32.const $push809=, 128
+ i32.lt_u $push808=, $37, $pop809
+ tee_local $push807=, $47=, $pop808
+ i64.select $push154=, $pop151, $pop153, $pop807
+ i64.select $push155=, $pop154, $8, $37
i32.const $push643=, 432
- i32.add $push644=, $33, $pop643
- i32.const $push807=, 8
- i32.add $push156=, $pop644, $pop807
+ i32.add $push644=, $52, $pop643
+ i32.const $push806=, 8
+ i32.add $push156=, $pop644, $pop806
i64.load $push157=, 0($pop156)
- i64.const $push806=, 0
- i32.const $push805=, 128
- i32.lt_u $push804=, $39, $pop805
- tee_local $push803=, $49=, $pop804
- i64.select $push158=, $pop157, $pop806, $pop803
+ i64.const $push805=, 0
+ i32.const $push804=, 128
+ i32.lt_u $push803=, $38, $pop804
+ tee_local $push802=, $48=, $pop803
+ i64.select $push158=, $pop157, $pop805, $pop802
i64.or $push159=, $pop155, $pop158
i32.const $push633=, 464
- i32.add $push634=, $33, $pop633
- i32.const $push802=, 8
- i32.add $push140=, $pop634, $pop802
+ i32.add $push634=, $52, $pop633
+ i32.const $push801=, 8
+ i32.add $push140=, $pop634, $pop801
i64.load $push141=, 0($pop140)
i32.const $push631=, 480
- i32.add $push632=, $33, $pop631
- i32.const $push801=, 8
- i32.add $push138=, $pop632, $pop801
+ i32.add $push632=, $52, $pop631
+ i32.const $push800=, 8
+ i32.add $push138=, $pop632, $pop800
i64.load $push139=, 0($pop138)
i64.or $push142=, $pop141, $pop139
i32.const $push635=, 496
- i32.add $push636=, $33, $pop635
- i32.const $push800=, 8
- i32.add $push143=, $pop636, $pop800
+ i32.add $push636=, $52, $pop635
+ i32.const $push799=, 8
+ i32.add $push143=, $pop636, $pop799
i64.load $push144=, 0($pop143)
- i32.const $push799=, 128
- i32.lt_u $push798=, $37, $pop799
- tee_local $push797=, $47=, $pop798
- i64.select $push145=, $pop142, $pop144, $pop797
- i64.select $push146=, $pop145, $4, $37
- i32.const $push796=, 256
- i32.lt_u $push795=, $38, $pop796
- tee_local $push794=, $50=, $pop795
- i64.select $push160=, $pop159, $pop146, $pop794
- i64.select $push161=, $pop160, $8, $38
- i64.select $push191=, $pop190, $pop161, $44
- i64.select $push192=, $pop191, $16, $34
+ i32.const $push798=, 128
+ i32.lt_u $push797=, $36, $pop798
+ tee_local $push796=, $46=, $pop797
+ i64.select $push145=, $pop142, $pop144, $pop796
+ i64.select $push146=, $pop145, $4, $36
+ i32.const $push795=, 256
+ i32.lt_u $push794=, $37, $pop795
+ tee_local $push793=, $49=, $pop794
+ i64.select $push160=, $pop159, $pop146, $pop793
+ i64.select $push161=, $pop160, $8, $37
+ i64.select $push191=, $pop190, $pop161, $43
+ i64.select $push192=, $pop191, $16, $33
i64.store $drop=, 0($pop194), $pop192
i32.const $push235=, 112
i32.add $push236=, $0, $pop235
- i64.load $push218=, 1008($33)
- i64.load $push219=, 960($33)
+ i64.load $push218=, 1008($52)
+ i64.load $push219=, 960($52)
i64.or $push220=, $pop218, $pop219
- i64.load $push221=, 976($33)
- i64.select $push222=, $pop220, $pop221, $42
- i64.select $push223=, $pop222, $15, $34
- i64.load $push224=, 816($33)
- i64.const $push793=, 0
- i64.select $push225=, $pop224, $pop793, $46
+ i64.load $push221=, 976($52)
+ i64.select $push222=, $pop220, $pop221, $41
+ i64.select $push223=, $pop222, $15, $33
+ i64.load $push224=, 816($52)
+ i64.const $push792=, 0
+ i64.select $push225=, $pop224, $pop792, $45
i64.or $push226=, $pop223, $pop225
- i64.load $push213=, 848($33)
- i64.load $push212=, 864($33)
+ i64.load $push213=, 848($52)
+ i64.load $push212=, 864($52)
i64.or $push214=, $pop213, $pop212
- i64.load $push215=, 880($33)
- i64.select $push216=, $pop214, $pop215, $45
- i64.select $push217=, $pop216, $11, $35
- i64.select $push227=, $pop226, $pop217, $43
- i64.select $push228=, $pop227, $15, $34
- i64.load $push229=, 240($33)
- i64.const $push792=, 0
- i64.select $push230=, $pop229, $pop792, $51
+ i64.load $push215=, 880($52)
+ i64.select $push216=, $pop214, $pop215, $44
+ i64.select $push217=, $pop216, $11, $34
+ i64.select $push227=, $pop226, $pop217, $42
+ i64.select $push228=, $pop227, $15, $33
+ i64.load $push229=, 240($52)
i64.const $push791=, 0
- i64.select $push231=, $pop230, $pop791, $52
+ i64.select $push230=, $pop229, $pop791, $50
+ i64.const $push790=, 0
+ i64.select $push231=, $pop230, $pop790, $51
i64.or $push232=, $pop228, $pop231
- i64.load $push202=, 336($33)
- i64.load $push201=, 352($33)
+ i64.load $push202=, 336($52)
+ i64.load $push201=, 352($52)
i64.or $push203=, $pop202, $pop201
- i64.load $push204=, 368($33)
- i64.select $push205=, $pop203, $pop204, $48
- i64.select $push206=, $pop205, $7, $38
- i64.load $push207=, 432($33)
- i64.const $push790=, 0
- i64.select $push208=, $pop207, $pop790, $49
+ i64.load $push204=, 368($52)
+ i64.select $push205=, $pop203, $pop204, $47
+ i64.select $push206=, $pop205, $7, $37
+ i64.load $push207=, 432($52)
+ i64.const $push789=, 0
+ i64.select $push208=, $pop207, $pop789, $48
i64.or $push209=, $pop206, $pop208
- i64.load $push196=, 464($33)
- i64.load $push195=, 480($33)
+ i64.load $push196=, 464($52)
+ i64.load $push195=, 480($52)
i64.or $push197=, $pop196, $pop195
- i64.load $push198=, 496($33)
- i64.select $push199=, $pop197, $pop198, $47
- i64.select $push200=, $pop199, $3, $37
- i64.select $push210=, $pop209, $pop200, $50
- i64.select $push211=, $pop210, $7, $38
- i64.select $push233=, $pop232, $pop211, $44
- i64.select $push234=, $pop233, $15, $34
+ i64.load $push198=, 496($52)
+ i64.select $push199=, $pop197, $pop198, $46
+ i64.select $push200=, $pop199, $3, $36
+ i64.select $push210=, $pop209, $pop200, $49
+ i64.select $push211=, $pop210, $7, $37
+ i64.select $push233=, $pop232, $pop211, $43
+ i64.select $push234=, $pop233, $15, $33
i64.store $drop=, 0($pop236), $pop234
i32.const $push286=, 104
i32.add $push287=, $0, $pop286
i32.const $push673=, 992
- i32.add $push674=, $33, $pop673
- i32.const $push789=, 8
- i32.add $push256=, $pop674, $pop789
+ i32.add $push674=, $52, $pop673
+ i32.const $push788=, 8
+ i32.add $push256=, $pop674, $pop788
i64.load $push257=, 0($pop256)
- i64.const $push788=, 0
- i64.select $push258=, $pop257, $pop788, $42
+ i64.const $push787=, 0
+ i64.select $push258=, $pop257, $pop787, $41
i32.const $push667=, 768
- i32.add $push668=, $33, $pop667
- i32.const $push787=, 8
- i32.add $push247=, $pop668, $pop787
+ i32.add $push668=, $52, $pop667
+ i32.const $push786=, 8
+ i32.add $push247=, $pop668, $pop786
i64.load $push248=, 0($pop247)
i32.const $push669=, 784
- i32.add $push670=, $33, $pop669
- i32.const $push786=, 8
- i32.add $push249=, $pop670, $pop786
+ i32.add $push670=, $52, $pop669
+ i32.const $push785=, 8
+ i32.add $push249=, $pop670, $pop785
i64.load $push250=, 0($pop249)
i64.or $push251=, $pop248, $pop250
i32.const $push671=, 800
- i32.add $push672=, $33, $pop671
- i32.const $push785=, 8
- i32.add $push252=, $pop672, $pop785
+ i32.add $push672=, $52, $pop671
+ i32.const $push784=, 8
+ i32.add $push252=, $pop672, $pop784
i64.load $push253=, 0($pop252)
- i64.select $push254=, $pop251, $pop253, $46
- i64.select $push255=, $pop254, $10, $36
+ i64.select $push254=, $pop251, $pop253, $45
+ i64.select $push255=, $pop254, $10, $35
i64.or $push259=, $pop258, $pop255
i32.const $push675=, 832
- i32.add $push676=, $33, $pop675
- i32.const $push784=, 8
- i32.add $push260=, $pop676, $pop784
+ i32.add $push676=, $52, $pop675
+ i32.const $push783=, 8
+ i32.add $push260=, $pop676, $pop783
i64.load $push261=, 0($pop260)
- i64.const $push783=, 0
- i64.select $push262=, $pop261, $pop783, $45
- i64.select $push263=, $pop259, $pop262, $43
- i64.select $push264=, $pop263, $14, $34
+ i64.const $push782=, 0
+ i64.select $push262=, $pop261, $pop782, $44
+ i64.select $push263=, $pop259, $pop262, $42
+ i64.select $push264=, $pop263, $14, $33
i32.const $push661=, 192
- i32.add $push662=, $33, $pop661
- i32.const $push782=, 8
- i32.add $push237=, $pop662, $pop782
+ i32.add $push662=, $52, $pop661
+ i32.const $push781=, 8
+ i32.add $push237=, $pop662, $pop781
i64.load $push238=, 0($pop237)
i32.const $push663=, 208
- i32.add $push664=, $33, $pop663
- i32.const $push781=, 8
- i32.add $push239=, $pop664, $pop781
+ i32.add $push664=, $52, $pop663
+ i32.const $push780=, 8
+ i32.add $push239=, $pop664, $pop780
i64.load $push240=, 0($pop239)
i64.or $push241=, $pop238, $pop240
i32.const $push665=, 224
- i32.add $push666=, $33, $pop665
- i32.const $push780=, 8
- i32.add $push242=, $pop666, $pop780
+ i32.add $push666=, $52, $pop665
+ i32.const $push779=, 8
+ i32.add $push242=, $pop666, $pop779
i64.load $push243=, 0($pop242)
- i64.select $push244=, $pop241, $pop243, $51
- i64.select $push245=, $pop244, $6, $40
- i64.const $push779=, 0
- i64.select $push246=, $pop245, $pop779, $52
+ i64.select $push244=, $pop241, $pop243, $50
+ i64.select $push245=, $pop244, $6, $39
+ i64.const $push778=, 0
+ i64.select $push246=, $pop245, $pop778, $51
i64.or $push265=, $pop264, $pop246
i32.const $push683=, 320
- i32.add $push684=, $33, $pop683
- i32.const $push778=, 8
- i32.add $push275=, $pop684, $pop778
+ i32.add $push684=, $52, $pop683
+ i32.const $push777=, 8
+ i32.add $push275=, $pop684, $pop777
i64.load $push276=, 0($pop275)
- i64.const $push777=, 0
- i64.select $push277=, $pop276, $pop777, $48
+ i64.const $push776=, 0
+ i64.select $push277=, $pop276, $pop776, $47
i32.const $push677=, 384
- i32.add $push678=, $33, $pop677
- i32.const $push776=, 8
- i32.add $push266=, $pop678, $pop776
+ i32.add $push678=, $52, $pop677
+ i32.const $push775=, 8
+ i32.add $push266=, $pop678, $pop775
i64.load $push267=, 0($pop266)
i32.const $push679=, 400
- i32.add $push680=, $33, $pop679
- i32.const $push775=, 8
- i32.add $push268=, $pop680, $pop775
+ i32.add $push680=, $52, $pop679
+ i32.const $push774=, 8
+ i32.add $push268=, $pop680, $pop774
i64.load $push269=, 0($pop268)
i64.or $push270=, $pop267, $pop269
i32.const $push681=, 416
- i32.add $push682=, $33, $pop681
- i32.const $push774=, 8
- i32.add $push271=, $pop682, $pop774
+ i32.add $push682=, $52, $pop681
+ i32.const $push773=, 8
+ i32.add $push271=, $pop682, $pop773
i64.load $push272=, 0($pop271)
- i64.select $push273=, $pop270, $pop272, $49
- i64.select $push274=, $pop273, $2, $39
+ i64.select $push273=, $pop270, $pop272, $48
+ i64.select $push274=, $pop273, $2, $38
i64.or $push278=, $pop277, $pop274
i32.const $push685=, 448
- i32.add $push686=, $33, $pop685
- i32.const $push773=, 8
- i32.add $push279=, $pop686, $pop773
+ i32.add $push686=, $52, $pop685
+ i32.const $push772=, 8
+ i32.add $push279=, $pop686, $pop772
i64.load $push280=, 0($pop279)
- i64.const $push772=, 0
- i64.select $push281=, $pop280, $pop772, $47
- i64.select $push282=, $pop278, $pop281, $50
- i64.select $push283=, $pop282, $6, $38
- i64.select $push284=, $pop265, $pop283, $44
- i64.select $push285=, $pop284, $14, $34
+ i64.const $push771=, 0
+ i64.select $push281=, $pop280, $pop771, $46
+ i64.select $push282=, $pop278, $pop281, $49
+ i64.select $push283=, $pop282, $6, $37
+ i64.select $push284=, $pop265, $pop283, $43
+ i64.select $push285=, $pop284, $14, $33
i64.store $drop=, 0($pop287), $pop285
i32.const $push324=, 96
i32.add $push325=, $0, $pop324
- i64.load $push301=, 992($33)
- i64.const $push771=, 0
- i64.select $push302=, $pop301, $pop771, $42
- i64.load $push295=, 768($33)
- i64.load $push296=, 784($33)
+ i64.load $push301=, 992($52)
+ i64.const $push770=, 0
+ i64.select $push302=, $pop301, $pop770, $41
+ i64.load $push295=, 768($52)
+ i64.load $push296=, 784($52)
i64.or $push297=, $pop295, $pop296
- i64.load $push298=, 800($33)
- i64.select $push299=, $pop297, $pop298, $46
- i64.select $push300=, $pop299, $9, $36
+ i64.load $push298=, 800($52)
+ i64.select $push299=, $pop297, $pop298, $45
+ i64.select $push300=, $pop299, $9, $35
i64.or $push303=, $pop302, $pop300
- i64.load $push304=, 832($33)
- i64.const $push770=, 0
- i64.select $push305=, $pop304, $pop770, $45
- i64.select $push306=, $pop303, $pop305, $43
- i64.select $push307=, $pop306, $13, $34
- i64.load $push288=, 192($33)
- i64.load $push289=, 208($33)
- i64.or $push290=, $pop288, $pop289
- i64.load $push291=, 224($33)
- i64.select $push292=, $pop290, $pop291, $51
- i64.select $push293=, $pop292, $5, $40
+ i64.load $push304=, 832($52)
i64.const $push769=, 0
- i64.select $push294=, $pop293, $pop769, $52
- i64.or $push308=, $pop307, $pop294
- i64.load $push315=, 320($33)
+ i64.select $push305=, $pop304, $pop769, $44
+ i64.select $push306=, $pop303, $pop305, $42
+ i64.select $push307=, $pop306, $13, $33
+ i64.load $push288=, 192($52)
+ i64.load $push289=, 208($52)
+ i64.or $push290=, $pop288, $pop289
+ i64.load $push291=, 224($52)
+ i64.select $push292=, $pop290, $pop291, $50
+ i64.select $push293=, $pop292, $5, $39
i64.const $push768=, 0
- i64.select $push316=, $pop315, $pop768, $48
- i64.load $push309=, 384($33)
- i64.load $push310=, 400($33)
+ i64.select $push294=, $pop293, $pop768, $51
+ i64.or $push308=, $pop307, $pop294
+ i64.load $push315=, 320($52)
+ i64.const $push767=, 0
+ i64.select $push316=, $pop315, $pop767, $47
+ i64.load $push309=, 384($52)
+ i64.load $push310=, 400($52)
i64.or $push311=, $pop309, $pop310
- i64.load $push312=, 416($33)
- i64.select $push313=, $pop311, $pop312, $49
- i64.select $push314=, $pop313, $1, $39
+ i64.load $push312=, 416($52)
+ i64.select $push313=, $pop311, $pop312, $48
+ i64.select $push314=, $pop313, $1, $38
i64.or $push317=, $pop316, $pop314
- i64.load $push318=, 448($33)
- i64.const $push767=, 0
- i64.select $push319=, $pop318, $pop767, $47
- i64.select $push320=, $pop317, $pop319, $50
- i64.select $push321=, $pop320, $5, $38
- i64.select $push322=, $pop308, $pop321, $44
- i64.select $push323=, $pop322, $13, $34
+ i64.load $push318=, 448($52)
+ i64.const $push766=, 0
+ i64.select $push319=, $pop318, $pop766, $46
+ i64.select $push320=, $pop317, $pop319, $49
+ i64.select $push321=, $pop320, $5, $37
+ i64.select $push322=, $pop308, $pop321, $43
+ i64.select $push323=, $pop322, $13, $33
i64.store $drop=, 0($pop325), $pop323
i32.const $push361=, 72
i32.add $push362=, $0, $pop361
i32.const $push699=, 896
- i32.add $push700=, $33, $pop699
- i32.const $push766=, 8
- i32.add $push350=, $pop700, $pop766
+ i32.add $push700=, $52, $pop699
+ i32.const $push765=, 8
+ i32.add $push350=, $pop700, $pop765
i64.load $push351=, 0($pop350)
- i64.const $push765=, 0
- i64.select $push352=, $pop351, $pop765, $42
i64.const $push764=, 0
- i64.select $push353=, $pop352, $pop764, $43
- i32.const $push763=, 8
- i32.add $push335=, $33, $pop763
+ i64.select $push352=, $pop351, $pop764, $41
+ i64.const $push763=, 0
+ i64.select $push353=, $pop352, $pop763, $42
+ i32.const $push762=, 8
+ i32.add $push335=, $52, $pop762
i64.load $push336=, 0($pop335)
i32.const $push693=, 16
- i32.add $push694=, $33, $pop693
- i32.const $push762=, 8
- i32.add $push337=, $pop694, $pop762
+ i32.add $push694=, $52, $pop693
+ i32.const $push761=, 8
+ i32.add $push337=, $pop694, $pop761
i64.load $push338=, 0($pop337)
i64.or $push339=, $pop336, $pop338
i32.const $push695=, 32
- i32.add $push696=, $33, $pop695
- i32.const $push761=, 8
- i32.add $push340=, $pop696, $pop761
+ i32.add $push696=, $52, $pop695
+ i32.const $push760=, 8
+ i32.add $push340=, $pop696, $pop760
i64.load $push341=, 0($pop340)
- i64.select $push342=, $pop339, $pop341, $51
- i64.select $push343=, $pop342, $2, $40
+ i64.select $push342=, $pop339, $pop341, $50
+ i64.select $push343=, $pop342, $2, $39
i32.const $push697=, 64
- i32.add $push698=, $33, $pop697
- i32.const $push760=, 8
- i32.add $push344=, $pop698, $pop760
+ i32.add $push698=, $52, $pop697
+ i32.const $push759=, 8
+ i32.add $push344=, $pop698, $pop759
i64.load $push345=, 0($pop344)
- i64.const $push759=, 0
- i32.const $push758=, 128
- i32.lt_u $push757=, $41, $pop758
- tee_local $push756=, $35=, $pop757
- i64.select $push346=, $pop345, $pop759, $pop756
+ i64.const $push758=, 0
+ i32.const $push757=, 128
+ i32.lt_u $push756=, $40, $pop757
+ tee_local $push755=, $34=, $pop756
+ i64.select $push346=, $pop345, $pop758, $pop755
i64.or $push347=, $pop343, $pop346
i32.const $push687=, 128
- i32.add $push688=, $33, $pop687
- i32.const $push755=, 8
- i32.add $push326=, $pop688, $pop755
+ i32.add $push688=, $52, $pop687
+ i32.const $push754=, 8
+ i32.add $push326=, $pop688, $pop754
i64.load $push327=, 0($pop326)
i32.const $push689=, 144
- i32.add $push690=, $33, $pop689
- i32.const $push754=, 8
- i32.add $push328=, $pop690, $pop754
+ i32.add $push690=, $52, $pop689
+ i32.const $push753=, 8
+ i32.add $push328=, $pop690, $pop753
i64.load $push329=, 0($pop328)
i64.or $push330=, $pop327, $pop329
i32.const $push691=, 160
- i32.add $push692=, $33, $pop691
- i32.const $push753=, 8
- i32.add $push331=, $pop692, $pop753
+ i32.add $push692=, $52, $pop691
+ i32.const $push752=, 8
+ i32.add $push331=, $pop692, $pop752
i64.load $push332=, 0($pop331)
- i64.select $push333=, $pop330, $pop332, $46
- i64.select $push334=, $pop333, $6, $36
- i64.select $push348=, $pop347, $pop334, $52
- i64.select $push349=, $pop348, $2, $40
+ i64.select $push333=, $pop330, $pop332, $45
+ i64.select $push334=, $pop333, $6, $35
+ i64.select $push348=, $pop347, $pop334, $51
+ i64.select $push349=, $pop348, $2, $39
i64.or $push354=, $pop353, $pop349
i32.const $push701=, 256
- i32.add $push702=, $33, $pop701
- i32.const $push752=, 8
- i32.add $push355=, $pop702, $pop752
+ i32.add $push702=, $52, $pop701
+ i32.const $push751=, 8
+ i32.add $push355=, $pop702, $pop751
i64.load $push356=, 0($pop355)
- i64.const $push751=, 0
- i64.select $push357=, $pop356, $pop751, $48
i64.const $push750=, 0
- i64.select $push358=, $pop357, $pop750, $50
- i64.select $push359=, $pop354, $pop358, $44
- i64.select $push360=, $pop359, $10, $34
+ i64.select $push357=, $pop356, $pop750, $47
+ i64.const $push749=, 0
+ i64.select $push358=, $pop357, $pop749, $49
+ i64.select $push359=, $pop354, $pop358, $43
+ i64.select $push360=, $pop359, $10, $33
i64.store $drop=, 0($pop362), $pop360
i32.const $push389=, 64
i32.add $push390=, $0, $pop389
- i64.load $push380=, 896($33)
- i64.const $push749=, 0
- i64.select $push381=, $pop380, $pop749, $42
+ i64.load $push380=, 896($52)
i64.const $push748=, 0
- i64.select $push382=, $pop381, $pop748, $43
- i64.load $push369=, 0($33)
- i64.load $push370=, 16($33)
- i64.or $push371=, $pop369, $pop370
- i64.load $push372=, 32($33)
- i64.select $push373=, $pop371, $pop372, $51
- i64.select $push374=, $pop373, $1, $40
- i64.load $push375=, 64($33)
+ i64.select $push381=, $pop380, $pop748, $41
i64.const $push747=, 0
- i64.select $push376=, $pop375, $pop747, $35
+ i64.select $push382=, $pop381, $pop747, $42
+ i64.load $push369=, 0($52)
+ i64.load $push370=, 16($52)
+ i64.or $push371=, $pop369, $pop370
+ i64.load $push372=, 32($52)
+ i64.select $push373=, $pop371, $pop372, $50
+ i64.select $push374=, $pop373, $1, $39
+ i64.load $push375=, 64($52)
+ i64.const $push746=, 0
+ i64.select $push376=, $pop375, $pop746, $34
i64.or $push377=, $pop374, $pop376
- i64.load $push363=, 128($33)
- i64.load $push364=, 144($33)
+ i64.load $push363=, 128($52)
+ i64.load $push364=, 144($52)
i64.or $push365=, $pop363, $pop364
- i64.load $push366=, 160($33)
- i64.select $push367=, $pop365, $pop366, $46
- i64.select $push368=, $pop367, $5, $36
- i64.select $push378=, $pop377, $pop368, $52
- i64.select $push379=, $pop378, $1, $40
+ i64.load $push366=, 160($52)
+ i64.select $push367=, $pop365, $pop366, $45
+ i64.select $push368=, $pop367, $5, $35
+ i64.select $push378=, $pop377, $pop368, $51
+ i64.select $push379=, $pop378, $1, $39
i64.or $push383=, $pop382, $pop379
- i64.load $push384=, 256($33)
- i64.const $push746=, 0
- i64.select $push385=, $pop384, $pop746, $48
+ i64.load $push384=, 256($52)
i64.const $push745=, 0
- i64.select $push386=, $pop385, $pop745, $50
- i64.select $push387=, $pop383, $pop386, $44
- i64.select $push388=, $pop387, $9, $34
+ i64.select $push385=, $pop384, $pop745, $47
+ i64.const $push744=, 0
+ i64.select $push386=, $pop385, $pop744, $49
+ i64.select $push387=, $pop383, $pop386, $43
+ i64.select $push388=, $pop387, $9, $33
i64.store $drop=, 0($pop390), $pop388
i32.const $push432=, 88
i32.add $push433=, $0, $pop432
i32.const $push703=, 912
- i32.add $push704=, $33, $pop703
- i32.const $push744=, 8
- i32.add $push391=, $pop704, $pop744
+ i32.add $push704=, $52, $pop703
+ i32.const $push743=, 8
+ i32.add $push391=, $pop704, $pop743
i64.load $push392=, 0($pop391)
i32.const $push705=, 928
- i32.add $push706=, $33, $pop705
- i32.const $push743=, 8
- i32.add $push393=, $pop706, $pop743
+ i32.add $push706=, $52, $pop705
+ i32.const $push742=, 8
+ i32.add $push393=, $pop706, $pop742
i64.load $push394=, 0($pop393)
i64.or $push395=, $pop392, $pop394
i32.const $push707=, 944
- i32.add $push708=, $33, $pop707
- i32.const $push742=, 8
- i32.add $push396=, $pop708, $pop742
+ i32.add $push708=, $52, $pop707
+ i32.const $push741=, 8
+ i32.add $push396=, $pop708, $pop741
i64.load $push397=, 0($pop396)
- i64.select $push398=, $pop395, $pop397, $42
- i64.select $push399=, $pop398, $12, $34
- i64.const $push741=, 0
- i64.select $push400=, $pop399, $pop741, $43
+ i64.select $push398=, $pop395, $pop397, $41
+ i64.select $push399=, $pop398, $12, $33
+ i64.const $push740=, 0
+ i64.select $push400=, $pop399, $pop740, $42
i32.const $push715=, 48
- i32.add $push716=, $33, $pop715
- i32.const $push740=, 8
- i32.add $push410=, $pop716, $pop740
+ i32.add $push716=, $52, $pop715
+ i32.const $push739=, 8
+ i32.add $push410=, $pop716, $pop739
i64.load $push411=, 0($pop410)
- i64.const $push739=, 0
- i64.select $push412=, $pop411, $pop739, $51
+ i64.const $push738=, 0
+ i64.select $push412=, $pop411, $pop738, $50
i32.const $push709=, 80
- i32.add $push710=, $33, $pop709
- i32.const $push738=, 8
- i32.add $push401=, $pop710, $pop738
+ i32.add $push710=, $52, $pop709
+ i32.const $push737=, 8
+ i32.add $push401=, $pop710, $pop737
i64.load $push402=, 0($pop401)
i32.const $push711=, 96
- i32.add $push712=, $33, $pop711
- i32.const $push737=, 8
- i32.add $push403=, $pop712, $pop737
+ i32.add $push712=, $52, $pop711
+ i32.const $push736=, 8
+ i32.add $push403=, $pop712, $pop736
i64.load $push404=, 0($pop403)
i64.or $push405=, $pop402, $pop404
i32.const $push713=, 112
- i32.add $push714=, $33, $pop713
- i32.const $push736=, 8
- i32.add $push406=, $pop714, $pop736
+ i32.add $push714=, $52, $pop713
+ i32.const $push735=, 8
+ i32.add $push406=, $pop714, $pop735
i64.load $push407=, 0($pop406)
- i64.select $push408=, $pop405, $pop407, $35
- i64.select $push409=, $pop408, $8, $41
+ i64.select $push408=, $pop405, $pop407, $34
+ i64.select $push409=, $pop408, $8, $40
i64.or $push413=, $pop412, $pop409
i32.const $push717=, 176
- i32.add $push718=, $33, $pop717
- i32.const $push735=, 8
- i32.add $push414=, $pop718, $pop735
+ i32.add $push718=, $52, $pop717
+ i32.const $push734=, 8
+ i32.add $push414=, $pop718, $pop734
i64.load $push415=, 0($pop414)
- i64.const $push734=, 0
- i64.select $push416=, $pop415, $pop734, $46
- i64.select $push417=, $pop413, $pop416, $52
- i64.select $push418=, $pop417, $4, $40
+ i64.const $push733=, 0
+ i64.select $push416=, $pop415, $pop733, $45
+ i64.select $push417=, $pop413, $pop416, $51
+ i64.select $push418=, $pop417, $4, $39
i64.or $push419=, $pop400, $pop418
i32.const $push721=, 272
- i32.add $push722=, $33, $pop721
- i32.const $push733=, 8
- i32.add $push422=, $pop722, $pop733
+ i32.add $push722=, $52, $pop721
+ i32.const $push732=, 8
+ i32.add $push422=, $pop722, $pop732
i64.load $push423=, 0($pop422)
i32.const $push719=, 288
- i32.add $push720=, $33, $pop719
- i32.const $push732=, 8
- i32.add $push420=, $pop720, $pop732
+ i32.add $push720=, $52, $pop719
+ i32.const $push731=, 8
+ i32.add $push420=, $pop720, $pop731
i64.load $push421=, 0($pop420)
i64.or $push424=, $pop423, $pop421
i32.const $push723=, 304
- i32.add $push724=, $33, $pop723
- i32.const $push731=, 8
- i32.add $push425=, $pop724, $pop731
+ i32.add $push724=, $52, $pop723
+ i32.const $push730=, 8
+ i32.add $push425=, $pop724, $pop730
i64.load $push426=, 0($pop425)
- i64.select $push427=, $pop424, $pop426, $48
- i64.select $push428=, $pop427, $4, $38
- i64.const $push730=, 0
- i64.select $push429=, $pop428, $pop730, $50
- i64.select $push430=, $pop419, $pop429, $44
- i64.select $push431=, $pop430, $12, $34
+ i64.select $push427=, $pop424, $pop426, $47
+ i64.select $push428=, $pop427, $4, $37
+ i64.const $push729=, 0
+ i64.select $push429=, $pop428, $pop729, $49
+ i64.select $push430=, $pop419, $pop429, $43
+ i64.select $push431=, $pop430, $12, $33
i64.store $drop=, 0($pop433), $pop431
i32.const $push464=, 80
i32.add $push465=, $0, $pop464
- i64.load $push434=, 912($33)
- i64.load $push435=, 928($33)
+ i64.load $push434=, 912($52)
+ i64.load $push435=, 928($52)
i64.or $push436=, $pop434, $pop435
- i64.load $push437=, 944($33)
- i64.select $push438=, $pop436, $pop437, $42
- i64.select $push439=, $pop438, $11, $34
- i64.const $push729=, 0
- i64.select $push440=, $pop439, $pop729, $43
- i64.load $push447=, 48($33)
+ i64.load $push437=, 944($52)
+ i64.select $push438=, $pop436, $pop437, $41
+ i64.select $push439=, $pop438, $11, $33
i64.const $push728=, 0
- i64.select $push448=, $pop447, $pop728, $51
- i64.load $push441=, 80($33)
- i64.load $push442=, 96($33)
+ i64.select $push440=, $pop439, $pop728, $42
+ i64.load $push447=, 48($52)
+ i64.const $push727=, 0
+ i64.select $push448=, $pop447, $pop727, $50
+ i64.load $push441=, 80($52)
+ i64.load $push442=, 96($52)
i64.or $push443=, $pop441, $pop442
- i64.load $push444=, 112($33)
- i64.select $push445=, $pop443, $pop444, $35
- i64.select $push446=, $pop445, $7, $41
+ i64.load $push444=, 112($52)
+ i64.select $push445=, $pop443, $pop444, $34
+ i64.select $push446=, $pop445, $7, $40
i64.or $push449=, $pop448, $pop446
- i64.load $push450=, 176($33)
- i64.const $push727=, 0
- i64.select $push451=, $pop450, $pop727, $46
- i64.select $push452=, $pop449, $pop451, $52
- i64.select $push453=, $pop452, $3, $40
+ i64.load $push450=, 176($52)
+ i64.const $push726=, 0
+ i64.select $push451=, $pop450, $pop726, $45
+ i64.select $push452=, $pop449, $pop451, $51
+ i64.select $push453=, $pop452, $3, $39
i64.or $push454=, $pop440, $pop453
- i64.load $push456=, 272($33)
- i64.load $push455=, 288($33)
+ i64.load $push456=, 272($52)
+ i64.load $push455=, 288($52)
i64.or $push457=, $pop456, $pop455
- i64.load $push458=, 304($33)
- i64.select $push459=, $pop457, $pop458, $48
- i64.select $push460=, $pop459, $3, $38
- i64.const $push726=, 0
- i64.select $push461=, $pop460, $pop726, $50
- i64.select $push462=, $pop454, $pop461, $44
- i64.select $push463=, $pop462, $11, $34
+ i64.load $push458=, 304($52)
+ i64.select $push459=, $pop457, $pop458, $47
+ i64.select $push460=, $pop459, $3, $37
+ i64.const $push725=, 0
+ i64.select $push461=, $pop460, $pop725, $49
+ i64.select $push462=, $pop454, $pop461, $43
+ i64.select $push463=, $pop462, $11, $33
i64.store $drop=, 0($pop465), $pop463
- i32.const $push472=, __stack_pointer
+ i32.const $push472=, 0
i32.const $push470=, 1024
- i32.add $push471=, $33, $pop470
- i32.store $drop=, 0($pop472), $pop471
+ i32.add $push471=, $52, $pop470
+ i32.store $drop=, __stack_pointer($pop472), $pop471
return
.endfunc
.Lfunc_end5:
diff --git a/test/llvm_autogenerated/legalize.wast b/test/llvm_autogenerated/legalize.wast
index 37c487a3e..5ef162889 100644
--- a/test/llvm_autogenerated/legalize.wast
+++ b/test/llvm_autogenerated/legalize.wast
@@ -1,23 +1,17 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
(type $FUNCSIG$vijji (func (param i32 i64 i64 i32)))
- (type $1 (func (param i32 i32 i32) (result i32)))
- (type $2 (func (param i64 i64 i32) (result i64)))
- (type $3 (func (param i64) (result i64)))
- (type $4 (func (param i32) (result f64)))
- (type $5 (func (param i32) (result f32)))
- (type $6 (func (param i32 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64)))
- (import $__ashlti3 "env" "__ashlti3" (param i32 i64 i64 i32))
- (import $__lshrti3 "env" "__lshrti3" (param i32 i64 i64 i32))
- (export "shl_i3" $shl_i3)
- (export "shl_i53" $shl_i53)
- (export "sext_in_reg_i32_i64" $sext_in_reg_i32_i64)
- (export "fpext_f32_f64" $fpext_f32_f64)
- (export "fpconv_f64_f32" $fpconv_f64_f32)
- (export "bigshift" $bigshift)
- (func $shl_i3 (type $1) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (import "env" "__ashlti3" (func $__ashlti3 (param i32 i64 i64 i32)))
+ (import "env" "__lshrti3" (func $__lshrti3 (param i32 i64 i64 i32)))
+ (export "memory" (memory $0))
+ (export "shl_i3" (func $shl_i3))
+ (export "shl_i53" (func $shl_i53))
+ (export "sext_in_reg_i32_i64" (func $sext_in_reg_i32_i64))
+ (export "fpext_f32_f64" (func $fpext_f32_f64))
+ (export "fpconv_f64_f32" (func $fpconv_f64_f32))
+ (export "bigshift" (func $bigshift))
+ (func $shl_i3 (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(return
(i32.shl
(get_local $0)
@@ -28,7 +22,7 @@
)
)
)
- (func $shl_i53 (type $2) (param $0 i64) (param $1 i64) (param $2 i32) (result i64)
+ (func $shl_i53 (param $0 i64) (param $1 i64) (param $2 i32) (result i64)
(return
(i64.shl
(get_local $0)
@@ -39,7 +33,7 @@
)
)
)
- (func $sext_in_reg_i32_i64 (type $3) (param $0 i64) (result i64)
+ (func $sext_in_reg_i32_i64 (param $0 i64) (result i64)
(return
(i64.shr_s
(i64.shl
@@ -50,7 +44,7 @@
)
)
)
- (func $fpext_f32_f64 (type $4) (param $0 i32) (result f64)
+ (func $fpext_f32_f64 (param $0 i32) (result f64)
(return
(f64.promote/f32
(f32.load
@@ -59,7 +53,7 @@
)
)
)
- (func $fpconv_f64_f32 (type $5) (param $0 i32) (result f32)
+ (func $fpconv_f64_f32 (param $0 i32) (result f32)
(return
(f32.demote/f64
(f64.load
@@ -68,7 +62,7 @@
)
)
)
- (func $bigshift (type $6) (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) (param $6 i64) (param $7 i64) (param $8 i64) (param $9 i64) (param $10 i64) (param $11 i64) (param $12 i64) (param $13 i64) (param $14 i64) (param $15 i64) (param $16 i64) (param $17 i64) (param $18 i64) (param $19 i64) (param $20 i64) (param $21 i64) (param $22 i64) (param $23 i64) (param $24 i64) (param $25 i64) (param $26 i64) (param $27 i64) (param $28 i64) (param $29 i64) (param $30 i64) (param $31 i64) (param $32 i64)
+ (func $bigshift (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) (param $6 i64) (param $7 i64) (param $8 i64) (param $9 i64) (param $10 i64) (param $11 i64) (param $12 i64) (param $13 i64) (param $14 i64) (param $15 i64) (param $16 i64) (param $17 i64) (param $18 i64) (param $19 i64) (param $20 i64) (param $21 i64) (param $22 i64) (param $23 i64) (param $24 i64) (param $25 i64) (param $26 i64) (param $27 i64) (param $28 i64) (param $29 i64) (param $30 i64) (param $31 i64) (param $32 i64)
(local $33 i32)
(local $34 i32)
(local $35 i32)
@@ -89,741 +83,869 @@
(local $50 i32)
(local $51 i32)
(local $52 i32)
- (local $53 i32)
- (call_import $__ashlti3
- (i32.add
- (tee_local $33
- (block
- (block
- (set_local $53
- (i32.sub
- (i32.load
- (i32.const 4)
- )
- (i32.const 1024)
- )
- )
- (i32.store
- (i32.const 4)
- (get_local $53)
- )
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (tee_local $52
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
)
- (get_local $53)
+ (i32.const 1024)
)
)
- (i32.const 512)
)
- (get_local $1)
- (get_local $2)
- (tee_local $34
- (i32.wrap/i64
- (get_local $17)
+ )
+ (drop
+ (call_import $__ashlti3
+ (i32.add
+ (get_local $52)
+ (i32.const 512)
+ )
+ (get_local $1)
+ (get_local $2)
+ (tee_local $33
+ (i32.wrap/i64
+ (get_local $17)
+ )
)
)
)
- (call_import $__ashlti3
- (i32.add
+ (drop
+ (call_import $__ashlti3
+ (i32.add
+ (get_local $52)
+ (i32.const 528)
+ )
+ (get_local $3)
+ (get_local $4)
(get_local $33)
- (i32.const 528)
)
- (get_local $3)
- (get_local $4)
- (get_local $34)
)
- (call_import $__lshrti3
- (i32.add
- (get_local $33)
- (i32.const 544)
- )
- (get_local $1)
- (get_local $2)
- (tee_local $42
- (i32.sub
- (i32.const 128)
- (get_local $34)
+ (drop
+ (call_import $__lshrti3
+ (i32.add
+ (get_local $52)
+ (i32.const 544)
+ )
+ (get_local $1)
+ (get_local $2)
+ (tee_local $41
+ (i32.sub
+ (i32.const 128)
+ (get_local $33)
+ )
)
)
)
- (call_import $__ashlti3
- (i32.add
- (get_local $33)
- (i32.const 560)
- )
- (get_local $1)
- (get_local $2)
- (tee_local $43
+ (drop
+ (call_import $__ashlti3
(i32.add
- (get_local $34)
- (i32.const -128)
+ (get_local $52)
+ (i32.const 560)
)
- )
- )
- (call_import $__lshrti3
- (i32.add
- (get_local $33)
- (i32.const 736)
- )
- (get_local $1)
- (get_local $2)
- (tee_local $44
- (i32.sub
- (i32.const 384)
- (get_local $34)
+ (get_local $1)
+ (get_local $2)
+ (tee_local $42
+ (i32.add
+ (get_local $33)
+ (i32.const -128)
+ )
)
)
)
- (call_import $__ashlti3
- (i32.add
- (get_local $33)
- (i32.const 720)
- )
- (get_local $3)
- (get_local $4)
- (tee_local $35
+ (drop
+ (call_import $__lshrti3
(i32.add
- (get_local $34)
- (i32.const -256)
+ (get_local $52)
+ (i32.const 736)
+ )
+ (get_local $1)
+ (get_local $2)
+ (tee_local $43
+ (i32.sub
+ (i32.const 384)
+ (get_local $33)
+ )
)
)
)
- (call_import $__ashlti3
- (i32.add
- (get_local $33)
- (i32.const 752)
- )
- (get_local $1)
- (get_local $2)
- (tee_local $40
+ (drop
+ (call_import $__ashlti3
(i32.add
- (get_local $34)
- (i32.const -384)
+ (get_local $52)
+ (i32.const 720)
+ )
+ (get_local $3)
+ (get_local $4)
+ (tee_local $34
+ (i32.add
+ (get_local $33)
+ (i32.const -256)
+ )
)
)
)
- (call_import $__ashlti3
- (i32.add
- (get_local $33)
- (i32.const 592)
+ (drop
+ (call_import $__ashlti3
+ (i32.add
+ (get_local $52)
+ (i32.const 752)
+ )
+ (get_local $1)
+ (get_local $2)
+ (tee_local $39
+ (i32.add
+ (get_local $33)
+ (i32.const -384)
+ )
+ )
)
- (get_local $7)
- (get_local $8)
- (get_local $34)
)
- (call_import $__lshrti3
- (i32.add
+ (drop
+ (call_import $__ashlti3
+ (i32.add
+ (get_local $52)
+ (i32.const 592)
+ )
+ (get_local $7)
+ (get_local $8)
(get_local $33)
- (i32.const 608)
)
- (get_local $5)
- (get_local $6)
- (get_local $42)
)
- (call_import $__ashlti3
- (i32.add
- (get_local $33)
- (i32.const 624)
+ (drop
+ (call_import $__lshrti3
+ (i32.add
+ (get_local $52)
+ (i32.const 608)
+ )
+ (get_local $5)
+ (get_local $6)
+ (get_local $41)
)
- (get_local $5)
- (get_local $6)
- (get_local $43)
)
- (call_import $__lshrti3
- (i32.add
- (get_local $33)
- (i32.const 688)
- )
- (get_local $3)
- (get_local $4)
- (tee_local $36
- (i32.sub
- (i32.const 256)
- (get_local $34)
+ (drop
+ (call_import $__ashlti3
+ (i32.add
+ (get_local $52)
+ (i32.const 624)
)
+ (get_local $5)
+ (get_local $6)
+ (get_local $42)
)
)
- (call_import $__lshrti3
- (i32.add
- (get_local $33)
- (i32.const 640)
+ (drop
+ (call_import $__lshrti3
+ (i32.add
+ (get_local $52)
+ (i32.const 688)
+ )
+ (get_local $3)
+ (get_local $4)
+ (tee_local $35
+ (i32.sub
+ (i32.const 256)
+ (get_local $33)
+ )
+ )
)
- (get_local $1)
- (get_local $2)
- (get_local $36)
)
- (call_import $__ashlti3
- (i32.add
- (get_local $33)
- (i32.const 656)
- )
- (get_local $3)
- (get_local $4)
- (tee_local $51
- (i32.sub
- (i32.const 128)
- (get_local $36)
+ (drop
+ (call_import $__lshrti3
+ (i32.add
+ (get_local $52)
+ (i32.const 640)
)
+ (get_local $1)
+ (get_local $2)
+ (get_local $35)
)
)
- (call_import $__lshrti3
- (i32.add
- (get_local $33)
- (i32.const 672)
+ (drop
+ (call_import $__ashlti3
+ (i32.add
+ (get_local $52)
+ (i32.const 656)
+ )
+ (get_local $3)
+ (get_local $4)
+ (tee_local $50
+ (i32.sub
+ (i32.const 128)
+ (get_local $35)
+ )
+ )
)
- (get_local $3)
- (get_local $4)
- (get_local $42)
)
- (call_import $__ashlti3
- (i32.add
- (get_local $33)
- (i32.const 576)
+ (drop
+ (call_import $__lshrti3
+ (i32.add
+ (get_local $52)
+ (i32.const 672)
+ )
+ (get_local $3)
+ (get_local $4)
+ (get_local $41)
)
- (get_local $5)
- (get_local $6)
- (get_local $34)
)
- (call_import $__ashlti3
- (i32.add
+ (drop
+ (call_import $__ashlti3
+ (i32.add
+ (get_local $52)
+ (i32.const 576)
+ )
+ (get_local $5)
+ (get_local $6)
(get_local $33)
- (i32.const 704)
)
- (get_local $1)
- (get_local $2)
- (get_local $35)
)
- (call_import $__lshrti3
- (i32.add
- (get_local $33)
- (i32.const 480)
- )
- (get_local $1)
- (get_local $2)
- (i32.sub
- (i32.const 896)
+ (drop
+ (call_import $__ashlti3
+ (i32.add
+ (get_local $52)
+ (i32.const 704)
+ )
+ (get_local $1)
+ (get_local $2)
(get_local $34)
)
)
- (call_import $__ashlti3
- (i32.add
- (get_local $33)
- (i32.const 464)
- )
- (get_local $3)
- (get_local $4)
- (tee_local $37
+ (drop
+ (call_import $__lshrti3
(i32.add
- (get_local $34)
- (i32.const -768)
+ (get_local $52)
+ (i32.const 480)
+ )
+ (get_local $1)
+ (get_local $2)
+ (i32.sub
+ (i32.const 896)
+ (get_local $33)
)
)
)
- (call_import $__ashlti3
- (i32.add
- (get_local $33)
- (i32.const 496)
- )
- (get_local $1)
- (get_local $2)
- (i32.add
- (get_local $34)
- (i32.const -896)
+ (drop
+ (call_import $__ashlti3
+ (i32.add
+ (get_local $52)
+ (i32.const 464)
+ )
+ (get_local $3)
+ (get_local $4)
+ (tee_local $36
+ (i32.add
+ (get_local $33)
+ (i32.const -768)
+ )
+ )
)
)
- (call_import $__lshrti3
- (i32.add
- (get_local $33)
- (i32.const 352)
- )
- (get_local $5)
- (get_local $6)
- (tee_local $46
- (i32.sub
- (i32.const 640)
- (get_local $34)
+ (drop
+ (call_import $__ashlti3
+ (i32.add
+ (get_local $52)
+ (i32.const 496)
+ )
+ (get_local $1)
+ (get_local $2)
+ (i32.add
+ (get_local $33)
+ (i32.const -896)
)
)
)
- (call_import $__ashlti3
- (i32.add
- (get_local $33)
- (i32.const 336)
- )
- (get_local $7)
- (get_local $8)
- (tee_local $38
+ (drop
+ (call_import $__lshrti3
(i32.add
- (get_local $34)
- (i32.const -512)
+ (get_local $52)
+ (i32.const 352)
+ )
+ (get_local $5)
+ (get_local $6)
+ (tee_local $45
+ (i32.sub
+ (i32.const 640)
+ (get_local $33)
+ )
)
)
)
- (call_import $__ashlti3
- (i32.add
- (get_local $33)
- (i32.const 368)
- )
- (get_local $5)
- (get_local $6)
- (tee_local $52
+ (drop
+ (call_import $__ashlti3
(i32.add
- (get_local $34)
- (i32.const -640)
+ (get_local $52)
+ (i32.const 336)
+ )
+ (get_local $7)
+ (get_local $8)
+ (tee_local $37
+ (i32.add
+ (get_local $33)
+ (i32.const -512)
+ )
)
)
)
- (call_import $__lshrti3
- (i32.add
- (get_local $33)
- (i32.const 432)
- )
- (get_local $3)
- (get_local $4)
- (tee_local $39
- (i32.sub
- (i32.const 768)
- (get_local $34)
+ (drop
+ (call_import $__ashlti3
+ (i32.add
+ (get_local $52)
+ (i32.const 368)
+ )
+ (get_local $5)
+ (get_local $6)
+ (tee_local $51
+ (i32.add
+ (get_local $33)
+ (i32.const -640)
+ )
)
)
)
- (call_import $__lshrti3
- (i32.add
- (get_local $33)
- (i32.const 864)
+ (drop
+ (call_import $__lshrti3
+ (i32.add
+ (get_local $52)
+ (i32.const 432)
+ )
+ (get_local $3)
+ (get_local $4)
+ (tee_local $38
+ (i32.sub
+ (i32.const 768)
+ (get_local $33)
+ )
+ )
)
- (get_local $9)
- (get_local $10)
- (get_local $44)
)
- (call_import $__ashlti3
- (i32.add
- (get_local $33)
- (i32.const 848)
+ (drop
+ (call_import $__lshrti3
+ (i32.add
+ (get_local $52)
+ (i32.const 864)
+ )
+ (get_local $9)
+ (get_local $10)
+ (get_local $43)
)
- (get_local $11)
- (get_local $12)
- (get_local $35)
)
- (call_import $__ashlti3
- (i32.add
- (get_local $33)
- (i32.const 880)
+ (drop
+ (call_import $__ashlti3
+ (i32.add
+ (get_local $52)
+ (i32.const 848)
+ )
+ (get_local $11)
+ (get_local $12)
+ (get_local $34)
)
- (get_local $9)
- (get_local $10)
- (get_local $40)
)
- (call_import $__ashlti3
- (i32.add
- (get_local $33)
- (i32.const 1008)
+ (drop
+ (call_import $__ashlti3
+ (i32.add
+ (get_local $52)
+ (i32.const 880)
+ )
+ (get_local $9)
+ (get_local $10)
+ (get_local $39)
)
- (get_local $15)
- (get_local $16)
- (get_local $34)
)
- (call_import $__lshrti3
- (i32.add
+ (drop
+ (call_import $__ashlti3
+ (i32.add
+ (get_local $52)
+ (i32.const 1008)
+ )
+ (get_local $15)
+ (get_local $16)
(get_local $33)
- (i32.const 960)
)
- (get_local $13)
- (get_local $14)
- (get_local $42)
)
- (call_import $__ashlti3
- (i32.add
- (get_local $33)
- (i32.const 976)
+ (drop
+ (call_import $__lshrti3
+ (i32.add
+ (get_local $52)
+ (i32.const 960)
+ )
+ (get_local $13)
+ (get_local $14)
+ (get_local $41)
)
- (get_local $13)
- (get_local $14)
- (get_local $43)
)
- (call_import $__lshrti3
- (i32.add
- (get_local $33)
- (i32.const 816)
+ (drop
+ (call_import $__ashlti3
+ (i32.add
+ (get_local $52)
+ (i32.const 976)
+ )
+ (get_local $13)
+ (get_local $14)
+ (get_local $42)
)
- (get_local $11)
- (get_local $12)
- (get_local $36)
)
- (call_import $__lshrti3
- (i32.add
- (get_local $33)
- (i32.const 240)
- )
- (get_local $7)
- (get_local $8)
- (tee_local $40
- (i32.sub
- (i32.const 512)
- (get_local $34)
+ (drop
+ (call_import $__lshrti3
+ (i32.add
+ (get_local $52)
+ (i32.const 816)
)
+ (get_local $11)
+ (get_local $12)
+ (get_local $35)
)
)
- (call_import $__lshrti3
- (i32.add
- (get_local $33)
- (i32.const 192)
+ (drop
+ (call_import $__lshrti3
+ (i32.add
+ (get_local $52)
+ (i32.const 240)
+ )
+ (get_local $7)
+ (get_local $8)
+ (tee_local $39
+ (i32.sub
+ (i32.const 512)
+ (get_local $33)
+ )
+ )
)
- (get_local $5)
- (get_local $6)
- (get_local $40)
)
- (call_import $__ashlti3
- (i32.add
- (get_local $33)
- (i32.const 208)
- )
- (get_local $7)
- (get_local $8)
- (tee_local $45
- (i32.sub
- (i32.const 128)
- (get_local $40)
+ (drop
+ (call_import $__lshrti3
+ (i32.add
+ (get_local $52)
+ (i32.const 192)
)
+ (get_local $5)
+ (get_local $6)
+ (get_local $39)
)
)
- (call_import $__lshrti3
- (i32.add
- (get_local $33)
- (i32.const 224)
+ (drop
+ (call_import $__ashlti3
+ (i32.add
+ (get_local $52)
+ (i32.const 208)
+ )
+ (get_local $7)
+ (get_local $8)
+ (tee_local $44
+ (i32.sub
+ (i32.const 128)
+ (get_local $39)
+ )
+ )
)
- (get_local $7)
- (get_local $8)
- (get_local $44)
)
- (call_import $__lshrti3
- (i32.add
- (get_local $33)
- (i32.const 768)
+ (drop
+ (call_import $__lshrti3
+ (i32.add
+ (get_local $52)
+ (i32.const 224)
+ )
+ (get_local $7)
+ (get_local $8)
+ (get_local $43)
)
- (get_local $9)
- (get_local $10)
- (get_local $36)
)
- (call_import $__ashlti3
- (i32.add
- (get_local $33)
- (i32.const 784)
+ (drop
+ (call_import $__lshrti3
+ (i32.add
+ (get_local $52)
+ (i32.const 768)
+ )
+ (get_local $9)
+ (get_local $10)
+ (get_local $35)
)
- (get_local $11)
- (get_local $12)
- (get_local $51)
)
- (call_import $__lshrti3
- (i32.add
- (get_local $33)
- (i32.const 800)
+ (drop
+ (call_import $__ashlti3
+ (i32.add
+ (get_local $52)
+ (i32.const 784)
+ )
+ (get_local $11)
+ (get_local $12)
+ (get_local $50)
)
- (get_local $11)
- (get_local $12)
- (get_local $42)
)
- (call_import $__ashlti3
- (i32.add
- (get_local $33)
- (i32.const 992)
+ (drop
+ (call_import $__lshrti3
+ (i32.add
+ (get_local $52)
+ (i32.const 800)
+ )
+ (get_local $11)
+ (get_local $12)
+ (get_local $41)
)
- (get_local $13)
- (get_local $14)
- (get_local $34)
)
- (call_import $__ashlti3
- (i32.add
+ (drop
+ (call_import $__ashlti3
+ (i32.add
+ (get_local $52)
+ (i32.const 992)
+ )
+ (get_local $13)
+ (get_local $14)
(get_local $33)
- (i32.const 832)
)
- (get_local $9)
- (get_local $10)
- (get_local $35)
)
- (call_import $__lshrti3
- (i32.add
- (get_local $33)
- (i32.const 384)
+ (drop
+ (call_import $__ashlti3
+ (i32.add
+ (get_local $52)
+ (i32.const 832)
+ )
+ (get_local $9)
+ (get_local $10)
+ (get_local $34)
)
- (get_local $1)
- (get_local $2)
- (get_local $39)
)
- (call_import $__ashlti3
- (i32.add
- (get_local $33)
- (i32.const 400)
- )
- (get_local $3)
- (get_local $4)
- (i32.sub
- (i32.const 128)
- (get_local $39)
+ (drop
+ (call_import $__lshrti3
+ (i32.add
+ (get_local $52)
+ (i32.const 384)
+ )
+ (get_local $1)
+ (get_local $2)
+ (get_local $38)
)
)
- (call_import $__lshrti3
- (i32.add
- (get_local $33)
- (i32.const 416)
+ (drop
+ (call_import $__ashlti3
+ (i32.add
+ (get_local $52)
+ (i32.const 400)
+ )
+ (get_local $3)
+ (get_local $4)
+ (i32.sub
+ (i32.const 128)
+ (get_local $38)
+ )
)
- (get_local $3)
- (get_local $4)
- (get_local $46)
)
- (call_import $__ashlti3
- (i32.add
- (get_local $33)
- (i32.const 320)
+ (drop
+ (call_import $__lshrti3
+ (i32.add
+ (get_local $52)
+ (i32.const 416)
+ )
+ (get_local $3)
+ (get_local $4)
+ (get_local $45)
)
- (get_local $5)
- (get_local $6)
- (get_local $38)
)
- (call_import $__ashlti3
- (i32.add
- (get_local $33)
- (i32.const 448)
+ (drop
+ (call_import $__ashlti3
+ (i32.add
+ (get_local $52)
+ (i32.const 320)
+ )
+ (get_local $5)
+ (get_local $6)
+ (get_local $37)
)
- (get_local $1)
- (get_local $2)
- (get_local $37)
)
- (call_import $__lshrti3
- (i32.add
- (get_local $33)
- (i32.const 128)
+ (drop
+ (call_import $__ashlti3
+ (i32.add
+ (get_local $52)
+ (i32.const 448)
+ )
+ (get_local $1)
+ (get_local $2)
+ (get_local $36)
)
- (get_local $5)
- (get_local $6)
- (get_local $36)
)
- (call_import $__ashlti3
- (i32.add
- (get_local $33)
- (i32.const 144)
- )
- (get_local $7)
- (get_local $8)
- (i32.sub
- (i32.const 384)
- (get_local $40)
+ (drop
+ (call_import $__lshrti3
+ (i32.add
+ (get_local $52)
+ (i32.const 128)
+ )
+ (get_local $5)
+ (get_local $6)
+ (get_local $35)
)
)
- (call_import $__lshrti3
- (i32.add
- (get_local $33)
- (i32.const 160)
+ (drop
+ (call_import $__ashlti3
+ (i32.add
+ (get_local $52)
+ (i32.const 144)
+ )
+ (get_local $7)
+ (get_local $8)
+ (i32.sub
+ (i32.const 384)
+ (get_local $39)
+ )
)
- (get_local $7)
- (get_local $8)
- (get_local $42)
- )
- (call_import $__lshrti3
- (get_local $33)
- (get_local $1)
- (get_local $2)
- (get_local $40)
)
- (call_import $__ashlti3
- (i32.add
- (get_local $33)
- (i32.const 16)
+ (drop
+ (call_import $__lshrti3
+ (i32.add
+ (get_local $52)
+ (i32.const 160)
+ )
+ (get_local $7)
+ (get_local $8)
+ (get_local $41)
)
- (get_local $3)
- (get_local $4)
- (get_local $45)
)
- (call_import $__lshrti3
- (i32.add
- (get_local $33)
- (i32.const 32)
+ (drop
+ (call_import $__lshrti3
+ (get_local $52)
+ (get_local $1)
+ (get_local $2)
+ (get_local $39)
)
- (get_local $3)
- (get_local $4)
- (get_local $44)
)
- (call_import $__ashlti3
- (i32.add
- (get_local $33)
- (i32.const 64)
- )
- (get_local $5)
- (get_local $6)
- (tee_local $41
- (i32.sub
- (i32.const 256)
- (get_local $40)
+ (drop
+ (call_import $__ashlti3
+ (i32.add
+ (get_local $52)
+ (i32.const 16)
)
+ (get_local $3)
+ (get_local $4)
+ (get_local $44)
)
)
- (call_import $__ashlti3
- (i32.add
- (get_local $33)
- (i32.const 896)
+ (drop
+ (call_import $__lshrti3
+ (i32.add
+ (get_local $52)
+ (i32.const 32)
+ )
+ (get_local $3)
+ (get_local $4)
+ (get_local $43)
)
- (get_local $9)
- (get_local $10)
- (get_local $34)
)
- (call_import $__ashlti3
- (i32.add
- (get_local $33)
- (i32.const 256)
+ (drop
+ (call_import $__ashlti3
+ (i32.add
+ (get_local $52)
+ (i32.const 64)
+ )
+ (get_local $5)
+ (get_local $6)
+ (tee_local $40
+ (i32.sub
+ (i32.const 256)
+ (get_local $39)
+ )
+ )
)
- (get_local $1)
- (get_local $2)
- (get_local $38)
)
- (call_import $__ashlti3
- (i32.add
+ (drop
+ (call_import $__ashlti3
+ (i32.add
+ (get_local $52)
+ (i32.const 896)
+ )
+ (get_local $9)
+ (get_local $10)
(get_local $33)
- (i32.const 912)
)
- (get_local $11)
- (get_local $12)
- (get_local $34)
)
- (call_import $__lshrti3
- (i32.add
- (get_local $33)
- (i32.const 928)
+ (drop
+ (call_import $__ashlti3
+ (i32.add
+ (get_local $52)
+ (i32.const 256)
+ )
+ (get_local $1)
+ (get_local $2)
+ (get_local $37)
)
- (get_local $9)
- (get_local $10)
- (get_local $42)
)
- (call_import $__ashlti3
- (i32.add
+ (drop
+ (call_import $__ashlti3
+ (i32.add
+ (get_local $52)
+ (i32.const 912)
+ )
+ (get_local $11)
+ (get_local $12)
(get_local $33)
- (i32.const 944)
)
- (get_local $9)
- (get_local $10)
- (get_local $43)
)
- (call_import $__ashlti3
- (i32.add
- (get_local $33)
- (i32.const 80)
+ (drop
+ (call_import $__lshrti3
+ (i32.add
+ (get_local $52)
+ (i32.const 928)
+ )
+ (get_local $9)
+ (get_local $10)
+ (get_local $41)
)
- (get_local $7)
- (get_local $8)
- (get_local $41)
)
- (call_import $__lshrti3
- (i32.add
- (get_local $33)
- (i32.const 96)
+ (drop
+ (call_import $__ashlti3
+ (i32.add
+ (get_local $52)
+ (i32.const 944)
+ )
+ (get_local $9)
+ (get_local $10)
+ (get_local $42)
)
- (get_local $5)
- (get_local $6)
- (i32.sub
- (i32.const 128)
- (get_local $41)
+ )
+ (drop
+ (call_import $__ashlti3
+ (i32.add
+ (get_local $52)
+ (i32.const 80)
+ )
+ (get_local $7)
+ (get_local $8)
+ (get_local $40)
)
)
- (call_import $__ashlti3
- (i32.add
- (get_local $33)
- (i32.const 112)
+ (drop
+ (call_import $__lshrti3
+ (i32.add
+ (get_local $52)
+ (i32.const 96)
+ )
+ (get_local $5)
+ (get_local $6)
+ (i32.sub
+ (i32.const 128)
+ (get_local $40)
+ )
)
- (get_local $5)
- (get_local $6)
- (get_local $45)
)
- (call_import $__lshrti3
- (i32.add
- (get_local $33)
- (i32.const 48)
+ (drop
+ (call_import $__ashlti3
+ (i32.add
+ (get_local $52)
+ (i32.const 112)
+ )
+ (get_local $5)
+ (get_local $6)
+ (get_local $44)
)
- (get_local $3)
- (get_local $4)
- (get_local $40)
)
- (call_import $__lshrti3
- (i32.add
- (get_local $33)
- (i32.const 176)
+ (drop
+ (call_import $__lshrti3
+ (i32.add
+ (get_local $52)
+ (i32.const 48)
+ )
+ (get_local $3)
+ (get_local $4)
+ (get_local $39)
)
- (get_local $7)
- (get_local $8)
- (get_local $36)
)
- (call_import $__lshrti3
- (i32.add
- (get_local $33)
- (i32.const 288)
+ (drop
+ (call_import $__lshrti3
+ (i32.add
+ (get_local $52)
+ (i32.const 176)
+ )
+ (get_local $7)
+ (get_local $8)
+ (get_local $35)
)
- (get_local $1)
- (get_local $2)
- (get_local $46)
)
- (call_import $__ashlti3
- (i32.add
- (get_local $33)
- (i32.const 272)
+ (drop
+ (call_import $__lshrti3
+ (i32.add
+ (get_local $52)
+ (i32.const 288)
+ )
+ (get_local $1)
+ (get_local $2)
+ (get_local $45)
)
- (get_local $3)
- (get_local $4)
- (get_local $38)
)
- (call_import $__ashlti3
- (i32.add
- (get_local $33)
- (i32.const 304)
+ (drop
+ (call_import $__ashlti3
+ (i32.add
+ (get_local $52)
+ (i32.const 272)
+ )
+ (get_local $3)
+ (get_local $4)
+ (get_local $37)
)
- (get_local $1)
- (get_local $2)
- (get_local $52)
)
- (i64.store
- (i32.add
- (get_local $0)
- (i32.const 8)
+ (drop
+ (call_import $__ashlti3
+ (i32.add
+ (get_local $52)
+ (i32.const 304)
+ )
+ (get_local $1)
+ (get_local $2)
+ (get_local $51)
)
- (select
+ )
+ (drop
+ (i64.store
+ (i32.add
+ (get_local $0)
+ (i32.const 8)
+ )
(select
(select
- (i64.load
- (i32.add
+ (select
+ (i64.load
(i32.add
+ (i32.add
+ (get_local $52)
+ (i32.const 512)
+ )
+ (i32.const 8)
+ )
+ )
+ (i64.const 0)
+ (tee_local $41
+ (i32.lt_u
(get_local $33)
- (i32.const 512)
+ (i32.const 128)
)
- (i32.const 8)
)
)
(i64.const 0)
(tee_local $42
(i32.lt_u
- (get_local $34)
- (i32.const 128)
+ (get_local $33)
+ (i32.const 256)
)
)
)
(i64.const 0)
(tee_local $43
(i32.lt_u
- (get_local $34)
- (i32.const 256)
+ (get_local $33)
+ (i32.const 512)
)
)
)
- (i64.const 0)
- (tee_local $44
- (i32.lt_u
- (get_local $34)
- (i32.const 512)
- )
- )
)
)
- (i64.store
- (get_local $0)
- (select
+ (drop
+ (i64.store
+ (get_local $0)
(select
(select
- (i64.load offset=512
- (get_local $33)
+ (select
+ (i64.load offset=512
+ (get_local $52)
+ )
+ (i64.const 0)
+ (get_local $41)
)
(i64.const 0)
(get_local $42)
@@ -831,564 +953,596 @@
(i64.const 0)
(get_local $43)
)
- (i64.const 0)
- (get_local $44)
)
)
- (i64.store
- (i32.add
- (get_local $0)
- (i32.const 24)
- )
- (select
+ (drop
+ (i64.store
+ (i32.add
+ (get_local $0)
+ (i32.const 24)
+ )
(select
(select
(select
- (i64.or
- (i64.load
- (i32.add
+ (select
+ (i64.or
+ (i64.load
(i32.add
- (get_local $33)
- (i32.const 528)
+ (i32.add
+ (get_local $52)
+ (i32.const 528)
+ )
+ (i32.const 8)
+ )
+ )
+ (i64.load
+ (i32.add
+ (i32.add
+ (get_local $52)
+ (i32.const 544)
+ )
+ (i32.const 8)
)
- (i32.const 8)
)
)
(i64.load
(i32.add
(i32.add
- (get_local $33)
- (i32.const 544)
+ (get_local $52)
+ (i32.const 560)
)
(i32.const 8)
)
)
+ (get_local $41)
)
- (i64.load
- (i32.add
- (i32.add
- (get_local $33)
- (i32.const 560)
- )
- (i32.const 8)
- )
- )
- (get_local $42)
+ (get_local $4)
+ (get_local $33)
)
- (get_local $4)
- (get_local $34)
+ (i64.const 0)
+ (get_local $42)
)
(i64.const 0)
(get_local $43)
)
- (i64.const 0)
- (get_local $44)
)
)
- (i64.store
- (i32.add
- (get_local $0)
- (i32.const 16)
- )
- (select
+ (drop
+ (i64.store
+ (i32.add
+ (get_local $0)
+ (i32.const 16)
+ )
(select
(select
(select
- (i64.or
- (i64.load offset=528
- (get_local $33)
+ (select
+ (i64.or
+ (i64.load offset=528
+ (get_local $52)
+ )
+ (i64.load offset=544
+ (get_local $52)
+ )
)
- (i64.load offset=544
- (get_local $33)
+ (i64.load offset=560
+ (get_local $52)
)
+ (get_local $41)
)
- (i64.load offset=560
- (get_local $33)
- )
- (get_local $42)
+ (get_local $3)
+ (get_local $33)
)
- (get_local $3)
- (get_local $34)
+ (i64.const 0)
+ (get_local $42)
)
(i64.const 0)
(get_local $43)
)
- (i64.const 0)
- (get_local $44)
)
)
- (i64.store
- (i32.add
- (get_local $0)
- (i32.const 56)
- )
- (select
+ (drop
+ (i64.store
+ (i32.add
+ (get_local $0)
+ (i32.const 56)
+ )
(select
(select
- (i64.or
- (select
+ (select
+ (i64.or
(select
- (i64.or
- (i64.load
- (i32.add
+ (select
+ (i64.or
+ (i64.load
(i32.add
- (get_local $33)
- (i32.const 592)
+ (i32.add
+ (get_local $52)
+ (i32.const 592)
+ )
+ (i32.const 8)
+ )
+ )
+ (i64.load
+ (i32.add
+ (i32.add
+ (get_local $52)
+ (i32.const 608)
+ )
+ (i32.const 8)
)
- (i32.const 8)
)
)
(i64.load
(i32.add
(i32.add
- (get_local $33)
- (i32.const 608)
+ (get_local $52)
+ (i32.const 624)
)
(i32.const 8)
)
)
+ (get_local $41)
)
+ (get_local $8)
+ (get_local $33)
+ )
+ (select
(i64.load
(i32.add
(i32.add
- (get_local $33)
- (i32.const 624)
+ (get_local $52)
+ (i32.const 688)
)
(i32.const 8)
)
)
- (get_local $42)
- )
- (get_local $8)
- (get_local $34)
- )
- (select
- (i64.load
- (i32.add
- (i32.add
- (get_local $33)
- (i32.const 688)
+ (i64.const 0)
+ (tee_local $45
+ (i32.lt_u
+ (get_local $35)
+ (i32.const 128)
)
- (i32.const 8)
- )
- )
- (i64.const 0)
- (tee_local $46
- (i32.lt_u
- (get_local $36)
- (i32.const 128)
)
)
)
- )
- (select
(select
- (i64.or
- (i64.load
- (i32.add
+ (select
+ (i64.or
+ (i64.load
(i32.add
- (get_local $33)
- (i32.const 720)
+ (i32.add
+ (get_local $52)
+ (i32.const 720)
+ )
+ (i32.const 8)
+ )
+ )
+ (i64.load
+ (i32.add
+ (i32.add
+ (get_local $52)
+ (i32.const 736)
+ )
+ (i32.const 8)
)
- (i32.const 8)
)
)
(i64.load
(i32.add
(i32.add
- (get_local $33)
- (i32.const 736)
+ (get_local $52)
+ (i32.const 752)
)
(i32.const 8)
)
)
- )
- (i64.load
- (i32.add
- (i32.add
- (get_local $33)
- (i32.const 752)
+ (tee_local $44
+ (i32.lt_u
+ (get_local $34)
+ (i32.const 128)
)
- (i32.const 8)
- )
- )
- (tee_local $45
- (i32.lt_u
- (get_local $35)
- (i32.const 128)
)
)
+ (get_local $4)
+ (get_local $34)
)
- (get_local $4)
- (get_local $35)
+ (get_local $42)
)
- (get_local $43)
+ (get_local $8)
+ (get_local $33)
)
- (get_local $8)
- (get_local $34)
+ (i64.const 0)
+ (get_local $43)
)
- (i64.const 0)
- (get_local $44)
)
)
- (i64.store
- (i32.add
- (get_local $0)
- (i32.const 48)
- )
- (select
+ (drop
+ (i64.store
+ (i32.add
+ (get_local $0)
+ (i32.const 48)
+ )
(select
(select
- (i64.or
- (select
+ (select
+ (i64.or
(select
- (i64.or
- (i64.load offset=592
- (get_local $33)
+ (select
+ (i64.or
+ (i64.load offset=592
+ (get_local $52)
+ )
+ (i64.load offset=608
+ (get_local $52)
+ )
)
- (i64.load offset=608
- (get_local $33)
+ (i64.load offset=624
+ (get_local $52)
)
+ (get_local $41)
)
- (i64.load offset=624
- (get_local $33)
- )
- (get_local $42)
- )
- (get_local $7)
- (get_local $34)
- )
- (select
- (i64.load offset=688
+ (get_local $7)
(get_local $33)
)
- (i64.const 0)
- (get_local $46)
+ (select
+ (i64.load offset=688
+ (get_local $52)
+ )
+ (i64.const 0)
+ (get_local $45)
+ )
)
- )
- (select
(select
- (i64.or
- (i64.load offset=720
- (get_local $33)
+ (select
+ (i64.or
+ (i64.load offset=720
+ (get_local $52)
+ )
+ (i64.load offset=736
+ (get_local $52)
+ )
)
- (i64.load offset=736
- (get_local $33)
+ (i64.load offset=752
+ (get_local $52)
)
+ (get_local $44)
)
- (i64.load offset=752
- (get_local $33)
- )
- (get_local $45)
+ (get_local $3)
+ (get_local $34)
)
- (get_local $3)
- (get_local $35)
+ (get_local $42)
)
- (get_local $43)
+ (get_local $7)
+ (get_local $33)
)
- (get_local $7)
- (get_local $34)
+ (i64.const 0)
+ (get_local $43)
)
- (i64.const 0)
- (get_local $44)
)
)
- (i64.store
- (i32.add
- (get_local $0)
- (i32.const 40)
- )
- (select
+ (drop
+ (i64.store
+ (i32.add
+ (get_local $0)
+ (i32.const 40)
+ )
(select
(select
- (i64.or
- (select
- (i64.load
- (i32.add
+ (select
+ (i64.or
+ (select
+ (i64.load
(i32.add
- (get_local $33)
- (i32.const 576)
+ (i32.add
+ (get_local $52)
+ (i32.const 576)
+ )
+ (i32.const 8)
)
- (i32.const 8)
)
+ (i64.const 0)
+ (get_local $41)
)
- (i64.const 0)
- (get_local $42)
- )
- (select
(select
- (i64.or
- (i64.load
- (i32.add
+ (select
+ (i64.or
+ (i64.load
(i32.add
- (get_local $33)
- (i32.const 640)
+ (i32.add
+ (get_local $52)
+ (i32.const 640)
+ )
+ (i32.const 8)
+ )
+ )
+ (i64.load
+ (i32.add
+ (i32.add
+ (get_local $52)
+ (i32.const 656)
+ )
+ (i32.const 8)
)
- (i32.const 8)
)
)
(i64.load
(i32.add
(i32.add
- (get_local $33)
- (i32.const 656)
+ (get_local $52)
+ (i32.const 672)
)
(i32.const 8)
)
)
+ (get_local $45)
)
- (i64.load
- (i32.add
- (i32.add
- (get_local $33)
- (i32.const 672)
- )
- (i32.const 8)
- )
- )
- (get_local $46)
+ (get_local $2)
+ (get_local $35)
)
- (get_local $2)
- (get_local $36)
)
- )
- (select
- (i64.load
- (i32.add
+ (select
+ (i64.load
(i32.add
- (get_local $33)
- (i32.const 704)
+ (i32.add
+ (get_local $52)
+ (i32.const 704)
+ )
+ (i32.const 8)
)
- (i32.const 8)
)
+ (i64.const 0)
+ (get_local $44)
)
- (i64.const 0)
- (get_local $45)
+ (get_local $42)
)
- (get_local $43)
+ (get_local $6)
+ (get_local $33)
)
- (get_local $6)
- (get_local $34)
+ (i64.const 0)
+ (get_local $43)
)
- (i64.const 0)
- (get_local $44)
)
)
- (i64.store
- (i32.add
- (get_local $0)
- (i32.const 32)
- )
- (select
+ (drop
+ (i64.store
+ (i32.add
+ (get_local $0)
+ (i32.const 32)
+ )
(select
(select
- (i64.or
- (select
- (i64.load offset=576
- (get_local $33)
+ (select
+ (i64.or
+ (select
+ (i64.load offset=576
+ (get_local $52)
+ )
+ (i64.const 0)
+ (get_local $41)
)
- (i64.const 0)
- (get_local $42)
- )
- (select
(select
- (i64.or
- (i64.load offset=640
- (get_local $33)
+ (select
+ (i64.or
+ (i64.load offset=640
+ (get_local $52)
+ )
+ (i64.load offset=656
+ (get_local $52)
+ )
)
- (i64.load offset=656
- (get_local $33)
+ (i64.load offset=672
+ (get_local $52)
)
+ (get_local $45)
)
- (i64.load offset=672
- (get_local $33)
- )
- (get_local $46)
+ (get_local $1)
+ (get_local $35)
)
- (get_local $1)
- (get_local $36)
)
- )
- (select
- (i64.load offset=704
- (get_local $33)
+ (select
+ (i64.load offset=704
+ (get_local $52)
+ )
+ (i64.const 0)
+ (get_local $44)
)
- (i64.const 0)
- (get_local $45)
+ (get_local $42)
)
- (get_local $43)
+ (get_local $5)
+ (get_local $33)
)
- (get_local $5)
- (get_local $34)
+ (i64.const 0)
+ (get_local $43)
)
- (i64.const 0)
- (get_local $44)
)
)
- (i64.store
- (i32.add
- (get_local $0)
- (i32.const 120)
- )
- (select
+ (drop
+ (i64.store
+ (i32.add
+ (get_local $0)
+ (i32.const 120)
+ )
(select
- (i64.or
- (select
+ (select
+ (i64.or
(select
- (i64.or
- (select
+ (select
+ (i64.or
(select
- (i64.or
- (i64.load
- (i32.add
+ (select
+ (i64.or
+ (i64.load
(i32.add
- (get_local $33)
- (i32.const 1008)
+ (i32.add
+ (get_local $52)
+ (i32.const 1008)
+ )
+ (i32.const 8)
+ )
+ )
+ (i64.load
+ (i32.add
+ (i32.add
+ (get_local $52)
+ (i32.const 960)
+ )
+ (i32.const 8)
)
- (i32.const 8)
)
)
(i64.load
(i32.add
(i32.add
- (get_local $33)
- (i32.const 960)
+ (get_local $52)
+ (i32.const 976)
)
(i32.const 8)
)
)
+ (get_local $41)
)
+ (get_local $16)
+ (get_local $33)
+ )
+ (select
(i64.load
(i32.add
(i32.add
- (get_local $33)
- (i32.const 976)
+ (get_local $52)
+ (i32.const 816)
)
(i32.const 8)
)
)
- (get_local $42)
+ (i64.const 0)
+ (get_local $45)
)
- (get_local $16)
- (get_local $34)
)
(select
- (i64.load
- (i32.add
- (i32.add
- (get_local $33)
- (i32.const 816)
+ (select
+ (i64.or
+ (i64.load
+ (i32.add
+ (i32.add
+ (get_local $52)
+ (i32.const 848)
+ )
+ (i32.const 8)
+ )
)
- (i32.const 8)
- )
- )
- (i64.const 0)
- (get_local $46)
- )
- )
- (select
- (select
- (i64.or
- (i64.load
- (i32.add
+ (i64.load
(i32.add
- (get_local $33)
- (i32.const 848)
+ (i32.add
+ (get_local $52)
+ (i32.const 864)
+ )
+ (i32.const 8)
)
- (i32.const 8)
)
)
(i64.load
(i32.add
(i32.add
- (get_local $33)
- (i32.const 864)
+ (get_local $52)
+ (i32.const 880)
)
(i32.const 8)
)
)
+ (get_local $44)
)
- (i64.load
- (i32.add
- (i32.add
- (get_local $33)
- (i32.const 880)
- )
- (i32.const 8)
- )
- )
- (get_local $45)
+ (get_local $12)
+ (get_local $34)
)
- (get_local $12)
- (get_local $35)
+ (get_local $42)
)
- (get_local $43)
+ (get_local $16)
+ (get_local $33)
)
- (get_local $16)
- (get_local $34)
- )
- (select
(select
- (i64.load
- (i32.add
+ (select
+ (i64.load
(i32.add
- (get_local $33)
- (i32.const 240)
+ (i32.add
+ (get_local $52)
+ (i32.const 240)
+ )
+ (i32.const 8)
+ )
+ )
+ (i64.const 0)
+ (tee_local $50
+ (i32.lt_u
+ (get_local $39)
+ (i32.const 128)
)
- (i32.const 8)
)
)
(i64.const 0)
(tee_local $51
(i32.lt_u
- (get_local $40)
- (i32.const 128)
+ (get_local $39)
+ (i32.const 256)
)
)
)
- (i64.const 0)
- (tee_local $52
- (i32.lt_u
- (get_local $40)
- (i32.const 256)
- )
- )
)
- )
- (select
(select
- (i64.or
- (select
+ (select
+ (i64.or
(select
- (i64.or
- (i64.load
- (i32.add
+ (select
+ (i64.or
+ (i64.load
(i32.add
- (get_local $33)
- (i32.const 336)
+ (i32.add
+ (get_local $52)
+ (i32.const 336)
+ )
+ (i32.const 8)
+ )
+ )
+ (i64.load
+ (i32.add
+ (i32.add
+ (get_local $52)
+ (i32.const 352)
+ )
+ (i32.const 8)
)
- (i32.const 8)
)
)
(i64.load
(i32.add
(i32.add
- (get_local $33)
- (i32.const 352)
+ (get_local $52)
+ (i32.const 368)
)
(i32.const 8)
)
)
+ (tee_local $47
+ (i32.lt_u
+ (get_local $37)
+ (i32.const 128)
+ )
+ )
)
+ (get_local $8)
+ (get_local $37)
+ )
+ (select
(i64.load
(i32.add
(i32.add
- (get_local $33)
- (i32.const 368)
+ (get_local $52)
+ (i32.const 432)
)
(i32.const 8)
)
)
+ (i64.const 0)
(tee_local $48
(i32.lt_u
(get_local $38)
@@ -1396,359 +1550,286 @@
)
)
)
- (get_local $8)
- (get_local $38)
)
(select
- (i64.load
- (i32.add
- (i32.add
- (get_local $33)
- (i32.const 432)
+ (select
+ (i64.or
+ (i64.load
+ (i32.add
+ (i32.add
+ (get_local $52)
+ (i32.const 464)
+ )
+ (i32.const 8)
+ )
)
- (i32.const 8)
- )
- )
- (i64.const 0)
- (tee_local $49
- (i32.lt_u
- (get_local $39)
- (i32.const 128)
- )
- )
- )
- )
- (select
- (select
- (i64.or
- (i64.load
- (i32.add
+ (i64.load
(i32.add
- (get_local $33)
- (i32.const 464)
+ (i32.add
+ (get_local $52)
+ (i32.const 480)
+ )
+ (i32.const 8)
)
- (i32.const 8)
)
)
(i64.load
(i32.add
(i32.add
- (get_local $33)
- (i32.const 480)
+ (get_local $52)
+ (i32.const 496)
)
(i32.const 8)
)
)
- )
- (i64.load
- (i32.add
- (i32.add
- (get_local $33)
- (i32.const 496)
+ (tee_local $46
+ (i32.lt_u
+ (get_local $36)
+ (i32.const 128)
)
- (i32.const 8)
- )
- )
- (tee_local $47
- (i32.lt_u
- (get_local $37)
- (i32.const 128)
)
)
+ (get_local $4)
+ (get_local $36)
)
- (get_local $4)
- (get_local $37)
- )
- (tee_local $50
- (i32.lt_u
- (get_local $38)
- (i32.const 256)
+ (tee_local $49
+ (i32.lt_u
+ (get_local $37)
+ (i32.const 256)
+ )
)
)
+ (get_local $8)
+ (get_local $37)
)
- (get_local $8)
- (get_local $38)
+ (get_local $43)
)
- (get_local $44)
+ (get_local $16)
+ (get_local $33)
)
- (get_local $16)
- (get_local $34)
)
)
- (i64.store
- (i32.add
- (get_local $0)
- (i32.const 112)
- )
- (select
+ (drop
+ (i64.store
+ (i32.add
+ (get_local $0)
+ (i32.const 112)
+ )
(select
- (i64.or
- (select
+ (select
+ (i64.or
(select
- (i64.or
- (select
+ (select
+ (i64.or
(select
- (i64.or
- (i64.load offset=1008
- (get_local $33)
+ (select
+ (i64.or
+ (i64.load offset=1008
+ (get_local $52)
+ )
+ (i64.load offset=960
+ (get_local $52)
+ )
)
- (i64.load offset=960
- (get_local $33)
+ (i64.load offset=976
+ (get_local $52)
)
+ (get_local $41)
)
- (i64.load offset=976
- (get_local $33)
- )
- (get_local $42)
- )
- (get_local $15)
- (get_local $34)
- )
- (select
- (i64.load offset=816
+ (get_local $15)
(get_local $33)
)
- (i64.const 0)
- (get_local $46)
+ (select
+ (i64.load offset=816
+ (get_local $52)
+ )
+ (i64.const 0)
+ (get_local $45)
+ )
)
- )
- (select
(select
- (i64.or
- (i64.load offset=848
- (get_local $33)
+ (select
+ (i64.or
+ (i64.load offset=848
+ (get_local $52)
+ )
+ (i64.load offset=864
+ (get_local $52)
+ )
)
- (i64.load offset=864
- (get_local $33)
+ (i64.load offset=880
+ (get_local $52)
)
+ (get_local $44)
)
- (i64.load offset=880
- (get_local $33)
- )
- (get_local $45)
+ (get_local $11)
+ (get_local $34)
)
- (get_local $11)
- (get_local $35)
+ (get_local $42)
)
- (get_local $43)
+ (get_local $15)
+ (get_local $33)
)
- (get_local $15)
- (get_local $34)
- )
- (select
(select
- (i64.load offset=240
- (get_local $33)
+ (select
+ (i64.load offset=240
+ (get_local $52)
+ )
+ (i64.const 0)
+ (get_local $50)
)
(i64.const 0)
(get_local $51)
)
- (i64.const 0)
- (get_local $52)
)
- )
- (select
(select
- (i64.or
- (select
+ (select
+ (i64.or
(select
- (i64.or
- (i64.load offset=336
- (get_local $33)
+ (select
+ (i64.or
+ (i64.load offset=336
+ (get_local $52)
+ )
+ (i64.load offset=352
+ (get_local $52)
+ )
)
- (i64.load offset=352
- (get_local $33)
+ (i64.load offset=368
+ (get_local $52)
)
+ (get_local $47)
)
- (i64.load offset=368
- (get_local $33)
+ (get_local $7)
+ (get_local $37)
+ )
+ (select
+ (i64.load offset=432
+ (get_local $52)
)
+ (i64.const 0)
(get_local $48)
)
- (get_local $7)
- (get_local $38)
)
(select
- (i64.load offset=432
- (get_local $33)
- )
- (i64.const 0)
- (get_local $49)
- )
- )
- (select
- (select
- (i64.or
- (i64.load offset=464
- (get_local $33)
+ (select
+ (i64.or
+ (i64.load offset=464
+ (get_local $52)
+ )
+ (i64.load offset=480
+ (get_local $52)
+ )
)
- (i64.load offset=480
- (get_local $33)
+ (i64.load offset=496
+ (get_local $52)
)
+ (get_local $46)
)
- (i64.load offset=496
- (get_local $33)
- )
- (get_local $47)
+ (get_local $3)
+ (get_local $36)
)
- (get_local $3)
- (get_local $37)
+ (get_local $49)
)
- (get_local $50)
+ (get_local $7)
+ (get_local $37)
)
- (get_local $7)
- (get_local $38)
+ (get_local $43)
)
- (get_local $44)
+ (get_local $15)
+ (get_local $33)
)
- (get_local $15)
- (get_local $34)
)
)
- (i64.store
- (i32.add
- (get_local $0)
- (i32.const 104)
- )
- (select
+ (drop
+ (i64.store
+ (i32.add
+ (get_local $0)
+ (i32.const 104)
+ )
(select
- (i64.or
- (select
+ (select
+ (i64.or
(select
- (i64.or
- (select
- (i64.load
- (i32.add
+ (select
+ (i64.or
+ (select
+ (i64.load
(i32.add
- (get_local $33)
- (i32.const 992)
+ (i32.add
+ (get_local $52)
+ (i32.const 992)
+ )
+ (i32.const 8)
)
- (i32.const 8)
)
+ (i64.const 0)
+ (get_local $41)
)
- (i64.const 0)
- (get_local $42)
- )
- (select
(select
- (i64.or
- (i64.load
- (i32.add
+ (select
+ (i64.or
+ (i64.load
(i32.add
- (get_local $33)
- (i32.const 768)
+ (i32.add
+ (get_local $52)
+ (i32.const 768)
+ )
+ (i32.const 8)
+ )
+ )
+ (i64.load
+ (i32.add
+ (i32.add
+ (get_local $52)
+ (i32.const 784)
+ )
+ (i32.const 8)
)
- (i32.const 8)
)
)
(i64.load
(i32.add
(i32.add
- (get_local $33)
- (i32.const 784)
+ (get_local $52)
+ (i32.const 800)
)
(i32.const 8)
)
)
+ (get_local $45)
)
- (i64.load
- (i32.add
- (i32.add
- (get_local $33)
- (i32.const 800)
- )
- (i32.const 8)
- )
- )
- (get_local $46)
- )
- (get_local $10)
- (get_local $36)
- )
- )
- (select
- (i64.load
- (i32.add
- (i32.add
- (get_local $33)
- (i32.const 832)
- )
- (i32.const 8)
+ (get_local $10)
+ (get_local $35)
)
)
- (i64.const 0)
- (get_local $45)
- )
- (get_local $43)
- )
- (get_local $14)
- (get_local $34)
- )
- (select
- (select
- (select
- (i64.or
- (i64.load
- (i32.add
- (i32.add
- (get_local $33)
- (i32.const 192)
- )
- (i32.const 8)
- )
- )
+ (select
(i64.load
(i32.add
(i32.add
- (get_local $33)
- (i32.const 208)
+ (get_local $52)
+ (i32.const 832)
)
(i32.const 8)
)
)
+ (i64.const 0)
+ (get_local $44)
)
- (i64.load
- (i32.add
- (i32.add
- (get_local $33)
- (i32.const 224)
- )
- (i32.const 8)
- )
- )
- (get_local $51)
+ (get_local $42)
)
- (get_local $6)
- (get_local $40)
+ (get_local $14)
+ (get_local $33)
)
- (i64.const 0)
- (get_local $52)
- )
- )
- (select
- (select
- (i64.or
- (select
- (i64.load
- (i32.add
- (i32.add
- (get_local $33)
- (i32.const 320)
- )
- (i32.const 8)
- )
- )
- (i64.const 0)
- (get_local $48)
- )
+ (select
(select
(select
(i64.or
(i64.load
(i32.add
(i32.add
- (get_local $33)
- (i32.const 384)
+ (get_local $52)
+ (i32.const 192)
)
(i32.const 8)
)
@@ -1756,8 +1837,8 @@
(i64.load
(i32.add
(i32.add
- (get_local $33)
- (i32.const 400)
+ (get_local $52)
+ (i32.const 208)
)
(i32.const 8)
)
@@ -1766,666 +1847,735 @@
(i64.load
(i32.add
(i32.add
- (get_local $33)
- (i32.const 416)
+ (get_local $52)
+ (i32.const 224)
)
(i32.const 8)
)
)
- (get_local $49)
+ (get_local $50)
)
- (get_local $2)
+ (get_local $6)
(get_local $39)
)
- )
- (select
- (i64.load
- (i32.add
- (i32.add
- (get_local $33)
- (i32.const 448)
- )
- (i32.const 8)
- )
- )
(i64.const 0)
- (get_local $47)
+ (get_local $51)
)
- (get_local $50)
)
- (get_local $6)
- (get_local $38)
- )
- (get_local $44)
- )
- (get_local $14)
- (get_local $34)
- )
- )
- (i64.store
- (i32.add
- (get_local $0)
- (i32.const 96)
- )
- (select
- (select
- (i64.or
(select
(select
(i64.or
(select
- (i64.load offset=992
- (get_local $33)
+ (i64.load
+ (i32.add
+ (i32.add
+ (get_local $52)
+ (i32.const 320)
+ )
+ (i32.const 8)
+ )
)
(i64.const 0)
- (get_local $42)
+ (get_local $47)
)
(select
(select
(i64.or
- (i64.load offset=768
- (get_local $33)
+ (i64.load
+ (i32.add
+ (i32.add
+ (get_local $52)
+ (i32.const 384)
+ )
+ (i32.const 8)
+ )
)
- (i64.load offset=784
- (get_local $33)
+ (i64.load
+ (i32.add
+ (i32.add
+ (get_local $52)
+ (i32.const 400)
+ )
+ (i32.const 8)
+ )
)
)
- (i64.load offset=800
- (get_local $33)
+ (i64.load
+ (i32.add
+ (i32.add
+ (get_local $52)
+ (i32.const 416)
+ )
+ (i32.const 8)
+ )
)
- (get_local $46)
+ (get_local $48)
)
- (get_local $9)
- (get_local $36)
+ (get_local $2)
+ (get_local $38)
)
)
(select
- (i64.load offset=832
- (get_local $33)
+ (i64.load
+ (i32.add
+ (i32.add
+ (get_local $52)
+ (i32.const 448)
+ )
+ (i32.const 8)
+ )
)
(i64.const 0)
- (get_local $45)
+ (get_local $46)
)
- (get_local $43)
+ (get_local $49)
)
- (get_local $13)
- (get_local $34)
+ (get_local $6)
+ (get_local $37)
)
- (select
+ (get_local $43)
+ )
+ (get_local $14)
+ (get_local $33)
+ )
+ )
+ )
+ (drop
+ (i64.store
+ (i32.add
+ (get_local $0)
+ (i32.const 96)
+ )
+ (select
+ (select
+ (i64.or
(select
(select
(i64.or
- (i64.load offset=192
- (get_local $33)
+ (select
+ (i64.load offset=992
+ (get_local $52)
+ )
+ (i64.const 0)
+ (get_local $41)
)
- (i64.load offset=208
- (get_local $33)
+ (select
+ (select
+ (i64.or
+ (i64.load offset=768
+ (get_local $52)
+ )
+ (i64.load offset=784
+ (get_local $52)
+ )
+ )
+ (i64.load offset=800
+ (get_local $52)
+ )
+ (get_local $45)
+ )
+ (get_local $9)
+ (get_local $35)
)
)
- (i64.load offset=224
- (get_local $33)
+ (select
+ (i64.load offset=832
+ (get_local $52)
+ )
+ (i64.const 0)
+ (get_local $44)
)
- (get_local $51)
+ (get_local $42)
)
- (get_local $5)
- (get_local $40)
+ (get_local $13)
+ (get_local $33)
)
- (i64.const 0)
- (get_local $52)
- )
- )
- (select
- (select
- (i64.or
- (select
- (i64.load offset=320
- (get_local $33)
- )
- (i64.const 0)
- (get_local $48)
- )
+ (select
(select
(select
(i64.or
- (i64.load offset=384
- (get_local $33)
+ (i64.load offset=192
+ (get_local $52)
)
- (i64.load offset=400
- (get_local $33)
+ (i64.load offset=208
+ (get_local $52)
)
)
- (i64.load offset=416
- (get_local $33)
+ (i64.load offset=224
+ (get_local $52)
)
- (get_local $49)
+ (get_local $50)
)
- (get_local $1)
+ (get_local $5)
(get_local $39)
)
+ (i64.const 0)
+ (get_local $51)
)
+ )
+ (select
(select
- (i64.load offset=448
- (get_local $33)
+ (i64.or
+ (select
+ (i64.load offset=320
+ (get_local $52)
+ )
+ (i64.const 0)
+ (get_local $47)
+ )
+ (select
+ (select
+ (i64.or
+ (i64.load offset=384
+ (get_local $52)
+ )
+ (i64.load offset=400
+ (get_local $52)
+ )
+ )
+ (i64.load offset=416
+ (get_local $52)
+ )
+ (get_local $48)
+ )
+ (get_local $1)
+ (get_local $38)
+ )
)
- (i64.const 0)
- (get_local $47)
+ (select
+ (i64.load offset=448
+ (get_local $52)
+ )
+ (i64.const 0)
+ (get_local $46)
+ )
+ (get_local $49)
)
- (get_local $50)
+ (get_local $5)
+ (get_local $37)
)
- (get_local $5)
- (get_local $38)
+ (get_local $43)
)
- (get_local $44)
+ (get_local $13)
+ (get_local $33)
)
- (get_local $13)
- (get_local $34)
)
)
- (i64.store
- (i32.add
- (get_local $0)
- (i32.const 72)
- )
- (select
+ (drop
+ (i64.store
+ (i32.add
+ (get_local $0)
+ (i32.const 72)
+ )
(select
- (i64.or
- (select
+ (select
+ (i64.or
(select
- (i64.load
- (i32.add
+ (select
+ (i64.load
(i32.add
- (get_local $33)
- (i32.const 896)
+ (i32.add
+ (get_local $52)
+ (i32.const 896)
+ )
+ (i32.const 8)
)
- (i32.const 8)
)
+ (i64.const 0)
+ (get_local $41)
)
(i64.const 0)
(get_local $42)
)
- (i64.const 0)
- (get_local $43)
- )
- (select
(select
- (i64.or
- (select
+ (select
+ (i64.or
(select
- (i64.or
- (i64.load
- (i32.add
- (get_local $33)
- (i32.const 8)
+ (select
+ (i64.or
+ (i64.load
+ (i32.add
+ (get_local $52)
+ (i32.const 8)
+ )
+ )
+ (i64.load
+ (i32.add
+ (i32.add
+ (get_local $52)
+ (i32.const 16)
+ )
+ (i32.const 8)
+ )
)
)
(i64.load
(i32.add
(i32.add
- (get_local $33)
- (i32.const 16)
+ (get_local $52)
+ (i32.const 32)
)
(i32.const 8)
)
)
+ (get_local $50)
)
+ (get_local $2)
+ (get_local $39)
+ )
+ (select
(i64.load
(i32.add
(i32.add
- (get_local $33)
- (i32.const 32)
+ (get_local $52)
+ (i32.const 64)
)
(i32.const 8)
)
)
- (get_local $51)
- )
- (get_local $2)
- (get_local $40)
- )
- (select
- (i64.load
- (i32.add
- (i32.add
- (get_local $33)
- (i32.const 64)
+ (i64.const 0)
+ (tee_local $34
+ (i32.lt_u
+ (get_local $40)
+ (i32.const 128)
)
- (i32.const 8)
- )
- )
- (i64.const 0)
- (tee_local $35
- (i32.lt_u
- (get_local $41)
- (i32.const 128)
)
)
)
- )
- (select
(select
- (i64.or
- (i64.load
- (i32.add
+ (select
+ (i64.or
+ (i64.load
(i32.add
- (get_local $33)
- (i32.const 128)
+ (i32.add
+ (get_local $52)
+ (i32.const 128)
+ )
+ (i32.const 8)
+ )
+ )
+ (i64.load
+ (i32.add
+ (i32.add
+ (get_local $52)
+ (i32.const 144)
+ )
+ (i32.const 8)
)
- (i32.const 8)
)
)
(i64.load
(i32.add
(i32.add
- (get_local $33)
- (i32.const 144)
+ (get_local $52)
+ (i32.const 160)
)
(i32.const 8)
)
)
+ (get_local $45)
)
- (i64.load
- (i32.add
- (i32.add
- (get_local $33)
- (i32.const 160)
- )
- (i32.const 8)
- )
- )
- (get_local $46)
+ (get_local $6)
+ (get_local $35)
)
- (get_local $6)
- (get_local $36)
+ (get_local $51)
)
- (get_local $52)
+ (get_local $2)
+ (get_local $39)
)
- (get_local $2)
- (get_local $40)
)
- )
- (select
(select
- (i64.load
- (i32.add
+ (select
+ (i64.load
(i32.add
- (get_local $33)
- (i32.const 256)
+ (i32.add
+ (get_local $52)
+ (i32.const 256)
+ )
+ (i32.const 8)
)
- (i32.const 8)
)
+ (i64.const 0)
+ (get_local $47)
)
(i64.const 0)
- (get_local $48)
+ (get_local $49)
)
- (i64.const 0)
- (get_local $50)
+ (get_local $43)
)
- (get_local $44)
+ (get_local $10)
+ (get_local $33)
)
- (get_local $10)
- (get_local $34)
)
)
- (i64.store
- (i32.add
- (get_local $0)
- (i32.const 64)
- )
- (select
+ (drop
+ (i64.store
+ (i32.add
+ (get_local $0)
+ (i32.const 64)
+ )
(select
- (i64.or
- (select
+ (select
+ (i64.or
(select
- (i64.load offset=896
- (get_local $33)
+ (select
+ (i64.load offset=896
+ (get_local $52)
+ )
+ (i64.const 0)
+ (get_local $41)
)
(i64.const 0)
(get_local $42)
)
- (i64.const 0)
- (get_local $43)
- )
- (select
(select
- (i64.or
- (select
+ (select
+ (i64.or
(select
- (i64.or
- (i64.load
- (get_local $33)
+ (select
+ (i64.or
+ (i64.load
+ (get_local $52)
+ )
+ (i64.load offset=16
+ (get_local $52)
+ )
)
- (i64.load offset=16
- (get_local $33)
+ (i64.load offset=32
+ (get_local $52)
)
+ (get_local $50)
)
- (i64.load offset=32
- (get_local $33)
+ (get_local $1)
+ (get_local $39)
+ )
+ (select
+ (i64.load offset=64
+ (get_local $52)
)
- (get_local $51)
+ (i64.const 0)
+ (get_local $34)
)
- (get_local $1)
- (get_local $40)
)
(select
- (i64.load offset=64
- (get_local $33)
- )
- (i64.const 0)
- (get_local $35)
- )
- )
- (select
- (select
- (i64.or
- (i64.load offset=128
- (get_local $33)
+ (select
+ (i64.or
+ (i64.load offset=128
+ (get_local $52)
+ )
+ (i64.load offset=144
+ (get_local $52)
+ )
)
- (i64.load offset=144
- (get_local $33)
+ (i64.load offset=160
+ (get_local $52)
)
+ (get_local $45)
)
- (i64.load offset=160
- (get_local $33)
- )
- (get_local $46)
+ (get_local $5)
+ (get_local $35)
)
- (get_local $5)
- (get_local $36)
+ (get_local $51)
)
- (get_local $52)
+ (get_local $1)
+ (get_local $39)
)
- (get_local $1)
- (get_local $40)
)
- )
- (select
(select
- (i64.load offset=256
- (get_local $33)
+ (select
+ (i64.load offset=256
+ (get_local $52)
+ )
+ (i64.const 0)
+ (get_local $47)
)
(i64.const 0)
- (get_local $48)
+ (get_local $49)
)
- (i64.const 0)
- (get_local $50)
+ (get_local $43)
)
- (get_local $44)
+ (get_local $9)
+ (get_local $33)
)
- (get_local $9)
- (get_local $34)
)
)
- (i64.store
- (i32.add
- (get_local $0)
- (i32.const 88)
- )
- (select
+ (drop
+ (i64.store
+ (i32.add
+ (get_local $0)
+ (i32.const 88)
+ )
(select
- (i64.or
- (select
+ (select
+ (i64.or
(select
(select
- (i64.or
- (i64.load
- (i32.add
+ (select
+ (i64.or
+ (i64.load
+ (i32.add
+ (i32.add
+ (get_local $52)
+ (i32.const 912)
+ )
+ (i32.const 8)
+ )
+ )
+ (i64.load
(i32.add
- (get_local $33)
- (i32.const 912)
+ (i32.add
+ (get_local $52)
+ (i32.const 928)
+ )
+ (i32.const 8)
)
- (i32.const 8)
)
)
(i64.load
(i32.add
(i32.add
- (get_local $33)
- (i32.const 928)
+ (get_local $52)
+ (i32.const 944)
)
(i32.const 8)
)
)
+ (get_local $41)
)
- (i64.load
- (i32.add
- (i32.add
- (get_local $33)
- (i32.const 944)
- )
- (i32.const 8)
- )
- )
- (get_local $42)
+ (get_local $12)
+ (get_local $33)
)
- (get_local $12)
- (get_local $34)
+ (i64.const 0)
+ (get_local $42)
)
- (i64.const 0)
- (get_local $43)
- )
- (select
(select
- (i64.or
- (select
- (i64.load
- (i32.add
+ (select
+ (i64.or
+ (select
+ (i64.load
(i32.add
- (get_local $33)
- (i32.const 48)
+ (i32.add
+ (get_local $52)
+ (i32.const 48)
+ )
+ (i32.const 8)
)
- (i32.const 8)
)
+ (i64.const 0)
+ (get_local $50)
)
- (i64.const 0)
- (get_local $51)
- )
- (select
(select
- (i64.or
- (i64.load
- (i32.add
+ (select
+ (i64.or
+ (i64.load
(i32.add
- (get_local $33)
- (i32.const 80)
+ (i32.add
+ (get_local $52)
+ (i32.const 80)
+ )
+ (i32.const 8)
+ )
+ )
+ (i64.load
+ (i32.add
+ (i32.add
+ (get_local $52)
+ (i32.const 96)
+ )
+ (i32.const 8)
)
- (i32.const 8)
)
)
(i64.load
(i32.add
(i32.add
- (get_local $33)
- (i32.const 96)
+ (get_local $52)
+ (i32.const 112)
)
(i32.const 8)
)
)
+ (get_local $34)
)
- (i64.load
- (i32.add
- (i32.add
- (get_local $33)
- (i32.const 112)
- )
- (i32.const 8)
- )
- )
- (get_local $35)
+ (get_local $8)
+ (get_local $40)
)
- (get_local $8)
- (get_local $41)
)
- )
- (select
- (i64.load
- (i32.add
+ (select
+ (i64.load
(i32.add
- (get_local $33)
- (i32.const 176)
+ (i32.add
+ (get_local $52)
+ (i32.const 176)
+ )
+ (i32.const 8)
)
- (i32.const 8)
)
+ (i64.const 0)
+ (get_local $45)
)
- (i64.const 0)
- (get_local $46)
+ (get_local $51)
)
- (get_local $52)
+ (get_local $4)
+ (get_local $39)
)
- (get_local $4)
- (get_local $40)
)
- )
- (select
(select
(select
- (i64.or
- (i64.load
- (i32.add
+ (select
+ (i64.or
+ (i64.load
(i32.add
- (get_local $33)
- (i32.const 272)
+ (i32.add
+ (get_local $52)
+ (i32.const 272)
+ )
+ (i32.const 8)
+ )
+ )
+ (i64.load
+ (i32.add
+ (i32.add
+ (get_local $52)
+ (i32.const 288)
+ )
+ (i32.const 8)
)
- (i32.const 8)
)
)
(i64.load
(i32.add
(i32.add
- (get_local $33)
- (i32.const 288)
+ (get_local $52)
+ (i32.const 304)
)
(i32.const 8)
)
)
+ (get_local $47)
)
- (i64.load
- (i32.add
- (i32.add
- (get_local $33)
- (i32.const 304)
- )
- (i32.const 8)
- )
- )
- (get_local $48)
+ (get_local $4)
+ (get_local $37)
)
- (get_local $4)
- (get_local $38)
+ (i64.const 0)
+ (get_local $49)
)
- (i64.const 0)
- (get_local $50)
+ (get_local $43)
)
- (get_local $44)
+ (get_local $12)
+ (get_local $33)
)
- (get_local $12)
- (get_local $34)
)
)
- (i64.store
- (i32.add
- (get_local $0)
- (i32.const 80)
- )
- (select
+ (drop
+ (i64.store
+ (i32.add
+ (get_local $0)
+ (i32.const 80)
+ )
(select
- (i64.or
- (select
+ (select
+ (i64.or
(select
(select
- (i64.or
- (i64.load offset=912
- (get_local $33)
+ (select
+ (i64.or
+ (i64.load offset=912
+ (get_local $52)
+ )
+ (i64.load offset=928
+ (get_local $52)
+ )
)
- (i64.load offset=928
- (get_local $33)
+ (i64.load offset=944
+ (get_local $52)
)
+ (get_local $41)
)
- (i64.load offset=944
- (get_local $33)
- )
- (get_local $42)
+ (get_local $11)
+ (get_local $33)
)
- (get_local $11)
- (get_local $34)
+ (i64.const 0)
+ (get_local $42)
)
- (i64.const 0)
- (get_local $43)
- )
- (select
(select
- (i64.or
- (select
- (i64.load offset=48
- (get_local $33)
+ (select
+ (i64.or
+ (select
+ (i64.load offset=48
+ (get_local $52)
+ )
+ (i64.const 0)
+ (get_local $50)
)
- (i64.const 0)
- (get_local $51)
- )
- (select
(select
- (i64.or
- (i64.load offset=80
- (get_local $33)
+ (select
+ (i64.or
+ (i64.load offset=80
+ (get_local $52)
+ )
+ (i64.load offset=96
+ (get_local $52)
+ )
)
- (i64.load offset=96
- (get_local $33)
+ (i64.load offset=112
+ (get_local $52)
)
+ (get_local $34)
)
- (i64.load offset=112
- (get_local $33)
- )
- (get_local $35)
+ (get_local $7)
+ (get_local $40)
)
- (get_local $7)
- (get_local $41)
)
- )
- (select
- (i64.load offset=176
- (get_local $33)
+ (select
+ (i64.load offset=176
+ (get_local $52)
+ )
+ (i64.const 0)
+ (get_local $45)
)
- (i64.const 0)
- (get_local $46)
+ (get_local $51)
)
- (get_local $52)
+ (get_local $3)
+ (get_local $39)
)
- (get_local $3)
- (get_local $40)
)
- )
- (select
(select
(select
- (i64.or
- (i64.load offset=272
- (get_local $33)
+ (select
+ (i64.or
+ (i64.load offset=272
+ (get_local $52)
+ )
+ (i64.load offset=288
+ (get_local $52)
+ )
)
- (i64.load offset=288
- (get_local $33)
+ (i64.load offset=304
+ (get_local $52)
)
+ (get_local $47)
)
- (i64.load offset=304
- (get_local $33)
- )
- (get_local $48)
+ (get_local $3)
+ (get_local $37)
)
- (get_local $3)
- (get_local $38)
+ (i64.const 0)
+ (get_local $49)
)
- (i64.const 0)
- (get_local $50)
+ (get_local $43)
)
- (get_local $44)
+ (get_local $11)
+ (get_local $33)
)
- (get_local $11)
- (get_local $34)
)
)
- (i32.store
- (i32.const 4)
- (i32.add
- (get_local $33)
- (i32.const 1024)
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (i32.add
+ (get_local $52)
+ (i32.const 1024)
+ )
)
)
(return)
diff --git a/test/llvm_autogenerated/load-ext.wast b/test/llvm_autogenerated/load-ext.wast
index 67c07444d..cc6207cbe 100644
--- a/test/llvm_autogenerated/load-ext.wast
+++ b/test/llvm_autogenerated/load-ext.wast
@@ -1,17 +1,17 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
- (export "sext_i8_i32" $sext_i8_i32)
- (export "zext_i8_i32" $zext_i8_i32)
- (export "sext_i16_i32" $sext_i16_i32)
- (export "zext_i16_i32" $zext_i16_i32)
- (export "sext_i8_i64" $sext_i8_i64)
- (export "zext_i8_i64" $zext_i8_i64)
- (export "sext_i16_i64" $sext_i16_i64)
- (export "zext_i16_i64" $zext_i16_i64)
- (export "sext_i32_i64" $sext_i32_i64)
- (export "zext_i32_i64" $zext_i32_i64)
+ (export "memory" (memory $0))
+ (export "sext_i8_i32" (func $sext_i8_i32))
+ (export "zext_i8_i32" (func $zext_i8_i32))
+ (export "sext_i16_i32" (func $sext_i16_i32))
+ (export "zext_i16_i32" (func $zext_i16_i32))
+ (export "sext_i8_i64" (func $sext_i8_i64))
+ (export "zext_i8_i64" (func $zext_i8_i64))
+ (export "sext_i16_i64" (func $sext_i16_i64))
+ (export "zext_i16_i64" (func $zext_i16_i64))
+ (export "sext_i32_i64" (func $sext_i32_i64))
+ (export "zext_i32_i64" (func $zext_i32_i64))
(func $sext_i8_i32 (param $0 i32) (result i32)
(return
(i32.load8_s
diff --git a/test/llvm_autogenerated/load-store-i1.wast b/test/llvm_autogenerated/load-store-i1.wast
index 3138a07bf..b34bb5133 100644
--- a/test/llvm_autogenerated/load-store-i1.wast
+++ b/test/llvm_autogenerated/load-store-i1.wast
@@ -1,13 +1,13 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
- (export "load_u_i1_i32" $load_u_i1_i32)
- (export "load_s_i1_i32" $load_s_i1_i32)
- (export "load_u_i1_i64" $load_u_i1_i64)
- (export "load_s_i1_i64" $load_s_i1_i64)
- (export "store_i32_i1" $store_i32_i1)
- (export "store_i64_i1" $store_i64_i1)
+ (export "memory" (memory $0))
+ (export "load_u_i1_i32" (func $load_u_i1_i32))
+ (export "load_s_i1_i32" (func $load_s_i1_i32))
+ (export "load_u_i1_i64" (func $load_u_i1_i64))
+ (export "load_s_i1_i64" (func $load_s_i1_i64))
+ (export "store_i32_i1" (func $store_i32_i1))
+ (export "store_i64_i1" (func $store_i64_i1))
(func $load_u_i1_i32 (param $0 i32) (result i32)
(return
(i32.load8_u
@@ -49,21 +49,25 @@
)
)
(func $store_i32_i1 (param $0 i32) (param $1 i32)
- (i32.store8
- (get_local $0)
- (i32.and
- (get_local $1)
- (i32.const 1)
+ (drop
+ (i32.store8
+ (get_local $0)
+ (i32.and
+ (get_local $1)
+ (i32.const 1)
+ )
)
)
(return)
)
(func $store_i64_i1 (param $0 i32) (param $1 i64)
- (i64.store8
- (get_local $0)
- (i64.and
- (get_local $1)
- (i64.const 1)
+ (drop
+ (i64.store8
+ (get_local $0)
+ (i64.and
+ (get_local $1)
+ (i64.const 1)
+ )
)
)
(return)
diff --git a/test/llvm_autogenerated/load.wast b/test/llvm_autogenerated/load.wast
index 22774cc57..67c73c342 100644
--- a/test/llvm_autogenerated/load.wast
+++ b/test/llvm_autogenerated/load.wast
@@ -1,11 +1,11 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
- (export "ldi32" $ldi32)
- (export "ldi64" $ldi64)
- (export "ldf32" $ldf32)
- (export "ldf64" $ldf64)
+ (export "memory" (memory $0))
+ (export "ldi32" (func $ldi32))
+ (export "ldi64" (func $ldi64))
+ (export "ldf32" (func $ldf32))
+ (export "ldf64" (func $ldf64))
(func $ldi32 (param $0 i32) (result i32)
(return
(i32.load
diff --git a/test/llvm_autogenerated/mem-intrinsics.s b/test/llvm_autogenerated/mem-intrinsics.s
index 5efdeba00..858767466 100644
--- a/test/llvm_autogenerated/mem-intrinsics.s
+++ b/test/llvm_autogenerated/mem-intrinsics.s
@@ -1,5 +1,5 @@
.text
- .file "/s/llvm/llvm/test/CodeGen/WebAssembly/mem-intrinsics.ll"
+ .file "/s/llvm-upstream/llvm/test/CodeGen/WebAssembly/mem-intrinsics.ll"
.globl copy_yes
.type copy_yes,@function
copy_yes:
@@ -67,25 +67,25 @@ set_no:
.type frame_index,@function
frame_index:
.local i32
- i32.const $push6=, __stack_pointer
- i32.const $push3=, __stack_pointer
- i32.load $push4=, 0($pop3)
+ i32.const $push6=, 0
+ i32.const $push3=, 0
+ i32.load $push4=, __stack_pointer($pop3)
i32.const $push5=, 4096
- i32.sub $push12=, $pop4, $pop5
- i32.store $push16=, 0($pop6), $pop12
- tee_local $push15=, $0=, $pop16
+ i32.sub $push15=, $pop4, $pop5
+ tee_local $push14=, $0=, $pop15
+ i32.store $drop=, __stack_pointer($pop6), $pop14
i32.const $push10=, 2048
- i32.add $push11=, $pop15, $pop10
+ i32.add $push11=, $0, $pop10
i32.const $push2=, 0
i32.const $push1=, 1024
i32.call $drop=, memset@FUNCTION, $pop11, $pop2, $pop1
- i32.const $push9=, __stack_pointer
- i32.const $push14=, 0
- i32.const $push13=, 1024
- i32.call $push0=, memset@FUNCTION, $0, $pop14, $pop13
+ i32.const $push9=, 0
+ i32.const $push13=, 0
+ i32.const $push12=, 1024
+ i32.call $push0=, memset@FUNCTION, $0, $pop13, $pop12
i32.const $push7=, 4096
i32.add $push8=, $pop0, $pop7
- i32.store $drop=, 0($pop9), $pop8
+ i32.store $drop=, __stack_pointer($pop9), $pop8
return
.endfunc
.Lfunc_end6:
@@ -148,3 +148,5 @@ tail_dup_to_reuse_result:
.size tail_dup_to_reuse_result, .Lfunc_end8-tail_dup_to_reuse_result
+ .functype def, i32
+ .functype block_tail_dup, void
diff --git a/test/llvm_autogenerated/mem-intrinsics.wast b/test/llvm_autogenerated/mem-intrinsics.wast
index 52d52c13a..90ec611af 100644
--- a/test/llvm_autogenerated/mem-intrinsics.wast
+++ b/test/llvm_autogenerated/mem-intrinsics.wast
@@ -1,27 +1,25 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
- (type $FUNCSIG$v (func))
(type $FUNCSIG$i (func (result i32)))
+ (type $FUNCSIG$v (func))
(type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32)))
- (type $3 (func (param i32 i32 i32)))
- (type $4 (func (param i32 i32 i32 i32 i32) (result i32)))
- (import $block_tail_dup "env" "block_tail_dup")
- (import $def "env" "def" (result i32))
- (import $memcpy "env" "memcpy" (param i32 i32 i32) (result i32))
- (import $memmove "env" "memmove" (param i32 i32 i32) (result i32))
- (import $memset "env" "memset" (param i32 i32 i32) (result i32))
- (export "copy_yes" $copy_yes)
- (export "copy_no" $copy_no)
- (export "move_yes" $move_yes)
- (export "move_no" $move_no)
- (export "set_yes" $set_yes)
- (export "set_no" $set_no)
- (export "frame_index" $frame_index)
- (export "drop_result" $drop_result)
- (export "tail_dup_to_reuse_result" $tail_dup_to_reuse_result)
- (func $copy_yes (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (import "env" "block_tail_dup" (func $block_tail_dup))
+ (import "env" "def" (func $def (result i32)))
+ (import "env" "memcpy" (func $memcpy (param i32 i32 i32) (result i32)))
+ (import "env" "memmove" (func $memmove (param i32 i32 i32) (result i32)))
+ (import "env" "memset" (func $memset (param i32 i32 i32) (result i32)))
+ (export "memory" (memory $0))
+ (export "copy_yes" (func $copy_yes))
+ (export "copy_no" (func $copy_no))
+ (export "move_yes" (func $move_yes))
+ (export "move_no" (func $move_no))
+ (export "set_yes" (func $set_yes))
+ (export "set_no" (func $set_no))
+ (export "frame_index" (func $frame_index))
+ (export "drop_result" (func $drop_result))
+ (export "tail_dup_to_reuse_result" (func $tail_dup_to_reuse_result))
+ (func $copy_yes (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(return
(call_import $memcpy
(get_local $0)
@@ -30,7 +28,7 @@
)
)
)
- (func $copy_no (type $3) (param $0 i32) (param $1 i32) (param $2 i32)
+ (func $copy_no (param $0 i32) (param $1 i32) (param $2 i32)
(drop
(call_import $memcpy
(get_local $0)
@@ -40,7 +38,7 @@
)
(return)
)
- (func $move_yes (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (func $move_yes (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(return
(call_import $memmove
(get_local $0)
@@ -49,7 +47,7 @@
)
)
)
- (func $move_no (type $3) (param $0 i32) (param $1 i32) (param $2 i32)
+ (func $move_no (param $0 i32) (param $1 i32) (param $2 i32)
(drop
(call_import $memmove
(get_local $0)
@@ -59,7 +57,7 @@
)
(return)
)
- (func $set_yes (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (func $set_yes (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(return
(call_import $memset
(get_local $0)
@@ -68,7 +66,7 @@
)
)
)
- (func $set_no (type $3) (param $0 i32) (param $1 i32) (param $2 i32)
+ (func $set_no (param $0 i32) (param $1 i32) (param $2 i32)
(drop
(call_import $memset
(get_local $0)
@@ -78,51 +76,47 @@
)
(return)
)
- (func $frame_index (type $FUNCSIG$v)
+ (func $frame_index
(local $0 i32)
- (local $1 i32)
(drop
- (call_import $memset
- (i32.add
- (tee_local $0
- (block
- (block
- (set_local $1
- (i32.sub
- (i32.load
- (i32.const 4)
- )
- (i32.const 4096)
- )
- )
- (i32.store
- (i32.const 4)
- (get_local $1)
- )
- )
- (get_local $1)
+ (i32.store offset=4
+ (i32.const 0)
+ (tee_local $0
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
)
+ (i32.const 4096)
)
+ )
+ )
+ )
+ (drop
+ (call_import $memset
+ (i32.add
+ (get_local $0)
(i32.const 2048)
)
(i32.const 0)
(i32.const 1024)
)
)
- (i32.store
- (i32.const 4)
- (i32.add
- (call_import $memset
- (get_local $0)
- (i32.const 0)
- (i32.const 1024)
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (i32.add
+ (call_import $memset
+ (get_local $0)
+ (i32.const 0)
+ (i32.const 1024)
+ )
+ (i32.const 4096)
)
- (i32.const 4096)
)
)
(return)
)
- (func $drop_result (type $4) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32)
+ (func $drop_result (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32)
(block $label$0
(block $label$1
(block $label$2
@@ -142,7 +136,9 @@
)
)
)
- (call_import $block_tail_dup)
+ (drop
+ (call_import $block_tail_dup)
+ )
(return
(get_local $0)
)
@@ -154,12 +150,14 @@
(get_local $2)
)
)
- (call_import $block_tail_dup)
+ (drop
+ (call_import $block_tail_dup)
+ )
(return
(get_local $0)
)
)
- (func $tail_dup_to_reuse_result (type $4) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32)
+ (func $tail_dup_to_reuse_result (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32)
(block $label$0
(block $label$1
(block $label$2
diff --git a/test/llvm_autogenerated/memory-addr32.wast b/test/llvm_autogenerated/memory-addr32.wast
index d5e43423a..98edc6adf 100644
--- a/test/llvm_autogenerated/memory-addr32.wast
+++ b/test/llvm_autogenerated/memory-addr32.wast
@@ -1,17 +1,19 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
- (export "current_memory" $current_memory)
- (export "grow_memory" $grow_memory)
+ (export "memory" (memory $0))
+ (export "current_memory" (func $current_memory))
+ (export "grow_memory" (func $grow_memory))
(func $current_memory (result i32)
(return
(current_memory)
)
)
(func $grow_memory (param $0 i32)
- (grow_memory
- (get_local $0)
+ (drop
+ (grow_memory
+ (get_local $0)
+ )
)
(return)
)
diff --git a/test/llvm_autogenerated/non-executable-stack.wast b/test/llvm_autogenerated/non-executable-stack.wast
index 20a88f29f..6ef9977d2 100644
--- a/test/llvm_autogenerated/non-executable-stack.wast
+++ b/test/llvm_autogenerated/non-executable-stack.wast
@@ -1,6 +1,6 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
+ (export "memory" (memory $0))
)
;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] }
diff --git a/test/llvm_autogenerated/offset.s b/test/llvm_autogenerated/offset.s
index f267ea537..c7f415e5f 100644
--- a/test/llvm_autogenerated/offset.s
+++ b/test/llvm_autogenerated/offset.s
@@ -1,5 +1,5 @@
.text
- .file "/s/llvm/llvm/test/CodeGen/WebAssembly/offset.ll"
+ .file "/s/llvm-upstream/llvm/test/CodeGen/WebAssembly/offset.ll"
.globl load_i32_with_folded_offset
.type load_i32_with_folded_offset,@function
load_i32_with_folded_offset:
@@ -369,9 +369,10 @@ aggregate_load_store:
.type aggregate_return,@function
aggregate_return:
.param i32
+ i64.const $push0=, 0
+ i64.store $drop=, 8($0):p2align=2, $pop0
i64.const $push1=, 0
- i64.store $push0=, 8($0):p2align=2, $pop1
- i64.store $drop=, 0($0):p2align=2, $pop0
+ i64.store $drop=, 0($0):p2align=2, $pop1
.endfunc
.Lfunc_end33:
.size aggregate_return, .Lfunc_end33-aggregate_return
@@ -380,12 +381,14 @@ aggregate_return:
.type aggregate_return_without_merge,@function
aggregate_return_without_merge:
.param i32
+ i32.const $push0=, 0
+ i32.store8 $drop=, 14($0), $pop0
+ i32.const $push3=, 0
+ i32.store16 $drop=, 12($0), $pop3
i32.const $push2=, 0
- i32.store8 $push0=, 14($0), $pop2
- i32.store16 $push1=, 12($0), $pop0
- i32.store $drop=, 8($0), $pop1
- i64.const $push3=, 0
- i64.store $drop=, 0($0), $pop3
+ i32.store $drop=, 8($0), $pop2
+ i64.const $push1=, 0
+ i64.store $drop=, 0($0), $pop1
.endfunc
.Lfunc_end34:
.size aggregate_return_without_merge, .Lfunc_end34-aggregate_return_without_merge
diff --git a/test/llvm_autogenerated/offset.wast b/test/llvm_autogenerated/offset.wast
index b86e801f2..eab28eecc 100644
--- a/test/llvm_autogenerated/offset.wast
+++ b/test/llvm_autogenerated/offset.wast
@@ -2,59 +2,53 @@
(memory 1)
(data (i32.const 4) "\10\04\00\00")
(data (i32.const 12) "\00\00\00\00")
- (export "memory" memory)
- (type $0 (func (param i32) (result i32)))
- (type $1 (func (param i32) (result i64)))
- (type $2 (func (param i32)))
- (type $3 (func (result i32)))
- (type $4 (func))
- (type $5 (func (param i32 i32)))
- (export "load_i32_with_folded_offset" $load_i32_with_folded_offset)
- (export "load_i32_with_folded_gep_offset" $load_i32_with_folded_gep_offset)
- (export "load_i32_with_unfolded_gep_negative_offset" $load_i32_with_unfolded_gep_negative_offset)
- (export "load_i32_with_unfolded_offset" $load_i32_with_unfolded_offset)
- (export "load_i32_with_unfolded_gep_offset" $load_i32_with_unfolded_gep_offset)
- (export "load_i64_with_folded_offset" $load_i64_with_folded_offset)
- (export "load_i64_with_folded_gep_offset" $load_i64_with_folded_gep_offset)
- (export "load_i64_with_unfolded_gep_negative_offset" $load_i64_with_unfolded_gep_negative_offset)
- (export "load_i64_with_unfolded_offset" $load_i64_with_unfolded_offset)
- (export "load_i64_with_unfolded_gep_offset" $load_i64_with_unfolded_gep_offset)
- (export "load_i32_with_folded_or_offset" $load_i32_with_folded_or_offset)
- (export "store_i32_with_folded_offset" $store_i32_with_folded_offset)
- (export "store_i32_with_folded_gep_offset" $store_i32_with_folded_gep_offset)
- (export "store_i32_with_unfolded_gep_negative_offset" $store_i32_with_unfolded_gep_negative_offset)
- (export "store_i32_with_unfolded_offset" $store_i32_with_unfolded_offset)
- (export "store_i32_with_unfolded_gep_offset" $store_i32_with_unfolded_gep_offset)
- (export "store_i64_with_folded_offset" $store_i64_with_folded_offset)
- (export "store_i64_with_folded_gep_offset" $store_i64_with_folded_gep_offset)
- (export "store_i64_with_unfolded_gep_negative_offset" $store_i64_with_unfolded_gep_negative_offset)
- (export "store_i64_with_unfolded_offset" $store_i64_with_unfolded_offset)
- (export "store_i64_with_unfolded_gep_offset" $store_i64_with_unfolded_gep_offset)
- (export "store_i32_with_folded_or_offset" $store_i32_with_folded_or_offset)
- (export "load_i32_from_numeric_address" $load_i32_from_numeric_address)
- (export "load_i32_from_global_address" $load_i32_from_global_address)
- (export "store_i32_to_numeric_address" $store_i32_to_numeric_address)
- (export "store_i32_to_global_address" $store_i32_to_global_address)
- (export "load_i8_s_with_folded_offset" $load_i8_s_with_folded_offset)
- (export "load_i8_s_with_folded_gep_offset" $load_i8_s_with_folded_gep_offset)
- (export "load_i8_u_with_folded_offset" $load_i8_u_with_folded_offset)
- (export "load_i8_u_with_folded_gep_offset" $load_i8_u_with_folded_gep_offset)
- (export "store_i8_with_folded_offset" $store_i8_with_folded_offset)
- (export "store_i8_with_folded_gep_offset" $store_i8_with_folded_gep_offset)
- (export "aggregate_load_store" $aggregate_load_store)
- (export "aggregate_return" $aggregate_return)
- (export "aggregate_return_without_merge" $aggregate_return_without_merge)
- (func $load_i32_with_folded_offset (type $0) (param $0 i32) (result i32)
+ (export "memory" (memory $0))
+ (export "load_i32_with_folded_offset" (func $load_i32_with_folded_offset))
+ (export "load_i32_with_folded_gep_offset" (func $load_i32_with_folded_gep_offset))
+ (export "load_i32_with_unfolded_gep_negative_offset" (func $load_i32_with_unfolded_gep_negative_offset))
+ (export "load_i32_with_unfolded_offset" (func $load_i32_with_unfolded_offset))
+ (export "load_i32_with_unfolded_gep_offset" (func $load_i32_with_unfolded_gep_offset))
+ (export "load_i64_with_folded_offset" (func $load_i64_with_folded_offset))
+ (export "load_i64_with_folded_gep_offset" (func $load_i64_with_folded_gep_offset))
+ (export "load_i64_with_unfolded_gep_negative_offset" (func $load_i64_with_unfolded_gep_negative_offset))
+ (export "load_i64_with_unfolded_offset" (func $load_i64_with_unfolded_offset))
+ (export "load_i64_with_unfolded_gep_offset" (func $load_i64_with_unfolded_gep_offset))
+ (export "load_i32_with_folded_or_offset" (func $load_i32_with_folded_or_offset))
+ (export "store_i32_with_folded_offset" (func $store_i32_with_folded_offset))
+ (export "store_i32_with_folded_gep_offset" (func $store_i32_with_folded_gep_offset))
+ (export "store_i32_with_unfolded_gep_negative_offset" (func $store_i32_with_unfolded_gep_negative_offset))
+ (export "store_i32_with_unfolded_offset" (func $store_i32_with_unfolded_offset))
+ (export "store_i32_with_unfolded_gep_offset" (func $store_i32_with_unfolded_gep_offset))
+ (export "store_i64_with_folded_offset" (func $store_i64_with_folded_offset))
+ (export "store_i64_with_folded_gep_offset" (func $store_i64_with_folded_gep_offset))
+ (export "store_i64_with_unfolded_gep_negative_offset" (func $store_i64_with_unfolded_gep_negative_offset))
+ (export "store_i64_with_unfolded_offset" (func $store_i64_with_unfolded_offset))
+ (export "store_i64_with_unfolded_gep_offset" (func $store_i64_with_unfolded_gep_offset))
+ (export "store_i32_with_folded_or_offset" (func $store_i32_with_folded_or_offset))
+ (export "load_i32_from_numeric_address" (func $load_i32_from_numeric_address))
+ (export "load_i32_from_global_address" (func $load_i32_from_global_address))
+ (export "store_i32_to_numeric_address" (func $store_i32_to_numeric_address))
+ (export "store_i32_to_global_address" (func $store_i32_to_global_address))
+ (export "load_i8_s_with_folded_offset" (func $load_i8_s_with_folded_offset))
+ (export "load_i8_s_with_folded_gep_offset" (func $load_i8_s_with_folded_gep_offset))
+ (export "load_i8_u_with_folded_offset" (func $load_i8_u_with_folded_offset))
+ (export "load_i8_u_with_folded_gep_offset" (func $load_i8_u_with_folded_gep_offset))
+ (export "store_i8_with_folded_offset" (func $store_i8_with_folded_offset))
+ (export "store_i8_with_folded_gep_offset" (func $store_i8_with_folded_gep_offset))
+ (export "aggregate_load_store" (func $aggregate_load_store))
+ (export "aggregate_return" (func $aggregate_return))
+ (export "aggregate_return_without_merge" (func $aggregate_return_without_merge))
+ (func $load_i32_with_folded_offset (param $0 i32) (result i32)
(i32.load offset=24
(get_local $0)
)
)
- (func $load_i32_with_folded_gep_offset (type $0) (param $0 i32) (result i32)
+ (func $load_i32_with_folded_gep_offset (param $0 i32) (result i32)
(i32.load offset=24
(get_local $0)
)
)
- (func $load_i32_with_unfolded_gep_negative_offset (type $0) (param $0 i32) (result i32)
+ (func $load_i32_with_unfolded_gep_negative_offset (param $0 i32) (result i32)
(i32.load
(i32.add
(get_local $0)
@@ -62,7 +56,7 @@
)
)
)
- (func $load_i32_with_unfolded_offset (type $0) (param $0 i32) (result i32)
+ (func $load_i32_with_unfolded_offset (param $0 i32) (result i32)
(i32.load
(i32.add
(get_local $0)
@@ -70,7 +64,7 @@
)
)
)
- (func $load_i32_with_unfolded_gep_offset (type $0) (param $0 i32) (result i32)
+ (func $load_i32_with_unfolded_gep_offset (param $0 i32) (result i32)
(i32.load
(i32.add
(get_local $0)
@@ -78,17 +72,17 @@
)
)
)
- (func $load_i64_with_folded_offset (type $1) (param $0 i32) (result i64)
+ (func $load_i64_with_folded_offset (param $0 i32) (result i64)
(i64.load offset=24
(get_local $0)
)
)
- (func $load_i64_with_folded_gep_offset (type $1) (param $0 i32) (result i64)
+ (func $load_i64_with_folded_gep_offset (param $0 i32) (result i64)
(i64.load offset=24
(get_local $0)
)
)
- (func $load_i64_with_unfolded_gep_negative_offset (type $1) (param $0 i32) (result i64)
+ (func $load_i64_with_unfolded_gep_negative_offset (param $0 i32) (result i64)
(i64.load
(i32.add
(get_local $0)
@@ -96,7 +90,7 @@
)
)
)
- (func $load_i64_with_unfolded_offset (type $1) (param $0 i32) (result i64)
+ (func $load_i64_with_unfolded_offset (param $0 i32) (result i64)
(i64.load
(i32.add
(get_local $0)
@@ -104,7 +98,7 @@
)
)
)
- (func $load_i64_with_unfolded_gep_offset (type $1) (param $0 i32) (result i64)
+ (func $load_i64_with_unfolded_gep_offset (param $0 i32) (result i64)
(i64.load
(i32.add
(get_local $0)
@@ -112,7 +106,7 @@
)
)
)
- (func $load_i32_with_folded_or_offset (type $0) (param $0 i32) (result i32)
+ (func $load_i32_with_folded_or_offset (param $0 i32) (result i32)
(i32.load8_s offset=2
(i32.and
(get_local $0)
@@ -120,148 +114,178 @@
)
)
)
- (func $store_i32_with_folded_offset (type $2) (param $0 i32)
- (i32.store offset=24
- (get_local $0)
- (i32.const 0)
- )
- )
- (func $store_i32_with_folded_gep_offset (type $2) (param $0 i32)
- (i32.store offset=24
- (get_local $0)
- (i32.const 0)
- )
- )
- (func $store_i32_with_unfolded_gep_negative_offset (type $2) (param $0 i32)
- (i32.store
- (i32.add
+ (func $store_i32_with_folded_offset (param $0 i32)
+ (drop
+ (i32.store offset=24
(get_local $0)
- (i32.const -24)
+ (i32.const 0)
)
- (i32.const 0)
)
)
- (func $store_i32_with_unfolded_offset (type $2) (param $0 i32)
- (i32.store
- (i32.add
+ (func $store_i32_with_folded_gep_offset (param $0 i32)
+ (drop
+ (i32.store offset=24
(get_local $0)
- (i32.const 24)
+ (i32.const 0)
)
- (i32.const 0)
)
)
- (func $store_i32_with_unfolded_gep_offset (type $2) (param $0 i32)
- (i32.store
- (i32.add
- (get_local $0)
- (i32.const 24)
+ (func $store_i32_with_unfolded_gep_negative_offset (param $0 i32)
+ (drop
+ (i32.store
+ (i32.add
+ (get_local $0)
+ (i32.const -24)
+ )
+ (i32.const 0)
)
- (i32.const 0)
)
)
- (func $store_i64_with_folded_offset (type $2) (param $0 i32)
- (i64.store offset=24
- (get_local $0)
- (i64.const 0)
+ (func $store_i32_with_unfolded_offset (param $0 i32)
+ (drop
+ (i32.store
+ (i32.add
+ (get_local $0)
+ (i32.const 24)
+ )
+ (i32.const 0)
+ )
)
)
- (func $store_i64_with_folded_gep_offset (type $2) (param $0 i32)
- (i64.store offset=24
- (get_local $0)
- (i64.const 0)
+ (func $store_i32_with_unfolded_gep_offset (param $0 i32)
+ (drop
+ (i32.store
+ (i32.add
+ (get_local $0)
+ (i32.const 24)
+ )
+ (i32.const 0)
+ )
)
)
- (func $store_i64_with_unfolded_gep_negative_offset (type $2) (param $0 i32)
- (i64.store
- (i32.add
+ (func $store_i64_with_folded_offset (param $0 i32)
+ (drop
+ (i64.store offset=24
(get_local $0)
- (i32.const -24)
+ (i64.const 0)
)
- (i64.const 0)
)
)
- (func $store_i64_with_unfolded_offset (type $2) (param $0 i32)
- (i64.store
- (i32.add
+ (func $store_i64_with_folded_gep_offset (param $0 i32)
+ (drop
+ (i64.store offset=24
(get_local $0)
- (i32.const 24)
+ (i64.const 0)
)
- (i64.const 0)
)
)
- (func $store_i64_with_unfolded_gep_offset (type $2) (param $0 i32)
- (i64.store
- (i32.add
- (get_local $0)
- (i32.const 24)
+ (func $store_i64_with_unfolded_gep_negative_offset (param $0 i32)
+ (drop
+ (i64.store
+ (i32.add
+ (get_local $0)
+ (i32.const -24)
+ )
+ (i64.const 0)
)
- (i64.const 0)
)
)
- (func $store_i32_with_folded_or_offset (type $2) (param $0 i32)
- (i32.store8 offset=2
- (i32.and
- (get_local $0)
- (i32.const -4)
+ (func $store_i64_with_unfolded_offset (param $0 i32)
+ (drop
+ (i64.store
+ (i32.add
+ (get_local $0)
+ (i32.const 24)
+ )
+ (i64.const 0)
+ )
+ )
+ )
+ (func $store_i64_with_unfolded_gep_offset (param $0 i32)
+ (drop
+ (i64.store
+ (i32.add
+ (get_local $0)
+ (i32.const 24)
+ )
+ (i64.const 0)
+ )
+ )
+ )
+ (func $store_i32_with_folded_or_offset (param $0 i32)
+ (drop
+ (i32.store8 offset=2
+ (i32.and
+ (get_local $0)
+ (i32.const -4)
+ )
+ (i32.const 0)
)
- (i32.const 0)
)
)
- (func $load_i32_from_numeric_address (type $3) (result i32)
+ (func $load_i32_from_numeric_address (result i32)
(i32.load offset=42
(i32.const 0)
)
)
- (func $load_i32_from_global_address (type $3) (result i32)
+ (func $load_i32_from_global_address (result i32)
(i32.load offset=12
(i32.const 0)
)
)
- (func $store_i32_to_numeric_address (type $4)
- (i32.store offset=42
- (i32.const 0)
- (i32.const 0)
+ (func $store_i32_to_numeric_address
+ (drop
+ (i32.store offset=42
+ (i32.const 0)
+ (i32.const 0)
+ )
)
)
- (func $store_i32_to_global_address (type $4)
- (i32.store offset=12
- (i32.const 0)
- (i32.const 0)
+ (func $store_i32_to_global_address
+ (drop
+ (i32.store offset=12
+ (i32.const 0)
+ (i32.const 0)
+ )
)
)
- (func $load_i8_s_with_folded_offset (type $0) (param $0 i32) (result i32)
+ (func $load_i8_s_with_folded_offset (param $0 i32) (result i32)
(i32.load8_s offset=24
(get_local $0)
)
)
- (func $load_i8_s_with_folded_gep_offset (type $0) (param $0 i32) (result i32)
+ (func $load_i8_s_with_folded_gep_offset (param $0 i32) (result i32)
(i32.load8_s offset=24
(get_local $0)
)
)
- (func $load_i8_u_with_folded_offset (type $0) (param $0 i32) (result i32)
+ (func $load_i8_u_with_folded_offset (param $0 i32) (result i32)
(i32.load8_u offset=24
(get_local $0)
)
)
- (func $load_i8_u_with_folded_gep_offset (type $0) (param $0 i32) (result i32)
+ (func $load_i8_u_with_folded_gep_offset (param $0 i32) (result i32)
(i32.load8_u offset=24
(get_local $0)
)
)
- (func $store_i8_with_folded_offset (type $2) (param $0 i32)
- (i32.store8 offset=24
- (get_local $0)
- (i32.const 0)
+ (func $store_i8_with_folded_offset (param $0 i32)
+ (drop
+ (i32.store8 offset=24
+ (get_local $0)
+ (i32.const 0)
+ )
)
)
- (func $store_i8_with_folded_gep_offset (type $2) (param $0 i32)
- (i32.store8 offset=24
- (get_local $0)
- (i32.const 0)
+ (func $store_i8_with_folded_gep_offset (param $0 i32)
+ (drop
+ (i32.store8 offset=24
+ (get_local $0)
+ (i32.const 0)
+ )
)
)
- (func $aggregate_load_store (type $5) (param $0 i32) (param $1 i32)
+ (func $aggregate_load_store (param $0 i32) (param $1 i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
@@ -280,75 +304,71 @@
(get_local $0)
)
)
- (i32.store offset=12
- (get_local $1)
- (i32.load offset=12
- (get_local $0)
+ (drop
+ (i32.store offset=12
+ (get_local $1)
+ (i32.load offset=12
+ (get_local $0)
+ )
)
)
- (i32.store offset=8
- (get_local $1)
- (get_local $4)
+ (drop
+ (i32.store offset=8
+ (get_local $1)
+ (get_local $4)
+ )
)
- (i32.store offset=4
- (get_local $1)
- (get_local $3)
+ (drop
+ (i32.store offset=4
+ (get_local $1)
+ (get_local $3)
+ )
)
- (i32.store
- (get_local $1)
- (get_local $2)
+ (drop
+ (i32.store
+ (get_local $1)
+ (get_local $2)
+ )
)
)
- (func $aggregate_return (type $2) (param $0 i32)
- (local $1 i64)
- (i64.store align=4
- (get_local $0)
- (block
- (block
- (set_local $1
- (i64.const 0)
- )
- (i64.store offset=8 align=4
- (get_local $0)
- (get_local $1)
- )
- )
- (get_local $1)
+ (func $aggregate_return (param $0 i32)
+ (drop
+ (i64.store offset=8 align=4
+ (get_local $0)
+ (i64.const 0)
+ )
+ )
+ (drop
+ (i64.store align=4
+ (get_local $0)
+ (i64.const 0)
)
)
)
- (func $aggregate_return_without_merge (type $2) (param $0 i32)
- (local $1 i32)
- (local $2 i32)
- (i32.store offset=8
- (get_local $0)
- (block
- (block
- (set_local $2
- (block
- (block
- (set_local $1
- (i32.const 0)
- )
- (i32.store8 offset=14
- (get_local $0)
- (get_local $1)
- )
- )
- (get_local $1)
- )
- )
- (i32.store16 offset=12
- (get_local $0)
- (get_local $2)
- )
- )
- (get_local $2)
+ (func $aggregate_return_without_merge (param $0 i32)
+ (drop
+ (i32.store8 offset=14
+ (get_local $0)
+ (i32.const 0)
)
)
- (i64.store
- (get_local $0)
- (i64.const 0)
+ (drop
+ (i32.store16 offset=12
+ (get_local $0)
+ (i32.const 0)
+ )
+ )
+ (drop
+ (i32.store offset=8
+ (get_local $0)
+ (i32.const 0)
+ )
+ )
+ (drop
+ (i64.store
+ (get_local $0)
+ (i64.const 0)
+ )
)
)
)
diff --git a/test/llvm_autogenerated/phi.wast b/test/llvm_autogenerated/phi.wast
index 6975b7197..6ecc3f395 100644
--- a/test/llvm_autogenerated/phi.wast
+++ b/test/llvm_autogenerated/phi.wast
@@ -1,9 +1,9 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
- (export "test0" $test0)
- (export "test1" $test1)
+ (export "memory" (memory $0))
+ (export "test0" (func $test0))
+ (export "test1" (func $test1))
(func $test0 (param $0 i32) (result i32)
(block $label$0
(br_if $label$0
@@ -37,25 +37,27 @@
(set_local $4
(i32.const 0)
)
- (loop $label$1 $label$0
- (set_local $1
- (get_local $2)
- )
- (set_local $2
- (get_local $3)
- )
- (set_local $3
- (get_local $1)
- )
- (br_if $label$0
- (i32.lt_s
- (tee_local $4
- (i32.add
- (get_local $4)
- (i32.const 1)
+ (block $label$1
+ (loop $label$0
+ (set_local $1
+ (get_local $2)
+ )
+ (set_local $2
+ (get_local $3)
+ )
+ (set_local $3
+ (get_local $1)
+ )
+ (br_if $label$0
+ (i32.lt_s
+ (tee_local $4
+ (i32.add
+ (get_local $4)
+ (i32.const 1)
+ )
)
+ (get_local $0)
)
- (get_local $0)
)
)
)
diff --git a/test/llvm_autogenerated/reg-stackify.s b/test/llvm_autogenerated/reg-stackify.s
index cb813d3cc..90c17503b 100644
--- a/test/llvm_autogenerated/reg-stackify.s
+++ b/test/llvm_autogenerated/reg-stackify.s
@@ -1,5 +1,5 @@
.text
- .file "/s/llvm/llvm/test/CodeGen/WebAssembly/reg-stackify.ll"
+ .file "/s/llvm-upstream/llvm/test/CodeGen/WebAssembly/reg-stackify.ll"
.globl no0
.type no0,@function
no0:
@@ -155,11 +155,11 @@ multiple_uses:
stackify_store_across_side_effects:
.Lfunc_begin9:
.param i32
- .local i64
i64.const $push0=, 4611686018427387904
- i64.store $1=, 0($0), $pop0
+ i64.store $drop=, 0($0), $pop0
call evoke_side_effects@FUNCTION
- i64.store $drop=, 0($0), $1
+ i64.const $push1=, 4611686018427387904
+ i64.store $drop=, 0($0), $pop1
call evoke_side_effects@FUNCTION
return
.endfunc
@@ -351,9 +351,9 @@ no_stackify_store_past_load:
.Lfunc_begin18:
.param i32, i32, i32
.result i32
- i32.store $1=, 0($1), $0
+ i32.store $drop=, 0($1), $0
i32.load $2=, 0($2)
- i32.call $drop=, callee@FUNCTION, $1
+ i32.call $drop=, callee@FUNCTION, $0
return $2
.endfunc
.Lfunc_end18:
@@ -365,10 +365,10 @@ store_past_invar_load:
.Lfunc_begin19:
.param i32, i32, i32
.result i32
- i32.store $push0=, 0($1), $0
- i32.call $drop=, callee@FUNCTION, $pop0
- i32.load $push1=, 0($2)
- return $pop1
+ i32.store $drop=, 0($1), $0
+ i32.call $drop=, callee@FUNCTION, $0
+ i32.load $push0=, 0($2)
+ return $pop0
.endfunc
.Lfunc_end19:
.size store_past_invar_load, .Lfunc_end19-store_past_invar_load
@@ -388,21 +388,21 @@ no_stackify_past_epilogue:
.Lfunc_begin21:
.result i32
.local i32, i32
- i32.const $push3=, __stack_pointer
- i32.const $push0=, __stack_pointer
- i32.load $push1=, 0($pop0)
+ i32.const $push3=, 0
+ i32.const $push0=, 0
+ i32.load $push1=, __stack_pointer($pop0)
i32.const $push2=, 16
- i32.sub $push9=, $pop1, $pop2
- i32.store $push11=, 0($pop3), $pop9
- tee_local $push10=, $0=, $pop11
+ i32.sub $push10=, $pop1, $pop2
+ tee_local $push9=, $1=, $pop10
+ i32.store $drop=, __stack_pointer($pop3), $pop9
i32.const $push7=, 12
- i32.add $push8=, $pop10, $pop7
- i32.call $1=, use_memory@FUNCTION, $pop8
- i32.const $push6=, __stack_pointer
+ i32.add $push8=, $1, $pop7
+ i32.call $0=, use_memory@FUNCTION, $pop8
+ i32.const $push6=, 0
i32.const $push4=, 16
- i32.add $push5=, $0, $pop4
- i32.store $drop=, 0($pop6), $pop5
- return $1
+ i32.add $push5=, $1, $pop4
+ i32.store $drop=, __stack_pointer($pop6), $pop5
+ return $0
.endfunc
.Lfunc_end21:
.size no_stackify_past_epilogue, .Lfunc_end21-no_stackify_past_epilogue
@@ -437,13 +437,13 @@ stackpointer_dependency:
.param i32
.result i32
.local i32
- i32.const $push0=, __stack_pointer
- i32.load $push2=, 0($pop0)
+ i32.const $push0=, 0
+ i32.load $push2=, __stack_pointer($pop0)
copy_local $push4=, $pop2
tee_local $push3=, $1=, $pop4
i32.call $0=, stackpointer_callee@FUNCTION, $0, $pop3
- i32.const $push1=, __stack_pointer
- i32.store $drop=, 0($pop1), $1
+ i32.const $push1=, 0
+ i32.store $drop=, __stack_pointer($pop1), $1
return $0
.endfunc
.Lfunc_end23:
@@ -458,3 +458,63 @@ count:
.int32 0
.size count, 4
+ .section .debug_str,"MS",@progbits,1
+.Linfo_string0:
+ .asciz "clang version 3.9.0 (trunk 266005) (llvm/trunk 266105)"
+.Linfo_string1:
+ .asciz "test.c"
+.Linfo_string2:
+ .asciz "/"
+ .section .debug_loc,"",@progbits
+ .section .debug_abbrev,"",@progbits
+.Lsection_abbrev:
+ .int8 1
+ .int8 17
+ .int8 0
+ .int8 37
+ .int8 14
+ .int8 19
+ .int8 5
+ .int8 3
+ .int8 14
+ .int8 16
+ .int8 23
+ .int8 27
+ .int8 14
+ .int8 0
+ .int8 0
+ .int8 0
+ .section .debug_info,"",@progbits
+.Lsection_info:
+.Lcu_begin0:
+ .int32 26
+ .int16 4
+ .int32 .Lsection_abbrev
+ .int8 4
+ .int8 1
+ .int32 .Linfo_string0
+ .int16 12
+ .int32 .Linfo_string1
+ .int32 .Lline_table_start0
+ .int32 .Linfo_string2
+ .section .debug_ranges,"",@progbits
+.Ldebug_range:
+ .section .debug_macinfo,"",@progbits
+.Ldebug_macinfo:
+.Lcu_macro_begin0:
+ .int8 0
+
+ .functype readnone_callee, i32
+ .functype readonly_callee, i32
+ .functype evoke_side_effects, void
+ .functype use_a, void, i32
+ .functype use_b, void, i32
+ .functype use_2, void, i32, i32
+ .functype red, i32
+ .functype green, i32
+ .functype blue, i32
+ .functype callee, i32, i32
+ .functype use_memory, i32, i32
+ .functype stackpointer_callee, i32, i32, i32
+ .section .debug_line,"",@progbits
+.Lline_table_start0:
diff --git a/test/llvm_autogenerated/reg-stackify.wast b/test/llvm_autogenerated/reg-stackify.wast
index fa4225900..299d85515 100644
--- a/test/llvm_autogenerated/reg-stackify.wast
+++ b/test/llvm_autogenerated/reg-stackify.wast
@@ -2,86 +2,87 @@
(memory 1)
(data (i32.const 4) "\10\04\00\00")
(data (i32.const 12) "\00\00\00\00")
- (export "memory" memory)
(type $FUNCSIG$i (func (result i32)))
(type $FUNCSIG$ii (func (param i32) (result i32)))
(type $FUNCSIG$v (func))
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(type $FUNCSIG$vii (func (param i32 i32)))
(type $FUNCSIG$vi (func (param i32)))
- (type $6 (func (param i32 i32 i32) (result i32)))
- (type $7 (func (param i32 i32 i32 i32) (result i32)))
- (type $8 (func (param i32 i32 i32)))
- (type $9 (func (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) (result i32)))
- (type $10 (func (param i32 i32 i32 i32 i32)))
- (import $blue "env" "blue" (result i32))
- (import $callee "env" "callee" (param i32) (result i32))
- (import $evoke_side_effects "env" "evoke_side_effects")
- (import $green "env" "green" (result i32))
- (import $readnone_callee "env" "readnone_callee" (result i32))
- (import $readonly_callee "env" "readonly_callee" (result i32))
- (import $red "env" "red" (result i32))
- (import $stackpointer_callee "env" "stackpointer_callee" (param i32 i32) (result i32))
- (import $use_2 "env" "use_2" (param i32 i32))
- (import $use_a "env" "use_a" (param i32))
- (import $use_b "env" "use_b" (param i32))
- (import $use_memory "env" "use_memory" (param i32) (result i32))
- (export "no0" $no0)
- (export "no1" $no1)
- (export "yes0" $yes0)
- (export "yes1" $yes1)
- (export "sink_trap" $sink_trap)
- (export "sink_readnone_call" $sink_readnone_call)
- (export "no_sink_readonly_call" $no_sink_readonly_call)
- (export "stack_uses" $stack_uses)
- (export "multiple_uses" $multiple_uses)
- (export "stackify_store_across_side_effects" $stackify_store_across_side_effects)
- (export "div_tree" $div_tree)
- (export "simple_multiple_use" $simple_multiple_use)
- (export "multiple_uses_in_same_insn" $multiple_uses_in_same_insn)
- (export "commute" $commute)
- (export "no_stackify_past_use" $no_stackify_past_use)
- (export "commute_to_fix_ordering" $commute_to_fix_ordering)
- (export "multiple_defs" $multiple_defs)
- (export "no_stackify_call_past_load" $no_stackify_call_past_load)
- (export "no_stackify_store_past_load" $no_stackify_store_past_load)
- (export "store_past_invar_load" $store_past_invar_load)
- (export "ignore_dbg_value" $ignore_dbg_value)
- (export "no_stackify_past_epilogue" $no_stackify_past_epilogue)
- (export "stackify_indvar" $stackify_indvar)
- (export "stackpointer_dependency" $stackpointer_dependency)
- (func $no0 (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
+ (import "env" "blue" (func $blue (result i32)))
+ (import "env" "callee" (func $callee (param i32) (result i32)))
+ (import "env" "evoke_side_effects" (func $evoke_side_effects))
+ (import "env" "green" (func $green (result i32)))
+ (import "env" "readnone_callee" (func $readnone_callee (result i32)))
+ (import "env" "readonly_callee" (func $readonly_callee (result i32)))
+ (import "env" "red" (func $red (result i32)))
+ (import "env" "stackpointer_callee" (func $stackpointer_callee (param i32 i32) (result i32)))
+ (import "env" "use_2" (func $use_2 (param i32 i32)))
+ (import "env" "use_a" (func $use_a (param i32)))
+ (import "env" "use_b" (func $use_b (param i32)))
+ (import "env" "use_memory" (func $use_memory (param i32) (result i32)))
+ (export "memory" (memory $0))
+ (export "no0" (func $no0))
+ (export "no1" (func $no1))
+ (export "yes0" (func $yes0))
+ (export "yes1" (func $yes1))
+ (export "sink_trap" (func $sink_trap))
+ (export "sink_readnone_call" (func $sink_readnone_call))
+ (export "no_sink_readonly_call" (func $no_sink_readonly_call))
+ (export "stack_uses" (func $stack_uses))
+ (export "multiple_uses" (func $multiple_uses))
+ (export "stackify_store_across_side_effects" (func $stackify_store_across_side_effects))
+ (export "div_tree" (func $div_tree))
+ (export "simple_multiple_use" (func $simple_multiple_use))
+ (export "multiple_uses_in_same_insn" (func $multiple_uses_in_same_insn))
+ (export "commute" (func $commute))
+ (export "no_stackify_past_use" (func $no_stackify_past_use))
+ (export "commute_to_fix_ordering" (func $commute_to_fix_ordering))
+ (export "multiple_defs" (func $multiple_defs))
+ (export "no_stackify_call_past_load" (func $no_stackify_call_past_load))
+ (export "no_stackify_store_past_load" (func $no_stackify_store_past_load))
+ (export "store_past_invar_load" (func $store_past_invar_load))
+ (export "ignore_dbg_value" (func $ignore_dbg_value))
+ (export "no_stackify_past_epilogue" (func $no_stackify_past_epilogue))
+ (export "stackify_indvar" (func $stackify_indvar))
+ (export "stackpointer_dependency" (func $stackpointer_dependency))
+ (func $no0 (param $0 i32) (param $1 i32) (result i32)
(set_local $1
(i32.load
(get_local $1)
)
)
- (i32.store
- (get_local $0)
- (i32.const 0)
+ (drop
+ (i32.store
+ (get_local $0)
+ (i32.const 0)
+ )
)
(return
(get_local $1)
)
)
- (func $no1 (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
+ (func $no1 (param $0 i32) (param $1 i32) (result i32)
(set_local $1
(i32.load
(get_local $1)
)
)
- (i32.store
- (get_local $0)
- (i32.const 0)
+ (drop
+ (i32.store
+ (get_local $0)
+ (i32.const 0)
+ )
)
(return
(get_local $1)
)
)
- (func $yes0 (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
- (i32.store
- (get_local $0)
- (i32.const 0)
+ (func $yes0 (param $0 i32) (param $1 i32) (result i32)
+ (drop
+ (i32.store
+ (get_local $0)
+ (i32.const 0)
+ )
)
(return
(i32.load
@@ -89,17 +90,19 @@
)
)
)
- (func $yes1 (type $FUNCSIG$ii) (param $0 i32) (result i32)
+ (func $yes1 (param $0 i32) (result i32)
(return
(i32.load
(get_local $0)
)
)
)
- (func $sink_trap (type $6) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
- (i32.store
- (get_local $2)
- (i32.const 0)
+ (func $sink_trap (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (drop
+ (i32.store
+ (get_local $2)
+ (i32.const 0)
+ )
)
(return
(i32.div_s
@@ -108,29 +111,33 @@
)
)
)
- (func $sink_readnone_call (type $6) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
- (i32.store
- (get_local $2)
- (i32.const 0)
+ (func $sink_readnone_call (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (drop
+ (i32.store
+ (get_local $2)
+ (i32.const 0)
+ )
)
(return
(call_import $readnone_callee)
)
)
- (func $no_sink_readonly_call (type $6) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (func $no_sink_readonly_call (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
(set_local $3
(call_import $readonly_callee)
)
- (i32.store
- (get_local $2)
- (i32.const 0)
+ (drop
+ (i32.store
+ (get_local $2)
+ (i32.const 0)
+ )
)
(return
(get_local $3)
)
)
- (func $stack_uses (type $7) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
+ (func $stack_uses (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
(block $label$0
(br_if $label$0
(i32.ne
@@ -167,7 +174,7 @@
(i32.const 1)
)
)
- (func $multiple_uses (type $8) (param $0 i32) (param $1 i32) (param $2 i32)
+ (func $multiple_uses (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32)
(block $label$0
(br_if $label$0
@@ -186,39 +193,37 @@
(get_local $0)
)
)
- (i32.store
- (get_local $2)
- (get_local $3)
+ (drop
+ (i32.store
+ (get_local $2)
+ (get_local $3)
+ )
)
)
(return)
)
- (func $stackify_store_across_side_effects (type $FUNCSIG$vi) (param $0 i32)
- (local $1 i64)
- (local $2 i64)
- (set_local $1
- (block
- (block
- (set_local $2
- (i64.const 4611686018427387904)
- )
- (i64.store
- (get_local $0)
- (get_local $2)
- )
- )
- (get_local $2)
+ (func $stackify_store_across_side_effects (param $0 i32)
+ (drop
+ (i64.store
+ (get_local $0)
+ (i64.const 4611686018427387904)
)
)
- (call_import $evoke_side_effects)
- (i64.store
- (get_local $0)
- (get_local $1)
+ (drop
+ (call_import $evoke_side_effects)
+ )
+ (drop
+ (i64.store
+ (get_local $0)
+ (i64.const 4611686018427387904)
+ )
+ )
+ (drop
+ (call_import $evoke_side_effects)
)
- (call_import $evoke_side_effects)
(return)
)
- (func $div_tree (type $9) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) (param $7 i32) (param $8 i32) (param $9 i32) (param $10 i32) (param $11 i32) (param $12 i32) (param $13 i32) (param $14 i32) (param $15 i32) (result i32)
+ (func $div_tree (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) (param $7 i32) (param $8 i32) (param $9 i32) (param $10 i32) (param $11 i32) (param $12 i32) (param $13 i32) (param $14 i32) (param $15 i32) (result i32)
(return
(i32.div_s
(i32.div_s
@@ -268,33 +273,39 @@
)
)
)
- (func $simple_multiple_use (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
- (call_import $use_a
- (tee_local $1
- (i32.mul
- (get_local $1)
- (get_local $0)
+ (func $simple_multiple_use (param $0 i32) (param $1 i32)
+ (drop
+ (call_import $use_a
+ (tee_local $1
+ (i32.mul
+ (get_local $1)
+ (get_local $0)
+ )
)
)
)
- (call_import $use_b
- (get_local $1)
+ (drop
+ (call_import $use_b
+ (get_local $1)
+ )
)
(return)
)
- (func $multiple_uses_in_same_insn (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
- (call_import $use_2
- (tee_local $1
- (i32.mul
- (get_local $1)
- (get_local $0)
+ (func $multiple_uses_in_same_insn (param $0 i32) (param $1 i32)
+ (drop
+ (call_import $use_2
+ (tee_local $1
+ (i32.mul
+ (get_local $1)
+ (get_local $0)
+ )
)
+ (get_local $1)
)
- (get_local $1)
)
(return)
)
- (func $commute (type $FUNCSIG$i) (result i32)
+ (func $commute (result i32)
(return
(i32.add
(i32.add
@@ -305,7 +316,7 @@
)
)
)
- (func $no_stackify_past_use (type $FUNCSIG$ii) (param $0 i32) (result i32)
+ (func $no_stackify_past_use (param $0 i32) (result i32)
(local $1 i32)
(set_local $1
(call_import $callee
@@ -327,7 +338,7 @@
)
)
)
- (func $commute_to_fix_ordering (type $FUNCSIG$ii) (param $0 i32) (result i32)
+ (func $commute_to_fix_ordering (param $0 i32) (result i32)
(local $1 i32)
(return
(i32.mul
@@ -348,7 +359,7 @@
)
)
)
- (func $multiple_defs (type $10) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32)
+ (func $multiple_defs (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32)
(local $5 f64)
(local $6 f64)
(local $7 f64)
@@ -385,73 +396,77 @@
(set_local $7
(f64.const 0)
)
- (loop $label$1 $label$0
- (block $label$2
- (br_if $label$2
- (i32.or
- (f64.ge
- (get_local $7)
- (f64.const 23.2345)
- )
- (f64.ne
- (get_local $7)
- (get_local $7)
+ (block $label$1
+ (loop $label$0
+ (block $label$2
+ (br_if $label$2
+ (i32.or
+ (f64.ge
+ (get_local $7)
+ (f64.const 23.2345)
+ )
+ (f64.ne
+ (get_local $7)
+ (get_local $7)
+ )
)
)
- )
- (set_local $8
- (get_local $6)
- )
- (loop $label$4 $label$3
(set_local $8
- (f64.add
- (select
- (f64.const -11353.57)
- (tee_local $9
- (f64.add
- (get_local $7)
- (f64.const -1)
+ (get_local $6)
+ )
+ (block $label$4
+ (loop $label$3
+ (set_local $8
+ (f64.add
+ (select
+ (f64.const -11353.57)
+ (tee_local $9
+ (f64.add
+ (get_local $7)
+ (f64.const -1)
+ )
+ )
+ (get_local $2)
+ )
+ (tee_local $6
+ (get_local $8)
)
)
- (get_local $2)
)
- (tee_local $6
- (get_local $8)
+ (block $label$5
+ (br_if $label$5
+ (get_local $3)
+ )
+ (set_local $9
+ (get_local $5)
+ )
+ )
+ (set_local $8
+ (f64.add
+ (get_local $9)
+ (get_local $8)
+ )
+ )
+ (br_if $label$3
+ (f64.lt
+ (get_local $7)
+ (f64.const 23.2345)
+ )
)
- )
- )
- (block $label$5
- (br_if $label$5
- (get_local $3)
- )
- (set_local $9
- (get_local $5)
- )
- )
- (set_local $8
- (f64.add
- (get_local $9)
- (get_local $8)
- )
- )
- (br_if $label$3
- (f64.lt
- (get_local $7)
- (f64.const 23.2345)
)
)
)
- )
- (set_local $7
- (f64.add
- (get_local $7)
- (f64.const 1)
+ (set_local $7
+ (f64.add
+ (get_local $7)
+ (f64.const 1)
+ )
)
+ (br $label$0)
)
- (br $label$0)
)
)
- (func $no_stackify_call_past_load (type $FUNCSIG$i) (result i32)
+ (func $no_stackify_call_past_load (result i32)
(local $0 i32)
(local $1 i32)
(set_local $0
@@ -471,20 +486,11 @@
(get_local $1)
)
)
- (func $no_stackify_store_past_load (type $6) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
- (local $3 i32)
- (set_local $1
- (block
- (block
- (set_local $3
- (get_local $0)
- )
- (i32.store
- (get_local $1)
- (get_local $3)
- )
- )
- (get_local $3)
+ (func $no_stackify_store_past_load (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (drop
+ (i32.store
+ (get_local $1)
+ (get_local $0)
)
)
(set_local $2
@@ -494,29 +500,23 @@
)
(drop
(call_import $callee
- (get_local $1)
+ (get_local $0)
)
)
(return
(get_local $2)
)
)
- (func $store_past_invar_load (type $6) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
- (local $3 i32)
+ (func $store_past_invar_load (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
+ (drop
+ (i32.store
+ (get_local $1)
+ (get_local $0)
+ )
+ )
(drop
(call_import $callee
- (block
- (block
- (set_local $3
- (get_local $0)
- )
- (i32.store
- (get_local $1)
- (get_local $3)
- )
- )
- (get_local $3)
- )
+ (get_local $0)
)
)
(return
@@ -525,72 +525,72 @@
)
)
)
- (func $ignore_dbg_value (type $FUNCSIG$v)
+ (func $ignore_dbg_value
(unreachable)
)
- (func $no_stackify_past_epilogue (type $FUNCSIG$i) (result i32)
+ (func $no_stackify_past_epilogue (result i32)
(local $0 i32)
(local $1 i32)
- (local $2 i32)
- (set_local $1
- (call_import $use_memory
- (i32.add
- (tee_local $0
- (block
- (block
- (set_local $2
- (i32.sub
- (i32.load
- (i32.const 4)
- )
- (i32.const 16)
- )
- )
- (i32.store
- (i32.const 4)
- (get_local $2)
- )
- )
- (get_local $2)
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (tee_local $1
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
)
+ (i32.const 16)
)
+ )
+ )
+ )
+ (set_local $0
+ (call_import $use_memory
+ (i32.add
+ (get_local $1)
(i32.const 12)
)
)
)
- (i32.store
- (i32.const 4)
- (i32.add
- (get_local $0)
- (i32.const 16)
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (i32.add
+ (get_local $1)
+ (i32.const 16)
+ )
)
)
(return
- (get_local $1)
+ (get_local $0)
)
)
- (func $stackify_indvar (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
+ (func $stackify_indvar (param $0 i32) (param $1 i32)
(local $2 i32)
(set_local $2
(i32.const 0)
)
- (loop $label$1 $label$0
- (i32.store
- (get_local $1)
- (i32.add
- (get_local $2)
- (i32.load
+ (block $label$1
+ (loop $label$0
+ (drop
+ (i32.store
(get_local $1)
- )
- )
- )
- (br_if $label$0
- (i32.ne
- (get_local $0)
- (tee_local $2
(i32.add
(get_local $2)
- (i32.const 1)
+ (i32.load
+ (get_local $1)
+ )
+ )
+ )
+ )
+ (br_if $label$0
+ (i32.ne
+ (get_local $0)
+ (tee_local $2
+ (i32.add
+ (get_local $2)
+ (i32.const 1)
+ )
)
)
)
@@ -598,21 +598,23 @@
)
(return)
)
- (func $stackpointer_dependency (type $FUNCSIG$ii) (param $0 i32) (result i32)
+ (func $stackpointer_dependency (param $0 i32) (result i32)
(local $1 i32)
(set_local $0
(call_import $stackpointer_callee
(get_local $0)
(tee_local $1
- (i32.load
- (i32.const 4)
+ (i32.load offset=4
+ (i32.const 0)
)
)
)
)
- (i32.store
- (i32.const 4)
- (get_local $1)
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (get_local $1)
+ )
)
(return
(get_local $0)
diff --git a/test/llvm_autogenerated/return-int32.wast b/test/llvm_autogenerated/return-int32.wast
index eca34d41d..ac77e513b 100644
--- a/test/llvm_autogenerated/return-int32.wast
+++ b/test/llvm_autogenerated/return-int32.wast
@@ -1,9 +1,9 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
- (export "return_i32" $return_i32)
- (export "return_i32_twice" $return_i32_twice)
+ (export "memory" (memory $0))
+ (export "return_i32" (func $return_i32))
+ (export "return_i32_twice" (func $return_i32_twice))
(func $return_i32 (param $0 i32) (result i32)
(get_local $0)
)
@@ -14,17 +14,21 @@
(get_local $0)
)
)
- (i32.store
- (i32.const 0)
- (i32.const 0)
+ (drop
+ (i32.store
+ (i32.const 0)
+ (i32.const 0)
+ )
)
(return
(i32.const 1)
)
)
- (i32.store
- (i32.const 0)
- (i32.const 2)
+ (drop
+ (i32.store
+ (i32.const 0)
+ (i32.const 2)
+ )
)
(i32.const 3)
)
diff --git a/test/llvm_autogenerated/return-void.wast b/test/llvm_autogenerated/return-void.wast
index f2aa0eb37..bc0bc9c89 100644
--- a/test/llvm_autogenerated/return-void.wast
+++ b/test/llvm_autogenerated/return-void.wast
@@ -1,9 +1,9 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
- (export "return_void" $return_void)
- (export "return_void_twice" $return_void_twice)
+ (export "memory" (memory $0))
+ (export "return_void" (func $return_void))
+ (export "return_void_twice" (func $return_void_twice))
(func $return_void
)
(func $return_void_twice (param $0 i32)
@@ -13,15 +13,19 @@
(get_local $0)
)
)
- (i32.store
- (i32.const 0)
- (i32.const 0)
+ (drop
+ (i32.store
+ (i32.const 0)
+ (i32.const 0)
+ )
)
(return)
)
- (i32.store
- (i32.const 0)
- (i32.const 1)
+ (drop
+ (i32.store
+ (i32.const 0)
+ (i32.const 1)
+ )
)
)
)
diff --git a/test/llvm_autogenerated/select.wast b/test/llvm_autogenerated/select.wast
index b8c32c86e..468de2072 100644
--- a/test/llvm_autogenerated/select.wast
+++ b/test/llvm_autogenerated/select.wast
@@ -1,19 +1,19 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
- (export "select_i32_bool" $select_i32_bool)
- (export "select_i32_eq" $select_i32_eq)
- (export "select_i32_ne" $select_i32_ne)
- (export "select_i64_bool" $select_i64_bool)
- (export "select_i64_eq" $select_i64_eq)
- (export "select_i64_ne" $select_i64_ne)
- (export "select_f32_bool" $select_f32_bool)
- (export "select_f32_eq" $select_f32_eq)
- (export "select_f32_ne" $select_f32_ne)
- (export "select_f64_bool" $select_f64_bool)
- (export "select_f64_eq" $select_f64_eq)
- (export "select_f64_ne" $select_f64_ne)
+ (export "memory" (memory $0))
+ (export "select_i32_bool" (func $select_i32_bool))
+ (export "select_i32_eq" (func $select_i32_eq))
+ (export "select_i32_ne" (func $select_i32_ne))
+ (export "select_i64_bool" (func $select_i64_bool))
+ (export "select_i64_eq" (func $select_i64_eq))
+ (export "select_i64_ne" (func $select_i64_ne))
+ (export "select_f32_bool" (func $select_f32_bool))
+ (export "select_f32_eq" (func $select_f32_eq))
+ (export "select_f32_ne" (func $select_f32_ne))
+ (export "select_f64_bool" (func $select_f64_bool))
+ (export "select_f64_eq" (func $select_f64_eq))
+ (export "select_f64_ne" (func $select_f64_ne))
(func $select_i32_bool (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(return
(select
diff --git a/test/llvm_autogenerated/signext-zeroext.wast b/test/llvm_autogenerated/signext-zeroext.wast
index f3534f9ba..0c4d64a37 100644
--- a/test/llvm_autogenerated/signext-zeroext.wast
+++ b/test/llvm_autogenerated/signext-zeroext.wast
@@ -1,11 +1,11 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
- (export "z2s_func" $z2s_func)
- (export "s2z_func" $s2z_func)
- (export "z2s_call" $z2s_call)
- (export "s2z_call" $s2z_call)
+ (export "memory" (memory $0))
+ (export "z2s_func" (func $z2s_func))
+ (export "s2z_func" (func $s2z_func))
+ (export "z2s_call" (func $z2s_call))
+ (export "s2z_call" (func $s2z_call))
(func $z2s_func (param $0 i32) (result i32)
(return
(i32.shr_s
diff --git a/test/llvm_autogenerated/store-results.s b/test/llvm_autogenerated/store-results.s
deleted file mode 100644
index 6522ffa7a..000000000
--- a/test/llvm_autogenerated/store-results.s
+++ /dev/null
@@ -1,83 +0,0 @@
- .text
- .file "/s/llvm/llvm/test/CodeGen/WebAssembly/store-results.ll"
- .globl single_block
- .type single_block,@function
-single_block:
- .param i32
- .result i32
- i32.const $push1=, 0
- i32.store $push0=, 0($0), $pop1
- return $pop0
- .endfunc
-.Lfunc_end0:
- .size single_block, .Lfunc_end0-single_block
-
- .globl foo
- .type foo,@function
-foo:
- .local i32
- i32.const $0=, 0
-.LBB1_1:
- loop
- i32.const $push6=, 0
- i32.const $push5=, 0
- i32.store $drop=, pos($pop6), $pop5
- i32.const $push4=, 1
- i32.add $push3=, $0, $pop4
- tee_local $push2=, $0=, $pop3
- i32.const $push1=, 256
- i32.ne $push0=, $pop2, $pop1
- br_if 0, $pop0
- end_loop
- return
- .endfunc
-.Lfunc_end1:
- .size foo, .Lfunc_end1-foo
-
- .globl bar
- .type bar,@function
-bar:
- .local f32
- f32.const $0=, 0x0p0
-.LBB2_1:
- loop
- i32.const $push6=, 0
- i32.const $push5=, 0
- i32.store $drop=, pos($pop6), $pop5
- f32.const $push4=, 0x1p0
- f32.add $push3=, $0, $pop4
- tee_local $push2=, $0=, $pop3
- f32.const $push1=, 0x1p8
- f32.ne $push0=, $pop2, $pop1
- br_if 0, $pop0
- end_loop
- return
- .endfunc
-.Lfunc_end2:
- .size bar, .Lfunc_end2-bar
-
- .hidden fi_ret
- .globl fi_ret
- .type fi_ret,@function
-fi_ret:
- .param i32
- .result i32
- i32.const $push1=, __stack_pointer
- i32.load $push2=, 0($pop1)
- i32.const $push3=, 32
- i32.sub $push4=, $pop2, $pop3
- i32.store $push0=, 0($0), $pop4
- return $pop0
- .endfunc
-.Lfunc_end3:
- .size fi_ret, .Lfunc_end3-fi_ret
-
- .type pos,@object
- .bss
- .globl pos
- .p2align 2
-pos:
- .skip 12
- .size pos, 12
-
-
diff --git a/test/llvm_autogenerated/store-results.wast b/test/llvm_autogenerated/store-results.wast
index 1f2cd9c98..e69de29bb 100644
--- a/test/llvm_autogenerated/store-results.wast
+++ b/test/llvm_autogenerated/store-results.wast
@@ -1,99 +0,0 @@
-(module
- (memory 1)
- (data (i32.const 4) " \04\00\00")
- (export "memory" memory)
- (type $0 (func (param i32) (result i32)))
- (type $1 (func))
- (export "single_block" $single_block)
- (export "foo" $foo)
- (export "bar" $bar)
- (export "fi_ret" $fi_ret)
- (func $single_block (type $0) (param $0 i32) (result i32)
- (local $1 i32)
- (return
- (block
- (block
- (set_local $1
- (i32.const 0)
- )
- (i32.store
- (get_local $0)
- (get_local $1)
- )
- )
- (get_local $1)
- )
- )
- )
- (func $foo (type $1)
- (local $0 i32)
- (set_local $0
- (i32.const 0)
- )
- (loop $label$1 $label$0
- (i32.store offset=12
- (i32.const 0)
- (i32.const 0)
- )
- (br_if $label$0
- (i32.ne
- (tee_local $0
- (i32.add
- (get_local $0)
- (i32.const 1)
- )
- )
- (i32.const 256)
- )
- )
- )
- (return)
- )
- (func $bar (type $1)
- (local $0 f32)
- (set_local $0
- (f32.const 0)
- )
- (loop $label$1 $label$0
- (i32.store offset=12
- (i32.const 0)
- (i32.const 0)
- )
- (br_if $label$0
- (f32.ne
- (tee_local $0
- (f32.add
- (get_local $0)
- (f32.const 1)
- )
- )
- (f32.const 256)
- )
- )
- )
- (return)
- )
- (func $fi_ret (type $0) (param $0 i32) (result i32)
- (local $1 i32)
- (return
- (block
- (block
- (set_local $1
- (i32.sub
- (i32.load
- (i32.const 4)
- )
- (i32.const 32)
- )
- )
- (i32.store
- (get_local $0)
- (get_local $1)
- )
- )
- (get_local $1)
- )
- )
- )
-)
-;; METADATA: { "asmConsts": {},"staticBump": 1056, "initializers": [] }
diff --git a/test/llvm_autogenerated/store-trunc.wast b/test/llvm_autogenerated/store-trunc.wast
index d37c3b5c0..5452b340f 100644
--- a/test/llvm_autogenerated/store-trunc.wast
+++ b/test/llvm_autogenerated/store-trunc.wast
@@ -1,40 +1,50 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
- (export "trunc_i8_i32" $trunc_i8_i32)
- (export "trunc_i16_i32" $trunc_i16_i32)
- (export "trunc_i8_i64" $trunc_i8_i64)
- (export "trunc_i16_i64" $trunc_i16_i64)
- (export "trunc_i32_i64" $trunc_i32_i64)
+ (export "memory" (memory $0))
+ (export "trunc_i8_i32" (func $trunc_i8_i32))
+ (export "trunc_i16_i32" (func $trunc_i16_i32))
+ (export "trunc_i8_i64" (func $trunc_i8_i64))
+ (export "trunc_i16_i64" (func $trunc_i16_i64))
+ (export "trunc_i32_i64" (func $trunc_i32_i64))
(func $trunc_i8_i32 (param $0 i32) (param $1 i32)
- (i32.store8
- (get_local $0)
- (get_local $1)
+ (drop
+ (i32.store8
+ (get_local $0)
+ (get_local $1)
+ )
)
)
(func $trunc_i16_i32 (param $0 i32) (param $1 i32)
- (i32.store16
- (get_local $0)
- (get_local $1)
+ (drop
+ (i32.store16
+ (get_local $0)
+ (get_local $1)
+ )
)
)
(func $trunc_i8_i64 (param $0 i32) (param $1 i64)
- (i64.store8
- (get_local $0)
- (get_local $1)
+ (drop
+ (i64.store8
+ (get_local $0)
+ (get_local $1)
+ )
)
)
(func $trunc_i16_i64 (param $0 i32) (param $1 i64)
- (i64.store16
- (get_local $0)
- (get_local $1)
+ (drop
+ (i64.store16
+ (get_local $0)
+ (get_local $1)
+ )
)
)
(func $trunc_i32_i64 (param $0 i32) (param $1 i64)
- (i64.store
- (get_local $0)
- (get_local $1)
+ (drop
+ (i64.store
+ (get_local $0)
+ (get_local $1)
+ )
)
)
)
diff --git a/test/llvm_autogenerated/store.wast b/test/llvm_autogenerated/store.wast
index 1017588b1..60c32029a 100644
--- a/test/llvm_autogenerated/store.wast
+++ b/test/llvm_autogenerated/store.wast
@@ -1,36 +1,44 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
- (export "sti32" $sti32)
- (export "sti64" $sti64)
- (export "stf32" $stf32)
- (export "stf64" $stf64)
+ (export "memory" (memory $0))
+ (export "sti32" (func $sti32))
+ (export "sti64" (func $sti64))
+ (export "stf32" (func $stf32))
+ (export "stf64" (func $stf64))
(func $sti32 (param $0 i32) (param $1 i32)
- (i32.store
- (get_local $0)
- (get_local $1)
+ (drop
+ (i32.store
+ (get_local $0)
+ (get_local $1)
+ )
)
(return)
)
(func $sti64 (param $0 i32) (param $1 i64)
- (i64.store
- (get_local $0)
- (get_local $1)
+ (drop
+ (i64.store
+ (get_local $0)
+ (get_local $1)
+ )
)
(return)
)
(func $stf32 (param $0 i32) (param $1 f32)
- (f32.store
- (get_local $0)
- (get_local $1)
+ (drop
+ (f32.store
+ (get_local $0)
+ (get_local $1)
+ )
)
(return)
)
(func $stf64 (param $0 i32) (param $1 f64)
- (f64.store
- (get_local $0)
- (get_local $1)
+ (drop
+ (f64.store
+ (get_local $0)
+ (get_local $1)
+ )
)
(return)
)
diff --git a/test/llvm_autogenerated/switch.wast b/test/llvm_autogenerated/switch.wast
index abd4045ae..7191df4de 100644
--- a/test/llvm_autogenerated/switch.wast
+++ b/test/llvm_autogenerated/switch.wast
@@ -1,16 +1,16 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
(type $FUNCSIG$v (func))
- (import $foo0 "env" "foo0")
- (import $foo1 "env" "foo1")
- (import $foo2 "env" "foo2")
- (import $foo3 "env" "foo3")
- (import $foo4 "env" "foo4")
- (import $foo5 "env" "foo5")
- (export "bar32" $bar32)
- (export "bar64" $bar64)
+ (import "env" "foo0" (func $foo0))
+ (import "env" "foo1" (func $foo1))
+ (import "env" "foo2" (func $foo2))
+ (import "env" "foo3" (func $foo3))
+ (import "env" "foo4" (func $foo4))
+ (import "env" "foo5" (func $foo5))
+ (export "memory" (memory $0))
+ (export "bar32" (func $bar32))
+ (export "bar64" (func $bar64))
(func $bar32 (param $0 i32)
(block $label$0
(br_if $label$0
@@ -29,22 +29,34 @@
(get_local $0)
)
)
- (call_import $foo0)
+ (drop
+ (call_import $foo0)
+ )
(return)
)
- (call_import $foo1)
+ (drop
+ (call_import $foo1)
+ )
(return)
)
- (call_import $foo2)
+ (drop
+ (call_import $foo2)
+ )
(return)
)
- (call_import $foo3)
+ (drop
+ (call_import $foo3)
+ )
(return)
)
- (call_import $foo4)
+ (drop
+ (call_import $foo4)
+ )
(return)
)
- (call_import $foo5)
+ (drop
+ (call_import $foo5)
+ )
)
(return)
)
@@ -68,22 +80,34 @@
)
)
)
- (call_import $foo0)
+ (drop
+ (call_import $foo0)
+ )
(return)
)
- (call_import $foo1)
+ (drop
+ (call_import $foo1)
+ )
(return)
)
- (call_import $foo2)
+ (drop
+ (call_import $foo2)
+ )
(return)
)
- (call_import $foo3)
+ (drop
+ (call_import $foo3)
+ )
(return)
)
- (call_import $foo4)
+ (drop
+ (call_import $foo4)
+ )
(return)
)
- (call_import $foo5)
+ (drop
+ (call_import $foo5)
+ )
)
(return)
)
diff --git a/test/llvm_autogenerated/unreachable.wast b/test/llvm_autogenerated/unreachable.wast
index 27a783ccf..5029f5083 100644
--- a/test/llvm_autogenerated/unreachable.wast
+++ b/test/llvm_autogenerated/unreachable.wast
@@ -1,14 +1,16 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
(type $FUNCSIG$v (func))
- (import $abort "env" "abort")
- (export "f1" $f1)
- (export "f2" $f2)
- (export "f3" $f3)
+ (import "env" "abort" (func $abort))
+ (export "memory" (memory $0))
+ (export "f1" (func $f1))
+ (export "f2" (func $f2))
+ (export "f3" (func $f3))
(func $f1 (result i32)
- (call_import $abort)
+ (drop
+ (call_import $abort)
+ )
(unreachable)
)
(func $f2
diff --git a/test/llvm_autogenerated/unused-argument.wast b/test/llvm_autogenerated/unused-argument.wast
index c212ea165..1248f2e50 100644
--- a/test/llvm_autogenerated/unused-argument.wast
+++ b/test/llvm_autogenerated/unused-argument.wast
@@ -1,12 +1,12 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
(type $FUNCSIG$i (func (result i32)))
- (import $return_something "env" "return_something" (result i32))
- (export "unused_first" $unused_first)
- (export "unused_second" $unused_second)
- (export "call_something" $call_something)
+ (import "env" "return_something" (func $return_something (result i32)))
+ (export "memory" (memory $0))
+ (export "unused_first" (func $unused_first))
+ (export "unused_second" (func $unused_second))
+ (export "call_something" (func $call_something))
(func $unused_first (param $0 i32) (param $1 i32) (result i32)
(return
(get_local $1)
@@ -18,7 +18,9 @@
)
)
(func $call_something
- (call_import $return_something)
+ (drop
+ (call_import $return_something)
+ )
(return)
)
)
diff --git a/test/llvm_autogenerated/userstack.s b/test/llvm_autogenerated/userstack.s
index 9f6dfeb24..c82990478 100644
--- a/test/llvm_autogenerated/userstack.s
+++ b/test/llvm_autogenerated/userstack.s
@@ -1,22 +1,22 @@
.text
- .file "/s/llvm/llvm/test/CodeGen/WebAssembly/userstack.ll"
+ .file "/s/llvm-upstream/llvm/test/CodeGen/WebAssembly/userstack.ll"
.globl alloca32
.type alloca32,@function
alloca32:
.local i32
- i32.const $push4=, __stack_pointer
- i32.const $push1=, __stack_pointer
- i32.load $push2=, 0($pop1)
+ i32.const $push4=, 0
+ i32.const $push1=, 0
+ i32.load $push2=, __stack_pointer($pop1)
i32.const $push3=, 16
- i32.sub $push8=, $pop2, $pop3
- i32.store $push10=, 0($pop4), $pop8
- tee_local $push9=, $0=, $pop10
+ i32.sub $push9=, $pop2, $pop3
+ tee_local $push8=, $0=, $pop9
+ i32.store $drop=, __stack_pointer($pop4), $pop8
i32.const $push0=, 0
- i32.store $drop=, 12($pop9), $pop0
- i32.const $push7=, __stack_pointer
+ i32.store $drop=, 12($0), $pop0
+ i32.const $push7=, 0
i32.const $push5=, 16
i32.add $push6=, $0, $pop5
- i32.store $drop=, 0($pop7), $pop6
+ i32.store $drop=, __stack_pointer($pop7), $pop6
return
.endfunc
.Lfunc_end0:
@@ -26,8 +26,8 @@ alloca32:
.type alloca3264,@function
alloca3264:
.local i32
- i32.const $push2=, __stack_pointer
- i32.load $push3=, 0($pop2)
+ i32.const $push2=, 0
+ i32.load $push3=, __stack_pointer($pop2)
i32.const $push4=, 16
i32.sub $push6=, $pop3, $pop4
tee_local $push5=, $0=, $pop6
@@ -44,22 +44,23 @@ alloca3264:
.type allocarray,@function
allocarray:
.local i32
- i32.const $push7=, __stack_pointer
- i32.const $push4=, __stack_pointer
- i32.load $push5=, 0($pop4)
- i32.const $push6=, 144
- i32.sub $push11=, $pop5, $pop6
- i32.store $push13=, 0($pop7), $pop11
- tee_local $push12=, $0=, $pop13
- i32.const $push1=, 24
- i32.add $push2=, $0, $pop1
- i32.const $push3=, 1
- i32.store $push0=, 0($pop2), $pop3
- i32.store $drop=, 12($pop12), $pop0
- i32.const $push10=, __stack_pointer
- i32.const $push8=, 144
- i32.add $push9=, $0, $pop8
- i32.store $drop=, 0($pop10), $pop9
+ i32.const $push6=, 0
+ i32.const $push3=, 0
+ i32.load $push4=, __stack_pointer($pop3)
+ i32.const $push5=, 144
+ i32.sub $push12=, $pop4, $pop5
+ tee_local $push11=, $0=, $pop12
+ i32.store $drop=, __stack_pointer($pop6), $pop11
+ i32.const $push0=, 24
+ i32.add $push1=, $0, $pop0
+ i32.const $push2=, 1
+ i32.store $drop=, 0($pop1), $pop2
+ i32.const $push10=, 1
+ i32.store $drop=, 12($0), $pop10
+ i32.const $push9=, 0
+ i32.const $push7=, 144
+ i32.add $push8=, $0, $pop7
+ i32.store $drop=, __stack_pointer($pop9), $pop8
return
.endfunc
.Lfunc_end2:
@@ -70,24 +71,24 @@ allocarray:
non_mem_use:
.param i32
.local i32
- i32.const $push3=, __stack_pointer
- i32.const $push0=, __stack_pointer
- i32.load $push1=, 0($pop0)
+ i32.const $push3=, 0
+ i32.const $push0=, 0
+ i32.load $push1=, __stack_pointer($pop0)
i32.const $push2=, 48
- i32.sub $push11=, $pop1, $pop2
- i32.store $push13=, 0($pop3), $pop11
- tee_local $push12=, $1=, $pop13
+ i32.sub $push12=, $pop1, $pop2
+ tee_local $push11=, $1=, $pop12
+ i32.store $drop=, __stack_pointer($pop3), $pop11
i32.const $push7=, 8
- i32.add $push8=, $pop12, $pop7
+ i32.add $push8=, $1, $pop7
call ext_func@FUNCTION, $pop8
call ext_func@FUNCTION, $1
i32.const $push9=, 16
i32.add $push10=, $1, $pop9
i32.store $drop=, 0($0), $pop10
- i32.const $push6=, __stack_pointer
+ i32.const $push6=, 0
i32.const $push4=, 48
i32.add $push5=, $1, $pop4
- i32.store $drop=, 0($pop6), $pop5
+ i32.store $drop=, __stack_pointer($pop6), $pop5
return
.endfunc
.Lfunc_end3:
@@ -97,22 +98,23 @@ non_mem_use:
.type allocarray_inbounds,@function
allocarray_inbounds:
.local i32
- i32.const $push6=, __stack_pointer
- i32.const $push3=, __stack_pointer
- i32.load $push4=, 0($pop3)
- i32.const $push5=, 32
- i32.sub $push10=, $pop4, $pop5
- i32.store $push12=, 0($pop6), $pop10
- tee_local $push11=, $0=, $pop12
- i32.const $push1=, 1
- i32.store $push0=, 24($0), $pop1
- i32.store $drop=, 12($pop11), $pop0
+ i32.const $push5=, 0
i32.const $push2=, 0
- call ext_func@FUNCTION, $pop2
- i32.const $push9=, __stack_pointer
- i32.const $push7=, 32
- i32.add $push8=, $0, $pop7
- i32.store $drop=, 0($pop9), $pop8
+ i32.load $push3=, __stack_pointer($pop2)
+ i32.const $push4=, 32
+ i32.sub $push11=, $pop3, $pop4
+ tee_local $push10=, $0=, $pop11
+ i32.store $drop=, __stack_pointer($pop5), $pop10
+ i32.const $push0=, 1
+ i32.store $drop=, 24($0), $pop0
+ i32.const $push9=, 1
+ i32.store $drop=, 12($0), $pop9
+ i32.const $push1=, 0
+ call ext_func@FUNCTION, $pop1
+ i32.const $push8=, 0
+ i32.const $push6=, 32
+ i32.add $push7=, $0, $pop6
+ i32.store $drop=, __stack_pointer($pop8), $pop7
return
.endfunc
.Lfunc_end4:
@@ -123,9 +125,9 @@ allocarray_inbounds:
dynamic_alloca:
.param i32
.local i32
- i32.const $push6=, __stack_pointer
- i32.const $push7=, __stack_pointer
- i32.load $push14=, 0($pop7)
+ i32.const $push6=, 0
+ i32.const $push7=, 0
+ i32.load $push14=, __stack_pointer($pop7)
tee_local $push13=, $1=, $pop14
i32.const $push0=, 2
i32.shl $push1=, $0, $pop0
@@ -136,11 +138,11 @@ dynamic_alloca:
i32.sub $push12=, $pop13, $pop5
tee_local $push11=, $0=, $pop12
copy_local $push10=, $pop11
- i32.store $drop=, 0($pop6), $pop10
+ i32.store $drop=, __stack_pointer($pop6), $pop10
call ext_func_i32@FUNCTION, $0
- i32.const $push8=, __stack_pointer
+ i32.const $push8=, 0
copy_local $push9=, $1
- i32.store $drop=, 0($pop8), $pop9
+ i32.store $drop=, __stack_pointer($pop8), $pop9
return
.endfunc
.Lfunc_end5:
@@ -151,8 +153,8 @@ dynamic_alloca:
dynamic_alloca_redzone:
.param i32
.local i32
- i32.const $push7=, __stack_pointer
- i32.load $push11=, 0($pop7)
+ i32.const $push7=, 0
+ i32.load $push11=, __stack_pointer($pop7)
tee_local $push10=, $1=, $pop11
copy_local $drop=, $pop10
i32.const $push0=, 2
@@ -176,31 +178,31 @@ dynamic_alloca_redzone:
dynamic_static_alloca:
.param i32
.local i32
- i32.const $push8=, __stack_pointer
- i32.const $push12=, __stack_pointer
- i32.const $push9=, __stack_pointer
- i32.load $push10=, 0($pop9)
- i32.const $push11=, 16
- i32.sub $push21=, $pop10, $pop11
- tee_local $push20=, $1=, $pop21
- i32.store $push0=, 0($pop12), $pop20
- i32.const $push1=, 2
- i32.shl $push2=, $0, $pop1
- i32.const $push3=, 15
- i32.add $push4=, $pop2, $pop3
- i32.const $push5=, -16
- i32.and $push6=, $pop4, $pop5
- i32.sub $push19=, $pop0, $pop6
- tee_local $push18=, $0=, $pop19
- copy_local $push17=, $pop18
- i32.store $drop=, 0($pop8), $pop17
+ i32.const $push11=, 0
+ i32.const $push8=, 0
+ i32.load $push9=, __stack_pointer($pop8)
+ i32.const $push10=, 16
+ i32.sub $push20=, $pop9, $pop10
+ tee_local $push19=, $1=, $pop20
+ i32.store $drop=, __stack_pointer($pop11), $pop19
i32.const $push7=, 0
- i32.store $drop=, 0($0), $pop7
- i32.const $push15=, __stack_pointer
- copy_local $push16=, $1
- i32.const $push13=, 16
- i32.add $push14=, $pop16, $pop13
- i32.store $drop=, 0($pop15), $pop14
+ i32.const $push0=, 2
+ i32.shl $push1=, $0, $pop0
+ i32.const $push2=, 15
+ i32.add $push3=, $pop1, $pop2
+ i32.const $push4=, -16
+ i32.and $push5=, $pop3, $pop4
+ i32.sub $push18=, $1, $pop5
+ tee_local $push17=, $0=, $pop18
+ copy_local $push16=, $pop17
+ i32.store $drop=, __stack_pointer($pop7), $pop16
+ i32.const $push6=, 0
+ i32.store $drop=, 0($0), $pop6
+ i32.const $push14=, 0
+ copy_local $push15=, $1
+ i32.const $push12=, 16
+ i32.add $push13=, $pop15, $pop12
+ i32.store $drop=, __stack_pointer($pop14), $pop13
return
.endfunc
.Lfunc_end7:
@@ -211,8 +213,8 @@ dynamic_static_alloca:
copytoreg_fi:
.param i32, i32
.local i32
- i32.const $push0=, __stack_pointer
- i32.load $push1=, 0($pop0)
+ i32.const $push0=, 0
+ i32.load $push1=, __stack_pointer($pop0)
i32.const $push2=, 16
i32.sub $push5=, $pop1, $pop2
i32.const $push3=, 12
@@ -236,13 +238,13 @@ copytoreg_fi:
.type frameaddress_0,@function
frameaddress_0:
.local i32
- i32.const $push0=, __stack_pointer
- i32.load $push2=, 0($pop0)
+ i32.const $push0=, 0
+ i32.load $push2=, __stack_pointer($pop0)
copy_local $push4=, $pop2
tee_local $push3=, $0=, $pop4
call use_i8_star@FUNCTION, $pop3
- i32.const $push1=, __stack_pointer
- i32.store $drop=, 0($pop1), $0
+ i32.const $push1=, 0
+ i32.store $drop=, __stack_pointer($pop1), $0
return
.endfunc
.Lfunc_end9:
@@ -262,8 +264,8 @@ frameaddress_1:
.type inline_asm,@function
inline_asm:
.local i32
- i32.const $push0=, __stack_pointer
- i32.load $push1=, 0($pop0)
+ i32.const $push0=, 0
+ i32.load $push1=, __stack_pointer($pop0)
i32.const $push2=, 16
i32.sub $push5=, $pop1, $pop2
i32.const $push3=, 15
@@ -278,3 +280,6 @@ inline_asm:
.size inline_asm, .Lfunc_end11-inline_asm
+ .functype ext_func, void, i32
+ .functype ext_func_i32, void, i32
+ .functype use_i8_star, void, i32
diff --git a/test/llvm_autogenerated/userstack.wast b/test/llvm_autogenerated/userstack.wast
index d9ccc83e5..b3e576121 100644
--- a/test/llvm_autogenerated/userstack.wast
+++ b/test/llvm_autogenerated/userstack.wast
@@ -1,233 +1,262 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
(type $FUNCSIG$vi (func (param i32)))
- (type $1 (func))
- (type $2 (func (param i32 i32)))
- (import $ext_func "env" "ext_func" (param i32))
- (import $ext_func_i32 "env" "ext_func_i32" (param i32))
- (import $use_i8_star "env" "use_i8_star" (param i32))
- (export "alloca32" $alloca32)
- (export "alloca3264" $alloca3264)
- (export "allocarray" $allocarray)
- (export "non_mem_use" $non_mem_use)
- (export "allocarray_inbounds" $allocarray_inbounds)
- (export "dynamic_alloca" $dynamic_alloca)
- (export "dynamic_alloca_redzone" $dynamic_alloca_redzone)
- (export "dynamic_static_alloca" $dynamic_static_alloca)
- (export "copytoreg_fi" $copytoreg_fi)
- (export "frameaddress_0" $frameaddress_0)
- (export "frameaddress_1" $frameaddress_1)
- (export "inline_asm" $inline_asm)
- (func $alloca32 (type $1)
+ (import "env" "ext_func" (func $ext_func (param i32)))
+ (import "env" "ext_func_i32" (func $ext_func_i32 (param i32)))
+ (import "env" "use_i8_star" (func $use_i8_star (param i32)))
+ (export "memory" (memory $0))
+ (export "alloca32" (func $alloca32))
+ (export "alloca3264" (func $alloca3264))
+ (export "allocarray" (func $allocarray))
+ (export "non_mem_use" (func $non_mem_use))
+ (export "allocarray_inbounds" (func $allocarray_inbounds))
+ (export "dynamic_alloca" (func $dynamic_alloca))
+ (export "dynamic_alloca_redzone" (func $dynamic_alloca_redzone))
+ (export "dynamic_static_alloca" (func $dynamic_static_alloca))
+ (export "copytoreg_fi" (func $copytoreg_fi))
+ (export "frameaddress_0" (func $frameaddress_0))
+ (export "frameaddress_1" (func $frameaddress_1))
+ (export "inline_asm" (func $inline_asm))
+ (func $alloca32
(local $0 i32)
- (local $1 i32)
- (i32.store offset=12
- (tee_local $0
- (block
- (block
- (set_local $1
- (i32.sub
- (i32.load
- (i32.const 4)
- )
- (i32.const 16)
- )
- )
- (i32.store
- (i32.const 4)
- (get_local $1)
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (tee_local $0
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
)
+ (i32.const 16)
)
- (get_local $1)
)
)
- (i32.const 0)
)
- (i32.store
- (i32.const 4)
- (i32.add
+ (drop
+ (i32.store offset=12
(get_local $0)
- (i32.const 16)
+ (i32.const 0)
+ )
+ )
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (i32.add
+ (get_local $0)
+ (i32.const 16)
+ )
)
)
(return)
)
- (func $alloca3264 (type $1)
+ (func $alloca3264
(local $0 i32)
- (i32.store offset=12
- (tee_local $0
- (i32.sub
- (i32.load
- (i32.const 4)
+ (drop
+ (i32.store offset=12
+ (tee_local $0
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ (i32.const 16)
)
- (i32.const 16)
)
+ (i32.const 0)
)
- (i32.const 0)
)
- (i64.store
- (get_local $0)
- (i64.const 0)
+ (drop
+ (i64.store
+ (get_local $0)
+ (i64.const 0)
+ )
)
(return)
)
- (func $allocarray (type $1)
+ (func $allocarray
(local $0 i32)
- (local $1 i32)
- (local $2 i32)
- (i32.store offset=12
- (tee_local $0
- (block
- (block
- (set_local $1
- (i32.sub
- (i32.load
- (i32.const 4)
- )
- (i32.const 144)
- )
- )
- (i32.store
- (i32.const 4)
- (get_local $1)
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (tee_local $0
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
)
+ (i32.const 144)
)
- (get_local $1)
)
)
- (block
- (block
- (set_local $2
- (i32.const 1)
- )
- (i32.store
- (i32.add
- (get_local $0)
- (i32.const 24)
- )
- (get_local $2)
- )
+ )
+ (drop
+ (i32.store
+ (i32.add
+ (get_local $0)
+ (i32.const 24)
)
- (get_local $2)
+ (i32.const 1)
)
)
- (i32.store
- (i32.const 4)
- (i32.add
+ (drop
+ (i32.store offset=12
(get_local $0)
- (i32.const 144)
+ (i32.const 1)
+ )
+ )
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (i32.add
+ (get_local $0)
+ (i32.const 144)
+ )
)
)
(return)
)
- (func $non_mem_use (type $FUNCSIG$vi) (param $0 i32)
+ (func $non_mem_use (param $0 i32)
(local $1 i32)
- (local $2 i32)
- (call_import $ext_func
- (i32.add
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
(tee_local $1
- (block
- (block
- (set_local $2
- (i32.sub
- (i32.load
- (i32.const 4)
- )
- (i32.const 48)
- )
- )
- (i32.store
- (i32.const 4)
- (get_local $2)
- )
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
)
- (get_local $2)
+ (i32.const 48)
)
)
- (i32.const 8)
)
)
- (call_import $ext_func
- (get_local $1)
+ (drop
+ (call_import $ext_func
+ (i32.add
+ (get_local $1)
+ (i32.const 8)
+ )
+ )
)
- (i32.store
- (get_local $0)
- (i32.add
+ (drop
+ (call_import $ext_func
(get_local $1)
- (i32.const 16)
)
)
- (i32.store
- (i32.const 4)
- (i32.add
- (get_local $1)
- (i32.const 48)
+ (drop
+ (i32.store
+ (get_local $0)
+ (i32.add
+ (get_local $1)
+ (i32.const 16)
+ )
+ )
+ )
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (i32.add
+ (get_local $1)
+ (i32.const 48)
+ )
)
)
(return)
)
- (func $allocarray_inbounds (type $1)
+ (func $allocarray_inbounds
(local $0 i32)
- (local $1 i32)
- (local $2 i32)
- (i32.store offset=12
- (tee_local $0
- (block
- (block
- (set_local $1
- (i32.sub
- (i32.load
- (i32.const 4)
- )
- (i32.const 32)
- )
- )
- (i32.store
- (i32.const 4)
- (get_local $1)
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (tee_local $0
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
)
+ (i32.const 32)
)
- (get_local $1)
)
)
- (block
- (block
- (set_local $2
- (i32.const 1)
- )
- (i32.store offset=24
- (get_local $0)
- (get_local $2)
- )
+ )
+ (drop
+ (i32.store offset=24
+ (get_local $0)
+ (i32.const 1)
+ )
+ )
+ (drop
+ (i32.store offset=12
+ (get_local $0)
+ (i32.const 1)
+ )
+ )
+ (drop
+ (call_import $ext_func
+ (i32.const 0)
+ )
+ )
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (i32.add
+ (get_local $0)
+ (i32.const 32)
)
- (get_local $2)
)
)
- (call_import $ext_func
- (i32.const 0)
+ (return)
+ )
+ (func $dynamic_alloca (param $0 i32)
+ (local $1 i32)
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (tee_local $0
+ (i32.sub
+ (tee_local $1
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ )
+ (i32.and
+ (i32.add
+ (i32.shl
+ (get_local $0)
+ (i32.const 2)
+ )
+ (i32.const 15)
+ )
+ (i32.const -16)
+ )
+ )
+ )
+ )
)
- (i32.store
- (i32.const 4)
- (i32.add
+ (drop
+ (call_import $ext_func_i32
(get_local $0)
- (i32.const 32)
+ )
+ )
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (get_local $1)
)
)
(return)
)
- (func $dynamic_alloca (type $FUNCSIG$vi) (param $0 i32)
+ (func $dynamic_alloca_redzone (param $0 i32)
(local $1 i32)
- (i32.store
- (i32.const 4)
+ (drop
+ (tee_local $1
+ (i32.load offset=4
+ (i32.const 0)
+ )
+ )
+ )
+ (drop
(tee_local $0
(i32.sub
- (tee_local $1
- (i32.load
- (i32.const 4)
- )
- )
+ (get_local $1)
(i32.and
(i32.add
(i32.shl
@@ -241,102 +270,73 @@
)
)
)
- (call_import $ext_func_i32
- (get_local $0)
- )
- (i32.store
- (i32.const 4)
- (get_local $1)
+ (drop
+ (i32.store
+ (get_local $0)
+ (i32.const 0)
+ )
)
(return)
)
- (func $dynamic_alloca_redzone (type $FUNCSIG$vi) (param $0 i32)
+ (func $dynamic_static_alloca (param $0 i32)
(local $1 i32)
- (set_local $1
- (i32.load
- (i32.const 4)
- )
- )
- (set_local $0
- (i32.sub
- (get_local $1)
- (i32.and
- (i32.add
- (i32.shl
- (get_local $0)
- (i32.const 2)
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (tee_local $1
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
)
- (i32.const 15)
+ (i32.const 16)
)
- (i32.const -16)
)
)
)
- (i32.store
- (get_local $0)
- (i32.const 0)
- )
- (return)
- )
- (func $dynamic_static_alloca (type $FUNCSIG$vi) (param $0 i32)
- (local $1 i32)
- (local $2 i32)
- (i32.store
- (i32.const 4)
- (tee_local $0
- (i32.sub
- (block
- (block
- (set_local $2
- (tee_local $1
- (i32.sub
- (i32.load
- (i32.const 4)
- )
- (i32.const 16)
- )
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (tee_local $0
+ (i32.sub
+ (get_local $1)
+ (i32.and
+ (i32.add
+ (i32.shl
+ (get_local $0)
+ (i32.const 2)
)
+ (i32.const 15)
)
- (i32.store
- (i32.const 4)
- (get_local $2)
- )
- )
- (get_local $2)
- )
- (i32.and
- (i32.add
- (i32.shl
- (get_local $0)
- (i32.const 2)
- )
- (i32.const 15)
+ (i32.const -16)
)
- (i32.const -16)
)
)
)
)
- (i32.store
- (get_local $0)
- (i32.const 0)
+ (drop
+ (i32.store
+ (get_local $0)
+ (i32.const 0)
+ )
)
- (i32.store
- (i32.const 4)
- (i32.add
- (get_local $1)
- (i32.const 16)
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (i32.add
+ (get_local $1)
+ (i32.const 16)
+ )
)
)
(return)
)
- (func $copytoreg_fi (type $2) (param $0 i32) (param $1 i32)
+ (func $copytoreg_fi (param $0 i32) (param $1 i32)
(local $2 i32)
(set_local $2
(i32.add
(i32.sub
- (i32.load
- (i32.const 4)
+ (i32.load offset=4
+ (i32.const 0)
)
(i32.const 16)
)
@@ -349,48 +349,58 @@
(i32.const 1)
)
)
- (loop $label$1 $label$0
- (i32.store
- (get_local $2)
- (i32.const 1)
- )
- (set_local $2
- (get_local $1)
- )
- (br_if $label$0
- (get_local $0)
+ (block $label$1
+ (loop $label$0
+ (drop
+ (i32.store
+ (get_local $2)
+ (i32.const 1)
+ )
+ )
+ (set_local $2
+ (get_local $1)
+ )
+ (br_if $label$0
+ (get_local $0)
+ )
)
)
(return)
)
- (func $frameaddress_0 (type $1)
+ (func $frameaddress_0
(local $0 i32)
- (call_import $use_i8_star
- (tee_local $0
- (i32.load
- (i32.const 4)
+ (drop
+ (call_import $use_i8_star
+ (tee_local $0
+ (i32.load offset=4
+ (i32.const 0)
+ )
)
)
)
- (i32.store
- (i32.const 4)
- (get_local $0)
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (get_local $0)
+ )
)
(return)
)
- (func $frameaddress_1 (type $1)
- (call_import $use_i8_star
- (i32.const 0)
+ (func $frameaddress_1
+ (drop
+ (call_import $use_i8_star
+ (i32.const 0)
+ )
)
(return)
)
- (func $inline_asm (type $1)
+ (func $inline_asm
(local $0 i32)
(set_local $0
(i32.add
(i32.sub
- (i32.load
- (i32.const 4)
+ (i32.load offset=4
+ (i32.const 0)
)
(i32.const 16)
)
diff --git a/test/llvm_autogenerated/varargs.s b/test/llvm_autogenerated/varargs.s
index 4b3e7c214..3e427ac49 100644
--- a/test/llvm_autogenerated/varargs.s
+++ b/test/llvm_autogenerated/varargs.s
@@ -1,5 +1,5 @@
.text
- .file "/s/llvm/llvm/test/CodeGen/WebAssembly/varargs.ll"
+ .file "/s/llvm-upstream/llvm/test/CodeGen/WebAssembly/varargs.ll"
.globl start
.type start,@function
start:
@@ -77,19 +77,20 @@ arg_i128:
i32.const $push1=, 7
i32.add $push2=, $pop0, $pop1
i32.const $push3=, -8
- i32.and $push12=, $pop2, $pop3
- tee_local $push11=, $3=, $pop12
+ i32.and $push13=, $pop2, $pop3
+ tee_local $push12=, $2=, $pop13
i32.const $push4=, 8
- i32.add $push5=, $pop11, $pop4
- i32.store $2=, 0($1), $pop5
- i64.load $4=, 0($3)
- i32.const $push6=, 16
- i32.add $push7=, $3, $pop6
- i32.store $drop=, 0($1), $pop7
- i32.const $push10=, 8
- i32.add $push8=, $0, $pop10
- i64.load $push9=, 0($2)
- i64.store $drop=, 0($pop8), $pop9
+ i32.add $push11=, $pop12, $pop4
+ tee_local $push10=, $3=, $pop11
+ i32.store $drop=, 0($1), $pop10
+ i64.load $4=, 0($2)
+ i32.const $push5=, 16
+ i32.add $push6=, $2, $pop5
+ i32.store $drop=, 0($1), $pop6
+ i32.const $push9=, 8
+ i32.add $push7=, $0, $pop9
+ i64.load $push8=, 0($3)
+ i64.store $drop=, 0($pop7), $pop8
i64.store $drop=, 0($0), $4
return
.endfunc
@@ -110,22 +111,22 @@ caller_none:
.type caller_some,@function
caller_some:
.local i32
- i32.const $push5=, __stack_pointer
- i32.const $push2=, __stack_pointer
- i32.load $push3=, 0($pop2)
+ i32.const $push5=, 0
+ i32.const $push2=, 0
+ i32.load $push3=, __stack_pointer($pop2)
i32.const $push4=, 16
- i32.sub $push9=, $pop3, $pop4
- i32.store $push11=, 0($pop5), $pop9
- tee_local $push10=, $0=, $pop11
+ i32.sub $push10=, $pop3, $pop4
+ tee_local $push9=, $0=, $pop10
+ i32.store $drop=, __stack_pointer($pop5), $pop9
i64.const $push0=, 4611686018427387904
- i64.store $drop=, 8($pop10), $pop0
+ i64.store $drop=, 8($0), $pop0
i32.const $push1=, 0
i32.store $drop=, 0($0), $pop1
call callee@FUNCTION, $0
- i32.const $push8=, __stack_pointer
+ i32.const $push8=, 0
i32.const $push6=, 16
i32.add $push7=, $0, $pop6
- i32.store $drop=, 0($pop8), $pop7
+ i32.store $drop=, __stack_pointer($pop8), $pop7
return
.endfunc
.Lfunc_end7:
@@ -150,3 +151,4 @@ startbb:
.size startbb, .Lfunc_end8-startbb
+ .functype callee, void
diff --git a/test/llvm_autogenerated/varargs.wast b/test/llvm_autogenerated/varargs.wast
index 17d93d1ae..e2ec13ebc 100644
--- a/test/llvm_autogenerated/varargs.wast
+++ b/test/llvm_autogenerated/varargs.wast
@@ -1,52 +1,55 @@
(module
(memory 1)
(data (i32.const 4) "\10\04\00\00")
- (export "memory" memory)
+ (type $FUNCSIG$v (func))
(type $FUNCSIG$vi (func (param i32)))
- (type $1 (func (param i32 i32)))
- (type $2 (func (param i32) (result i32)))
- (type $3 (func))
- (type $4 (func (param i32 i32 i32)))
- (import $callee "env" "callee" (param i32))
- (export "start" $start)
- (export "end" $end)
- (export "copy" $copy)
- (export "arg_i8" $arg_i8)
- (export "arg_i32" $arg_i32)
- (export "arg_i128" $arg_i128)
- (export "caller_none" $caller_none)
- (export "caller_some" $caller_some)
- (export "startbb" $startbb)
- (func $start (type $1) (param $0 i32) (param $1 i32)
- (i32.store
- (get_local $0)
- (get_local $1)
+ (import "env" "callee" (func $callee (param i32)))
+ (export "memory" (memory $0))
+ (export "start" (func $start))
+ (export "end" (func $end))
+ (export "copy" (func $copy))
+ (export "arg_i8" (func $arg_i8))
+ (export "arg_i32" (func $arg_i32))
+ (export "arg_i128" (func $arg_i128))
+ (export "caller_none" (func $caller_none))
+ (export "caller_some" (func $caller_some))
+ (export "startbb" (func $startbb))
+ (func $start (param $0 i32) (param $1 i32)
+ (drop
+ (i32.store
+ (get_local $0)
+ (get_local $1)
+ )
)
(return)
)
- (func $end (type $FUNCSIG$vi) (param $0 i32)
+ (func $end (param $0 i32)
(return)
)
- (func $copy (type $1) (param $0 i32) (param $1 i32)
- (i32.store
- (get_local $0)
- (i32.load
- (get_local $1)
+ (func $copy (param $0 i32) (param $1 i32)
+ (drop
+ (i32.store
+ (get_local $0)
+ (i32.load
+ (get_local $1)
+ )
)
)
(return)
)
- (func $arg_i8 (type $2) (param $0 i32) (result i32)
+ (func $arg_i8 (param $0 i32) (result i32)
(local $1 i32)
- (i32.store
- (get_local $0)
- (i32.add
- (tee_local $1
- (i32.load
- (get_local $0)
+ (drop
+ (i32.store
+ (get_local $0)
+ (i32.add
+ (tee_local $1
+ (i32.load
+ (get_local $0)
+ )
)
+ (i32.const 4)
)
- (i32.const 4)
)
)
(return
@@ -55,23 +58,25 @@
)
)
)
- (func $arg_i32 (type $2) (param $0 i32) (result i32)
+ (func $arg_i32 (param $0 i32) (result i32)
(local $1 i32)
- (i32.store
- (get_local $0)
- (i32.add
- (tee_local $1
- (i32.and
- (i32.add
- (i32.load
- (get_local $0)
+ (drop
+ (i32.store
+ (get_local $0)
+ (i32.add
+ (tee_local $1
+ (i32.and
+ (i32.add
+ (i32.load
+ (get_local $0)
+ )
+ (i32.const 3)
)
- (i32.const 3)
+ (i32.const -4)
)
- (i32.const -4)
)
+ (i32.const 4)
)
- (i32.const 4)
)
)
(return
@@ -80,113 +85,116 @@
)
)
)
- (func $arg_i128 (type $1) (param $0 i32) (param $1 i32)
+ (func $arg_i128 (param $0 i32) (param $1 i32)
(local $2 i32)
(local $3 i32)
(local $4 i64)
- (local $5 i32)
- (set_local $2
- (block
- (block
- (set_local $5
- (i32.add
- (tee_local $3
- (i32.and
- (i32.add
- (i32.load
- (get_local $1)
- )
- (i32.const 7)
+ (drop
+ (i32.store
+ (get_local $1)
+ (tee_local $3
+ (i32.add
+ (tee_local $2
+ (i32.and
+ (i32.add
+ (i32.load
+ (get_local $1)
)
- (i32.const -8)
+ (i32.const 7)
)
+ (i32.const -8)
)
- (i32.const 8)
)
- )
- (i32.store
- (get_local $1)
- (get_local $5)
+ (i32.const 8)
)
)
- (get_local $5)
)
)
(set_local $4
(i64.load
- (get_local $3)
+ (get_local $2)
)
)
- (i32.store
- (get_local $1)
- (i32.add
- (get_local $3)
- (i32.const 16)
+ (drop
+ (i32.store
+ (get_local $1)
+ (i32.add
+ (get_local $2)
+ (i32.const 16)
+ )
)
)
- (i64.store
- (i32.add
- (get_local $0)
- (i32.const 8)
- )
- (i64.load
- (get_local $2)
+ (drop
+ (i64.store
+ (i32.add
+ (get_local $0)
+ (i32.const 8)
+ )
+ (i64.load
+ (get_local $3)
+ )
)
)
- (i64.store
- (get_local $0)
- (get_local $4)
+ (drop
+ (i64.store
+ (get_local $0)
+ (get_local $4)
+ )
)
(return)
)
- (func $caller_none (type $3)
- (call_import $callee
- (i32.const 0)
+ (func $caller_none
+ (drop
+ (call_import $callee
+ (i32.const 0)
+ )
)
(return)
)
- (func $caller_some (type $3)
+ (func $caller_some
(local $0 i32)
- (local $1 i32)
- (i64.store offset=8
- (tee_local $0
- (block
- (block
- (set_local $1
- (i32.sub
- (i32.load
- (i32.const 4)
- )
- (i32.const 16)
- )
- )
- (i32.store
- (i32.const 4)
- (get_local $1)
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (tee_local $0
+ (i32.sub
+ (i32.load offset=4
+ (i32.const 0)
)
+ (i32.const 16)
)
- (get_local $1)
)
)
- (i64.const 4611686018427387904)
)
- (i32.store
- (get_local $0)
- (i32.const 0)
+ (drop
+ (i64.store offset=8
+ (get_local $0)
+ (i64.const 4611686018427387904)
+ )
)
- (call_import $callee
- (get_local $0)
+ (drop
+ (i32.store
+ (get_local $0)
+ (i32.const 0)
+ )
)
- (i32.store
- (i32.const 4)
- (i32.add
+ (drop
+ (call_import $callee
(get_local $0)
- (i32.const 16)
+ )
+ )
+ (drop
+ (i32.store offset=4
+ (i32.const 0)
+ (i32.add
+ (get_local $0)
+ (i32.const 16)
+ )
)
)
(return)
)
- (func $startbb (type $4) (param $0 i32) (param $1 i32) (param $2 i32)
+ (func $startbb (param $0 i32) (param $1 i32) (param $2 i32)
(block $label$0
(br_if $label$0
(i32.eqz
@@ -198,9 +206,11 @@
)
(return)
)
- (i32.store
- (get_local $1)
- (get_local $2)
+ (drop
+ (i32.store
+ (get_local $1)
+ (get_local $2)
+ )
)
(return)
)