diff options
author | Dan Gohman <sunfish@mozilla.com> | 2016-05-20 20:08:54 -0700 |
---|---|---|
committer | Dan Gohman <sunfish@mozilla.com> | 2016-05-20 20:08:54 -0700 |
commit | 89a3fcbc78903d1a904354dd6eb2c4bd1ac44e8e (patch) | |
tree | 76d9524e84bbbbe32efe0688dd0b67a1cbe9545f | |
parent | b28a3a6eba4c4fbe64333dd544977a0c4f37c650 (diff) | |
download | binaryen-89a3fcbc78903d1a904354dd6eb2c4bd1ac44e8e.tar.gz binaryen-89a3fcbc78903d1a904354dd6eb2c4bd1ac44e8e.tar.bz2 binaryen-89a3fcbc78903d1a904354dd6eb2c4bd1ac44e8e.zip |
Update s2wasm for LLVM changes, and regenerate tests. (#532)
77 files changed, 7365 insertions, 6064 deletions
diff --git a/src/s2wasm.h b/src/s2wasm.h index 9afa51c7f..c0ab0998b 100644 --- a/src/s2wasm.h +++ b/src/s2wasm.h @@ -485,6 +485,12 @@ class S2WasmBuilder { mustMatch(":"); + if (match(".Lfunc_begin")) { + s = strchr(s, '\n'); + s++; + skipWhitespace(); + } + unsigned nextId = 0; auto getNextId = [&nextId]() { return cashew::IString(std::to_string(nextId++).c_str(), false); @@ -987,15 +993,10 @@ class S2WasmBuilder { addToBlock(builder.makeReturn(*s == '$' ? getInput() : nullptr)); } else if (match("unreachable")) { addToBlock(allocator->alloc<Unreachable>()); - } else if (match("memory_size")) { + } else if (match("current_memory")) { makeHost(CurrentMemory); } else if (match("grow_memory")) { makeHost1(GrowMemory); - } else if (match(".Lfunc_end")) { - s = strchr(s, '\n'); - s++; - s = strchr(s, '\n'); - break; // the function is done } else if (match(".endfunc")) { break; // the function is done } else { diff --git a/test/dot_s/asm_const.s b/test/dot_s/asm_const.s index 04c2c8630..a58f16a48 100644 --- a/test/dot_s/asm_const.s +++ b/test/dot_s/asm_const.s @@ -9,6 +9,7 @@ main: # @main call emscripten_asm_const@FUNCTION, $pop0 i32.const $push1=, 0 return $pop1 + .endfunc .Lfunc_end0: .size main, .Lfunc_end0-main diff --git a/test/dot_s/basics.s b/test/dot_s/basics.s index ee89f0b40..acabc48db 100644 --- a/test/dot_s/basics.s +++ b/test/dot_s/basics.s @@ -51,6 +51,7 @@ main: # @main i32.const $drop=, main@FUNCTION # just take address for testing end_block return $0 + .endfunc .Lfunc_end0: .size main, .Lfunc_end0-main diff --git a/test/dot_s/dso_handle.s b/test/dot_s/dso_handle.s index 64f640a01..87cf165fb 100644 --- a/test/dot_s/dso_handle.s +++ b/test/dot_s/dso_handle.s @@ -7,5 +7,6 @@ main: # @main # BB#0: i32.const $push0=, __dso_handle return $pop0 + .endfunc .Lfunc_end0: .size main, .Lfunc_end0-main diff --git a/test/dot_s/exit.s b/test/dot_s/exit.s index bf24ead9e..9b8121fbd 100644 --- a/test/dot_s/exit.s +++ b/test/dot_s/exit.s @@ -8,5 +8,6 @@ main: i32.const $push0=, 0 call exit@FUNCTION, $pop0 unreachable + .endfunc .Lfunc_end0: .size main, .Lfunc_end0-main diff --git a/test/dot_s/function-data-sections.s b/test/dot_s/function-data-sections.s index b9837b98c..b950a5f18 100644 --- a/test/dot_s/function-data-sections.s +++ b/test/dot_s/function-data-sections.s @@ -4,6 +4,7 @@ .type foo,@function foo: return + .endfunc .Lfunc_end0: .size foo, .Lfunc_end0-foo @@ -14,6 +15,7 @@ bar: .param i32 .result i32 return $0 + .endfunc .Lfunc_end1: .size bar, .Lfunc_end1-bar @@ -25,6 +27,7 @@ qux: .result f64 f64.add $push0=, $0, $1 return $pop0 + .endfunc .Lfunc_end2: .size qux, .Lfunc_end2-qux diff --git a/test/dot_s/initializers.s b/test/dot_s/initializers.s index 2bd4f1215..aa6b1d502 100644 --- a/test/dot_s/initializers.s +++ b/test/dot_s/initializers.s @@ -7,18 +7,21 @@ main: # @main # BB#0: i32.const $push0=, 5 return $pop0 + .endfunc .Lfunc_end0: .size main, .Lfunc_end0-main .globl f1 .type f1,@function f1: return + .endfunc .Lfunc_end1: .size f1, .Lfunc_end1-f1 .globl f2 .type f2,@function f2: return + .endfunc .Lfunc_end2: .size f2, .Lfunc_end2-f2 .section .init_array.101,"aw",@init_array diff --git a/test/dot_s/memops.s b/test/dot_s/memops.s index 0ddccaad2..2d5cabdf6 100644 --- a/test/dot_s/memops.s +++ b/test/dot_s/memops.s @@ -9,6 +9,7 @@ _Z6reporti: # @_Z6reporti i32.const $push1=, .str call emscripten_asm_const@FUNCTION, $pop1 return + .endfunc .Lfunc_end0: .size _Z6reporti, .Lfunc_end0-_Z6reporti @@ -80,6 +81,7 @@ main: # @main i32.const $9=, 0 i32.store $12=, 0($9), $12 return $pop17 + .endfunc .Lfunc_end1: .size main, .Lfunc_end1-main diff --git a/test/dot_s/minimal.s b/test/dot_s/minimal.s index e43abacfb..e91aa0930 100644 --- a/test/dot_s/minimal.s +++ b/test/dot_s/minimal.s @@ -7,6 +7,7 @@ main: # @main # BB#0: i32.const $push0=, 5 return $pop0 + .endfunc .Lfunc_end0: .size main, .Lfunc_end0-main diff --git a/test/dot_s/relocation.s b/test/dot_s/relocation.s index 816d7a488..474da3cf8 100644 --- a/test/dot_s/relocation.s +++ b/test/dot_s/relocation.s @@ -8,6 +8,7 @@ main: i32.const $push0=, a i32.load $push1=, 0($pop0) return $pop1 + .endfunc .Lfunc_end0: .size main, .Lfunc_end0-main diff --git a/test/dot_s/start_main0.s b/test/dot_s/start_main0.s index 85323ee62..c3f735a52 100644 --- a/test/dot_s/start_main0.s +++ b/test/dot_s/start_main0.s @@ -4,5 +4,6 @@ .type main,@function main: # @main # BB#0: + .endfunc .Lfunc_end0: .size main, .Lfunc_end0-main diff --git a/test/dot_s/start_main2.s b/test/dot_s/start_main2.s index 7f77ec463..d413f9213 100644 --- a/test/dot_s/start_main2.s +++ b/test/dot_s/start_main2.s @@ -7,5 +7,6 @@ main: # @main .result i32 # BB#0: return $0 + .endfunc .Lfunc_end0: .size main, .Lfunc_end0-main diff --git a/test/dot_s/symbolic-offset.s b/test/dot_s/symbolic-offset.s index d668e3ebc..683acef62 100644 --- a/test/dot_s/symbolic-offset.s +++ b/test/dot_s/symbolic-offset.s @@ -6,6 +6,7 @@ f: .param i32 i32.store $drop=, m+4($0), $1 return + .endfunc .Lfunc_end0: .size f, .Lfunc_end0-f diff --git a/test/dot_s/visibilities.s b/test/dot_s/visibilities.s index e5373a888..1bc19a767 100644 --- a/test/dot_s/visibilities.s +++ b/test/dot_s/visibilities.s @@ -4,6 +4,7 @@ .type foo,@function foo: return + .endfunc .Lfunc_end0: .size foo, .Lfunc_end0-foo @@ -12,6 +13,7 @@ foo: .type bar,@function bar: return + .endfunc .Lfunc_end1: .size bar, .Lfunc_end1-bar @@ -20,5 +22,6 @@ bar: .type qux,@function qux: return + .endfunc .Lfunc_end2: .size qux, .Lfunc_end2-qux diff --git a/test/llvm_autogenerated/byval.s b/test/llvm_autogenerated/byval.s index 02a27cb94..2fdba767c 100644 --- a/test/llvm_autogenerated/byval.s +++ b/test/llvm_autogenerated/byval.s @@ -4,22 +4,23 @@ .type byval_arg,@function byval_arg: .param i32 - .local i32, i32, i32, i32, i32 - i32.const $1=, __stack_pointer - i32.load $1=, 0($1) - i32.const $2=, 16 - i32.sub $5=, $1, $2 - i32.const $2=, __stack_pointer - i32.store $5=, 0($2), $5 + .local i32 + i32.const $push4=, __stack_pointer + i32.const $push1=, __stack_pointer + i32.load $push2=, 0($pop1) + i32.const $push3=, 16 + i32.sub $push10=, $pop2, $pop3 + i32.store $push12=, 0($pop4), $pop10 + tee_local $push11=, $1=, $pop12 i32.load $push0=, 0($0) - i32.store $drop=, 12($5), $pop0 - i32.const $4=, 12 - i32.add $4=, $5, $4 - call ext_byval_func@FUNCTION, $4 - i32.const $3=, 16 - i32.add $5=, $5, $3 - i32.const $3=, __stack_pointer - i32.store $5=, 0($3), $5 + i32.store $drop=, 12($pop11), $pop0 + i32.const $push8=, 12 + i32.add $push9=, $1, $pop8 + call ext_byval_func@FUNCTION, $pop9 + i32.const $push7=, __stack_pointer + i32.const $push5=, 16 + i32.add $push6=, $1, $pop5 + i32.store $drop=, 0($pop7), $pop6 return .endfunc .Lfunc_end0: @@ -29,22 +30,23 @@ byval_arg: .type byval_arg_align8,@function byval_arg_align8: .param i32 - .local i32, i32, i32, i32, i32 - i32.const $1=, __stack_pointer - i32.load $1=, 0($1) - i32.const $2=, 16 - i32.sub $5=, $1, $2 - i32.const $2=, __stack_pointer - i32.store $5=, 0($2), $5 - i32.load $push0=, 0($0):p2align=3 - i32.store $drop=, 8($5):p2align=3, $pop0 - i32.const $4=, 8 - i32.add $4=, $5, $4 - call ext_byval_func_align8@FUNCTION, $4 - i32.const $3=, 16 - i32.add $5=, $5, $3 - i32.const $3=, __stack_pointer - i32.store $5=, 0($3), $5 + .local i32 + i32.const $push4=, __stack_pointer + i32.const $push1=, __stack_pointer + i32.load $push2=, 0($pop1) + i32.const $push3=, 16 + i32.sub $push10=, $pop2, $pop3 + i32.store $push12=, 0($pop4), $pop10 + tee_local $push11=, $1=, $pop12 + i32.load $push0=, 0($0) + i32.store $drop=, 8($pop11), $pop0 + i32.const $push8=, 8 + i32.add $push9=, $1, $pop8 + call ext_byval_func_align8@FUNCTION, $pop9 + i32.const $push7=, __stack_pointer + i32.const $push5=, 16 + i32.add $push6=, $1, $pop5 + i32.store $drop=, 0($pop7), $pop6 return .endfunc .Lfunc_end1: @@ -54,96 +56,83 @@ byval_arg_align8: .type byval_arg_double,@function byval_arg_double: .param i32 - .local i32, i32, i32, i32 - i32.const $1=, __stack_pointer - i32.load $1=, 0($1) - i32.const $2=, 16 - i32.sub $4=, $1, $2 - i32.const $2=, __stack_pointer - i32.store $4=, 0($2), $4 + .local i32 + i32.const $push8=, __stack_pointer + i32.const $push5=, __stack_pointer + i32.load $push6=, 0($pop5) + i32.const $push7=, 16 + i32.sub $push12=, $pop6, $pop7 + i32.store $push15=, 0($pop8), $pop12 + tee_local $push14=, $1=, $pop15 i32.const $push0=, 8 - i32.add $push3=, $4, $pop0 - i32.const $push5=, 8 - i32.add $push1=, $0, $pop5 + i32.add $push3=, $pop14, $pop0 + i32.const $push13=, 8 + i32.add $push1=, $0, $pop13 i64.load $push2=, 0($pop1) i64.store $drop=, 0($pop3), $pop2 i64.load $push4=, 0($0) - i64.store $drop=, 0($4), $pop4 - call ext_byval_func_alignedstruct@FUNCTION, $4 - i32.const $3=, 16 - i32.add $4=, $4, $3 - i32.const $3=, __stack_pointer - i32.store $4=, 0($3), $4 + i64.store $drop=, 0($1), $pop4 + call ext_byval_func_alignedstruct@FUNCTION, $1 + i32.const $push11=, __stack_pointer + i32.const $push9=, 16 + i32.add $push10=, $1, $pop9 + i32.store $drop=, 0($pop11), $pop10 return .endfunc .Lfunc_end2: .size byval_arg_double, .Lfunc_end2-byval_arg_double - .globl byval_arg_big - .type byval_arg_big,@function -byval_arg_big: + .globl byval_param + .type byval_param,@function +byval_param: .param i32 - .local i32, i32, i32, i32, i32, i32, i32, i32, i32 - i32.const $1=, __stack_pointer - i32.load $1=, 0($1) - i32.const $2=, 48 - i32.sub $9=, $1, $2 - i32.const $2=, __stack_pointer - i32.store $9=, 0($2), $9 - i32.const $push0=, 32 - i32.const $4=, 12 - i32.add $4=, $9, $4 - i32.add $push3=, $4, $pop0 - i32.const $push20=, 32 - i32.add $push1=, $0, $pop20 - i32.load8_u $push2=, 0($pop1) - i32.store8 $drop=, 0($pop3):p2align=2, $pop2 - i32.const $push4=, 24 - i32.const $5=, 12 - i32.add $5=, $9, $5 - i32.add $push7=, $5, $pop4 - i32.const $push19=, 24 - i32.add $push5=, $0, $pop19 - i64.load $push6=, 0($pop5):p2align=0 - i64.store $drop=, 0($pop7):p2align=2, $pop6 - i32.const $push8=, 16 - i32.const $6=, 12 - i32.add $6=, $9, $6 - i32.add $push11=, $6, $pop8 - i32.const $push18=, 16 - i32.add $push9=, $0, $pop18 - i64.load $push10=, 0($pop9):p2align=0 - i64.store $drop=, 0($pop11):p2align=2, $pop10 - i32.const $push12=, 8 - i32.const $7=, 12 - i32.add $7=, $9, $7 - i32.add $push15=, $7, $pop12 - i32.const $push17=, 8 - i32.add $push13=, $0, $pop17 - i64.load $push14=, 0($pop13):p2align=0 - i64.store $drop=, 0($pop15):p2align=2, $pop14 - i64.load $push16=, 0($0):p2align=0 - i64.store $drop=, 12($9):p2align=2, $pop16 - i32.const $8=, 12 - i32.add $8=, $9, $8 - call ext_byval_func_bigarray@FUNCTION, $8 - i32.const $3=, 48 - i32.add $9=, $9, $3 - i32.const $3=, __stack_pointer - i32.store $9=, 0($3), $9 + call ext_func@FUNCTION, $0 return .endfunc .Lfunc_end3: - .size byval_arg_big, .Lfunc_end3-byval_arg_big + .size byval_param, .Lfunc_end3-byval_param - .globl byval_param - .type byval_param,@function -byval_param: + .globl byval_empty_caller + .type byval_empty_caller,@function +byval_empty_caller: .param i32 - call ext_func@FUNCTION, $0 + call ext_byval_func_empty@FUNCTION, $0 return .endfunc .Lfunc_end4: - .size byval_param, .Lfunc_end4-byval_param + .size byval_empty_caller, .Lfunc_end4-byval_empty_caller + + .globl byval_empty_callee + .type byval_empty_callee,@function +byval_empty_callee: + .param i32 + call ext_func_empty@FUNCTION, $0 + return + .endfunc +.Lfunc_end5: + .size byval_empty_callee, .Lfunc_end5-byval_empty_callee + + .globl big_byval + .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 + return + .endfunc +.Lfunc_end6: + .size big_byval, .Lfunc_end6-big_byval diff --git a/test/llvm_autogenerated/byval.wast b/test/llvm_autogenerated/byval.wast index edacb3d3b..9ebb4b446 100644 --- a/test/llvm_autogenerated/byval.wast +++ b/test/llvm_autogenerated/byval.wast @@ -4,190 +4,103 @@ ) (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_bigarray "env" "ext_byval_func_bigarray" (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_arg_big" $byval_arg_big) (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 (param $0 i32) (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (set_local $1 - (i32.const 4) - ) - (set_local $1 - (i32.load - (get_local $1) - ) - ) - (set_local $2 - (i32.const 16) - ) - (set_local $5 - (i32.sub - (get_local $1) - (get_local $2) - ) - ) - (set_local $2 - (i32.const 4) - ) - (set_local $5 - (i32.store - (get_local $2) - (get_local $5) - ) - ) (i32.store offset=12 - (get_local $5) + (set_local $1 + (i32.store + (i32.const 4) + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 16) + ) + ) + ) (i32.load (get_local $0) ) ) - (set_local $4 - (i32.const 12) - ) - (set_local $4 - (i32.add - (get_local $5) - (get_local $4) - ) - ) (call_import $ext_byval_func - (get_local $4) - ) - (set_local $3 - (i32.const 16) - ) - (set_local $5 (i32.add - (get_local $5) - (get_local $3) + (get_local $1) + (i32.const 12) ) ) - (set_local $3 + (i32.store (i32.const 4) - ) - (set_local $5 - (i32.store - (get_local $3) - (get_local $5) + (i32.add + (get_local $1) + (i32.const 16) ) ) (return) ) (func $byval_arg_align8 (param $0 i32) (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (set_local $1 - (i32.const 4) - ) - (set_local $1 - (i32.load - (get_local $1) - ) - ) - (set_local $2 - (i32.const 16) - ) - (set_local $5 - (i32.sub - (get_local $1) - (get_local $2) - ) - ) - (set_local $2 - (i32.const 4) - ) - (set_local $5 - (i32.store - (get_local $2) - (get_local $5) + (i32.store offset=8 + (set_local $1 + (i32.store + (i32.const 4) + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 16) + ) + ) ) - ) - (i32.store offset=8 align=8 - (get_local $5) - (i32.load align=8 + (i32.load (get_local $0) ) ) - (set_local $4 - (i32.const 8) - ) - (set_local $4 - (i32.add - (get_local $5) - (get_local $4) - ) - ) (call_import $ext_byval_func_align8 - (get_local $4) - ) - (set_local $3 - (i32.const 16) - ) - (set_local $5 (i32.add - (get_local $5) - (get_local $3) + (get_local $1) + (i32.const 8) ) ) - (set_local $3 + (i32.store (i32.const 4) - ) - (set_local $5 - (i32.store - (get_local $3) - (get_local $5) + (i32.add + (get_local $1) + (i32.const 16) ) ) (return) ) (func $byval_arg_double (param $0 i32) (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (set_local $1 - (i32.const 4) - ) - (set_local $1 - (i32.load - (get_local $1) - ) - ) - (set_local $2 - (i32.const 16) - ) - (set_local $4 - (i32.sub - (get_local $1) - (get_local $2) - ) - ) - (set_local $2 - (i32.const 4) - ) - (set_local $4 - (i32.store - (get_local $2) - (get_local $4) - ) - ) (i64.store (i32.add - (get_local $4) + (set_local $1 + (i32.store + (i32.const 4) + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 16) + ) + ) + ) (i32.const 8) ) (i64.load @@ -198,196 +111,66 @@ ) ) (i64.store - (get_local $4) + (get_local $1) (i64.load (get_local $0) ) ) (call_import $ext_byval_func_alignedstruct - (get_local $4) - ) - (set_local $3 - (i32.const 16) - ) - (set_local $4 - (i32.add - (get_local $4) - (get_local $3) - ) + (get_local $1) ) - (set_local $3 + (i32.store (i32.const 4) - ) - (set_local $4 - (i32.store - (get_local $3) - (get_local $4) + (i32.add + (get_local $1) + (i32.const 16) ) ) (return) ) - (func $byval_arg_big (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (set_local $1 - (i32.const 4) - ) - (set_local $1 - (i32.load - (get_local $1) - ) - ) - (set_local $2 - (i32.const 48) - ) - (set_local $9 - (i32.sub - (get_local $1) - (get_local $2) - ) - ) - (set_local $2 - (i32.const 4) - ) - (set_local $9 - (i32.store - (get_local $2) - (get_local $9) - ) - ) - (set_local $4 - (i32.const 12) - ) - (set_local $4 - (i32.add - (get_local $9) - (get_local $4) - ) - ) - (i32.store8 align=4 - (i32.add - (get_local $4) - (i32.const 32) - ) - (i32.load8_u - (i32.add - (get_local $0) - (i32.const 32) - ) - ) - ) - (set_local $5 - (i32.const 12) - ) - (set_local $5 - (i32.add - (get_local $9) - (get_local $5) - ) - ) - (i64.store align=4 - (i32.add - (get_local $5) - (i32.const 24) - ) - (i64.load align=1 - (i32.add - (get_local $0) - (i32.const 24) - ) - ) + (func $byval_param (param $0 i32) + (call_import $ext_func + (get_local $0) ) - (set_local $6 - (i32.const 12) + (return) + ) + (func $byval_empty_caller (param $0 i32) + (call_import $ext_byval_func_empty + (get_local $0) ) - (set_local $6 - (i32.add - (get_local $9) - (get_local $6) - ) + (return) + ) + (func $byval_empty_callee (param $0 i32) + (call_import $ext_func_empty + (get_local $0) ) - (i64.store align=4 - (i32.add - (get_local $6) - (i32.const 16) - ) - (i64.load align=1 - (i32.add + (return) + ) + (func $big_byval (param $0 i32) + (call_import $big_byval_callee + (set_local $0 + (call_import $memcpy + (i32.store + (i32.const 4) + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 131072) + ) + ) (get_local $0) - (i32.const 16) + (i32.const 131072) ) ) ) - (set_local $7 - (i32.const 12) - ) - (set_local $7 - (i32.add - (get_local $9) - (get_local $7) - ) - ) - (i64.store align=4 + (i32.store + (i32.const 4) (i32.add - (get_local $7) - (i32.const 8) - ) - (i64.load align=1 - (i32.add - (get_local $0) - (i32.const 8) - ) - ) - ) - (i64.store offset=12 align=4 - (get_local $9) - (i64.load align=1 (get_local $0) + (i32.const 131072) ) ) - (set_local $8 - (i32.const 12) - ) - (set_local $8 - (i32.add - (get_local $9) - (get_local $8) - ) - ) - (call_import $ext_byval_func_bigarray - (get_local $8) - ) - (set_local $3 - (i32.const 48) - ) - (set_local $9 - (i32.add - (get_local $9) - (get_local $3) - ) - ) - (set_local $3 - (i32.const 4) - ) - (set_local $9 - (i32.store - (get_local $3) - (get_local $9) - ) - ) - (return) - ) - (func $byval_param (param $0 i32) - (call_import $ext_func - (get_local $0) - ) (return) ) ) diff --git a/test/llvm_autogenerated/cfg-stackify.s b/test/llvm_autogenerated/cfg-stackify.s index 0dac62d46..f921cb4ba 100644 --- a/test/llvm_autogenerated/cfg-stackify.s +++ b/test/llvm_autogenerated/cfg-stackify.s @@ -8,15 +8,19 @@ test0: i32.const $1=, 0 .LBB0_1: loop - i32.const $push1=, 1 - i32.add $1=, $1, $pop1 - i32.ge_s $push0=, $1, $0 - br_if 1, $pop0 + 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 call something@FUNCTION br 0 -.LBB0_3: +.LBB0_4: end_loop - return .endfunc .Lfunc_end0: .size test0, .Lfunc_end0-test0 @@ -29,15 +33,19 @@ test1: i32.const $1=, 0 .LBB1_1: loop - i32.const $push1=, 1 - i32.add $1=, $1, $pop1 - i32.ge_s $push0=, $1, $0 - br_if 1, $pop0 + 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 call something@FUNCTION br 0 -.LBB1_3: +.LBB1_4: end_loop - return .endfunc .Lfunc_end1: .size test1, .Lfunc_end1-test1 @@ -50,18 +58,19 @@ test2: i32.const $push0=, 1 i32.lt_s $push1=, $1, $pop0 br_if 0, $pop1 -.LBB2_1: +.LBB2_2: loop - i32.const $push5=, -1 - i32.add $1=, $1, $pop5 f64.load $push2=, 0($0) - f64.const $push3=, 0x1.999999999999ap1 - f64.mul $push4=, $pop2, $pop3 - f64.store $drop=, 0($0), $pop4 - i32.const $push6=, 8 - i32.add $0=, $0, $pop6 - br_if 0, $1 -.LBB2_2: + f64.const $push8=, 0x1.999999999999ap1 + f64.mul $push3=, $pop2, $pop8 + f64.store $drop=, 0($0), $pop3 + i32.const $push7=, 8 + i32.add $0=, $0, $pop7 + i32.const $push6=, -1 + i32.add $push5=, $1, $pop6 + tee_local $push4=, $1=, $pop5 + br_if 0, $pop4 +.LBB2_3: end_loop end_block return @@ -158,9 +167,9 @@ diamond: single_block: .param i32 .result i32 - i32.const $push0=, 0 - i32.store $push1=, 0($0), $pop0 - return $pop1 + i32.const $push1=, 0 + i32.store $push0=, 0($0), $pop1 + return $pop0 .endfunc .Lfunc_end6: .size single_block, .Lfunc_end6-single_block @@ -194,9 +203,8 @@ simple_loop: loop i32.const $push3=, 1 i32.store $drop=, 0($0), $pop3 - i32.const $push4=, 0 - i32.eq $push5=, $1, $pop4 - br_if 0, $pop5 + i32.eqz $push4=, $1 + br_if 0, $pop4 end_loop i32.const $push1=, 2 i32.store $drop=, 0($0), $pop1 @@ -275,30 +283,31 @@ doublediamond_in_a_loop: i32.const $push0=, 0 i32.store $drop=, 0($2), $pop0 block - block br_if 0, $0 - i32.const $push1=, 1 + i32.const $push2=, 1 + i32.store $drop=, 0($2), $pop2 + i32.const $push1=, 5 i32.store $drop=, 0($2), $pop1 br 1 .LBB11_3: end_block - i32.const $push2=, 2 - i32.store $drop=, 0($2), $pop2 + i32.const $push3=, 2 + i32.store $drop=, 0($2), $pop3 block br_if 0, $1 - i32.const $push3=, 3 - i32.store $drop=, 0($2), $pop3 + i32.const $push5=, 3 + i32.store $drop=, 0($2), $pop5 + i32.const $push4=, 5 + i32.store $drop=, 0($2), $pop4 br 1 .LBB11_5: end_block - i32.const $push4=, 4 - i32.store $drop=, 0($2), $pop4 -.LBB11_6: - end_block - i32.const $push5=, 5 - i32.store $drop=, 0($2), $pop5 + i32.const $push7=, 4 + i32.store $drop=, 0($2), $pop7 + i32.const $push6=, 5 + i32.store $drop=, 0($2), $pop6 br 0 -.LBB11_7: +.LBB11_6: end_loop .endfunc .Lfunc_end11: @@ -311,20 +320,21 @@ test3: block i32.const $push0=, 0 br_if 0, $pop0 -.LBB12_1: + i32.eq $0=, $0, $0 +.LBB12_2: loop br_if 1, $0 -.LBB12_2: +.LBB12_3: loop - i32.ne $push1=, $0, $0 + i32.eqz $push1=, $0 br_if 0, $pop1 end_loop call bar@FUNCTION br 0 -.LBB12_4: +.LBB12_5: end_loop unreachable -.LBB12_5: +.LBB12_6: end_block return .endfunc @@ -337,33 +347,27 @@ test4: .param i32 block block - block i32.const $push0=, 3 i32.gt_s $push1=, $0, $pop0 br_if 0, $pop1 - block - i32.const $push8=, 0 - i32.eq $push9=, $0, $pop8 - br_if 0, $pop9 + i32.eqz $push7=, $0 + br_if 1, $pop7 i32.const $push6=, 2 - i32.ne $push7=, $0, $pop6 - br_if 2, $pop7 + i32.eq $drop=, $0, $pop6 + br 1 .LBB13_3: end_block - return -.LBB13_4: - end_block + block i32.const $push2=, 4 i32.eq $push3=, $0, $pop2 - br_if 1, $pop3 + br_if 0, $pop3 i32.const $push4=, 622 i32.ne $push5=, $0, $pop4 - br_if 0, $pop5 - return -.LBB13_7: + br_if 1, $pop5 +.LBB13_5: end_block return -.LBB13_8: +.LBB13_6: end_block return .endfunc @@ -376,31 +380,30 @@ test5: .param i32, i32 .local i32 i32.const $push5=, 1 - i32.and $0=, $0, $pop5 + i32.and $2=, $0, $pop5 i32.const $push4=, 1 - i32.and $2=, $1, $pop4 + i32.and $1=, $1, $pop4 .LBB14_1: block loop i32.const $push7=, 0 i32.const $push6=, 0 - i32.store $1=, 0($pop7), $pop6 - i32.const $push9=, 0 - i32.eq $push10=, $0, $pop9 - br_if 2, $pop10 + i32.store $0=, 0($pop7), $pop6 + i32.eqz $push9=, $2 + br_if 2, $pop9 i32.const $push8=, 1 - i32.store $drop=, 0($1), $pop8 - br_if 0, $2 + i32.store $drop=, 0($0), $pop8 + br_if 0, $1 end_loop - i32.const $push2=, 0 - i32.const $push3=, 3 - i32.store $drop=, 0($pop2), $pop3 + i32.const $push3=, 0 + i32.const $push2=, 3 + i32.store $drop=, 0($pop3), $pop2 return .LBB14_4: end_block - i32.const $push0=, 0 - i32.const $push1=, 2 - i32.store $drop=, 0($pop0), $pop1 + i32.const $push1=, 0 + i32.const $push0=, 2 + i32.store $drop=, 0($pop1), $pop0 return .endfunc .Lfunc_end14: @@ -411,43 +414,41 @@ test5: test6: .param i32, i32 .local i32, i32, i32 - i32.const $push8=, 1 - i32.and $2=, $0, $pop8 + i32.const $push6=, 1 + i32.and $3=, $0, $pop6 .LBB15_1: block block loop - i32.const $push10=, 0 - i32.const $push9=, 0 - i32.store $0=, 0($pop10), $pop9 - i32.const $push14=, 0 - i32.eq $push15=, $2, $pop14 - br_if 3, $pop15 + 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 $push0=, 0($0), $pop13 - tee_local $push12=, $4=, $pop0 - i32.and $push1=, $1, $pop12 - tee_local $push11=, $3=, $pop1 - i32.const $push16=, 0 - i32.eq $push17=, $pop11, $pop16 - br_if 2, $pop17 - i32.store $drop=, 0($0), $4 - br_if 0, $3 + i32.store $push12=, 0($0), $pop13 + tee_local $push11=, $2=, $pop12 + 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 end_loop - i32.const $push6=, 0 - i32.const $push7=, 2 - i32.store $drop=, 0($pop6), $pop7 + i32.const $push5=, 0 + i32.const $push4=, 2 + i32.store $drop=, 0($pop5), $pop4 return .LBB15_5: end_block - i32.const $push2=, 0 - i32.const $push3=, 3 - i32.store $drop=, 0($pop2), $pop3 + i32.const $push1=, 0 + i32.const $push0=, 3 + i32.store $drop=, 0($pop1), $pop0 .LBB15_6: end_block - i32.const $push4=, 0 - i32.const $push5=, 4 - i32.store $drop=, 0($pop4), $pop5 + i32.const $push3=, 0 + i32.const $push2=, 4 + i32.store $drop=, 0($pop3), $pop2 return .endfunc .Lfunc_end15: @@ -473,9 +474,9 @@ test7: i32.store $drop=, 0($2), $pop10 i32.and $push1=, $1, $0 br_if 1, $pop1 - i32.const $push2=, 0 - i32.const $push3=, 4 - i32.store $drop=, 0($pop2), $pop3 + i32.const $push3=, 0 + i32.const $push2=, 4 + i32.store $drop=, 0($pop3), $pop2 unreachable .LBB16_4: end_block @@ -484,9 +485,9 @@ test7: i32.and $push4=, $1, $0 br_if 0, $pop4 end_loop - i32.const $push5=, 0 - i32.const $push6=, 5 - i32.store $drop=, 0($pop5), $pop6 + i32.const $push6=, 0 + i32.const $push5=, 5 + i32.store $drop=, 0($pop6), $pop5 unreachable .endfunc .Lfunc_end16: @@ -498,23 +499,10 @@ test8: .result i32 .LBB17_1: loop - block i32.const $push0=, 0 - i32.const $push3=, 0 - i32.eq $push4=, $pop0, $pop3 - br_if 0, $pop4 - i32.const $push2=, 0 - i32.const $push5=, 0 - i32.eq $push6=, $pop2, $pop5 - br_if 1, $pop6 -.LBB17_3: - end_block - loop - i32.const $push1=, 0 - br_if 0, $pop1 - br 2 -.LBB17_4: - end_loop + br_if 0, $pop0 + br 0 +.LBB17_2: end_loop .endfunc .Lfunc_end17: @@ -525,48 +513,48 @@ test8: test9: .local i32, i32 i32.const $push0=, 0 - i32.const $push12=, 0 - i32.store $0=, 0($pop0), $pop12 + i32.const $push11=, 0 + i32.store $0=, 0($pop0), $pop11 .LBB18_1: loop i32.const $push14=, 1 - i32.store $push1=, 0($0), $pop14 - tee_local $push13=, $1=, $pop1 - i32.call $push2=, a@FUNCTION - i32.and $push3=, $pop13, $pop2 - i32.const $push18=, 0 - i32.eq $push19=, $pop3, $pop18 - br_if 1, $pop19 + 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 .LBB18_2: loop i32.const $push15=, 2 i32.store $drop=, 0($0), $pop15 block - i32.call $push6=, a@FUNCTION - i32.and $push7=, $pop6, $1 - i32.const $push20=, 0 - i32.eq $push21=, $pop7, $pop20 - br_if 0, $pop21 + i32.call $push5=, a@FUNCTION + i32.and $push6=, $pop5, $1 + i32.eqz $push19=, $pop6 + br_if 0, $pop19 i32.const $push16=, 3 i32.store $drop=, 0($0), $pop16 - i32.call $push10=, a@FUNCTION - i32.and $push11=, $pop10, $1 - br_if 1, $pop11 - br 3 + i32.call $push9=, a@FUNCTION + i32.and $push10=, $pop9, $1 + i32.eqz $push20=, $pop10 + br_if 3, $pop20 + br 1 .LBB18_4: end_block i32.const $push17=, 4 i32.store $drop=, 0($0), $pop17 - i32.call $push8=, a@FUNCTION - i32.and $push9=, $pop8, $1 - br_if 0, $pop9 - br 2 + i32.call $push7=, a@FUNCTION + i32.and $push8=, $pop7, $1 + i32.eqz $push21=, $pop8 + br_if 2, $pop21 + br 0 .LBB18_5: end_loop end_loop i32.const $push4=, 0 - i32.const $push5=, 5 - i32.store $drop=, 0($pop4), $pop5 + i32.const $push3=, 5 + i32.store $drop=, 0($pop4), $pop3 return .endfunc .Lfunc_end18: @@ -579,34 +567,35 @@ test10: i32.const $0=, 2 .LBB19_1: loop - copy_local $4=, $1 + copy_local $2=, $1 copy_local $3=, $0 i32.const $1=, 0 i32.const $0=, 3 + br_if 0, $2 i32.const $2=, 4 - br_if 0, $4 -.LBB19_2: +.LBB19_3: block loop copy_local $4=, $3 copy_local $3=, $2 -.LBB19_3: +.LBB19_4: loop - copy_local $2=, $4 + copy_local $push3=, $4 + tee_local $push2=, $2=, $pop3 i32.const $push1=, 4 - i32.gt_u $push0=, $2, $pop1 + i32.gt_u $push0=, $pop2, $pop1 br_if 5, $pop0 copy_local $4=, $3 - br_table $2, 0, 1, 5, 2, 4, 0 -.LBB19_5: + br_table $2, 0, 1, 5, 2, 4, 0 +.LBB19_6: end_loop end_loop return -.LBB19_6: +.LBB19_7: end_block i32.const $1=, 1 br 0 -.LBB19_7: +.LBB19_8: end_loop .endfunc .Lfunc_end19: @@ -622,53 +611,52 @@ test11: block i32.const $push0=, 0 i32.const $push15=, 0 - i32.store $push1=, 0($pop0), $pop15 - tee_local $push14=, $0=, $pop1 - br_if 0, $pop14 - i32.const $push7=, 1 - i32.store $drop=, 0($0), $pop7 + 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 $push9=, 0 - i32.const $push8=, 2 - i32.store $drop=, 0($pop9), $pop8 + i32.const $push8=, 0 + i32.const $push7=, 2 + i32.store $drop=, 0($pop8), $pop7 i32.const $push16=, 0 br_if 2, $pop16 .LBB20_3: end_block i32.const $push12=, 0 - i32.const $push13=, 3 - i32.store $drop=, 0($pop12), $pop13 + i32.const $push11=, 3 + i32.store $drop=, 0($pop12), $pop11 return .LBB20_4: end_block - i32.const $push2=, 4 - i32.store $drop=, 0($0), $pop2 - br_if 2, $0 + i32.const $push1=, 4 + i32.store $drop=, 0($0), $pop1 + br_if 1, $0 i32.const $push18=, 0 - i32.const $push3=, 5 - i32.store $drop=, 0($pop18), $pop3 + i32.const $push2=, 5 + i32.store $drop=, 0($pop18), $pop2 i32.const $push17=, 0 - i32.const $push20=, 0 - i32.eq $push21=, $pop17, $pop20 - br_if 1, $pop21 + i32.eqz $push20=, $pop17 + br_if 2, $pop20 .LBB20_6: end_block i32.const $push10=, 0 - i32.const $push11=, 7 - i32.store $drop=, 0($pop10), $pop11 + i32.const $push9=, 7 + i32.store $drop=, 0($pop10), $pop9 return .LBB20_7: end_block - i32.const $push19=, 0 - i32.const $push4=, 6 - i32.store $drop=, 0($pop19), $pop4 + i32.const $push5=, 0 + i32.const $push4=, 8 + i32.store $drop=, 0($pop5), $pop4 return .LBB20_8: end_block - i32.const $push5=, 0 - i32.const $push6=, 8 - i32.store $drop=, 0($pop5), $pop6 + i32.const $push19=, 0 + i32.const $push3=, 6 + i32.store $drop=, 0($pop19), $pop3 return .endfunc .Lfunc_end20: @@ -683,37 +671,34 @@ test12: loop block block - block - i32.load8_u $push0=, 0($0) - tee_local $push7=, $1=, $pop0 - i32.const $push6=, 103 - i32.gt_s $push1=, $pop7, $pop6 - br_if 0, $pop1 + i32.load8_u $push7=, 0($0) + tee_local $push6=, $1=, $pop7 + i32.const $push5=, 103 + i32.gt_s $push0=, $pop6, $pop5 + br_if 0, $pop0 i32.const $push8=, 42 - i32.eq $push4=, $1, $pop8 - br_if 2, $pop4 + i32.eq $push3=, $1, $pop8 + br_if 1, $pop3 i32.const $push9=, 76 - i32.eq $push5=, $1, $pop9 - br_if 2, $pop5 - br 1 + i32.eq $push4=, $1, $pop9 + br_if 1, $pop4 + br 3 .LBB21_4: end_block i32.const $push10=, 108 - i32.eq $push2=, $1, $pop10 - br_if 1, $pop2 + i32.eq $push1=, $1, $pop10 + br_if 0, $pop1 i32.const $push11=, 104 - i32.eq $push3=, $1, $pop11 - br_if 1, $pop3 + i32.ne $push2=, $1, $pop11 + br_if 2, $pop2 .LBB21_6: end_block - return -.LBB21_7: - end_block i32.const $push12=, 1 i32.add $0=, $0, $pop12 br 0 -.LBB21_8: +.LBB21_7: end_loop + return .endfunc .Lfunc_end21: .size test12, .Lfunc_end21-test12 @@ -723,26 +708,24 @@ test12: test13: .local i32 block + block i32.const $push0=, 0 - i32.const $push4=, 0 - i32.eq $push5=, $pop0, $pop4 - br_if 0, $pop5 - return -.LBB22_2: - end_block + br_if 0, $pop0 i32.const $0=, 0 block i32.const $push3=, 0 br_if 0, $pop3 i32.const $0=, 0 -.LBB22_4: +.LBB22_3: end_block - block i32.const $push1=, 1 i32.and $push2=, $0, $pop1 - i32.const $push6=, 0 - i32.eq $push7=, $pop2, $pop6 - br_if 0, $pop7 + br_if 1, $pop2 + br 1 +.LBB22_4: + end_block + return +.LBB22_5: end_block unreachable .endfunc @@ -756,10 +739,9 @@ test14: loop i32.const $push0=, 0 br_if 0, $pop0 -.LBB23_2: end_loop +.LBB23_3: loop - i32.const $drop=, 0 i32.const $push1=, 0 br_if 0, $pop1 end_loop @@ -768,4 +750,43 @@ test14: .Lfunc_end23: .size test14, .Lfunc_end23-test14 + .globl test15 + .type test15,@function +test15: + .local i32, i32 + block + block + i32.const $push0=, 1 + br_if 0, $pop0 + i32.const $0=, 0 +.LBB24_2: + block + loop + i32.const $push1=, 1 + br_if 1, $pop1 + i32.const $1=, 0 + i32.const $push4=, -4 + i32.add $push3=, $0, $pop4 + tee_local $push2=, $0=, $pop3 + br_if 0, $pop2 + br 2 +.LBB24_4: + end_loop + i32.const $1=, 0 +.LBB24_5: + end_block + i32.eqz $push5=, $1 + br_if 1, $pop5 + call test15_callee0@FUNCTION + return +.LBB24_7: + end_block + call test15_callee1@FUNCTION +.LBB24_8: + end_block + return + .endfunc +.Lfunc_end24: + .size test15, .Lfunc_end24-test15 + diff --git a/test/llvm_autogenerated/cfg-stackify.wast b/test/llvm_autogenerated/cfg-stackify.wast index 8f2f58820..ac20e3398 100644 --- a/test/llvm_autogenerated/cfg-stackify.wast +++ b/test/llvm_autogenerated/cfg-stackify.wast @@ -8,6 +8,8 @@ (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) @@ -32,28 +34,30 @@ (export "test12" $test12) (export "test13" $test13) (export "test14" $test14) + (export "test15" $test15) (func $test0 (param $0 i32) (local $1 i32) (set_local $1 (i32.const 0) ) (loop $label$1 $label$0 - (set_local $1 - (i32.add - (get_local $1) - (i32.const 1) - ) - ) - (br_if $label$1 - (i32.ge_s - (get_local $1) - (get_local $0) + (block $label$2 + (br_if $label$2 + (i32.lt_s + (set_local $1 + (i32.add + (get_local $1) + (i32.const 1) + ) + ) + (get_local $0) + ) ) + (return) ) (call_import $something) (br $label$0) ) - (return) ) (func $test1 (param $0 i32) (local $1 i32) @@ -61,22 +65,23 @@ (i32.const 0) ) (loop $label$1 $label$0 - (set_local $1 - (i32.add - (get_local $1) - (i32.const 1) - ) - ) - (br_if $label$1 - (i32.ge_s - (get_local $1) - (get_local $0) + (block $label$2 + (br_if $label$2 + (i32.lt_s + (set_local $1 + (i32.add + (get_local $1) + (i32.const 1) + ) + ) + (get_local $0) + ) ) + (return) ) (call_import $something) (br $label$0) ) - (return) ) (func $test2 (param $0 i32) (param $1 i32) (block $label$0 @@ -87,12 +92,6 @@ ) ) (loop $label$2 $label$1 - (set_local $1 - (i32.add - (get_local $1) - (i32.const -1) - ) - ) (f64.store (get_local $0) (f64.mul @@ -109,7 +108,12 @@ ) ) (br_if $label$1 - (get_local $1) + (set_local $1 + (i32.add + (get_local $1) + (i32.const -1) + ) + ) ) ) ) @@ -244,9 +248,8 @@ (i32.const 1) ) (br_if $label$0 - (i32.eq + (i32.eqz (get_local $1) - (i32.const 0) ) ) ) @@ -339,34 +342,40 @@ (i32.const 0) ) (block $label$2 - (block $label$3 - (br_if $label$3 - (get_local $0) - ) - (i32.store - (get_local $2) - (i32.const 1) - ) - (br $label$2) + (br_if $label$2 + (get_local $0) ) (i32.store (get_local $2) - (i32.const 2) + (i32.const 1) ) - (block $label$4 - (br_if $label$4 - (get_local $1) - ) - (i32.store - (get_local $2) - (i32.const 3) - ) - (br $label$2) + (i32.store + (get_local $2) + (i32.const 5) + ) + (br $label$0) + ) + (i32.store + (get_local $2) + (i32.const 2) + ) + (block $label$3 + (br_if $label$3 + (get_local $1) ) (i32.store (get_local $2) - (i32.const 4) + (i32.const 3) + ) + (i32.store + (get_local $2) + (i32.const 5) ) + (br $label$0) + ) + (i32.store + (get_local $2) + (i32.const 4) ) (i32.store (get_local $2) @@ -380,14 +389,19 @@ (br_if $label$0 (i32.const 0) ) + (set_local $0 + (i32.eq + (get_local $0) + (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.ne - (get_local $0) + (i32.eqz (get_local $0) ) ) @@ -402,42 +416,36 @@ (func $test4 (param $0 i32) (block $label$0 (block $label$1 - (block $label$2 - (br_if $label$2 - (i32.gt_s - (get_local $0) - (i32.const 3) - ) - ) - (block $label$3 - (br_if $label$3 - (i32.eq - (get_local $0) - (i32.const 0) - ) - ) - (br_if $label$1 - (i32.ne - (get_local $0) - (i32.const 2) - ) - ) + (br_if $label$1 + (i32.gt_s + (get_local $0) + (i32.const 3) ) - (return) ) (br_if $label$0 + (i32.eqz + (get_local $0) + ) + ) + (i32.eq + (get_local $0) + (i32.const 2) + ) + (br $label$0) + ) + (block $label$2 + (br_if $label$2 (i32.eq (get_local $0) (i32.const 4) ) ) - (br_if $label$1 + (br_if $label$0 (i32.ne (get_local $0) (i32.const 622) ) ) - (return) ) (return) ) @@ -445,13 +453,13 @@ ) (func $test5 (param $0 i32) (param $1 i32) (local $2 i32) - (set_local $0 + (set_local $2 (i32.and (get_local $0) (i32.const 1) ) ) - (set_local $2 + (set_local $1 (i32.and (get_local $1) (i32.const 1) @@ -459,24 +467,23 @@ ) (block $label$0 (loop $label$2 $label$1 - (set_local $1 + (set_local $0 (i32.store (i32.const 0) (i32.const 0) ) ) (br_if $label$0 - (i32.eq - (get_local $0) - (i32.const 0) + (i32.eqz + (get_local $2) ) ) (i32.store - (get_local $1) + (get_local $0) (i32.const 1) ) (br_if $label$1 - (get_local $2) + (get_local $1) ) ) (i32.store @@ -495,7 +502,7 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (set_local $2 + (set_local $3 (i32.and (get_local $0) (i32.const 1) @@ -511,17 +518,16 @@ ) ) (br_if $label$0 - (i32.eq - (get_local $2) - (i32.const 0) + (i32.eqz + (get_local $3) ) ) (br_if $label$1 - (i32.eq - (set_local $3 + (i32.eqz + (set_local $4 (i32.and (get_local $1) - (set_local $4 + (set_local $2 (i32.store (get_local $0) (i32.const 1) @@ -529,15 +535,14 @@ ) ) ) - (i32.const 0) ) ) (i32.store (get_local $0) - (get_local $4) + (get_local $2) ) (br_if $label$2 - (get_local $3) + (get_local $4) ) ) (i32.store @@ -618,26 +623,10 @@ ) (func $test8 (result i32) (loop $label$1 $label$0 - (block $label$2 - (br_if $label$2 - (i32.eq - (i32.const 0) - (i32.const 0) - ) - ) - (br_if $label$0 - (i32.eq - (i32.const 0) - (i32.const 0) - ) - ) - ) - (loop $label$4 $label$3 - (br_if $label$3 - (i32.const 0) - ) - (br $label$0) + (br_if $label$0 + (i32.const 0) ) + (br $label$0) ) ) (func $test9 @@ -651,7 +640,7 @@ ) (loop $label$1 $label$0 (br_if $label$1 - (i32.eq + (i32.eqz (i32.and (set_local $1 (i32.store @@ -661,7 +650,6 @@ ) (call_import $a) ) - (i32.const 0) ) ) (loop $label$3 $label$2 @@ -671,37 +659,40 @@ ) (block $label$4 (br_if $label$4 - (i32.eq + (i32.eqz (i32.and (call_import $a) (get_local $1) ) - (i32.const 0) ) ) (i32.store (get_local $0) (i32.const 3) ) - (br_if $label$2 - (i32.and - (call_import $a) - (get_local $1) + (br_if $label$0 + (i32.eqz + (i32.and + (call_import $a) + (get_local $1) + ) ) ) - (br $label$0) + (br $label$2) ) (i32.store (get_local $0) (i32.const 4) ) - (br_if $label$2 - (i32.and - (call_import $a) - (get_local $1) + (br_if $label$0 + (i32.eqz + (i32.and + (call_import $a) + (get_local $1) + ) ) ) - (br $label$0) + (br $label$2) ) ) (i32.store @@ -720,7 +711,7 @@ (i32.const 2) ) (loop $label$1 $label$0 - (set_local $4 + (set_local $2 (get_local $1) ) (set_local $3 @@ -732,12 +723,12 @@ (set_local $0 (i32.const 3) ) + (br_if $label$0 + (get_local $2) + ) (set_local $2 (i32.const 4) ) - (br_if $label$0 - (get_local $4) - ) (block $label$2 (loop $label$4 $label$3 (set_local $4 @@ -747,12 +738,11 @@ (get_local $2) ) (loop $label$6 $label$5 - (set_local $2 - (get_local $4) - ) (br_if $label$0 (i32.gt_u - (get_local $2) + (set_local $2 + (get_local $4) + ) (i32.const 4) ) ) @@ -812,16 +802,15 @@ (get_local $0) (i32.const 4) ) - (br_if $label$0 + (br_if $label$1 (get_local $0) ) (i32.store (i32.const 0) (i32.const 5) ) - (br_if $label$1 - (i32.eq - (i32.const 0) + (br_if $label$0 + (i32.eqz (i32.const 0) ) ) @@ -834,13 +823,13 @@ ) (i32.store (i32.const 0) - (i32.const 6) + (i32.const 8) ) (return) ) (i32.store (i32.const 0) - (i32.const 8) + (i32.const 6) ) (return) ) @@ -849,45 +838,42 @@ (loop $label$1 $label$0 (block $label$2 (block $label$3 - (block $label$4 - (br_if $label$4 - (i32.gt_s - (set_local $1 - (i32.load8_u - (get_local $0) - ) + (br_if $label$3 + (i32.gt_s + (set_local $1 + (i32.load8_u + (get_local $0) ) - (i32.const 103) ) + (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) - ) - ) - (br $label$3) ) (br_if $label$2 (i32.eq (get_local $1) - (i32.const 108) + (i32.const 42) ) ) (br_if $label$2 (i32.eq (get_local $1) - (i32.const 104) + (i32.const 76) ) ) + (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) + ) ) - (return) ) (set_local $0 (i32.add @@ -897,39 +883,35 @@ ) (br $label$0) ) + (return) ) (func $test13 (local $0 i32) (block $label$0 - (br_if $label$0 - (i32.eq + (block $label$1 + (br_if $label$1 (i32.const 0) + ) + (set_local $0 (i32.const 0) ) - ) - (return) - ) - (set_local $0 - (i32.const 0) - ) - (block $label$1 - (br_if $label$1 - (i32.const 0) - ) - (set_local $0 - (i32.const 0) - ) - ) - (block $label$2 - (br_if $label$2 - (i32.eq + (block $label$2 + (br_if $label$2 + (i32.const 0) + ) + (set_local $0 + (i32.const 0) + ) + ) + (br_if $label$0 (i32.and (get_local $0) (i32.const 1) ) - (i32.const 0) ) + (br $label$0) ) + (return) ) (unreachable) ) @@ -940,12 +922,56 @@ ) ) (loop $label$3 $label$2 - (i32.const 0) (br_if $label$2 (i32.const 0) ) ) (return) ) + (func $test15 + (local $0 i32) + (local $1 i32) + (block $label$0 + (block $label$1 + (br_if $label$1 + (i32.const 1) + ) + (set_local $0 + (i32.const 0) + ) + (block $label$2 + (loop $label$4 $label$3 + (br_if $label$4 + (i32.const 1) + ) + (set_local $1 + (i32.const 0) + ) + (br_if $label$3 + (set_local $0 + (i32.add + (get_local $0) + (i32.const -4) + ) + ) + ) + (br $label$2) + ) + (set_local $1 + (i32.const 0) + ) + ) + (br_if $label$0 + (i32.eqz + (get_local $1) + ) + ) + (call_import $test15_callee0) + (return) + ) + (call_import $test15_callee1) + ) + (return) + ) ) ;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/copysign-casts.s b/test/llvm_autogenerated/copysign-casts.s index 1b3db084c..76f36ce01 100644 --- a/test/llvm_autogenerated/copysign-casts.s +++ b/test/llvm_autogenerated/copysign-casts.s @@ -7,7 +7,6 @@ fold_promote: .result f64 f64.promote/f32 $push0=, $1 f64.copysign $push1=, $0, $pop0 - return $pop1 .endfunc .Lfunc_end0: .size fold_promote, .Lfunc_end0-fold_promote @@ -19,7 +18,6 @@ fold_demote: .result f32 f32.demote/f64 $push0=, $1 f32.copysign $push1=, $0, $pop0 - return $pop1 .endfunc .Lfunc_end1: .size fold_demote, .Lfunc_end1-fold_demote diff --git a/test/llvm_autogenerated/copysign-casts.wast b/test/llvm_autogenerated/copysign-casts.wast index fb443e015..14da8c65d 100644 --- a/test/llvm_autogenerated/copysign-casts.wast +++ b/test/llvm_autogenerated/copysign-casts.wast @@ -6,22 +6,18 @@ (export "fold_promote" $fold_promote) (export "fold_demote" $fold_demote) (func $fold_promote (param $0 f64) (param $1 f32) (result f64) - (return - (f64.copysign - (get_local $0) - (f64.promote/f32 - (get_local $1) - ) + (f64.copysign + (get_local $0) + (f64.promote/f32 + (get_local $1) ) ) ) (func $fold_demote (param $0 f32) (param $1 f64) (result f32) - (return - (f32.copysign - (get_local $0) - (f32.demote/f64 - (get_local $1) - ) + (f32.copysign + (get_local $0) + (f32.demote/f64 + (get_local $1) ) ) ) diff --git a/test/llvm_autogenerated/cpus.s b/test/llvm_autogenerated/cpus.s index 9ec96b578..87f1a54da 100644 --- a/test/llvm_autogenerated/cpus.s +++ b/test/llvm_autogenerated/cpus.s @@ -5,7 +5,7 @@ f: .param i32 .result i32 - return $0 + copy_local $push0=, $0 .endfunc .Lfunc_end0: .size f, .Lfunc_end0-f diff --git a/test/llvm_autogenerated/cpus.wast b/test/llvm_autogenerated/cpus.wast index c96149c99..c874eab7c 100644 --- a/test/llvm_autogenerated/cpus.wast +++ b/test/llvm_autogenerated/cpus.wast @@ -5,9 +5,7 @@ (export "memory" memory) (export "f" $f) (func $f (param $0 i32) (result i32) - (return - (get_local $0) - ) + (get_local $0) ) ) ;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/dead-vreg.s b/test/llvm_autogenerated/dead-vreg.s index f3aac1461..69198d1e7 100644 --- a/test/llvm_autogenerated/dead-vreg.s +++ b/test/llvm_autogenerated/dead-vreg.s @@ -6,42 +6,43 @@ foo: .param i32, i32, i32 .local i32, i32, i32, i32, i32, i32 block - 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 $push4=, 1 - i32.lt_s $4=, $1, $pop4 + i32.lt_s $push1=, $2, $pop4 + br_if 0, $pop1 + i32.const $push2=, 2 + i32.shl $3=, $1, $pop2 + i32.const $5=, 0 + i32.const $push5=, 1 + i32.lt_s $4=, $1, $pop5 .LBB0_2: loop + block + br_if 0, $4 i32.const $6=, 0 copy_local $7=, $0 copy_local $8=, $1 - block - br_if 0, $4 -.LBB0_3: - loop - i32.store $drop=, 0($7), $6 - i32.const $push6=, -1 - i32.add $8=, $8, $pop6 - i32.const $push5=, 4 - i32.add $7=, $7, $pop5 - i32.add $6=, $6, $5 - br_if 0, $8 .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 +.LBB0_5: end_loop end_block - i32.const $push7=, 1 - i32.add $5=, $5, $pop7 i32.add $0=, $0, $3 - i32.ne $push2=, $5, $2 - br_if 0, $pop2 -.LBB0_5: + i32.const $push12=, 1 + i32.add $push11=, $5, $pop12 + tee_local $push10=, $5=, $pop11 + i32.ne $push3=, $pop10, $2 + br_if 0, $pop3 +.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 5a1c1cb31..efb17b49b 100644 --- a/test/llvm_autogenerated/dead-vreg.wast +++ b/test/llvm_autogenerated/dead-vreg.wast @@ -34,28 +34,27 @@ ) ) (loop $label$2 $label$1 - (set_local $6 - (i32.const 0) - ) - (set_local $7 - (get_local $0) - ) - (set_local $8 - (get_local $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 - (i32.store - (get_local $7) - (get_local $6) - ) - (set_local $8 + (set_local $6 (i32.add - (get_local $8) - (i32.const -1) + (i32.store + (get_local $7) + (get_local $6) + ) + (get_local $5) ) ) (set_local $7 @@ -64,23 +63,16 @@ (i32.const 4) ) ) - (set_local $6 - (i32.add - (get_local $6) - (get_local $5) - ) - ) (br_if $label$4 - (get_local $8) + (set_local $8 + (i32.add + (get_local $8) + (i32.const -1) + ) + ) ) ) ) - (set_local $5 - (i32.add - (get_local $5) - (i32.const 1) - ) - ) (set_local $0 (i32.add (get_local $0) @@ -89,13 +81,17 @@ ) (br_if $label$1 (i32.ne - (get_local $5) + (set_local $5 + (i32.add + (get_local $5) + (i32.const 1) + ) + ) (get_local $2) ) ) ) ) - (return) ) ) ;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/divrem-constant.s b/test/llvm_autogenerated/divrem-constant.s new file mode 100644 index 000000000..3901e3e86 --- /dev/null +++ b/test/llvm_autogenerated/divrem-constant.s @@ -0,0 +1,91 @@ + .text + .file "/s/llvm/llvm/test/CodeGen/WebAssembly/divrem-constant.ll" + .globl test_udiv_2 + .type test_udiv_2,@function +test_udiv_2: + .param i32 + .result i32 + i32.const $push0=, 1 + i32.shr_u $push1=, $0, $pop0 + .endfunc +.Lfunc_end0: + .size test_udiv_2, .Lfunc_end0-test_udiv_2 + + .globl test_udiv_5 + .type test_udiv_5,@function +test_udiv_5: + .param i32 + .result i32 + i32.const $push0=, 5 + i32.div_u $push1=, $0, $pop0 + .endfunc +.Lfunc_end1: + .size test_udiv_5, .Lfunc_end1-test_udiv_5 + + .globl test_sdiv_2 + .type test_sdiv_2,@function +test_sdiv_2: + .param i32 + .result i32 + i32.const $push0=, 2 + i32.div_s $push1=, $0, $pop0 + .endfunc +.Lfunc_end2: + .size test_sdiv_2, .Lfunc_end2-test_sdiv_2 + + .globl test_sdiv_5 + .type test_sdiv_5,@function +test_sdiv_5: + .param i32 + .result i32 + i32.const $push0=, 5 + i32.div_s $push1=, $0, $pop0 + .endfunc +.Lfunc_end3: + .size test_sdiv_5, .Lfunc_end3-test_sdiv_5 + + .globl test_urem_2 + .type test_urem_2,@function +test_urem_2: + .param i32 + .result i32 + i32.const $push0=, 1 + i32.and $push1=, $0, $pop0 + .endfunc +.Lfunc_end4: + .size test_urem_2, .Lfunc_end4-test_urem_2 + + .globl test_urem_5 + .type test_urem_5,@function +test_urem_5: + .param i32 + .result i32 + i32.const $push0=, 5 + i32.rem_u $push1=, $0, $pop0 + .endfunc +.Lfunc_end5: + .size test_urem_5, .Lfunc_end5-test_urem_5 + + .globl test_srem_2 + .type test_srem_2,@function +test_srem_2: + .param i32 + .result i32 + i32.const $push0=, 2 + i32.rem_s $push1=, $0, $pop0 + .endfunc +.Lfunc_end6: + .size test_srem_2, .Lfunc_end6-test_srem_2 + + .globl test_srem_5 + .type test_srem_5,@function +test_srem_5: + .param i32 + .result i32 + i32.const $push0=, 5 + i32.rem_s $push1=, $0, $pop0 + .endfunc +.Lfunc_end7: + .size test_srem_5, .Lfunc_end7-test_srem_5 + + diff --git a/test/llvm_autogenerated/divrem-constant.wast b/test/llvm_autogenerated/divrem-constant.wast new file mode 100644 index 000000000..c0f05f8b8 --- /dev/null +++ b/test/llvm_autogenerated/divrem-constant.wast @@ -0,0 +1,63 @@ +(module + (memory 1 + (segment 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) + (func $test_udiv_2 (param $0 i32) (result i32) + (i32.shr_u + (get_local $0) + (i32.const 1) + ) + ) + (func $test_udiv_5 (param $0 i32) (result i32) + (i32.div_u + (get_local $0) + (i32.const 5) + ) + ) + (func $test_sdiv_2 (param $0 i32) (result i32) + (i32.div_s + (get_local $0) + (i32.const 2) + ) + ) + (func $test_sdiv_5 (param $0 i32) (result i32) + (i32.div_s + (get_local $0) + (i32.const 5) + ) + ) + (func $test_urem_2 (param $0 i32) (result i32) + (i32.and + (get_local $0) + (i32.const 1) + ) + ) + (func $test_urem_5 (param $0 i32) (result i32) + (i32.rem_u + (get_local $0) + (i32.const 5) + ) + ) + (func $test_srem_2 (param $0 i32) (result i32) + (i32.rem_s + (get_local $0) + (i32.const 2) + ) + ) + (func $test_srem_5 (param $0 i32) (result i32) + (i32.rem_s + (get_local $0) + (i32.const 5) + ) + ) +) +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/fast-isel.s b/test/llvm_autogenerated/fast-isel.s index 63a2718a3..a60ed0c4d 100644 --- a/test/llvm_autogenerated/fast-isel.s +++ b/test/llvm_autogenerated/fast-isel.s @@ -5,7 +5,6 @@ immediate_f32: .result f32 f32.const $push0=, 0x1.4p1 - return $pop0 .endfunc .Lfunc_end0: .size immediate_f32, .Lfunc_end0-immediate_f32 @@ -15,9 +14,48 @@ immediate_f32: immediate_f64: .result f64 f64.const $push0=, 0x1.4p1 - return $pop0 .endfunc .Lfunc_end1: .size immediate_f64, .Lfunc_end1-immediate_f64 + .globl bitcast_i32_f32 + .type bitcast_i32_f32,@function +bitcast_i32_f32: + .param f32 + .result i32 + i32.reinterpret/f32 $push0=, $0 + .endfunc +.Lfunc_end2: + .size bitcast_i32_f32, .Lfunc_end2-bitcast_i32_f32 + + .globl bitcast_f32_i32 + .type bitcast_f32_i32,@function +bitcast_f32_i32: + .param i32 + .result f32 + f32.reinterpret/i32 $push0=, $0 + .endfunc +.Lfunc_end3: + .size bitcast_f32_i32, .Lfunc_end3-bitcast_f32_i32 + + .globl bitcast_i64_f64 + .type bitcast_i64_f64,@function +bitcast_i64_f64: + .param f64 + .result i64 + i64.reinterpret/f64 $push0=, $0 + .endfunc +.Lfunc_end4: + .size bitcast_i64_f64, .Lfunc_end4-bitcast_i64_f64 + + .globl bitcast_f64_i64 + .type bitcast_f64_i64,@function +bitcast_f64_i64: + .param i64 + .result f64 + f64.reinterpret/i64 $push0=, $0 + .endfunc +.Lfunc_end5: + .size bitcast_f64_i64, .Lfunc_end5-bitcast_f64_i64 + diff --git a/test/llvm_autogenerated/fast-isel.wast b/test/llvm_autogenerated/fast-isel.wast index c1b775e2b..02d8e97f1 100644 --- a/test/llvm_autogenerated/fast-isel.wast +++ b/test/llvm_autogenerated/fast-isel.wast @@ -5,14 +5,34 @@ (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) (func $immediate_f32 (result f32) - (return - (f32.const 2.5) - ) + (f32.const 2.5) ) (func $immediate_f64 (result f64) - (return - (f64.const 2.5) + (f64.const 2.5) + ) + (func $bitcast_i32_f32 (param $0 f32) (result i32) + (i32.reinterpret/f32 + (get_local $0) + ) + ) + (func $bitcast_f32_i32 (param $0 i32) (result f32) + (f32.reinterpret/i32 + (get_local $0) + ) + ) + (func $bitcast_i64_f64 (param $0 f64) (result i64) + (i64.reinterpret/f64 + (get_local $0) + ) + ) + (func $bitcast_f64_i64 (param $0 i64) (result f64) + (f64.reinterpret/i64 + (get_local $0) ) ) ) diff --git a/test/llvm_autogenerated/func.s b/test/llvm_autogenerated/func.s index 6573e62b2..913eee708 100644 --- a/test/llvm_autogenerated/func.s +++ b/test/llvm_autogenerated/func.s @@ -46,9 +46,8 @@ f4: block i32.const $push2=, 1 i32.and $push0=, $0, $pop2 - i32.const $push4=, 0 - i32.eq $push5=, $pop0, $pop4 - br_if 0, $pop5 + i32.eqz $push4=, $pop0 + br_if 0, $pop4 i32.const $push1=, 0 return $pop1 .LBB4_2: diff --git a/test/llvm_autogenerated/func.wast b/test/llvm_autogenerated/func.wast index 5257a4062..118fb252b 100644 --- a/test/llvm_autogenerated/func.wast +++ b/test/llvm_autogenerated/func.wast @@ -28,12 +28,11 @@ (func $f4 (param $0 i32) (result i32) (block $label$0 (br_if $label$0 - (i32.eq + (i32.eqz (i32.and (get_local $0) (i32.const 1) ) - (i32.const 0) ) ) (return diff --git a/test/llvm_autogenerated/globl.s b/test/llvm_autogenerated/globl.s index 894ec0bf5..2aac36823 100644 --- a/test/llvm_autogenerated/globl.s +++ b/test/llvm_autogenerated/globl.s @@ -3,7 +3,6 @@ .globl foo .type foo,@function foo: - return .endfunc .Lfunc_end0: .size foo, .Lfunc_end0-foo diff --git a/test/llvm_autogenerated/globl.wast b/test/llvm_autogenerated/globl.wast index a5c3c09df..e357a6337 100644 --- a/test/llvm_autogenerated/globl.wast +++ b/test/llvm_autogenerated/globl.wast @@ -5,7 +5,6 @@ (export "memory" memory) (export "foo" $foo) (func $foo - (return) ) ) ;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/i128.s b/test/llvm_autogenerated/i128.s new file mode 100644 index 000000000..4fb17621b --- /dev/null +++ b/test/llvm_autogenerated/i128.s @@ -0,0 +1,626 @@ + .text + .file "/s/llvm/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 + return + .endfunc +.Lfunc_end0: + .size add128, .Lfunc_end0-add128 + + .globl sub128 + .type sub128,@function +sub128: + .param i32, i64, i64, i64, i64 + i64.sub $push0=, $1, $3 + i64.store $drop=, 0($0), $pop0 + i32.const $push5=, 8 + i32.add $push6=, $0, $pop5 + i64.sub $push1=, $2, $4 + i64.lt_u $push2=, $1, $3 + i64.extend_u/i32 $push3=, $pop2 + i64.sub $push4=, $pop1, $pop3 + i64.store $drop=, 0($pop6), $pop4 + return + .endfunc +.Lfunc_end1: + .size sub128, .Lfunc_end1-sub128 + + .globl mul128 + .type mul128,@function +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 $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.const $push0=, 8 + i32.add $push1=, $0, $pop0 + i32.const $push13=, 8 + i32.add $push2=, $5, $pop13 + 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 $push9=, 16 + i32.add $push10=, $5, $pop9 + i32.store $drop=, 0($pop11), $pop10 + return + .endfunc +.Lfunc_end2: + .size mul128, .Lfunc_end2-mul128 + + .globl sdiv128 + .type sdiv128,@function +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 $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.const $push0=, 8 + i32.add $push1=, $0, $pop0 + i32.const $push13=, 8 + i32.add $push2=, $5, $pop13 + 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 $push9=, 16 + i32.add $push10=, $5, $pop9 + i32.store $drop=, 0($pop11), $pop10 + return + .endfunc +.Lfunc_end3: + .size sdiv128, .Lfunc_end3-sdiv128 + + .globl udiv128 + .type udiv128,@function +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 $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.const $push0=, 8 + i32.add $push1=, $0, $pop0 + i32.const $push13=, 8 + i32.add $push2=, $5, $pop13 + 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 $push9=, 16 + i32.add $push10=, $5, $pop9 + i32.store $drop=, 0($pop11), $pop10 + return + .endfunc +.Lfunc_end4: + .size udiv128, .Lfunc_end4-udiv128 + + .globl srem128 + .type srem128,@function +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 $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.const $push0=, 8 + i32.add $push1=, $0, $pop0 + i32.const $push13=, 8 + i32.add $push2=, $5, $pop13 + 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 $push9=, 16 + i32.add $push10=, $5, $pop9 + i32.store $drop=, 0($pop11), $pop10 + return + .endfunc +.Lfunc_end5: + .size srem128, .Lfunc_end5-srem128 + + .globl urem128 + .type urem128,@function +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 $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.const $push0=, 8 + i32.add $push1=, $0, $pop0 + i32.const $push13=, 8 + i32.add $push2=, $5, $pop13 + 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 $push9=, 16 + i32.add $push10=, $5, $pop9 + i32.store $drop=, 0($pop11), $pop10 + return + .endfunc +.Lfunc_end6: + .size urem128, .Lfunc_end6-urem128 + + .globl and128 + .type and128,@function +and128: + .param i32, i64, i64, i64, i64 + i32.const $push1=, 8 + i32.add $push2=, $0, $pop1 + i64.and $push0=, $2, $4 + i64.store $drop=, 0($pop2), $pop0 + i64.and $push3=, $1, $3 + i64.store $drop=, 0($0), $pop3 + return + .endfunc +.Lfunc_end7: + .size and128, .Lfunc_end7-and128 + + .globl or128 + .type or128,@function +or128: + .param i32, i64, i64, i64, i64 + i32.const $push1=, 8 + i32.add $push2=, $0, $pop1 + i64.or $push0=, $2, $4 + i64.store $drop=, 0($pop2), $pop0 + i64.or $push3=, $1, $3 + i64.store $drop=, 0($0), $pop3 + return + .endfunc +.Lfunc_end8: + .size or128, .Lfunc_end8-or128 + + .globl xor128 + .type xor128,@function +xor128: + .param i32, i64, i64, i64, i64 + i32.const $push1=, 8 + i32.add $push2=, $0, $pop1 + i64.xor $push0=, $2, $4 + i64.store $drop=, 0($pop2), $pop0 + i64.xor $push3=, $1, $3 + i64.store $drop=, 0($0), $pop3 + return + .endfunc +.Lfunc_end9: + .size xor128, .Lfunc_end9-xor128 + + .globl shl128 + .type shl128,@function +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 $push8=, 16 + i32.sub $push13=, $pop7, $pop8 + i32.store $push16=, 0($pop9), $pop13 + tee_local $push15=, $5=, $pop16 + i32.wrap/i64 $push0=, $3 + call __ashlti3@FUNCTION, $pop15, $1, $2, $pop0 + i32.const $push1=, 8 + i32.add $push2=, $0, $pop1 + i32.const $push14=, 8 + i32.add $push3=, $5, $pop14 + 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 $push10=, 16 + i32.add $push11=, $5, $pop10 + i32.store $drop=, 0($pop12), $pop11 + return + .endfunc +.Lfunc_end10: + .size shl128, .Lfunc_end10-shl128 + + .globl shr128 + .type shr128,@function +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 $push8=, 16 + i32.sub $push13=, $pop7, $pop8 + i32.store $push16=, 0($pop9), $pop13 + tee_local $push15=, $5=, $pop16 + i32.wrap/i64 $push0=, $3 + call __lshrti3@FUNCTION, $pop15, $1, $2, $pop0 + i32.const $push1=, 8 + i32.add $push2=, $0, $pop1 + i32.const $push14=, 8 + i32.add $push3=, $5, $pop14 + 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 $push10=, 16 + i32.add $push11=, $5, $pop10 + i32.store $drop=, 0($pop12), $pop11 + return + .endfunc +.Lfunc_end11: + .size shr128, .Lfunc_end11-shr128 + + .globl sar128 + .type sar128,@function +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 $push8=, 16 + i32.sub $push13=, $pop7, $pop8 + i32.store $push16=, 0($pop9), $pop13 + tee_local $push15=, $5=, $pop16 + i32.wrap/i64 $push0=, $3 + call __ashrti3@FUNCTION, $pop15, $1, $2, $pop0 + i32.const $push1=, 8 + i32.add $push2=, $0, $pop1 + i32.const $push14=, 8 + i32.add $push3=, $5, $pop14 + 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 $push10=, 16 + i32.add $push11=, $5, $pop10 + i32.store $drop=, 0($pop12), $pop11 + return + .endfunc +.Lfunc_end12: + .size sar128, .Lfunc_end12-sar128 + + .globl clz128 + .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 + return + .endfunc +.Lfunc_end13: + .size clz128, .Lfunc_end13-clz128 + + .globl clz128_zero_undef + .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 + return + .endfunc +.Lfunc_end14: + .size clz128_zero_undef, .Lfunc_end14-clz128_zero_undef + + .globl ctz128 + .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 + return + .endfunc +.Lfunc_end15: + .size ctz128, .Lfunc_end15-ctz128 + + .globl ctz128_zero_undef + .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 + return + .endfunc +.Lfunc_end16: + .size ctz128_zero_undef, .Lfunc_end16-ctz128_zero_undef + + .globl popcnt128 + .type popcnt128,@function +popcnt128: + .param i32, i64, i64 + i32.const $push0=, 8 + i32.add $push1=, $0, $pop0 + i64.const $push2=, 0 + i64.store $drop=, 0($pop1), $pop2 + i64.popcnt $push4=, $1 + i64.popcnt $push3=, $2 + i64.add $push5=, $pop4, $pop3 + i64.store $drop=, 0($0), $pop5 + return + .endfunc +.Lfunc_end17: + .size popcnt128, .Lfunc_end17-popcnt128 + + .globl eqz128 + .type eqz128,@function +eqz128: + .param i64, i64 + .result i32 + i64.or $push0=, $0, $1 + i64.eqz $push1=, $pop0 + return $pop1 + .endfunc +.Lfunc_end18: + .size eqz128, .Lfunc_end18-eqz128 + + .globl rotl + .type rotl,@function +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 $push16=, 32 + i32.sub $push25=, $pop15, $pop16 + i32.store $push29=, 0($pop17), $pop25 + tee_local $push28=, $5=, $pop29 + i32.const $push21=, 16 + i32.add $push22=, $pop28, $pop21 + i32.wrap/i64 $push0=, $3 + call __ashlti3@FUNCTION, $pop22, $1, $2, $pop0 + i64.const $push1=, 128 + i64.sub $push2=, $pop1, $3 + i32.wrap/i64 $push3=, $pop2 + call __lshrti3@FUNCTION, $5, $1, $2, $pop3 + i32.const $push4=, 8 + 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 + i64.load $push9=, 0($pop8) + i64.or $push10=, $pop7, $pop9 + i64.store $drop=, 0($pop5), $pop10 + i64.load $push11=, 16($5) + i64.load $push12=, 0($5) + i64.or $push13=, $pop11, $pop12 + i64.store $drop=, 0($0), $pop13 + i32.const $push20=, __stack_pointer + i32.const $push18=, 32 + i32.add $push19=, $5, $pop18 + i32.store $drop=, 0($pop20), $pop19 + return + .endfunc +.Lfunc_end19: + .size rotl, .Lfunc_end19-rotl + + .globl masked_rotl + .type masked_rotl,@function +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 $push17=, 32 + i32.sub $push26=, $pop16, $pop17 + i32.store $push32=, 0($pop18), $pop26 + tee_local $push31=, $5=, $pop32 + i32.const $push22=, 16 + i32.add $push23=, $pop31, $pop22 + i64.const $push0=, 127 + i64.and $push30=, $3, $pop0 + tee_local $push29=, $3=, $pop30 + i32.wrap/i64 $push1=, $pop29 + call __ashlti3@FUNCTION, $pop23, $1, $2, $pop1 + i64.const $push2=, 128 + i64.sub $push3=, $pop2, $3 + i32.wrap/i64 $push4=, $pop3 + call __lshrti3@FUNCTION, $5, $1, $2, $pop4 + i32.const $push5=, 8 + 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 + i64.load $push10=, 0($pop9) + i64.or $push11=, $pop8, $pop10 + i64.store $drop=, 0($pop6), $pop11 + i64.load $push12=, 16($5) + i64.load $push13=, 0($5) + i64.or $push14=, $pop12, $pop13 + i64.store $drop=, 0($0), $pop14 + i32.const $push21=, __stack_pointer + i32.const $push19=, 32 + i32.add $push20=, $5, $pop19 + i32.store $drop=, 0($pop21), $pop20 + return + .endfunc +.Lfunc_end20: + .size masked_rotl, .Lfunc_end20-masked_rotl + + .globl rotr + .type rotr,@function +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 $push16=, 32 + i32.sub $push25=, $pop15, $pop16 + i32.store $push29=, 0($pop17), $pop25 + tee_local $push28=, $5=, $pop29 + i32.const $push21=, 16 + i32.add $push22=, $pop28, $pop21 + i32.wrap/i64 $push0=, $3 + call __lshrti3@FUNCTION, $pop22, $1, $2, $pop0 + i64.const $push1=, 128 + i64.sub $push2=, $pop1, $3 + i32.wrap/i64 $push3=, $pop2 + call __ashlti3@FUNCTION, $5, $1, $2, $pop3 + i32.const $push4=, 8 + 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 + i64.load $push9=, 0($pop8) + i64.or $push10=, $pop7, $pop9 + i64.store $drop=, 0($pop5), $pop10 + i64.load $push11=, 16($5) + i64.load $push12=, 0($5) + i64.or $push13=, $pop11, $pop12 + i64.store $drop=, 0($0), $pop13 + i32.const $push20=, __stack_pointer + i32.const $push18=, 32 + i32.add $push19=, $5, $pop18 + i32.store $drop=, 0($pop20), $pop19 + return + .endfunc +.Lfunc_end21: + .size rotr, .Lfunc_end21-rotr + + .globl masked_rotr + .type masked_rotr,@function +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 $push17=, 32 + i32.sub $push26=, $pop16, $pop17 + i32.store $push32=, 0($pop18), $pop26 + tee_local $push31=, $5=, $pop32 + i32.const $push22=, 16 + i32.add $push23=, $pop31, $pop22 + i64.const $push0=, 127 + i64.and $push30=, $3, $pop0 + tee_local $push29=, $3=, $pop30 + i32.wrap/i64 $push1=, $pop29 + call __lshrti3@FUNCTION, $pop23, $1, $2, $pop1 + i64.const $push2=, 128 + i64.sub $push3=, $pop2, $3 + i32.wrap/i64 $push4=, $pop3 + call __ashlti3@FUNCTION, $5, $1, $2, $pop4 + i32.const $push5=, 8 + 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 + i64.load $push10=, 0($pop9) + i64.or $push11=, $pop8, $pop10 + i64.store $drop=, 0($pop6), $pop11 + i64.load $push12=, 16($5) + i64.load $push13=, 0($5) + i64.or $push14=, $pop12, $pop13 + i64.store $drop=, 0($0), $pop14 + i32.const $push21=, __stack_pointer + i32.const $push19=, 32 + i32.add $push20=, $5, $pop19 + i32.store $drop=, 0($pop21), $pop20 + return + .endfunc +.Lfunc_end22: + .size masked_rotr, .Lfunc_end22-masked_rotr + + diff --git a/test/llvm_autogenerated/i128.wast b/test/llvm_autogenerated/i128.wast new file mode 100644 index 000000000..19b600792 --- /dev/null +++ b/test/llvm_autogenerated/i128.wast @@ -0,0 +1,992 @@ +(module + (memory 1 + (segment 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))) + (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 (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.add + (i64.add + (get_local $2) + (get_local $4) + ) + (select + (i64.const 1) + (i64.extend_u/i32 + (i64.lt_u + (set_local $2 + (i64.store + (get_local $0) + (i64.add + (get_local $1) + (get_local $3) + ) + ) + ) + (get_local $1) + ) + ) + (i64.lt_u + (get_local $2) + (get_local $3) + ) + ) + ) + ) + (return) + ) + (func $sub128 (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 + (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 (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) + (local $5 i32) + (call_import $__multi3 + (set_local $5 + (i32.store + (i32.const 4) + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 16) + ) + ) + ) + (get_local $1) + (get_local $2) + (get_local $3) + (get_local $4) + ) + (i64.store + (i32.add + (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) + ) + ) + (i32.store + (i32.const 4) + (i32.add + (get_local $5) + (i32.const 16) + ) + ) + (return) + ) + (func $sdiv128 (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) + (local $5 i32) + (call_import $__divti3 + (set_local $5 + (i32.store + (i32.const 4) + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 16) + ) + ) + ) + (get_local $1) + (get_local $2) + (get_local $3) + (get_local $4) + ) + (i64.store + (i32.add + (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) + ) + ) + (i32.store + (i32.const 4) + (i32.add + (get_local $5) + (i32.const 16) + ) + ) + (return) + ) + (func $udiv128 (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) + (local $5 i32) + (call_import $__udivti3 + (set_local $5 + (i32.store + (i32.const 4) + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 16) + ) + ) + ) + (get_local $1) + (get_local $2) + (get_local $3) + (get_local $4) + ) + (i64.store + (i32.add + (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) + ) + ) + (i32.store + (i32.const 4) + (i32.add + (get_local $5) + (i32.const 16) + ) + ) + (return) + ) + (func $srem128 (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) + (local $5 i32) + (call_import $__modti3 + (set_local $5 + (i32.store + (i32.const 4) + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 16) + ) + ) + ) + (get_local $1) + (get_local $2) + (get_local $3) + (get_local $4) + ) + (i64.store + (i32.add + (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) + ) + ) + (i32.store + (i32.const 4) + (i32.add + (get_local $5) + (i32.const 16) + ) + ) + (return) + ) + (func $urem128 (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) + (local $5 i32) + (call_import $__umodti3 + (set_local $5 + (i32.store + (i32.const 4) + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 16) + ) + ) + ) + (get_local $1) + (get_local $2) + (get_local $3) + (get_local $4) + ) + (i64.store + (i32.add + (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) + ) + ) + (i32.store + (i32.const 4) + (i32.add + (get_local $5) + (i32.const 16) + ) + ) + (return) + ) + (func $and128 (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) + ) + ) + (i64.store + (get_local $0) + (i64.and + (get_local $1) + (get_local $3) + ) + ) + (return) + ) + (func $or128 (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) + ) + ) + (i64.store + (get_local $0) + (i64.or + (get_local $1) + (get_local $3) + ) + ) + (return) + ) + (func $xor128 (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) + ) + ) + (i64.store + (get_local $0) + (i64.xor + (get_local $1) + (get_local $3) + ) + ) + (return) + ) + (func $shl128 (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) + (local $5 i32) + (call_import $__ashlti3 + (set_local $5 + (i32.store + (i32.const 4) + (i32.sub + (i32.load + (i32.const 4) + ) + (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) + ) + (i64.load + (i32.add + (get_local $5) + (i32.const 8) + ) + ) + ) + (i64.store + (get_local $0) + (i64.load + (get_local $5) + ) + ) + (i32.store + (i32.const 4) + (i32.add + (get_local $5) + (i32.const 16) + ) + ) + (return) + ) + (func $shr128 (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) + (local $5 i32) + (call_import $__lshrti3 + (set_local $5 + (i32.store + (i32.const 4) + (i32.sub + (i32.load + (i32.const 4) + ) + (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) + ) + (i64.load + (i32.add + (get_local $5) + (i32.const 8) + ) + ) + ) + (i64.store + (get_local $0) + (i64.load + (get_local $5) + ) + ) + (i32.store + (i32.const 4) + (i32.add + (get_local $5) + (i32.const 16) + ) + ) + (return) + ) + (func $sar128 (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) + (local $5 i32) + (call_import $__ashrti3 + (set_local $5 + (i32.store + (i32.const 4) + (i32.sub + (i32.load + (i32.const 4) + ) + (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) + ) + (i64.load + (i32.add + (get_local $5) + (i32.const 8) + ) + ) + ) + (i64.store + (get_local $0) + (i64.load + (get_local $5) + ) + ) + (i32.store + (i32.const 4) + (i32.add + (get_local $5) + (i32.const 16) + ) + ) + (return) + ) + (func $clz128 (param $0 i32) (param $1 i64) (param $2 i64) + (i64.store + (get_local $0) + (select + (i64.clz + (get_local $2) + ) + (i64.add + (i64.clz + (get_local $1) + ) + (i64.const 64) + ) + (i64.ne + (get_local $2) + (i64.store + (i32.add + (get_local $0) + (i32.const 8) + ) + (i64.const 0) + ) + ) + ) + ) + (return) + ) + (func $clz128_zero_undef (param $0 i32) (param $1 i64) (param $2 i64) + (i64.store + (get_local $0) + (select + (i64.clz + (get_local $2) + ) + (i64.add + (i64.clz + (get_local $1) + ) + (i64.const 64) + ) + (i64.ne + (get_local $2) + (i64.store + (i32.add + (get_local $0) + (i32.const 8) + ) + (i64.const 0) + ) + ) + ) + ) + (return) + ) + (func $ctz128 (param $0 i32) (param $1 i64) (param $2 i64) + (i64.store + (get_local $0) + (select + (i64.ctz + (get_local $1) + ) + (i64.add + (i64.ctz + (get_local $2) + ) + (i64.const 64) + ) + (i64.ne + (get_local $1) + (i64.store + (i32.add + (get_local $0) + (i32.const 8) + ) + (i64.const 0) + ) + ) + ) + ) + (return) + ) + (func $ctz128_zero_undef (param $0 i32) (param $1 i64) (param $2 i64) + (i64.store + (get_local $0) + (select + (i64.ctz + (get_local $1) + ) + (i64.add + (i64.ctz + (get_local $2) + ) + (i64.const 64) + ) + (i64.ne + (get_local $1) + (i64.store + (i32.add + (get_local $0) + (i32.const 8) + ) + (i64.const 0) + ) + ) + ) + ) + (return) + ) + (func $popcnt128 (param $0 i32) (param $1 i64) (param $2 i64) + (i64.store + (i32.add + (get_local $0) + (i32.const 8) + ) + (i64.const 0) + ) + (i64.store + (get_local $0) + (i64.add + (i64.popcnt + (get_local $1) + ) + (i64.popcnt + (get_local $2) + ) + ) + ) + (return) + ) + (func $eqz128 (param $0 i64) (param $1 i64) (result i32) + (return + (i64.eqz + (i64.or + (get_local $0) + (get_local $1) + ) + ) + ) + ) + (func $rotl (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) + (local $5 i32) + (call_import $__ashlti3 + (i32.add + (set_local $5 + (i32.store + (i32.const 4) + (i32.sub + (i32.load + (i32.const 4) + ) + (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) + (get_local $3) + ) + ) + ) + (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 8) + ) + ) + ) + ) + (i64.store + (get_local $0) + (i64.or + (i64.load offset=16 + (get_local $5) + ) + (i64.load + (get_local $5) + ) + ) + ) + (i32.store + (i32.const 4) + (i32.add + (get_local $5) + (i32.const 32) + ) + ) + (return) + ) + (func $masked_rotl (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) + (local $5 i32) + (call_import $__ashlti3 + (i32.add + (set_local $5 + (i32.store + (i32.const 4) + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 32) + ) + ) + ) + (i32.const 16) + ) + (get_local $1) + (get_local $2) + (i32.wrap/i64 + (set_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) + ) + ) + ) + (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 8) + ) + ) + ) + ) + (i64.store + (get_local $0) + (i64.or + (i64.load offset=16 + (get_local $5) + ) + (i64.load + (get_local $5) + ) + ) + ) + (i32.store + (i32.const 4) + (i32.add + (get_local $5) + (i32.const 32) + ) + ) + (return) + ) + (func $rotr (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) + (local $5 i32) + (call_import $__lshrti3 + (i32.add + (set_local $5 + (i32.store + (i32.const 4) + (i32.sub + (i32.load + (i32.const 4) + ) + (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) + (get_local $3) + ) + ) + ) + (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 8) + ) + ) + ) + ) + (i64.store + (get_local $0) + (i64.or + (i64.load offset=16 + (get_local $5) + ) + (i64.load + (get_local $5) + ) + ) + ) + (i32.store + (i32.const 4) + (i32.add + (get_local $5) + (i32.const 32) + ) + ) + (return) + ) + (func $masked_rotr (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) + (local $5 i32) + (call_import $__lshrti3 + (i32.add + (set_local $5 + (i32.store + (i32.const 4) + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 32) + ) + ) + ) + (i32.const 16) + ) + (get_local $1) + (get_local $2) + (i32.wrap/i64 + (set_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) + ) + ) + ) + (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 8) + ) + ) + ) + ) + (i64.store + (get_local $0) + (i64.or + (i64.load offset=16 + (get_local $5) + ) + (i64.load + (get_local $5) + ) + ) + ) + (i32.store + (i32.const 4) + (i32.add + (get_local $5) + (i32.const 32) + ) + ) + (return) + ) +) +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/i32-load-store-alignment.s b/test/llvm_autogenerated/i32-load-store-alignment.s index 58c560912..a76b66779 100644 --- a/test/llvm_autogenerated/i32-load-store-alignment.s +++ b/test/llvm_autogenerated/i32-load-store-alignment.s @@ -49,7 +49,7 @@ ldi32: ldi32_a8: .param i32 .result i32 - i32.load $push0=, 0($0):p2align=3 + i32.load $push0=, 0($0) return $pop0 .endfunc .Lfunc_end4: @@ -71,7 +71,7 @@ ldi8_a1: ldi8_a2: .param i32 .result i32 - i32.load8_u $push0=, 0($0):p2align=1 + i32.load8_u $push0=, 0($0) return $pop0 .endfunc .Lfunc_end6: @@ -104,7 +104,7 @@ ldi16_a2: ldi16_a4: .param i32 .result i32 - i32.load16_u $push0=, 0($0):p2align=2 + i32.load16_u $push0=, 0($0) return $pop0 .endfunc .Lfunc_end9: @@ -154,7 +154,7 @@ sti32: .type sti32_a8,@function sti32_a8: .param i32, i32 - i32.store $drop=, 0($0):p2align=3, $1 + i32.store $drop=, 0($0), $1 return .endfunc .Lfunc_end14: @@ -174,7 +174,7 @@ sti8_a1: .type sti8_a2,@function sti8_a2: .param i32, i32 - i32.store8 $drop=, 0($0):p2align=1, $1 + i32.store8 $drop=, 0($0), $1 return .endfunc .Lfunc_end16: @@ -204,7 +204,7 @@ sti16_a2: .type sti16_a4,@function sti16_a4: .param i32, i32 - i32.store16 $drop=, 0($0):p2align=2, $1 + i32.store16 $drop=, 0($0), $1 return .endfunc .Lfunc_end19: diff --git a/test/llvm_autogenerated/i32-load-store-alignment.wast b/test/llvm_autogenerated/i32-load-store-alignment.wast index 6309818af..230d3ffdc 100644 --- a/test/llvm_autogenerated/i32-load-store-alignment.wast +++ b/test/llvm_autogenerated/i32-load-store-alignment.wast @@ -53,7 +53,7 @@ ) (func $ldi32_a8 (param $0 i32) (result i32) (return - (i32.load align=8 + (i32.load (get_local $0) ) ) @@ -67,7 +67,7 @@ ) (func $ldi8_a2 (param $0 i32) (result i32) (return - (i32.load8_u align=2 + (i32.load8_u (get_local $0) ) ) @@ -88,7 +88,7 @@ ) (func $ldi16_a4 (param $0 i32) (result i32) (return - (i32.load16_u align=4 + (i32.load16_u (get_local $0) ) ) @@ -122,7 +122,7 @@ (return) ) (func $sti32_a8 (param $0 i32) (param $1 i32) - (i32.store align=8 + (i32.store (get_local $0) (get_local $1) ) @@ -136,7 +136,7 @@ (return) ) (func $sti8_a2 (param $0 i32) (param $1 i32) - (i32.store8 align=2 + (i32.store8 (get_local $0) (get_local $1) ) @@ -157,7 +157,7 @@ (return) ) (func $sti16_a4 (param $0 i32) (param $1 i32) - (i32.store16 align=4 + (i32.store16 (get_local $0) (get_local $1) ) diff --git a/test/llvm_autogenerated/i32.s b/test/llvm_autogenerated/i32.s index 66128cd2e..771c38f86 100644 --- a/test/llvm_autogenerated/i32.s +++ b/test/llvm_autogenerated/i32.s @@ -198,4 +198,59 @@ popcnt32: .Lfunc_end17: .size popcnt32, .Lfunc_end17-popcnt32 + .globl eqz32 + .type eqz32,@function +eqz32: + .param i32 + .result i32 + i32.eqz $push0=, $0 + return $pop0 + .endfunc +.Lfunc_end18: + .size eqz32, .Lfunc_end18-eqz32 + + .globl rotl + .type rotl,@function +rotl: + .param i32, i32 + .result i32 + i32.rotl $push0=, $0, $1 + return $pop0 + .endfunc +.Lfunc_end19: + .size rotl, .Lfunc_end19-rotl + + .globl masked_rotl + .type masked_rotl,@function +masked_rotl: + .param i32, i32 + .result i32 + i32.rotl $push0=, $0, $1 + return $pop0 + .endfunc +.Lfunc_end20: + .size masked_rotl, .Lfunc_end20-masked_rotl + + .globl rotr + .type rotr,@function +rotr: + .param i32, i32 + .result i32 + i32.rotr $push0=, $0, $1 + return $pop0 + .endfunc +.Lfunc_end21: + .size rotr, .Lfunc_end21-rotr + + .globl masked_rotr + .type masked_rotr,@function +masked_rotr: + .param i32, i32 + .result i32 + i32.rotr $push0=, $0, $1 + return $pop0 + .endfunc +.Lfunc_end22: + .size masked_rotr, .Lfunc_end22-masked_rotr + diff --git a/test/llvm_autogenerated/i32.wast b/test/llvm_autogenerated/i32.wast index 6678e8782..2f1bf90ca 100644 --- a/test/llvm_autogenerated/i32.wast +++ b/test/llvm_autogenerated/i32.wast @@ -21,6 +21,11 @@ (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) (func $add32 (param $0 i32) (param $1 i32) (result i32) (return (i32.add @@ -160,5 +165,44 @@ ) ) ) + (func $eqz32 (param $0 i32) (result i32) + (return + (i32.eqz + (get_local $0) + ) + ) + ) + (func $rotl (param $0 i32) (param $1 i32) (result i32) + (return + (i32.rotl + (get_local $0) + (get_local $1) + ) + ) + ) + (func $masked_rotl (param $0 i32) (param $1 i32) (result i32) + (return + (i32.rotl + (get_local $0) + (get_local $1) + ) + ) + ) + (func $rotr (param $0 i32) (param $1 i32) (result i32) + (return + (i32.rotr + (get_local $0) + (get_local $1) + ) + ) + ) + (func $masked_rotr (param $0 i32) (param $1 i32) (result i32) + (return + (i32.rotr + (get_local $0) + (get_local $1) + ) + ) + ) ) ;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/i64-load-store-alignment.s b/test/llvm_autogenerated/i64-load-store-alignment.s index fb0870989..00f67b1f9 100644 --- a/test/llvm_autogenerated/i64-load-store-alignment.s +++ b/test/llvm_autogenerated/i64-load-store-alignment.s @@ -60,7 +60,7 @@ ldi64: ldi64_a16: .param i32 .result i64 - i64.load $push0=, 0($0):p2align=3 + i64.load $push0=, 0($0) return $pop0 .endfunc .Lfunc_end5: @@ -82,7 +82,7 @@ ldi8_a1: ldi8_a2: .param i32 .result i64 - i64.load8_u $push0=, 0($0):p2align=1 + i64.load8_u $push0=, 0($0) return $pop0 .endfunc .Lfunc_end7: @@ -115,7 +115,7 @@ ldi16_a2: ldi16_a4: .param i32 .result i64 - i64.load16_u $push0=, 0($0):p2align=2 + i64.load16_u $push0=, 0($0) return $pop0 .endfunc .Lfunc_end10: @@ -159,7 +159,7 @@ ldi32_a4: ldi32_a8: .param i32 .result i64 - i64.load32_u $push0=, 0($0):p2align=3 + i64.load32_u $push0=, 0($0) return $pop0 .endfunc .Lfunc_end14: @@ -219,7 +219,7 @@ sti64: .type sti64_a16,@function sti64_a16: .param i32, i64 - i64.store $drop=, 0($0):p2align=3, $1 + i64.store $drop=, 0($0), $1 return .endfunc .Lfunc_end20: @@ -239,7 +239,7 @@ sti8_a1: .type sti8_a2,@function sti8_a2: .param i32, i64 - i64.store8 $drop=, 0($0):p2align=1, $1 + i64.store8 $drop=, 0($0), $1 return .endfunc .Lfunc_end22: @@ -269,7 +269,7 @@ sti16_a2: .type sti16_a4,@function sti16_a4: .param i32, i64 - i64.store16 $drop=, 0($0):p2align=2, $1 + i64.store16 $drop=, 0($0), $1 return .endfunc .Lfunc_end25: @@ -309,7 +309,7 @@ sti32_a4: .type sti32_a8,@function sti32_a8: .param i32, i64 - i64.store32 $drop=, 0($0):p2align=3, $1 + i64.store32 $drop=, 0($0), $1 return .endfunc .Lfunc_end29: diff --git a/test/llvm_autogenerated/i64-load-store-alignment.wast b/test/llvm_autogenerated/i64-load-store-alignment.wast index 793439a5f..f345f6dcc 100644 --- a/test/llvm_autogenerated/i64-load-store-alignment.wast +++ b/test/llvm_autogenerated/i64-load-store-alignment.wast @@ -84,7 +84,7 @@ ) (func $ldi8_a2 (param $0 i32) (result i64) (return - (i64.load8_u align=2 + (i64.load8_u (get_local $0) ) ) @@ -105,7 +105,7 @@ ) (func $ldi16_a4 (param $0 i32) (result i64) (return - (i64.load16_u align=4 + (i64.load16_u (get_local $0) ) ) @@ -133,7 +133,7 @@ ) (func $ldi32_a8 (param $0 i32) (result i64) (return - (i64.load32_u align=8 + (i64.load32_u (get_local $0) ) ) @@ -188,7 +188,7 @@ (return) ) (func $sti8_a2 (param $0 i32) (param $1 i64) - (i64.store8 align=2 + (i64.store8 (get_local $0) (get_local $1) ) @@ -209,7 +209,7 @@ (return) ) (func $sti16_a4 (param $0 i32) (param $1 i64) - (i64.store16 align=4 + (i64.store16 (get_local $0) (get_local $1) ) @@ -237,7 +237,7 @@ (return) ) (func $sti32_a8 (param $0 i32) (param $1 i64) - (i64.store32 align=8 + (i64.store32 (get_local $0) (get_local $1) ) diff --git a/test/llvm_autogenerated/i64.s b/test/llvm_autogenerated/i64.s index a095f0245..88b7f2c1c 100644 --- a/test/llvm_autogenerated/i64.s +++ b/test/llvm_autogenerated/i64.s @@ -198,4 +198,59 @@ popcnt64: .Lfunc_end17: .size popcnt64, .Lfunc_end17-popcnt64 + .globl eqz64 + .type eqz64,@function +eqz64: + .param i64 + .result i32 + i64.eqz $push0=, $0 + return $pop0 + .endfunc +.Lfunc_end18: + .size eqz64, .Lfunc_end18-eqz64 + + .globl rotl + .type rotl,@function +rotl: + .param i64, i64 + .result i64 + i64.rotl $push0=, $0, $1 + return $pop0 + .endfunc +.Lfunc_end19: + .size rotl, .Lfunc_end19-rotl + + .globl masked_rotl + .type masked_rotl,@function +masked_rotl: + .param i64, i64 + .result i64 + i64.rotl $push0=, $0, $1 + return $pop0 + .endfunc +.Lfunc_end20: + .size masked_rotl, .Lfunc_end20-masked_rotl + + .globl rotr + .type rotr,@function +rotr: + .param i64, i64 + .result i64 + i64.rotr $push0=, $0, $1 + return $pop0 + .endfunc +.Lfunc_end21: + .size rotr, .Lfunc_end21-rotr + + .globl masked_rotr + .type masked_rotr,@function +masked_rotr: + .param i64, i64 + .result i64 + i64.rotr $push0=, $0, $1 + return $pop0 + .endfunc +.Lfunc_end22: + .size masked_rotr, .Lfunc_end22-masked_rotr + diff --git a/test/llvm_autogenerated/i64.wast b/test/llvm_autogenerated/i64.wast index 90d7f00d3..bcbca2611 100644 --- a/test/llvm_autogenerated/i64.wast +++ b/test/llvm_autogenerated/i64.wast @@ -21,6 +21,11 @@ (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) (func $add64 (param $0 i64) (param $1 i64) (result i64) (return (i64.add @@ -160,5 +165,44 @@ ) ) ) + (func $eqz64 (param $0 i64) (result i32) + (return + (i64.eqz + (get_local $0) + ) + ) + ) + (func $rotl (param $0 i64) (param $1 i64) (result i64) + (return + (i64.rotl + (get_local $0) + (get_local $1) + ) + ) + ) + (func $masked_rotl (param $0 i64) (param $1 i64) (result i64) + (return + (i64.rotl + (get_local $0) + (get_local $1) + ) + ) + ) + (func $rotr (param $0 i64) (param $1 i64) (result i64) + (return + (i64.rotr + (get_local $0) + (get_local $1) + ) + ) + ) + (func $masked_rotr (param $0 i64) (param $1 i64) (result i64) + (return + (i64.rotr + (get_local $0) + (get_local $1) + ) + ) + ) ) ;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/immediates.s b/test/llvm_autogenerated/immediates.s index bba1d13e8..a9b6d0efd 100644 --- a/test/llvm_autogenerated/immediates.s +++ b/test/llvm_autogenerated/immediates.s @@ -160,6 +160,26 @@ neginf_f32: .Lfunc_end15: .size neginf_f32, .Lfunc_end15-neginf_f32 + .globl custom_nan_f32 + .type custom_nan_f32,@function +custom_nan_f32: + .result f32 + f32.const $push0=, -nan:0x6bcdef + return $pop0 + .endfunc +.Lfunc_end16: + .size custom_nan_f32, .Lfunc_end16-custom_nan_f32 + + .globl custom_nans_f32 + .type custom_nans_f32,@function +custom_nans_f32: + .result f32 + f32.const $push0=, -nan:0x6bcdef + return $pop0 + .endfunc +.Lfunc_end17: + .size custom_nans_f32, .Lfunc_end17-custom_nans_f32 + .globl negzero_f64 .type negzero_f64,@function negzero_f64: @@ -167,8 +187,8 @@ negzero_f64: f64.const $push0=, -0x0p0 return $pop0 .endfunc -.Lfunc_end16: - .size negzero_f64, .Lfunc_end16-negzero_f64 +.Lfunc_end18: + .size negzero_f64, .Lfunc_end18-negzero_f64 .globl zero_f64 .type zero_f64,@function @@ -177,8 +197,8 @@ zero_f64: f64.const $push0=, 0x0p0 return $pop0 .endfunc -.Lfunc_end17: - .size zero_f64, .Lfunc_end17-zero_f64 +.Lfunc_end19: + .size zero_f64, .Lfunc_end19-zero_f64 .globl one_f64 .type one_f64,@function @@ -187,8 +207,8 @@ one_f64: f64.const $push0=, 0x1p0 return $pop0 .endfunc -.Lfunc_end18: - .size one_f64, .Lfunc_end18-one_f64 +.Lfunc_end20: + .size one_f64, .Lfunc_end20-one_f64 .globl two_f64 .type two_f64,@function @@ -197,8 +217,8 @@ two_f64: f64.const $push0=, 0x1p1 return $pop0 .endfunc -.Lfunc_end19: - .size two_f64, .Lfunc_end19-two_f64 +.Lfunc_end21: + .size two_f64, .Lfunc_end21-two_f64 .globl nan_f64 .type nan_f64,@function @@ -207,8 +227,8 @@ nan_f64: f64.const $push0=, nan return $pop0 .endfunc -.Lfunc_end20: - .size nan_f64, .Lfunc_end20-nan_f64 +.Lfunc_end22: + .size nan_f64, .Lfunc_end22-nan_f64 .globl negnan_f64 .type negnan_f64,@function @@ -217,8 +237,8 @@ negnan_f64: f64.const $push0=, -nan return $pop0 .endfunc -.Lfunc_end21: - .size negnan_f64, .Lfunc_end21-negnan_f64 +.Lfunc_end23: + .size negnan_f64, .Lfunc_end23-negnan_f64 .globl inf_f64 .type inf_f64,@function @@ -227,8 +247,8 @@ inf_f64: f64.const $push0=, infinity return $pop0 .endfunc -.Lfunc_end22: - .size inf_f64, .Lfunc_end22-inf_f64 +.Lfunc_end24: + .size inf_f64, .Lfunc_end24-inf_f64 .globl neginf_f64 .type neginf_f64,@function @@ -237,7 +257,27 @@ neginf_f64: f64.const $push0=, -infinity return $pop0 .endfunc -.Lfunc_end23: - .size neginf_f64, .Lfunc_end23-neginf_f64 +.Lfunc_end25: + .size neginf_f64, .Lfunc_end25-neginf_f64 + + .globl custom_nan_f64 + .type custom_nan_f64,@function +custom_nan_f64: + .result f64 + f64.const $push0=, -nan:0xabcdef0123456 + return $pop0 + .endfunc +.Lfunc_end26: + .size custom_nan_f64, .Lfunc_end26-custom_nan_f64 + + .globl custom_nans_f64 + .type custom_nans_f64,@function +custom_nans_f64: + .result f64 + f64.const $push0=, -nan:0x2bcdef0123456 + return $pop0 + .endfunc +.Lfunc_end27: + .size custom_nans_f64, .Lfunc_end27-custom_nans_f64 diff --git a/test/llvm_autogenerated/immediates.wast b/test/llvm_autogenerated/immediates.wast index ad3d894cc..5e16ec488 100644 --- a/test/llvm_autogenerated/immediates.wast +++ b/test/llvm_autogenerated/immediates.wast @@ -19,6 +19,8 @@ (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) @@ -27,6 +29,8 @@ (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) (func $zero_i32 (result i32) (return (i32.const 0) @@ -107,6 +111,16 @@ (f32.const -infinity) ) ) + (func $custom_nan_f32 (result f32) + (return + (f32.const -nan:0x6bcdef) + ) + ) + (func $custom_nans_f32 (result f32) + (return + (f32.const -nan:0x6bcdef) + ) + ) (func $negzero_f64 (result f64) (return (f64.const -0) @@ -147,5 +161,15 @@ (f64.const -infinity) ) ) + (func $custom_nan_f64 (result f64) + (return + (f64.const -nan:0xabcdef0123456) + ) + ) + (func $custom_nans_f64 (result f64) + (return + (f64.const -nan:0x2bcdef0123456) + ) + ) ) ;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/irreducible-cfg.s b/test/llvm_autogenerated/irreducible-cfg.s new file mode 100644 index 000000000..e9dfda22c --- /dev/null +++ b/test/llvm_autogenerated/irreducible-cfg.s @@ -0,0 +1,172 @@ + .text + .file "/s/llvm/llvm/test/CodeGen/WebAssembly/irreducible-cfg.ll" + .globl test0 + .type test0,@function +test0: + .param i32, i32, i32, i32 + .local f64, i32, i32 + i32.const $5=, 0 + block + block + i32.eqz $push18=, $2 + br_if 0, $pop18 + i32.const $push0=, 3 + i32.shl $push1=, $3, $pop0 + i32.add $push2=, $0, $pop1 + f64.load $4=, 0($pop2):p2align=2 + i32.const $6=, 0 + br 1 +.LBB0_3: + end_block + i32.const $6=, 1 +.LBB0_4: + end_block + loop + block + block + block + block + block + block + br_table $6, 2, 0, 3, 1, 1 +.LBB0_5: + end_block + i32.ge_s $push3=, $5, $1 + br_if 4, $pop3 + i32.const $6=, 3 + br 5 +.LBB0_7: + end_block + i32.const $push4=, 3 + i32.shl $push5=, $5, $pop4 + i32.add $push17=, $0, $pop5 + tee_local $push16=, $2=, $pop17 + f64.load $push6=, 0($2):p2align=2 + f64.const $push7=, 0x1.2666666666666p1 + f64.mul $push15=, $pop6, $pop7 + tee_local $push14=, $4=, $pop15 + f64.store $drop=, 0($pop16):p2align=2, $pop14 + i32.const $6=, 0 + br 4 +.LBB0_9: + end_block + i32.const $push10=, 3 + i32.shl $push11=, $5, $pop10 + i32.add $push12=, $0, $pop11 + f64.const $push8=, 0x1.4cccccccccccdp0 + f64.add $push9=, $4, $pop8 + f64.store $drop=, 0($pop12):p2align=2, $pop9 + i32.const $push13=, 1 + i32.add $5=, $5, $pop13 + br 1 +.LBB0_10: + end_block + return +.LBB0_11: + end_block + i32.const $6=, 1 + br 1 +.LBB0_12: + end_block + i32.const $6=, 2 + br 0 +.LBB0_13: + end_loop + .endfunc +.Lfunc_end0: + .size test0, .Lfunc_end0-test0 + + .globl test1 + .type test1,@function +test1: + .param i32, i32, i32, i32 + .local f64, i32, i32 + i32.const $5=, 0 + block + block + i32.eqz $push23=, $2 + br_if 0, $pop23 + i32.const $push0=, 3 + i32.shl $push1=, $3, $pop0 + i32.add $push2=, $0, $pop1 + f64.load $4=, 0($pop2):p2align=2 + i32.const $6=, 0 + br 1 +.LBB1_3: + end_block + i32.const $6=, 1 +.LBB1_4: + end_block + loop + block + block + block + block + block + block + block + block + br_table $6, 3, 0, 4, 1, 2, 2 +.LBB1_5: + end_block + i32.ge_s $push3=, $5, $1 + br_if 6, $pop3 + i32.const $6=, 3 + br 7 +.LBB1_7: + end_block + i32.const $push4=, 3 + i32.shl $push5=, $5, $pop4 + i32.add $push18=, $0, $pop5 + tee_local $push17=, $2=, $pop18 + f64.load $push6=, 0($2):p2align=2 + f64.const $push7=, 0x1.2666666666666p1 + f64.mul $push16=, $pop6, $pop7 + tee_local $push15=, $4=, $pop16 + f64.store $drop=, 0($pop17):p2align=2, $pop15 + i32.const $2=, 0 + i32.const $6=, 4 + br 6 +.LBB1_9: + end_block + i32.const $push22=, 1 + i32.add $push21=, $2, $pop22 + tee_local $push20=, $2=, $pop21 + i32.const $push19=, 256 + i32.lt_s $push8=, $pop20, $pop19 + br_if 3, $pop8 + i32.const $6=, 0 + br 5 +.LBB1_11: + end_block + i32.const $push11=, 3 + i32.shl $push12=, $5, $pop11 + i32.add $push13=, $0, $pop12 + f64.const $push9=, 0x1.4cccccccccccdp0 + f64.add $push10=, $4, $pop9 + f64.store $drop=, 0($pop13):p2align=2, $pop10 + i32.const $push14=, 1 + i32.add $5=, $5, $pop14 + br 1 +.LBB1_12: + end_block + return +.LBB1_13: + end_block + i32.const $6=, 1 + br 2 +.LBB1_14: + end_block + i32.const $6=, 4 + br 1 +.LBB1_15: + end_block + i32.const $6=, 2 + br 0 +.LBB1_16: + end_loop + .endfunc +.Lfunc_end1: + .size test1, .Lfunc_end1-test1 + + diff --git a/test/llvm_autogenerated/irreducible-cfg.wast b/test/llvm_autogenerated/irreducible-cfg.wast new file mode 100644 index 000000000..6990faa76 --- /dev/null +++ b/test/llvm_autogenerated/irreducible-cfg.wast @@ -0,0 +1,263 @@ +(module + (memory 1 + (segment 4 "\10\04\00\00") + ) + (export "memory" memory) + (export "test0" $test0) + (export "test1" $test1) + (func $test0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (local $4 f64) + (local $5 i32) + (local $6 i32) + (set_local $5 + (i32.const 0) + ) + (block $label$0 + (block $label$1 + (br_if $label$1 + (i32.eqz + (get_local $2) + ) + ) + (set_local $4 + (f64.load align=4 + (i32.add + (get_local $0) + (i32.shl + (get_local $3) + (i32.const 3) + ) + ) + ) + ) + (set_local $6 + (i32.const 0) + ) + (br $label$0) + ) + (set_local $6 + (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) + ) + ) + (br_if $label$4 + (i32.ge_s + (get_local $5) + (get_local $1) + ) + ) + (set_local $6 + (i32.const 3) + ) + (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 + (get_local $2) + ) + (f64.const 2.3) + ) + ) + ) + (set_local $6 + (i32.const 0) + ) + (br $label$2) + ) + (f64.store align=4 + (i32.add + (get_local $0) + (i32.shl + (get_local $5) + (i32.const 3) + ) + ) + (f64.add + (get_local $4) + (f64.const 1.3) + ) + ) + (set_local $5 + (i32.add + (get_local $5) + (i32.const 1) + ) + ) + (br $label$5) + ) + (return) + ) + (set_local $6 + (i32.const 1) + ) + (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) + (local $4 f64) + (local $5 i32) + (local $6 i32) + (set_local $5 + (i32.const 0) + ) + (block $label$0 + (block $label$1 + (br_if $label$1 + (i32.eqz + (get_local $2) + ) + ) + (set_local $4 + (f64.load align=4 + (i32.add + (get_local $0) + (i32.shl + (get_local $3) + (i32.const 3) + ) + ) + ) + ) + (set_local $6 + (i32.const 0) + ) + (br $label$0) + ) + (set_local $6 + (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) + ) + ) + (br_if $label$4 + (i32.ge_s + (get_local $5) + (get_local $1) + ) + ) + (set_local $6 + (i32.const 3) + ) + (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 + (get_local $2) + ) + (f64.const 2.3) + ) + ) + ) + (set_local $2 + (i32.const 0) + ) + (set_local $6 + (i32.const 4) + ) + (br $label$2) + ) + (br_if $label$5 + (i32.lt_s + (set_local $2 + (i32.add + (get_local $2) + (i32.const 1) + ) + ) + (i32.const 256) + ) + ) + (set_local $6 + (i32.const 0) + ) + (br $label$2) + ) + (f64.store align=4 + (i32.add + (get_local $0) + (i32.shl + (get_local $5) + (i32.const 3) + ) + ) + (f64.add + (get_local $4) + (f64.const 1.3) + ) + ) + (set_local $5 + (i32.add + (get_local $5) + (i32.const 1) + ) + ) + (br $label$6) + ) + (return) + ) + (set_local $6 + (i32.const 1) + ) + (br $label$2) + ) + (set_local $6 + (i32.const 4) + ) + (br $label$2) + ) + (set_local $6 + (i32.const 2) + ) + (br $label$2) + ) + ) +) +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/legalize.s b/test/llvm_autogenerated/legalize.s index c543c4029..b3fd8f6f1 100644 --- a/test/llvm_autogenerated/legalize.s +++ b/test/llvm_autogenerated/legalize.s @@ -68,1030 +68,1009 @@ fpconv_f64_f32: .type bigshift,@function 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 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, 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, 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, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 - i32.const $183=, __stack_pointer - i32.load $183=, 0($183) - i32.const $184=, 1024 - i32.sub $312=, $183, $184 - i32.const $184=, __stack_pointer - i32.store $312=, 0($184), $312 - i64.const $push0=, 896 - i64.sub $push1=, $pop0, $17 - i32.const $186=, 480 - i32.add $186=, $312, $186 - call __lshrti3@FUNCTION, $186, $1, $2, $pop1 - i64.const $push2=, -768 - i64.add $push3=, $17, $pop2 - tee_local $push553=, $182=, $pop3 - i32.const $187=, 464 - i32.add $187=, $312, $187 - call __ashlti3@FUNCTION, $187, $3, $4, $pop553 - i64.const $push4=, -896 - i64.add $push5=, $17, $pop4 - i32.const $188=, 496 - i32.add $188=, $312, $188 - call __ashlti3@FUNCTION, $188, $1, $2, $pop5 - i64.const $push6=, 640 - i64.sub $push7=, $pop6, $17 - tee_local $push552=, $181=, $pop7 - i32.const $189=, 352 - i32.add $189=, $312, $189 - call __lshrti3@FUNCTION, $189, $5, $6, $pop552 - i64.const $push8=, -512 - i64.add $push9=, $17, $pop8 - tee_local $push551=, $180=, $pop9 - i32.const $190=, 336 - i32.add $190=, $312, $190 - call __ashlti3@FUNCTION, $190, $7, $8, $pop551 - i64.const $push10=, -640 - i64.add $push11=, $17, $pop10 - tee_local $push550=, $179=, $pop11 - i32.const $191=, 368 - i32.add $191=, $312, $191 - call __ashlti3@FUNCTION, $191, $5, $6, $pop550 - i64.const $push12=, 768 - i64.sub $push13=, $pop12, $17 - tee_local $push549=, $178=, $pop13 - i32.const $192=, 432 - i32.add $192=, $312, $192 - call __lshrti3@FUNCTION, $192, $3, $4, $pop549 - i64.const $push14=, 384 - i64.sub $push15=, $pop14, $17 - tee_local $push548=, $177=, $pop15 - i32.const $193=, 864 - i32.add $193=, $312, $193 - call __lshrti3@FUNCTION, $193, $9, $10, $pop548 - i64.const $push16=, -256 - i64.add $push17=, $17, $pop16 - tee_local $push547=, $176=, $pop17 - i32.const $194=, 848 - i32.add $194=, $312, $194 - call __ashlti3@FUNCTION, $194, $11, $12, $pop547 - i64.const $push18=, -384 - i64.add $push19=, $17, $pop18 - tee_local $push546=, $175=, $pop19 - i32.const $195=, 880 - i32.add $195=, $312, $195 - call __ashlti3@FUNCTION, $195, $9, $10, $pop546 - i32.const $196=, 1008 - i32.add $196=, $312, $196 - call __ashlti3@FUNCTION, $196, $15, $16, $17 - i64.const $push20=, 128 - i64.sub $push21=, $pop20, $17 - tee_local $push545=, $174=, $pop21 - i32.const $197=, 960 - i32.add $197=, $312, $197 - call __lshrti3@FUNCTION, $197, $13, $14, $pop545 - i64.const $push22=, -128 - i64.add $push23=, $17, $pop22 - tee_local $push544=, $173=, $pop23 - i32.const $198=, 976 - i32.add $198=, $312, $198 - call __ashlti3@FUNCTION, $198, $13, $14, $pop544 - i64.const $push24=, 256 - i64.sub $push25=, $pop24, $17 - tee_local $push543=, $172=, $pop25 - i32.const $199=, 816 - i32.add $199=, $312, $199 - call __lshrti3@FUNCTION, $199, $11, $12, $pop543 - i64.const $push26=, 512 - i64.sub $push27=, $pop26, $17 - tee_local $push542=, $171=, $pop27 - i32.const $200=, 240 - i32.add $200=, $312, $200 - call __lshrti3@FUNCTION, $200, $7, $8, $pop542 - i32.const $201=, 912 - i32.add $201=, $312, $201 - call __ashlti3@FUNCTION, $201, $11, $12, $17 - i32.const $202=, 928 - i32.add $202=, $312, $202 - call __lshrti3@FUNCTION, $202, $9, $10, $174 - i32.const $203=, 944 - i32.add $203=, $312, $203 - call __ashlti3@FUNCTION, $203, $9, $10, $173 - i64.const $push541=, 256 - i64.sub $push28=, $pop541, $171 - tee_local $push540=, $170=, $pop28 - i32.const $204=, 80 - i32.add $204=, $312, $204 - call __ashlti3@FUNCTION, $204, $7, $8, $pop540 - i64.const $push539=, 128 - i64.sub $push29=, $pop539, $170 - i32.const $205=, 96 - i32.add $205=, $312, $205 - call __lshrti3@FUNCTION, $205, $5, $6, $pop29 - i64.const $push538=, 128 - i64.sub $push30=, $pop538, $171 - tee_local $push537=, $169=, $pop30 - i32.const $206=, 112 - i32.add $206=, $312, $206 - call __ashlti3@FUNCTION, $206, $5, $6, $pop537 - i32.const $207=, 48 - i32.add $207=, $312, $207 - call __lshrti3@FUNCTION, $207, $3, $4, $171 - i32.const $208=, 176 - i32.add $208=, $312, $208 - call __lshrti3@FUNCTION, $208, $7, $8, $172 - i32.const $209=, 288 - i32.add $209=, $312, $209 - call __lshrti3@FUNCTION, $209, $1, $2, $181 - i32.const $210=, 272 - i32.add $210=, $312, $210 - call __ashlti3@FUNCTION, $210, $3, $4, $180 - i32.const $211=, 304 - i32.add $211=, $312, $211 - call __ashlti3@FUNCTION, $211, $1, $2, $179 - i32.const $212=, 128 - i32.add $212=, $312, $212 - call __lshrti3@FUNCTION, $212, $5, $6, $172 - i64.const $push536=, 384 - i64.sub $push31=, $pop536, $171 - i32.const $213=, 144 - i32.add $213=, $312, $213 - call __ashlti3@FUNCTION, $213, $7, $8, $pop31 - i32.const $214=, 160 - i32.add $214=, $312, $214 - call __lshrti3@FUNCTION, $214, $7, $8, $174 - call __lshrti3@FUNCTION, $312, $1, $2, $171 - i32.const $215=, 16 - i32.add $215=, $312, $215 - call __ashlti3@FUNCTION, $215, $3, $4, $169 - i32.const $216=, 32 - i32.add $216=, $312, $216 - call __lshrti3@FUNCTION, $216, $3, $4, $177 - i32.const $217=, 64 - i32.add $217=, $312, $217 - call __ashlti3@FUNCTION, $217, $5, $6, $170 - i32.const $218=, 896 - i32.add $218=, $312, $218 - call __ashlti3@FUNCTION, $218, $9, $10, $17 - i32.const $219=, 256 - i32.add $219=, $312, $219 - call __ashlti3@FUNCTION, $219, $1, $2, $180 - i32.const $220=, 192 - i32.add $220=, $312, $220 - call __lshrti3@FUNCTION, $220, $5, $6, $171 - i32.const $221=, 208 - i32.add $221=, $312, $221 - call __ashlti3@FUNCTION, $221, $7, $8, $169 - i32.const $222=, 224 - i32.add $222=, $312, $222 - call __lshrti3@FUNCTION, $222, $7, $8, $177 - i32.const $223=, 768 - i32.add $223=, $312, $223 - call __lshrti3@FUNCTION, $223, $9, $10, $172 - i64.const $push535=, 128 - i64.sub $push32=, $pop535, $172 - tee_local $push534=, $169=, $pop32 - i32.const $224=, 784 - i32.add $224=, $312, $224 - call __ashlti3@FUNCTION, $224, $11, $12, $pop534 - i32.const $225=, 800 - i32.add $225=, $312, $225 - call __lshrti3@FUNCTION, $225, $11, $12, $174 - i32.const $226=, 992 - i32.add $226=, $312, $226 - call __ashlti3@FUNCTION, $226, $13, $14, $17 - i32.const $227=, 832 - i32.add $227=, $312, $227 - call __ashlti3@FUNCTION, $227, $9, $10, $176 - i32.const $228=, 384 - i32.add $228=, $312, $228 - call __lshrti3@FUNCTION, $228, $1, $2, $178 - i64.const $push533=, 128 - i64.sub $push33=, $pop533, $178 - i32.const $229=, 400 - i32.add $229=, $312, $229 - call __ashlti3@FUNCTION, $229, $3, $4, $pop33 - i32.const $230=, 416 - i32.add $230=, $312, $230 - call __lshrti3@FUNCTION, $230, $3, $4, $181 - i32.const $231=, 320 - i32.add $231=, $312, $231 - call __ashlti3@FUNCTION, $231, $5, $6, $180 - i32.const $232=, 448 - i32.add $232=, $312, $232 - call __ashlti3@FUNCTION, $232, $1, $2, $182 - i32.const $233=, 736 - i32.add $233=, $312, $233 - call __lshrti3@FUNCTION, $233, $1, $2, $177 - i32.const $234=, 720 - i32.add $234=, $312, $234 - call __ashlti3@FUNCTION, $234, $3, $4, $176 - i32.const $235=, 752 - i32.add $235=, $312, $235 - call __ashlti3@FUNCTION, $235, $1, $2, $175 - i32.const $236=, 592 - i32.add $236=, $312, $236 - call __ashlti3@FUNCTION, $236, $7, $8, $17 - i32.const $237=, 608 - i32.add $237=, $312, $237 - call __lshrti3@FUNCTION, $237, $5, $6, $174 - i32.const $238=, 624 - i32.add $238=, $312, $238 - call __ashlti3@FUNCTION, $238, $5, $6, $173 - i32.const $239=, 688 - i32.add $239=, $312, $239 - call __lshrti3@FUNCTION, $239, $3, $4, $172 - i32.const $240=, 640 - i32.add $240=, $312, $240 - call __lshrti3@FUNCTION, $240, $1, $2, $172 - i32.const $241=, 656 - i32.add $241=, $312, $241 - call __ashlti3@FUNCTION, $241, $3, $4, $169 - i32.const $242=, 672 - i32.add $242=, $312, $242 - call __lshrti3@FUNCTION, $242, $3, $4, $174 - i32.const $243=, 576 - i32.add $243=, $312, $243 - call __ashlti3@FUNCTION, $243, $5, $6, $17 - i32.const $244=, 704 - i32.add $244=, $312, $244 - call __ashlti3@FUNCTION, $244, $1, $2, $176 - i32.const $245=, 528 - i32.add $245=, $312, $245 - call __ashlti3@FUNCTION, $245, $3, $4, $17 - i32.const $246=, 544 - i32.add $246=, $312, $246 - call __lshrti3@FUNCTION, $246, $1, $2, $174 - i32.const $247=, 560 - i32.add $247=, $312, $247 - call __ashlti3@FUNCTION, $247, $1, $2, $173 - i32.const $248=, 512 - i32.add $248=, $312, $248 - call __ashlti3@FUNCTION, $248, $1, $2, $17 - i32.const $push75=, 8 - i32.const $249=, 480 - i32.add $249=, $312, $249 - i32.add $push76=, $249, $pop75 - i64.load $174=, 0($pop76) - i32.const $push532=, 8 - i32.const $250=, 464 - i32.add $250=, $312, $250 - i32.add $push77=, $250, $pop532 - i64.load $177=, 0($pop77) - i64.load $173=, 480($312) - i64.load $181=, 464($312) - i64.load $169=, 496($312) - i32.const $push531=, 8 - i32.const $251=, 496 - i32.add $251=, $312, $251 - i32.add $push79=, $251, $pop531 - i64.load $179=, 0($pop79) - i32.const $push530=, 8 - i32.const $252=, 352 - i32.add $252=, $312, $252 - i32.add $push82=, $252, $pop530 - i64.load $175=, 0($pop82) - i32.const $push529=, 8 - i32.const $253=, 336 - i32.add $253=, $312, $253 - i32.add $push83=, $253, $pop529 - i64.load $45=, 0($pop83) - i32.const $push528=, 8 - i32.const $254=, 368 - i32.add $254=, $312, $254 - i32.add $push85=, $254, $pop528 - i64.load $46=, 0($pop85) - i32.const $push527=, 8 - i32.const $255=, 432 - i32.add $255=, $312, $255 - i32.add $push88=, $255, $pop527 - i64.load $47=, 0($pop88) - i32.const $push526=, 8 - i32.const $256=, 864 - i32.add $256=, $312, $256 - i32.add $push93=, $256, $pop526 - i64.load $48=, 0($pop93) - i32.const $push525=, 8 - i32.const $257=, 848 - i32.add $257=, $312, $257 - i32.add $push94=, $257, $pop525 - i64.load $49=, 0($pop94) - i32.const $push524=, 8 - i32.const $258=, 880 - i32.add $258=, $312, $258 - i32.add $push96=, $258, $pop524 - i64.load $50=, 0($pop96) - i32.const $push523=, 8 - i32.const $259=, 1008 - i32.add $259=, $312, $259 - i32.add $push99=, $259, $pop523 - i64.load $51=, 0($pop99) - i32.const $push522=, 8 - i32.const $260=, 960 - i32.add $260=, $312, $260 - i32.add $push100=, $260, $pop522 - i64.load $52=, 0($pop100) - i32.const $push521=, 8 - i32.const $261=, 976 - i32.add $261=, $312, $261 - i32.add $push102=, $261, $pop521 - i64.load $53=, 0($pop102) - i32.const $push520=, 8 - i32.const $262=, 816 - i32.add $262=, $312, $262 - i32.add $push105=, $262, $pop520 - i64.load $54=, 0($pop105) - i32.const $push519=, 8 - i32.const $263=, 240 - i32.add $263=, $312, $263 - i32.add $push110=, $263, $pop519 - i64.load $55=, 0($pop110) - i32.const $push518=, 8 - i32.const $264=, 912 - i32.add $264=, $312, $264 - i32.add $push138=, $264, $pop518 - i64.load $67=, 0($pop138) - i32.const $push517=, 8 - i32.const $265=, 928 - i32.add $265=, $312, $265 - i32.add $push139=, $265, $pop517 - i64.load $68=, 0($pop139) - i32.const $push516=, 8 - i32.const $266=, 944 - i32.add $266=, $312, $266 - i32.add $push141=, $266, $pop516 - i64.load $69=, 0($pop141) - i32.const $push515=, 8 - i32.const $267=, 80 - i32.add $267=, $312, $267 - i32.add $push145=, $267, $pop515 - i64.load $70=, 0($pop145) - i32.const $push514=, 8 - i32.const $268=, 96 - i32.add $268=, $312, $268 - i32.add $push146=, $268, $pop514 - i64.load $71=, 0($pop146) - i64.load $59=, 80($312) - i64.load $60=, 96($312) - i64.load $61=, 112($312) - i32.const $push513=, 8 - i32.const $269=, 112 - i32.add $269=, $312, $269 - i32.add $push148=, $269, $pop513 - i64.load $72=, 0($pop148) - i32.const $push512=, 8 - i32.const $270=, 48 - i32.add $270=, $312, $270 - i32.add $push151=, $270, $pop512 - i64.load $73=, 0($pop151) - i32.const $push511=, 8 - i32.const $271=, 176 - i32.add $271=, $312, $271 - i32.add $push154=, $271, $pop511 - i64.load $74=, 0($pop154) - i32.const $push510=, 8 - i32.const $272=, 288 - i32.add $272=, $312, $272 - i32.add $push159=, $272, $pop510 - i64.load $75=, 0($pop159) - i32.const $push509=, 8 - i32.const $273=, 272 - i32.add $273=, $312, $273 - i32.add $push160=, $273, $pop509 - i64.load $76=, 0($pop160) - i32.const $push508=, 8 - i32.const $274=, 304 - i32.add $274=, $312, $274 - i32.add $push162=, $274, $pop508 - i64.load $77=, 0($pop162) - i32.const $push507=, 8 - i32.const $275=, 128 - i32.add $275=, $312, $275 - i32.add $push186=, $275, $pop507 - i64.load $87=, 0($pop186) - i32.const $push506=, 8 - i32.const $276=, 144 - i32.add $276=, $312, $276 - i32.add $push187=, $276, $pop506 - i64.load $88=, 0($pop187) - i32.const $push505=, 8 - i32.const $277=, 160 - i32.add $277=, $312, $277 - i32.add $push189=, $277, $pop505 - i64.load $89=, 0($pop189) - i32.const $push504=, 8 - i32.add $push192=, $312, $pop504 - i64.load $90=, 0($pop192) - i32.const $push503=, 8 - i32.const $278=, 16 - i32.add $278=, $312, $278 - i32.add $push193=, $278, $pop503 - i64.load $91=, 0($pop193) - i64.load $84=, 64($312) - i32.const $push502=, 8 - i32.const $279=, 64 - i32.add $279=, $312, $279 - i32.add $push198=, $279, $pop502 - i64.load $93=, 0($pop198) - i32.const $push501=, 8 - i32.const $280=, 32 - i32.add $280=, $312, $280 - i32.add $push195=, $280, $pop501 - i64.load $92=, 0($pop195) - i32.const $push500=, 8 - i32.const $281=, 896 - i32.add $281=, $312, $281 - i32.add $push203=, $281, $pop500 - i64.load $94=, 0($pop203) - i32.const $push499=, 8 - i32.const $282=, 256 - i32.add $282=, $312, $282 - i32.add $push207=, $282, $pop499 - i64.load $95=, 0($pop207) - i32.const $push498=, 8 - i32.const $283=, 192 - i32.add $283=, $312, $283 - i32.add $push236=, $283, $pop498 - i64.load $109=, 0($pop236) - i32.const $push497=, 8 - i32.const $284=, 208 - i32.add $284=, $312, $284 - i32.add $push237=, $284, $pop497 - i64.load $110=, 0($pop237) - i64.load $81=, 0($312) - i64.load $82=, 16($312) - i64.load $83=, 32($312) - i32.const $push496=, 8 - i32.const $285=, 224 - i32.add $285=, $312, $285 - i32.add $push239=, $285, $pop496 - i64.load $111=, 0($pop239) - i64.load $96=, 192($312) - i64.load $97=, 208($312) - i64.load $98=, 224($312) - i64.load $44=, 240($312) - i64.load $62=, 48($312) - i64.load $63=, 176($312) - i64.load $78=, 128($312) - i64.load $79=, 144($312) - i64.load $80=, 160($312) - i32.const $push495=, 8 - i32.const $286=, 768 - i32.add $286=, $312, $286 - i32.add $push243=, $286, $pop495 - i64.load $112=, 0($pop243) - i32.const $push494=, 8 - i32.const $287=, 784 - i32.add $287=, $312, $287 - i32.add $push244=, $287, $pop494 - i64.load $113=, 0($pop244) - i32.const $push493=, 8 - i32.const $288=, 800 - i32.add $288=, $312, $288 - i32.add $push246=, $288, $pop493 - i64.load $114=, 0($pop246) - i32.const $push492=, 8 - i32.const $289=, 992 - i32.add $289=, $312, $289 - i32.add $push249=, $289, $pop492 - i64.load $115=, 0($pop249) - i32.const $push491=, 8 - i32.const $290=, 832 - i32.add $290=, $312, $290 - i32.add $push252=, $290, $pop491 - i64.load $116=, 0($pop252) - i32.const $push490=, 8 - i32.const $291=, 384 - i32.add $291=, $312, $291 - i32.add $push257=, $291, $pop490 - i64.load $117=, 0($pop257) - i32.const $push489=, 8 - i32.const $292=, 400 - i32.add $292=, $312, $292 - i32.add $push258=, $292, $pop489 - i64.load $118=, 0($pop258) - i64.load $104=, 384($312) - i64.load $105=, 400($312) - i32.const $push488=, 8 - i32.const $293=, 416 - i32.add $293=, $312, $293 - i32.add $push260=, $293, $pop488 - i64.load $119=, 0($pop260) - i64.load $106=, 416($312) - i64.load $36=, 432($312) - i32.const $push487=, 8 - i32.const $294=, 320 - i32.add $294=, $312, $294 - i32.add $push263=, $294, $pop487 - i64.load $120=, 0($pop263) - i64.load $33=, 352($312) - i64.load $34=, 336($312) - i64.load $35=, 368($312) - i32.const $push486=, 8 - i32.const $295=, 448 - i32.add $295=, $312, $295 - i32.add $push266=, $295, $pop486 - i64.load $121=, 0($pop266) - i64.load $64=, 288($312) - i64.load $65=, 272($312) - i64.load $66=, 304($312) - i64.load $86=, 256($312) - i64.load $107=, 320($312) - i64.load $108=, 448($312) - i32.const $push485=, 8 - i32.const $296=, 736 - i32.add $296=, $312, $296 - i32.add $push283=, $296, $pop485 - i64.load $129=, 0($pop283) - i32.const $push484=, 8 - i32.const $297=, 720 - i32.add $297=, $312, $297 - i32.add $push284=, $297, $pop484 - i64.load $130=, 0($pop284) - i64.load $37=, 864($312) - i64.load $38=, 848($312) - i64.load $39=, 880($312) - i32.const $push483=, 8 - i32.const $298=, 752 - i32.add $298=, $312, $298 - i32.add $push286=, $298, $pop483 - i64.load $131=, 0($pop286) - i64.load $122=, 736($312) - i64.load $123=, 720($312) - i64.load $124=, 752($312) - i32.const $push482=, 8 - i32.const $299=, 592 - i32.add $299=, $312, $299 - i32.add $push289=, $299, $pop482 - i64.load $132=, 0($pop289) - i32.const $push481=, 8 - i32.const $300=, 608 - i32.add $300=, $312, $300 - i32.add $push290=, $300, $pop481 - i64.load $133=, 0($pop290) - i32.const $push480=, 8 - i32.const $301=, 624 - i32.add $301=, $312, $301 - i32.add $push292=, $301, $pop480 - i64.load $134=, 0($pop292) - i32.const $push479=, 8 - i32.const $302=, 688 - i32.add $302=, $312, $302 - i32.add $push295=, $302, $pop479 - i64.load $135=, 0($pop295) - i32.const $push478=, 8 - i32.const $303=, 640 - i32.add $303=, $312, $303 - i32.add $push310=, $303, $pop478 - i64.load $141=, 0($pop310) - i32.const $push477=, 8 - i32.const $304=, 656 - i32.add $304=, $312, $304 - i32.add $push311=, $304, $pop477 - i64.load $142=, 0($pop311) - i64.load $99=, 768($312) - i64.load $100=, 784($312) - i64.load $101=, 800($312) - i32.const $push476=, 8 - i32.const $305=, 672 - i32.add $305=, $312, $305 - i32.add $push313=, $305, $pop476 - i64.load $143=, 0($pop313) - i64.load $136=, 640($312) - i64.load $137=, 656($312) - i64.load $138=, 672($312) - i64.load $43=, 816($312) - i64.load $128=, 688($312) - i32.const $push475=, 8 - i32.const $306=, 576 - i32.add $306=, $312, $306 - i32.add $push316=, $306, $pop475 - i64.load $144=, 0($pop316) - i64.load $103=, 832($312) - i64.load $140=, 704($312) - i32.const $push474=, 8 - i32.const $307=, 704 - i32.add $307=, $312, $307 - i32.add $push319=, $307, $pop474 - i64.load $145=, 0($pop319) - i32.const $push473=, 8 - i32.const $308=, 528 - i32.add $308=, $312, $308 - i32.add $push329=, $308, $pop473 - i64.load $149=, 0($pop329) - i32.const $push472=, 8 - i32.const $309=, 544 - i32.add $309=, $312, $309 - i32.add $push330=, $309, $pop472 - i64.load $150=, 0($pop330) - i32.const $push471=, 8 - i32.const $310=, 560 - i32.add $310=, $312, $310 - i32.add $push332=, $310, $pop471 - i64.load $151=, 0($pop332) - i64.load $40=, 1008($312) - i64.load $41=, 960($312) - i64.load $42=, 976($312) - i64.load $56=, 912($312) - i64.load $57=, 928($312) - i64.load $58=, 944($312) - i64.load $85=, 896($312) - i64.load $102=, 992($312) - i64.load $125=, 592($312) - i64.load $126=, 608($312) - i64.load $127=, 624($312) - i64.load $139=, 576($312) - i64.load $146=, 528($312) - i64.load $147=, 544($312) - i64.load $148=, 560($312) - i64.load $152=, 512($312) - i32.const $push470=, 8 - i32.add $push345=, $0, $pop470 - i32.const $push469=, 8 - i32.const $311=, 512 - i32.add $311=, $312, $311 - i32.add $push340=, $311, $pop469 + .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 $push468=, 1024 + i32.sub $push725=, $pop467, $pop468 + i32.store $push920=, 0($pop469), $pop725 + tee_local $push919=, $33=, $pop920 + 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.const $push475=, 528 + i32.add $push476=, $33, $pop475 + call __ashlti3@FUNCTION, $pop476, $3, $4, $34 + i32.const $push477=, 544 + i32.add $push478=, $33, $pop477 + i32.const $push0=, 128 + i32.sub $push916=, $pop0, $34 + tee_local $push915=, $42=, $pop916 + call __lshrti3@FUNCTION, $pop478, $1, $2, $pop915 + i32.const $push479=, 560 + i32.add $push480=, $33, $pop479 + i32.const $push1=, -128 + i32.add $push914=, $34, $pop1 + tee_local $push913=, $43=, $pop914 + call __ashlti3@FUNCTION, $pop480, $1, $2, $pop913 + i32.const $push481=, 736 + i32.add $push482=, $33, $pop481 + i32.const $push2=, 384 + i32.sub $push912=, $pop2, $34 + tee_local $push911=, $44=, $pop912 + call __lshrti3@FUNCTION, $pop482, $1, $2, $pop911 + i32.const $push483=, 720 + i32.add $push484=, $33, $pop483 + i32.const $push3=, -256 + i32.add $push910=, $34, $pop3 + tee_local $push909=, $35=, $pop910 + call __ashlti3@FUNCTION, $pop484, $3, $4, $pop909 + i32.const $push485=, 752 + i32.add $push486=, $33, $pop485 + i32.const $push4=, -384 + i32.add $push908=, $34, $pop4 + tee_local $push907=, $40=, $pop908 + call __ashlti3@FUNCTION, $pop486, $1, $2, $pop907 + i32.const $push487=, 592 + i32.add $push488=, $33, $pop487 + call __ashlti3@FUNCTION, $pop488, $7, $8, $34 + i32.const $push489=, 608 + i32.add $push490=, $33, $pop489 + call __lshrti3@FUNCTION, $pop490, $5, $6, $42 + i32.const $push491=, 624 + i32.add $push492=, $33, $pop491 + call __ashlti3@FUNCTION, $pop492, $5, $6, $43 + i32.const $push493=, 688 + i32.add $push494=, $33, $pop493 + i32.const $push5=, 256 + i32.sub $push906=, $pop5, $34 + tee_local $push905=, $36=, $pop906 + call __lshrti3@FUNCTION, $pop494, $3, $4, $pop905 + i32.const $push495=, 640 + i32.add $push496=, $33, $pop495 + call __lshrti3@FUNCTION, $pop496, $1, $2, $36 + 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.const $push499=, 672 + i32.add $push500=, $33, $pop499 + call __lshrti3@FUNCTION, $pop500, $3, $4, $42 + i32.const $push501=, 576 + i32.add $push502=, $33, $pop501 + call __ashlti3@FUNCTION, $pop502, $5, $6, $34 + i32.const $push503=, 704 + i32.add $push504=, $33, $pop503 + call __ashlti3@FUNCTION, $pop504, $1, $2, $35 + i32.const $push505=, 480 + i32.add $push506=, $33, $pop505 + i32.const $push6=, 896 + i32.sub $push7=, $pop6, $34 + call __lshrti3@FUNCTION, $pop506, $1, $2, $pop7 + i32.const $push507=, 464 + i32.add $push508=, $33, $pop507 + i32.const $push8=, -768 + i32.add $push901=, $34, $pop8 + tee_local $push900=, $37=, $pop901 + call __ashlti3@FUNCTION, $pop508, $3, $4, $pop900 + i32.const $push509=, 496 + i32.add $push510=, $33, $pop509 + i32.const $push9=, -896 + i32.add $push10=, $34, $pop9 + call __ashlti3@FUNCTION, $pop510, $1, $2, $pop10 + i32.const $push511=, 352 + i32.add $push512=, $33, $pop511 + i32.const $push11=, 640 + i32.sub $push899=, $pop11, $34 + tee_local $push898=, $46=, $pop899 + call __lshrti3@FUNCTION, $pop512, $5, $6, $pop898 + i32.const $push513=, 336 + i32.add $push514=, $33, $pop513 + i32.const $push12=, -512 + i32.add $push897=, $34, $pop12 + tee_local $push896=, $38=, $pop897 + call __ashlti3@FUNCTION, $pop514, $7, $8, $pop896 + i32.const $push515=, 368 + i32.add $push516=, $33, $pop515 + i32.const $push13=, -640 + i32.add $push895=, $34, $pop13 + tee_local $push894=, $52=, $pop895 + call __ashlti3@FUNCTION, $pop516, $5, $6, $pop894 + i32.const $push517=, 432 + i32.add $push518=, $33, $pop517 + i32.const $push14=, 768 + i32.sub $push893=, $pop14, $34 + tee_local $push892=, $39=, $pop893 + call __lshrti3@FUNCTION, $pop518, $3, $4, $pop892 + i32.const $push519=, 864 + i32.add $push520=, $33, $pop519 + call __lshrti3@FUNCTION, $pop520, $9, $10, $44 + i32.const $push521=, 848 + i32.add $push522=, $33, $pop521 + call __ashlti3@FUNCTION, $pop522, $11, $12, $35 + i32.const $push523=, 880 + i32.add $push524=, $33, $pop523 + call __ashlti3@FUNCTION, $pop524, $9, $10, $40 + i32.const $push525=, 1008 + i32.add $push526=, $33, $pop525 + call __ashlti3@FUNCTION, $pop526, $15, $16, $34 + i32.const $push527=, 960 + i32.add $push528=, $33, $pop527 + call __lshrti3@FUNCTION, $pop528, $13, $14, $42 + i32.const $push529=, 976 + i32.add $push530=, $33, $pop529 + call __ashlti3@FUNCTION, $pop530, $13, $14, $43 + i32.const $push531=, 816 + i32.add $push532=, $33, $pop531 + call __lshrti3@FUNCTION, $pop532, $11, $12, $36 + i32.const $push533=, 240 + i32.add $push534=, $33, $pop533 + i32.const $push15=, 512 + i32.sub $push891=, $pop15, $34 + tee_local $push890=, $40=, $pop891 + call __lshrti3@FUNCTION, $pop534, $7, $8, $pop890 + i32.const $push535=, 192 + i32.add $push536=, $33, $pop535 + call __lshrti3@FUNCTION, $pop536, $5, $6, $40 + 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.const $push539=, 224 + i32.add $push540=, $33, $pop539 + call __lshrti3@FUNCTION, $pop540, $7, $8, $44 + i32.const $push541=, 768 + i32.add $push542=, $33, $pop541 + call __lshrti3@FUNCTION, $pop542, $9, $10, $36 + i32.const $push543=, 784 + i32.add $push544=, $33, $pop543 + call __ashlti3@FUNCTION, $pop544, $11, $12, $51 + i32.const $push545=, 800 + i32.add $push546=, $33, $pop545 + call __lshrti3@FUNCTION, $pop546, $11, $12, $42 + i32.const $push547=, 992 + i32.add $push548=, $33, $pop547 + call __ashlti3@FUNCTION, $pop548, $13, $14, $34 + i32.const $push549=, 832 + i32.add $push550=, $33, $pop549 + call __ashlti3@FUNCTION, $pop550, $9, $10, $35 + i32.const $push551=, 384 + i32.add $push552=, $33, $pop551 + call __lshrti3@FUNCTION, $pop552, $1, $2, $39 + i32.const $push553=, 400 + i32.add $push554=, $33, $pop553 + i32.const $push886=, 128 + i32.sub $push16=, $pop886, $39 + call __ashlti3@FUNCTION, $pop554, $3, $4, $pop16 + i32.const $push555=, 416 + i32.add $push556=, $33, $pop555 + call __lshrti3@FUNCTION, $pop556, $3, $4, $46 + i32.const $push557=, 320 + i32.add $push558=, $33, $pop557 + call __ashlti3@FUNCTION, $pop558, $5, $6, $38 + i32.const $push559=, 448 + i32.add $push560=, $33, $pop559 + call __ashlti3@FUNCTION, $pop560, $1, $2, $37 + i32.const $push561=, 128 + i32.add $push562=, $33, $pop561 + call __lshrti3@FUNCTION, $pop562, $5, $6, $36 + i32.const $push563=, 144 + i32.add $push564=, $33, $pop563 + i32.const $push885=, 384 + i32.sub $push17=, $pop885, $40 + 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.const $push567=, 16 + i32.add $push568=, $33, $pop567 + call __ashlti3@FUNCTION, $pop568, $3, $4, $45 + i32.const $push569=, 32 + i32.add $push570=, $33, $pop569 + call __lshrti3@FUNCTION, $pop570, $3, $4, $44 + 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.const $push573=, 896 + i32.add $push574=, $33, $pop573 + call __ashlti3@FUNCTION, $pop574, $9, $10, $34 + i32.const $push575=, 256 + i32.add $push576=, $33, $pop575 + call __ashlti3@FUNCTION, $pop576, $1, $2, $38 + i32.const $push577=, 912 + i32.add $push578=, $33, $pop577 + call __ashlti3@FUNCTION, $pop578, $11, $12, $34 + i32.const $push579=, 928 + i32.add $push580=, $33, $pop579 + call __lshrti3@FUNCTION, $pop580, $9, $10, $42 + i32.const $push581=, 944 + i32.add $push582=, $33, $pop581 + call __ashlti3@FUNCTION, $pop582, $9, $10, $43 + i32.const $push583=, 80 + i32.add $push584=, $33, $pop583 + call __ashlti3@FUNCTION, $pop584, $7, $8, $41 + i32.const $push585=, 96 + i32.add $push586=, $33, $pop585 + i32.const $push881=, 128 + i32.sub $push18=, $pop881, $41 + call __lshrti3@FUNCTION, $pop586, $5, $6, $pop18 + i32.const $push587=, 112 + i32.add $push588=, $33, $pop587 + call __ashlti3@FUNCTION, $pop588, $5, $6, $45 + i32.const $push589=, 48 + i32.add $push590=, $33, $pop589 + call __lshrti3@FUNCTION, $pop590, $3, $4, $40 + i32.const $push591=, 176 + i32.add $push592=, $33, $pop591 + call __lshrti3@FUNCTION, $pop592, $7, $8, $36 + i32.const $push593=, 288 + i32.add $push594=, $33, $pop593 + call __lshrti3@FUNCTION, $pop594, $1, $2, $46 + i32.const $push595=, 272 + i32.add $push596=, $33, $pop595 + call __ashlti3@FUNCTION, $pop596, $3, $4, $38 + i32.const $push597=, 304 + i32.add $push598=, $33, $pop597 + call __ashlti3@FUNCTION, $pop598, $1, $2, $52 + 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 + 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 + i64.store $drop=, 0($pop26), $pop25 + i64.load $push27=, 512($33) + i64.const $push868=, 0 + i64.select $push28=, $pop27, $pop868, $42 + i64.const $push867=, 0 + i64.select $push29=, $pop28, $pop867, $43 + i64.const $push866=, 0 + i64.select $push30=, $pop29, $pop866, $44 + 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 + i64.load $push32=, 0($pop31) + i32.const $push603=, 544 + i32.add $push604=, $33, $pop603 + i32.const $push864=, 8 + i32.add $push33=, $pop604, $pop864 + 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 + 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.const $push861=, 0 + i64.select $push41=, $pop40, $pop861, $44 + 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.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.const $push859=, 0 + i64.select $push51=, $pop50, $pop859, $44 + 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 + i64.load $push64=, 0($pop63) + i32.const $push615=, 608 + i32.add $push616=, $33, $pop615 + i32.const $push857=, 8 + i32.add $push65=, $pop616, $pop857 + 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 + i64.load $push69=, 0($pop68) + i64.select $push70=, $pop67, $pop69, $42 + i64.select $push71=, $pop70, $8, $34 + i32.const $push619=, 688 + i32.add $push620=, $33, $pop619 + i32.const $push855=, 8 + i32.add $push72=, $pop620, $pop855 + 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.or $push75=, $pop71, $pop74 + i32.const $push609=, 720 + i32.add $push610=, $33, $pop609 + i32.const $push850=, 8 + i32.add $push56=, $pop610, $pop850 + i64.load $push57=, 0($pop56) + i32.const $push607=, 736 + i32.add $push608=, $33, $pop607 + i32.const $push849=, 8 + i32.add $push54=, $pop608, $pop849 + 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 + 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 + 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.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.or $push95=, $pop92, $pop94 + i64.load $push82=, 720($33) + i64.load $push81=, 736($33) + 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.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 + i64.load $push111=, 0($pop110) + i64.const $push840=, 0 + i64.select $push112=, $pop111, $pop840, $42 + i32.const $push621=, 640 + i32.add $push622=, $33, $pop621 + i32.const $push839=, 8 + i32.add $push101=, $pop622, $pop839 + i64.load $push102=, 0($pop101) + i32.const $push623=, 656 + i32.add $push624=, $33, $pop623 + i32.const $push838=, 8 + i32.add $push103=, $pop624, $pop838 + 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 + i64.load $push107=, 0($pop106) + i64.select $push108=, $pop105, $pop107, $46 + i64.select $push109=, $pop108, $2, $36 + i64.or $push113=, $pop112, $pop109 + i32.const $push629=, 704 + i32.add $push630=, $33, $pop629 + i32.const $push836=, 8 + i32.add $push114=, $pop630, $pop836 + 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.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.or $push124=, $pop122, $pop123 + i64.load $push125=, 672($33) + i64.select $push126=, $pop124, $pop125, $46 + i64.select $push127=, $pop126, $1, $36 + 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.const $push831=, 0 + i64.select $push135=, $pop134, $pop831, $44 + 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 + i64.load $push172=, 0($pop171) + i32.const $push653=, 960 + i32.add $push654=, $33, $pop653 + i32.const $push829=, 8 + i32.add $push173=, $pop654, $pop829 + 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 + i64.load $push177=, 0($pop176) + i64.select $push178=, $pop175, $pop177, $42 + i64.select $push179=, $pop178, $16, $34 + i32.const $push657=, 816 + i32.add $push658=, $33, $pop657 + i32.const $push827=, 8 + i32.add $push180=, $pop658, $pop827 + i64.load $push181=, 0($pop180) + i64.const $push826=, 0 + i64.select $push182=, $pop181, $pop826, $46 + i64.or $push183=, $pop179, $pop182 + i32.const $push647=, 848 + i32.add $push648=, $33, $pop647 + i32.const $push825=, 8 + i32.add $push164=, $pop648, $pop825 + i64.load $push165=, 0($pop164) + i32.const $push645=, 864 + i32.add $push646=, $33, $pop645 + i32.const $push824=, 8 + i32.add $push162=, $pop646, $pop824 + 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 + 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 + i32.const $push659=, 240 + i32.add $push660=, $33, $pop659 + i32.const $push822=, 8 + i32.add $push186=, $pop660, $pop822 + 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.or $push190=, $pop185, $pop189 + i32.const $push639=, 336 + i32.add $push640=, $33, $pop639 + i32.const $push813=, 8 + i32.add $push149=, $pop640, $pop813 + i64.load $push150=, 0($pop149) + i32.const $push637=, 352 + i32.add $push638=, $33, $pop637 + i32.const $push812=, 8 + i32.add $push147=, $pop638, $pop812 + 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 + 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 $push643=, 432 + i32.add $push644=, $33, $pop643 + i32.const $push807=, 8 + i32.add $push156=, $pop644, $pop807 + 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.or $push159=, $pop155, $pop158 + i32.const $push633=, 464 + i32.add $push634=, $33, $pop633 + i32.const $push802=, 8 + i32.add $push140=, $pop634, $pop802 + i64.load $push141=, 0($pop140) + i32.const $push631=, 480 + i32.add $push632=, $33, $pop631 + i32.const $push801=, 8 + i32.add $push138=, $pop632, $pop801 + 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 + 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 + 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.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.or $push226=, $pop223, $pop225 + i64.load $push213=, 848($33) + i64.load $push212=, 864($33) + 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.const $push791=, 0 + i64.select $push231=, $pop230, $pop791, $52 + i64.or $push232=, $pop228, $pop231 + i64.load $push202=, 336($33) + i64.load $push201=, 352($33) + 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.or $push209=, $pop206, $pop208 + i64.load $push196=, 464($33) + i64.load $push195=, 480($33) + 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.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 + i64.load $push257=, 0($pop256) + i64.const $push788=, 0 + i64.select $push258=, $pop257, $pop788, $42 + i32.const $push667=, 768 + i32.add $push668=, $33, $pop667 + i32.const $push787=, 8 + i32.add $push247=, $pop668, $pop787 + i64.load $push248=, 0($pop247) + i32.const $push669=, 784 + i32.add $push670=, $33, $pop669 + i32.const $push786=, 8 + i32.add $push249=, $pop670, $pop786 + 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 + i64.load $push253=, 0($pop252) + i64.select $push254=, $pop251, $pop253, $46 + i64.select $push255=, $pop254, $10, $36 + i64.or $push259=, $pop258, $pop255 + i32.const $push675=, 832 + i32.add $push676=, $33, $pop675 + i32.const $push784=, 8 + i32.add $push260=, $pop676, $pop784 + 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 + i32.const $push661=, 192 + i32.add $push662=, $33, $pop661 + i32.const $push782=, 8 + i32.add $push237=, $pop662, $pop782 + i64.load $push238=, 0($pop237) + i32.const $push663=, 208 + i32.add $push664=, $33, $pop663 + i32.const $push781=, 8 + i32.add $push239=, $pop664, $pop781 + 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 + 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.or $push265=, $pop264, $pop246 + i32.const $push683=, 320 + i32.add $push684=, $33, $pop683 + i32.const $push778=, 8 + i32.add $push275=, $pop684, $pop778 + i64.load $push276=, 0($pop275) + i64.const $push777=, 0 + i64.select $push277=, $pop276, $pop777, $48 + i32.const $push677=, 384 + i32.add $push678=, $33, $pop677 + i32.const $push776=, 8 + i32.add $push266=, $pop678, $pop776 + i64.load $push267=, 0($pop266) + i32.const $push679=, 400 + i32.add $push680=, $33, $pop679 + i32.const $push775=, 8 + i32.add $push268=, $pop680, $pop775 + 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 + i64.load $push272=, 0($pop271) + i64.select $push273=, $pop270, $pop272, $49 + i64.select $push274=, $pop273, $2, $39 + i64.or $push278=, $pop277, $pop274 + i32.const $push685=, 448 + i32.add $push686=, $33, $pop685 + i32.const $push773=, 8 + i32.add $push279=, $pop686, $pop773 + 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.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.or $push297=, $pop295, $pop296 + i64.load $push298=, 800($33) + i64.select $push299=, $pop297, $pop298, $46 + i64.select $push300=, $pop299, $9, $36 + 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.const $push769=, 0 + i64.select $push294=, $pop293, $pop769, $52 + i64.or $push308=, $pop307, $pop294 + i64.load $push315=, 320($33) + i64.const $push768=, 0 + i64.select $push316=, $pop315, $pop768, $48 + i64.load $push309=, 384($33) + i64.load $push310=, 400($33) + i64.or $push311=, $pop309, $pop310 + i64.load $push312=, 416($33) + i64.select $push313=, $pop311, $pop312, $49 + i64.select $push314=, $pop313, $1, $39 + 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.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 + 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.load $push336=, 0($pop335) + i32.const $push693=, 16 + i32.add $push694=, $33, $pop693 + i32.const $push762=, 8 + i32.add $push337=, $pop694, $pop762 + 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 i64.load $push341=, 0($pop340) - i64.const $push37=, 0 - i64.const $push468=, 128 - i64.lt_u $push56=, $17, $pop468 - tee_local $push467=, $168=, $pop56 - i64.select $push342=, $pop341, $pop37, $pop467 - i64.const $push466=, 0 - i64.const $push465=, 256 - i64.lt_u $push64=, $17, $pop465 - tee_local $push464=, $167=, $pop64 - i64.select $push343=, $pop342, $pop466, $pop464 - i64.const $push463=, 0 - i64.const $push462=, 512 - i64.lt_u $push72=, $17, $pop462 - tee_local $push461=, $166=, $pop72 - i64.select $push344=, $pop343, $pop463, $pop461 - i64.store $drop=, 0($pop345), $pop344 - i64.const $push460=, 0 - i64.select $push337=, $152, $pop460, $168 - i64.const $push459=, 0 - i64.select $push338=, $pop337, $pop459, $167 - i64.const $push458=, 0 - i64.select $push339=, $pop338, $pop458, $166 - i64.store $drop=, 0($0), $pop339 - i32.const $push346=, 24 - i32.add $push347=, $0, $pop346 - i64.or $push331=, $149, $150 - i64.select $push333=, $pop331, $151, $168 - i64.const $push457=, 0 - i64.eq $push59=, $17, $pop457 - tee_local $push456=, $165=, $pop59 - i64.select $push334=, $4, $pop333, $pop456 - i64.const $push455=, 0 - i64.select $push335=, $pop334, $pop455, $167 - i64.const $push454=, 0 - i64.select $push336=, $pop335, $pop454, $166 - i64.store $drop=, 0($pop347), $pop336 - i32.const $push348=, 16 - i32.add $push349=, $0, $pop348 - i64.or $push324=, $146, $147 - i64.select $push325=, $pop324, $148, $168 - i64.select $push326=, $3, $pop325, $165 - i64.const $push453=, 0 - i64.select $push327=, $pop326, $pop453, $167 - i64.const $push452=, 0 - i64.select $push328=, $pop327, $pop452, $166 - i64.store $drop=, 0($pop349), $pop328 - i32.const $push350=, 56 - i32.add $push351=, $0, $pop350 - i64.or $push291=, $132, $133 - i64.select $push293=, $pop291, $134, $168 - i64.select $push294=, $8, $pop293, $165 - i64.const $push451=, 0 - i64.const $push450=, 128 - i64.lt_u $push61=, $172, $pop450 - tee_local $push449=, $164=, $pop61 - i64.select $push296=, $135, $pop451, $pop449 - i64.or $push297=, $pop294, $pop296 - i64.or $push285=, $130, $129 - i64.const $push448=, 128 - i64.lt_u $push51=, $176, $pop448 - tee_local $push447=, $163=, $pop51 - i64.select $push287=, $pop285, $131, $pop447 - i64.const $push446=, 0 - i64.eq $push54=, $176, $pop446 - tee_local $push445=, $153=, $pop54 - i64.select $push288=, $4, $pop287, $pop445 - i64.select $push298=, $pop297, $pop288, $167 - i64.select $push299=, $8, $pop298, $165 - i64.const $push444=, 0 - i64.select $push300=, $pop299, $pop444, $166 - i64.store $drop=, 0($pop351), $pop300 - i32.const $push352=, 48 - i32.add $push353=, $0, $pop352 - i64.or $push275=, $125, $126 - i64.select $push276=, $pop275, $127, $168 - i64.select $push277=, $7, $pop276, $165 - i64.const $push443=, 0 - i64.select $push278=, $128, $pop443, $164 - i64.or $push279=, $pop277, $pop278 - i64.or $push272=, $123, $122 - i64.select $push273=, $pop272, $124, $163 - i64.select $push274=, $3, $pop273, $153 - i64.select $push280=, $pop279, $pop274, $167 - i64.select $push281=, $7, $pop280, $165 - i64.const $push442=, 0 - i64.select $push282=, $pop281, $pop442, $166 - i64.store $drop=, 0($pop353), $pop282 - i32.const $push354=, 40 - i32.add $push355=, $0, $pop354 - i64.const $push441=, 0 - i64.select $push317=, $144, $pop441, $168 - i64.or $push312=, $141, $142 - i64.select $push314=, $pop312, $143, $164 - i64.const $push440=, 0 - i64.eq $push170=, $172, $pop440 - tee_local $push439=, $162=, $pop170 - i64.select $push315=, $2, $pop314, $pop439 - i64.or $push318=, $pop317, $pop315 - i64.const $push438=, 0 - i64.select $push320=, $145, $pop438, $163 - i64.select $push321=, $pop318, $pop320, $167 - i64.select $push322=, $6, $pop321, $165 - i64.const $push437=, 0 - i64.select $push323=, $pop322, $pop437, $166 - i64.store $drop=, 0($pop355), $pop323 - i32.const $push356=, 32 - i32.add $push357=, $0, $pop356 - i64.const $push436=, 0 - i64.select $push304=, $139, $pop436, $168 - i64.or $push301=, $136, $137 - i64.select $push302=, $pop301, $138, $164 - i64.select $push303=, $1, $pop302, $162 - i64.or $push305=, $pop304, $pop303 - i64.const $push435=, 0 - i64.select $push306=, $140, $pop435, $163 - i64.select $push307=, $pop305, $pop306, $167 - i64.select $push308=, $5, $pop307, $165 - i64.const $push434=, 0 - i64.select $push309=, $pop308, $pop434, $166 - i64.store $drop=, 0($pop357), $pop309 - i32.const $push358=, 120 - i32.add $push359=, $0, $pop358 - i64.or $push101=, $51, $52 - i64.select $push103=, $pop101, $53, $168 - i64.select $push104=, $16, $pop103, $165 - i64.const $push433=, 0 - i64.select $push106=, $54, $pop433, $164 - i64.or $push107=, $pop104, $pop106 - i64.or $push95=, $49, $48 - i64.select $push97=, $pop95, $50, $163 - i64.select $push98=, $12, $pop97, $153 - i64.select $push108=, $pop107, $pop98, $167 - i64.select $push109=, $16, $pop108, $165 - i64.const $push432=, 0 - i64.const $push431=, 128 - i64.lt_u $push67=, $171, $pop431 - tee_local $push430=, $161=, $pop67 - i64.select $push111=, $55, $pop432, $pop430 - i64.const $push429=, 0 - i64.const $push428=, 256 - i64.lt_u $push69=, $171, $pop428 - tee_local $push427=, $160=, $pop69 - i64.select $push112=, $pop111, $pop429, $pop427 - i64.or $push113=, $pop109, $pop112 - i64.or $push84=, $45, $175 - i64.const $push426=, 128 - i64.lt_u $push40=, $180, $pop426 - tee_local $push425=, $159=, $pop40 - i64.select $push86=, $pop84, $46, $pop425 - i64.const $push424=, 0 - i64.eq $push43=, $180, $pop424 - tee_local $push423=, $158=, $pop43 - i64.select $push87=, $8, $pop86, $pop423 - i64.const $push422=, 0 - i64.const $push421=, 128 - i64.lt_u $push45=, $178, $pop421 - tee_local $push420=, $157=, $pop45 - i64.select $push89=, $47, $pop422, $pop420 - i64.or $push90=, $pop87, $pop89 - i64.or $push78=, $177, $174 - i64.const $push419=, 128 - i64.lt_u $push34=, $182, $pop419 - tee_local $push418=, $156=, $pop34 - i64.select $push80=, $pop78, $179, $pop418 - i64.const $push417=, 0 - i64.eq $push38=, $182, $pop417 - tee_local $push416=, $155=, $pop38 - i64.select $push81=, $4, $pop80, $pop416 - i64.const $push415=, 256 - i64.lt_u $push48=, $180, $pop415 - tee_local $push414=, $154=, $pop48 - i64.select $push91=, $pop90, $pop81, $pop414 - i64.select $push92=, $8, $pop91, $158 - i64.select $push114=, $pop113, $pop92, $166 - i64.select $push115=, $16, $pop114, $165 - i64.store $drop=, 0($pop359), $pop115 - i32.const $push360=, 112 - i32.add $push361=, $0, $pop360 - i64.or $push57=, $40, $41 - i64.select $push58=, $pop57, $42, $168 - i64.select $push60=, $15, $pop58, $165 - i64.const $push413=, 0 - i64.select $push62=, $43, $pop413, $164 - i64.or $push63=, $pop60, $pop62 - i64.or $push52=, $38, $37 - i64.select $push53=, $pop52, $39, $163 - i64.select $push55=, $11, $pop53, $153 - i64.select $push65=, $pop63, $pop55, $167 - i64.select $push66=, $15, $pop65, $165 - i64.const $push412=, 0 - i64.select $push68=, $44, $pop412, $161 - i64.const $push411=, 0 - i64.select $push70=, $pop68, $pop411, $160 - i64.or $push71=, $pop66, $pop70 - i64.or $push41=, $34, $33 - i64.select $push42=, $pop41, $35, $159 - i64.select $push44=, $7, $pop42, $158 - i64.const $push410=, 0 - i64.select $push46=, $36, $pop410, $157 - i64.or $push47=, $pop44, $pop46 - i64.or $push35=, $181, $173 - i64.select $push36=, $pop35, $169, $156 - i64.select $push39=, $3, $pop36, $155 - i64.select $push49=, $pop47, $pop39, $154 - i64.select $push50=, $7, $pop49, $158 - i64.select $push73=, $pop71, $pop50, $166 - i64.select $push74=, $15, $pop73, $165 - i64.store $drop=, 0($pop361), $pop74 - i32.const $push362=, 104 - i32.add $push363=, $0, $pop362 - i64.const $push409=, 0 - i64.select $push250=, $115, $pop409, $168 - i64.or $push245=, $112, $113 - i64.select $push247=, $pop245, $114, $164 - i64.select $push248=, $10, $pop247, $162 - i64.or $push251=, $pop250, $pop248 - i64.const $push408=, 0 - i64.select $push253=, $116, $pop408, $163 - i64.select $push254=, $pop251, $pop253, $167 - i64.select $push255=, $14, $pop254, $165 - i64.or $push238=, $109, $110 - i64.select $push240=, $pop238, $111, $161 - i64.const $push407=, 0 - i64.eq $push129=, $171, $pop407 - tee_local $push406=, $153=, $pop129 - i64.select $push241=, $6, $pop240, $pop406 - i64.const $push405=, 0 - i64.select $push242=, $pop241, $pop405, $160 - i64.or $push256=, $pop255, $pop242 - i64.const $push404=, 0 - i64.select $push264=, $120, $pop404, $159 - i64.or $push259=, $117, $118 - i64.select $push261=, $pop259, $119, $157 - i64.const $push403=, 0 - i64.eq $push227=, $178, $pop403 - tee_local $push402=, $155=, $pop227 - i64.select $push262=, $2, $pop261, $pop402 - i64.or $push265=, $pop264, $pop262 - i64.const $push401=, 0 - i64.select $push267=, $121, $pop401, $156 - i64.select $push268=, $pop265, $pop267, $154 - i64.select $push269=, $6, $pop268, $158 - i64.select $push270=, $pop256, $pop269, $166 - i64.select $push271=, $14, $pop270, $165 - i64.store $drop=, 0($pop363), $pop271 - i32.const $push364=, 96 - i32.add $push365=, $0, $pop364 - i64.const $push400=, 0 - i64.select $push219=, $102, $pop400, $168 - i64.or $push216=, $99, $100 - i64.select $push217=, $pop216, $101, $164 - i64.select $push218=, $9, $pop217, $162 - i64.or $push220=, $pop219, $pop218 - i64.const $push399=, 0 - i64.select $push221=, $103, $pop399, $163 - i64.select $push222=, $pop220, $pop221, $167 - i64.select $push223=, $13, $pop222, $165 - i64.or $push212=, $96, $97 - i64.select $push213=, $pop212, $98, $161 - i64.select $push214=, $5, $pop213, $153 - i64.const $push398=, 0 - i64.select $push215=, $pop214, $pop398, $160 - i64.or $push224=, $pop223, $pop215 - i64.const $push397=, 0 - i64.select $push229=, $107, $pop397, $159 - i64.or $push225=, $104, $105 - i64.select $push226=, $pop225, $106, $157 - i64.select $push228=, $1, $pop226, $155 - i64.or $push230=, $pop229, $pop228 - i64.const $push396=, 0 - i64.select $push231=, $108, $pop396, $156 - i64.select $push232=, $pop230, $pop231, $154 - i64.select $push233=, $5, $pop232, $158 - i64.select $push234=, $pop224, $pop233, $166 - i64.select $push235=, $13, $pop234, $165 - i64.store $drop=, 0($pop365), $pop235 - i32.const $push366=, 72 - i32.add $push367=, $0, $pop366 - i64.const $push395=, 0 - i64.select $push204=, $94, $pop395, $168 - i64.const $push394=, 0 - i64.select $push205=, $pop204, $pop394, $167 - i64.or $push194=, $90, $91 - i64.select $push196=, $pop194, $92, $161 - i64.select $push197=, $2, $pop196, $153 - i64.const $push393=, 0 - i64.const $push392=, 128 - i64.lt_u $push120=, $170, $pop392 - tee_local $push391=, $163=, $pop120 - i64.select $push199=, $93, $pop393, $pop391 - i64.or $push200=, $pop197, $pop199 - i64.or $push188=, $87, $88 - i64.select $push190=, $pop188, $89, $164 - i64.select $push191=, $6, $pop190, $162 - i64.select $push201=, $pop200, $pop191, $160 - i64.select $push202=, $2, $pop201, $153 - i64.or $push206=, $pop205, $pop202 - i64.const $push390=, 0 - i64.select $push208=, $95, $pop390, $159 - i64.const $push389=, 0 - i64.select $push209=, $pop208, $pop389, $154 - i64.select $push210=, $pop206, $pop209, $166 - i64.select $push211=, $10, $pop210, $165 - i64.store $drop=, 0($pop367), $pop211 - i32.const $push368=, 64 - i32.add $push369=, $0, $pop368 - i64.const $push388=, 0 - i64.select $push179=, $85, $pop388, $168 - i64.const $push387=, 0 - i64.select $push180=, $pop179, $pop387, $167 - i64.or $push172=, $81, $82 - i64.select $push173=, $pop172, $83, $161 - i64.select $push174=, $1, $pop173, $153 - i64.const $push386=, 0 - i64.select $push175=, $84, $pop386, $163 - i64.or $push176=, $pop174, $pop175 - i64.or $push168=, $78, $79 - i64.select $push169=, $pop168, $80, $164 - i64.select $push171=, $5, $pop169, $162 - i64.select $push177=, $pop176, $pop171, $160 - i64.select $push178=, $1, $pop177, $153 - i64.or $push181=, $pop180, $pop178 - i64.const $push385=, 0 - i64.select $push182=, $86, $pop385, $159 - i64.const $push384=, 0 - i64.select $push183=, $pop182, $pop384, $154 - i64.select $push184=, $pop181, $pop183, $166 - i64.select $push185=, $9, $pop184, $165 - i64.store $drop=, 0($pop369), $pop185 - i32.const $push370=, 88 - i32.add $push371=, $0, $pop370 - i64.or $push140=, $67, $68 - i64.select $push142=, $pop140, $69, $168 - i64.select $push143=, $12, $pop142, $165 - i64.const $push383=, 0 - i64.select $push144=, $pop143, $pop383, $167 - i64.const $push382=, 0 - i64.select $push152=, $73, $pop382, $161 - i64.or $push147=, $70, $71 - i64.select $push149=, $pop147, $72, $163 - i64.const $push381=, 0 - i64.eq $push123=, $170, $pop381 - tee_local $push380=, $162=, $pop123 - i64.select $push150=, $8, $pop149, $pop380 - i64.or $push153=, $pop152, $pop150 - i64.const $push379=, 0 - i64.select $push155=, $74, $pop379, $164 - i64.select $push156=, $pop153, $pop155, $160 - i64.select $push157=, $4, $pop156, $153 - i64.or $push158=, $pop144, $pop157 - i64.or $push161=, $76, $75 - i64.select $push163=, $pop161, $77, $159 - i64.select $push164=, $4, $pop163, $158 - i64.const $push378=, 0 - i64.select $push165=, $pop164, $pop378, $154 - i64.select $push166=, $pop158, $pop165, $166 - i64.select $push167=, $12, $pop166, $165 - i64.store $drop=, 0($pop371), $pop167 - i32.const $push372=, 80 - i32.add $push373=, $0, $pop372 - i64.or $push116=, $56, $57 - i64.select $push117=, $pop116, $58, $168 - i64.select $push118=, $11, $pop117, $165 - i64.const $push377=, 0 - i64.select $push119=, $pop118, $pop377, $167 - i64.const $push376=, 0 - i64.select $push125=, $62, $pop376, $161 - i64.or $push121=, $59, $60 - i64.select $push122=, $pop121, $61, $163 - i64.select $push124=, $7, $pop122, $162 - i64.or $push126=, $pop125, $pop124 - i64.const $push375=, 0 - i64.select $push127=, $63, $pop375, $164 - i64.select $push128=, $pop126, $pop127, $160 - i64.select $push130=, $3, $pop128, $153 - i64.or $push131=, $pop119, $pop130 - i64.or $push132=, $65, $64 - i64.select $push133=, $pop132, $66, $159 - i64.select $push134=, $3, $pop133, $158 - i64.const $push374=, 0 - i64.select $push135=, $pop134, $pop374, $154 - i64.select $push136=, $pop131, $pop135, $166 - i64.select $push137=, $11, $pop136, $165 - i64.store $drop=, 0($pop373), $pop137 - i32.const $185=, 1024 - i32.add $312=, $312, $185 - i32.const $185=, __stack_pointer - i32.store $312=, 0($185), $312 + i64.select $push342=, $pop339, $pop341, $51 + i64.select $push343=, $pop342, $2, $40 + i32.const $push697=, 64 + i32.add $push698=, $33, $pop697 + i32.const $push760=, 8 + i32.add $push344=, $pop698, $pop760 + 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.or $push347=, $pop343, $pop346 + i32.const $push687=, 128 + i32.add $push688=, $33, $pop687 + i32.const $push755=, 8 + i32.add $push326=, $pop688, $pop755 + i64.load $push327=, 0($pop326) + i32.const $push689=, 144 + i32.add $push690=, $33, $pop689 + i32.const $push754=, 8 + i32.add $push328=, $pop690, $pop754 + 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 + 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.or $push354=, $pop353, $pop349 + i32.const $push701=, 256 + i32.add $push702=, $33, $pop701 + i32.const $push752=, 8 + i32.add $push355=, $pop702, $pop752 + 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.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.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.const $push747=, 0 + i64.select $push376=, $pop375, $pop747, $35 + i64.or $push377=, $pop374, $pop376 + i64.load $push363=, 128($33) + i64.load $push364=, 144($33) + 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.or $push383=, $pop382, $pop379 + i64.load $push384=, 256($33) + i64.const $push746=, 0 + i64.select $push385=, $pop384, $pop746, $48 + i64.const $push745=, 0 + i64.select $push386=, $pop385, $pop745, $50 + i64.select $push387=, $pop383, $pop386, $44 + i64.select $push388=, $pop387, $9, $34 + 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 + i64.load $push392=, 0($pop391) + i32.const $push705=, 928 + i32.add $push706=, $33, $pop705 + i32.const $push743=, 8 + i32.add $push393=, $pop706, $pop743 + 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 + 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 + i32.const $push715=, 48 + i32.add $push716=, $33, $pop715 + i32.const $push740=, 8 + i32.add $push410=, $pop716, $pop740 + i64.load $push411=, 0($pop410) + i64.const $push739=, 0 + i64.select $push412=, $pop411, $pop739, $51 + i32.const $push709=, 80 + i32.add $push710=, $33, $pop709 + i32.const $push738=, 8 + i32.add $push401=, $pop710, $pop738 + i64.load $push402=, 0($pop401) + i32.const $push711=, 96 + i32.add $push712=, $33, $pop711 + i32.const $push737=, 8 + i32.add $push403=, $pop712, $pop737 + 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 + i64.load $push407=, 0($pop406) + i64.select $push408=, $pop405, $pop407, $35 + i64.select $push409=, $pop408, $8, $41 + i64.or $push413=, $pop412, $pop409 + i32.const $push717=, 176 + i32.add $push718=, $33, $pop717 + i32.const $push735=, 8 + i32.add $push414=, $pop718, $pop735 + 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.or $push419=, $pop400, $pop418 + i32.const $push721=, 272 + i32.add $push722=, $33, $pop721 + i32.const $push733=, 8 + i32.add $push422=, $pop722, $pop733 + i64.load $push423=, 0($pop422) + i32.const $push719=, 288 + i32.add $push720=, $33, $pop719 + i32.const $push732=, 8 + i32.add $push420=, $pop720, $pop732 + 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 + 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.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.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.const $push728=, 0 + i64.select $push448=, $pop447, $pop728, $51 + i64.load $push441=, 80($33) + i64.load $push442=, 96($33) + i64.or $push443=, $pop441, $pop442 + i64.load $push444=, 112($33) + i64.select $push445=, $pop443, $pop444, $35 + i64.select $push446=, $pop445, $7, $41 + 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.or $push454=, $pop440, $pop453 + i64.load $push456=, 272($33) + i64.load $push455=, 288($33) + 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.store $drop=, 0($pop465), $pop463 + i32.const $push472=, __stack_pointer + i32.const $push470=, 1024 + i32.add $push471=, $33, $pop470 + i32.store $drop=, 0($pop472), $pop471 return .endfunc .Lfunc_end5: diff --git a/test/llvm_autogenerated/legalize.wast b/test/llvm_autogenerated/legalize.wast index 7d299ab82..8ceba3431 100644 --- a/test/llvm_autogenerated/legalize.wast +++ b/test/llvm_autogenerated/legalize.wast @@ -3,9 +3,9 @@ (segment 4 "\10\04\00\00") ) (export "memory" memory) - (type $FUNCSIG$vijjj (func (param i32 i64 i64 i64))) - (import $__ashlti3 "env" "__ashlti3" (param i32 i64 i64 i64)) - (import $__lshrti3 "env" "__lshrti3" (param i32 i64 i64 i64)) + (type $FUNCSIG$vijji (func (param i32 i64 i64 i32))) + (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) @@ -64,2743 +64,702 @@ ) ) (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 i64) - (local $34 i64) - (local $35 i64) - (local $36 i64) - (local $37 i64) - (local $38 i64) - (local $39 i64) - (local $40 i64) - (local $41 i64) - (local $42 i64) - (local $43 i64) - (local $44 i64) - (local $45 i64) - (local $46 i64) - (local $47 i64) - (local $48 i64) - (local $49 i64) - (local $50 i64) - (local $51 i64) - (local $52 i64) - (local $53 i64) - (local $54 i64) - (local $55 i64) - (local $56 i64) - (local $57 i64) - (local $58 i64) - (local $59 i64) - (local $60 i64) - (local $61 i64) - (local $62 i64) - (local $63 i64) - (local $64 i64) - (local $65 i64) - (local $66 i64) - (local $67 i64) - (local $68 i64) - (local $69 i64) - (local $70 i64) - (local $71 i64) - (local $72 i64) - (local $73 i64) - (local $74 i64) - (local $75 i64) - (local $76 i64) - (local $77 i64) - (local $78 i64) - (local $79 i64) - (local $80 i64) - (local $81 i64) - (local $82 i64) - (local $83 i64) - (local $84 i64) - (local $85 i64) - (local $86 i64) - (local $87 i64) - (local $88 i64) - (local $89 i64) - (local $90 i64) - (local $91 i64) - (local $92 i64) - (local $93 i64) - (local $94 i64) - (local $95 i64) - (local $96 i64) - (local $97 i64) - (local $98 i64) - (local $99 i64) - (local $100 i64) - (local $101 i64) - (local $102 i64) - (local $103 i64) - (local $104 i64) - (local $105 i64) - (local $106 i64) - (local $107 i64) - (local $108 i64) - (local $109 i64) - (local $110 i64) - (local $111 i64) - (local $112 i64) - (local $113 i64) - (local $114 i64) - (local $115 i64) - (local $116 i64) - (local $117 i64) - (local $118 i64) - (local $119 i64) - (local $120 i64) - (local $121 i64) - (local $122 i64) - (local $123 i64) - (local $124 i64) - (local $125 i64) - (local $126 i64) - (local $127 i64) - (local $128 i64) - (local $129 i64) - (local $130 i64) - (local $131 i64) - (local $132 i64) - (local $133 i64) - (local $134 i64) - (local $135 i64) - (local $136 i64) - (local $137 i64) - (local $138 i64) - (local $139 i64) - (local $140 i64) - (local $141 i64) - (local $142 i64) - (local $143 i64) - (local $144 i64) - (local $145 i64) - (local $146 i64) - (local $147 i64) - (local $148 i64) - (local $149 i64) - (local $150 i64) - (local $151 i64) - (local $152 i64) - (local $153 i32) - (local $154 i32) - (local $155 i32) - (local $156 i32) - (local $157 i32) - (local $158 i32) - (local $159 i32) - (local $160 i32) - (local $161 i32) - (local $162 i32) - (local $163 i32) - (local $164 i32) - (local $165 i32) - (local $166 i32) - (local $167 i32) - (local $168 i32) - (local $169 i64) - (local $170 i64) - (local $171 i64) - (local $172 i64) - (local $173 i64) - (local $174 i64) - (local $175 i64) - (local $176 i64) - (local $177 i64) - (local $178 i64) - (local $179 i64) - (local $180 i64) - (local $181 i64) - (local $182 i64) - (local $183 i32) - (local $184 i32) - (local $185 i32) - (local $186 i32) - (local $187 i32) - (local $188 i32) - (local $189 i32) - (local $190 i32) - (local $191 i32) - (local $192 i32) - (local $193 i32) - (local $194 i32) - (local $195 i32) - (local $196 i32) - (local $197 i32) - (local $198 i32) - (local $199 i32) - (local $200 i32) - (local $201 i32) - (local $202 i32) - (local $203 i32) - (local $204 i32) - (local $205 i32) - (local $206 i32) - (local $207 i32) - (local $208 i32) - (local $209 i32) - (local $210 i32) - (local $211 i32) - (local $212 i32) - (local $213 i32) - (local $214 i32) - (local $215 i32) - (local $216 i32) - (local $217 i32) - (local $218 i32) - (local $219 i32) - (local $220 i32) - (local $221 i32) - (local $222 i32) - (local $223 i32) - (local $224 i32) - (local $225 i32) - (local $226 i32) - (local $227 i32) - (local $228 i32) - (local $229 i32) - (local $230 i32) - (local $231 i32) - (local $232 i32) - (local $233 i32) - (local $234 i32) - (local $235 i32) - (local $236 i32) - (local $237 i32) - (local $238 i32) - (local $239 i32) - (local $240 i32) - (local $241 i32) - (local $242 i32) - (local $243 i32) - (local $244 i32) - (local $245 i32) - (local $246 i32) - (local $247 i32) - (local $248 i32) - (local $249 i32) - (local $250 i32) - (local $251 i32) - (local $252 i32) - (local $253 i32) - (local $254 i32) - (local $255 i32) - (local $256 i32) - (local $257 i32) - (local $258 i32) - (local $259 i32) - (local $260 i32) - (local $261 i32) - (local $262 i32) - (local $263 i32) - (local $264 i32) - (local $265 i32) - (local $266 i32) - (local $267 i32) - (local $268 i32) - (local $269 i32) - (local $270 i32) - (local $271 i32) - (local $272 i32) - (local $273 i32) - (local $274 i32) - (local $275 i32) - (local $276 i32) - (local $277 i32) - (local $278 i32) - (local $279 i32) - (local $280 i32) - (local $281 i32) - (local $282 i32) - (local $283 i32) - (local $284 i32) - (local $285 i32) - (local $286 i32) - (local $287 i32) - (local $288 i32) - (local $289 i32) - (local $290 i32) - (local $291 i32) - (local $292 i32) - (local $293 i32) - (local $294 i32) - (local $295 i32) - (local $296 i32) - (local $297 i32) - (local $298 i32) - (local $299 i32) - (local $300 i32) - (local $301 i32) - (local $302 i32) - (local $303 i32) - (local $304 i32) - (local $305 i32) - (local $306 i32) - (local $307 i32) - (local $308 i32) - (local $309 i32) - (local $310 i32) - (local $311 i32) - (local $312 i32) - (set_local $183 - (i32.const 4) - ) - (set_local $183 - (i32.load - (get_local $183) - ) - ) - (set_local $184 - (i32.const 1024) - ) - (set_local $312 - (i32.sub - (get_local $183) - (get_local $184) - ) - ) - (set_local $184 - (i32.const 4) - ) - (set_local $312 - (i32.store - (get_local $184) - (get_local $312) - ) - ) - (set_local $186 - (i32.const 480) - ) - (set_local $186 + (local $33 i32) + (local $34 i32) + (local $35 i32) + (local $36 i32) + (local $37 i32) + (local $38 i32) + (local $39 i32) + (local $40 i32) + (local $41 i32) + (local $42 i32) + (local $43 i32) + (local $44 i32) + (local $45 i32) + (local $46 i32) + (local $47 i32) + (local $48 i32) + (local $49 i32) + (local $50 i32) + (local $51 i32) + (local $52 i32) + (call_import $__ashlti3 (i32.add - (get_local $312) - (get_local $186) + (set_local $33 + (i32.store + (i32.const 4) + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 1024) + ) + ) + ) + (i32.const 512) ) - ) - (call_import $__lshrti3 - (get_local $186) (get_local $1) (get_local $2) - (i64.sub - (i64.const 896) - (get_local $17) + (set_local $34 + (i32.wrap/i64 + (get_local $17) + ) ) ) - (set_local $187 - (i32.const 464) - ) - (set_local $187 + (call_import $__ashlti3 (i32.add - (get_local $312) - (get_local $187) + (get_local $33) + (i32.const 528) ) - ) - (call_import $__ashlti3 - (get_local $187) (get_local $3) (get_local $4) - (set_local $182 - (i64.add - (get_local $17) - (i64.const -768) - ) - ) + (get_local $34) ) - (set_local $188 - (i32.const 496) - ) - (set_local $188 + (call_import $__lshrti3 (i32.add - (get_local $312) - (get_local $188) + (get_local $33) + (i32.const 544) ) - ) - (call_import $__ashlti3 - (get_local $188) (get_local $1) (get_local $2) - (i64.add - (get_local $17) - (i64.const -896) - ) - ) - (set_local $189 - (i32.const 352) - ) - (set_local $189 - (i32.add - (get_local $312) - (get_local $189) - ) - ) - (call_import $__lshrti3 - (get_local $189) - (get_local $5) - (get_local $6) - (set_local $181 - (i64.sub - (i64.const 640) - (get_local $17) + (set_local $42 + (i32.sub + (i32.const 128) + (get_local $34) ) ) ) - (set_local $190 - (i32.const 336) - ) - (set_local $190 + (call_import $__ashlti3 (i32.add - (get_local $312) - (get_local $190) + (get_local $33) + (i32.const 560) ) - ) - (call_import $__ashlti3 - (get_local $190) - (get_local $7) - (get_local $8) - (set_local $180 - (i64.add - (get_local $17) - (i64.const -512) + (get_local $1) + (get_local $2) + (set_local $43 + (i32.add + (get_local $34) + (i32.const -128) ) ) ) - (set_local $191 - (i32.const 368) - ) - (set_local $191 + (call_import $__lshrti3 (i32.add - (get_local $312) - (get_local $191) + (get_local $33) + (i32.const 736) ) - ) - (call_import $__ashlti3 - (get_local $191) - (get_local $5) - (get_local $6) - (set_local $179 - (i64.add - (get_local $17) - (i64.const -640) + (get_local $1) + (get_local $2) + (set_local $44 + (i32.sub + (i32.const 384) + (get_local $34) ) ) ) - (set_local $192 - (i32.const 432) - ) - (set_local $192 + (call_import $__ashlti3 (i32.add - (get_local $312) - (get_local $192) + (get_local $33) + (i32.const 720) ) - ) - (call_import $__lshrti3 - (get_local $192) (get_local $3) (get_local $4) - (set_local $178 - (i64.sub - (i64.const 768) - (get_local $17) + (set_local $35 + (i32.add + (get_local $34) + (i32.const -256) ) ) ) - (set_local $193 - (i32.const 864) - ) - (set_local $193 + (call_import $__ashlti3 (i32.add - (get_local $312) - (get_local $193) + (get_local $33) + (i32.const 752) ) - ) - (call_import $__lshrti3 - (get_local $193) - (get_local $9) - (get_local $10) - (set_local $177 - (i64.sub - (i64.const 384) - (get_local $17) + (get_local $1) + (get_local $2) + (set_local $40 + (i32.add + (get_local $34) + (i32.const -384) ) ) ) - (set_local $194 - (i32.const 848) + (call_import $__ashlti3 + (i32.add + (get_local $33) + (i32.const 592) + ) + (get_local $7) + (get_local $8) + (get_local $34) ) - (set_local $194 + (call_import $__lshrti3 (i32.add - (get_local $312) - (get_local $194) + (get_local $33) + (i32.const 608) ) + (get_local $5) + (get_local $6) + (get_local $42) ) (call_import $__ashlti3 - (get_local $194) - (get_local $11) - (get_local $12) - (set_local $176 - (i64.add - (get_local $17) - (i64.const -256) - ) + (i32.add + (get_local $33) + (i32.const 624) ) + (get_local $5) + (get_local $6) + (get_local $43) ) - (set_local $195 - (i32.const 880) - ) - (set_local $195 + (call_import $__lshrti3 (i32.add - (get_local $312) - (get_local $195) + (get_local $33) + (i32.const 688) ) - ) - (call_import $__ashlti3 - (get_local $195) - (get_local $9) - (get_local $10) - (set_local $175 - (i64.add - (get_local $17) - (i64.const -384) + (get_local $3) + (get_local $4) + (set_local $36 + (i32.sub + (i32.const 256) + (get_local $34) ) ) ) - (set_local $196 - (i32.const 1008) - ) - (set_local $196 + (call_import $__lshrti3 (i32.add - (get_local $312) - (get_local $196) + (get_local $33) + (i32.const 640) ) + (get_local $1) + (get_local $2) + (get_local $36) ) (call_import $__ashlti3 - (get_local $196) - (get_local $15) - (get_local $16) - (get_local $17) - ) - (set_local $197 - (i32.const 960) - ) - (set_local $197 (i32.add - (get_local $312) - (get_local $197) + (get_local $33) + (i32.const 656) ) - ) - (call_import $__lshrti3 - (get_local $197) - (get_local $13) - (get_local $14) - (set_local $174 - (i64.sub - (i64.const 128) - (get_local $17) + (get_local $3) + (get_local $4) + (set_local $51 + (i32.sub + (i32.const 128) + (get_local $36) ) ) ) - (set_local $198 - (i32.const 976) - ) - (set_local $198 + (call_import $__lshrti3 (i32.add - (get_local $312) - (get_local $198) + (get_local $33) + (i32.const 672) ) + (get_local $3) + (get_local $4) + (get_local $42) ) (call_import $__ashlti3 - (get_local $198) - (get_local $13) - (get_local $14) - (set_local $173 - (i64.add - (get_local $17) - (i64.const -128) - ) + (i32.add + (get_local $33) + (i32.const 576) ) + (get_local $5) + (get_local $6) + (get_local $34) ) - (set_local $199 - (i32.const 816) - ) - (set_local $199 + (call_import $__ashlti3 (i32.add - (get_local $312) - (get_local $199) + (get_local $33) + (i32.const 704) ) + (get_local $1) + (get_local $2) + (get_local $35) ) (call_import $__lshrti3 - (get_local $199) - (get_local $11) - (get_local $12) - (set_local $172 - (i64.sub - (i64.const 256) - (get_local $17) - ) + (i32.add + (get_local $33) + (i32.const 480) + ) + (get_local $1) + (get_local $2) + (i32.sub + (i32.const 896) + (get_local $34) ) ) - (set_local $200 - (i32.const 240) - ) - (set_local $200 + (call_import $__ashlti3 (i32.add - (get_local $312) - (get_local $200) + (get_local $33) + (i32.const 464) ) - ) - (call_import $__lshrti3 - (get_local $200) - (get_local $7) - (get_local $8) - (set_local $171 - (i64.sub - (i64.const 512) - (get_local $17) + (get_local $3) + (get_local $4) + (set_local $37 + (i32.add + (get_local $34) + (i32.const -768) ) ) ) - (set_local $201 - (i32.const 912) - ) - (set_local $201 + (call_import $__ashlti3 (i32.add - (get_local $312) - (get_local $201) + (get_local $33) + (i32.const 496) ) - ) - (call_import $__ashlti3 - (get_local $201) - (get_local $11) - (get_local $12) - (get_local $17) - ) - (set_local $202 - (i32.const 928) - ) - (set_local $202 + (get_local $1) + (get_local $2) (i32.add - (get_local $312) - (get_local $202) + (get_local $34) + (i32.const -896) ) ) (call_import $__lshrti3 - (get_local $202) - (get_local $9) - (get_local $10) - (get_local $174) - ) - (set_local $203 - (i32.const 944) - ) - (set_local $203 (i32.add - (get_local $312) - (get_local $203) + (get_local $33) + (i32.const 352) + ) + (get_local $5) + (get_local $6) + (set_local $46 + (i32.sub + (i32.const 640) + (get_local $34) + ) ) ) (call_import $__ashlti3 - (get_local $203) - (get_local $9) - (get_local $10) - (get_local $173) - ) - (set_local $204 - (i32.const 80) - ) - (set_local $204 (i32.add - (get_local $312) - (get_local $204) + (get_local $33) + (i32.const 336) ) - ) - (call_import $__ashlti3 - (get_local $204) (get_local $7) (get_local $8) - (set_local $170 - (i64.sub - (i64.const 256) - (get_local $171) + (set_local $38 + (i32.add + (get_local $34) + (i32.const -512) ) ) ) - (set_local $205 - (i32.const 96) - ) - (set_local $205 - (i32.add - (get_local $312) - (get_local $205) - ) - ) - (call_import $__lshrti3 - (get_local $205) - (get_local $5) - (get_local $6) - (i64.sub - (i64.const 128) - (get_local $170) - ) - ) - (set_local $206 - (i32.const 112) - ) - (set_local $206 + (call_import $__ashlti3 (i32.add - (get_local $312) - (get_local $206) + (get_local $33) + (i32.const 368) ) - ) - (call_import $__ashlti3 - (get_local $206) (get_local $5) (get_local $6) - (set_local $169 - (i64.sub - (i64.const 128) - (get_local $171) + (set_local $52 + (i32.add + (get_local $34) + (i32.const -640) ) ) ) - (set_local $207 - (i32.const 48) - ) - (set_local $207 + (call_import $__lshrti3 (i32.add - (get_local $312) - (get_local $207) + (get_local $33) + (i32.const 432) ) - ) - (call_import $__lshrti3 - (get_local $207) (get_local $3) (get_local $4) - (get_local $171) - ) - (set_local $208 - (i32.const 176) - ) - (set_local $208 - (i32.add - (get_local $312) - (get_local $208) + (set_local $39 + (i32.sub + (i32.const 768) + (get_local $34) + ) ) ) (call_import $__lshrti3 - (get_local $208) - (get_local $7) - (get_local $8) - (get_local $172) - ) - (set_local $209 - (i32.const 288) - ) - (set_local $209 (i32.add - (get_local $312) - (get_local $209) + (get_local $33) + (i32.const 864) ) + (get_local $9) + (get_local $10) + (get_local $44) ) - (call_import $__lshrti3 - (get_local $209) - (get_local $1) - (get_local $2) - (get_local $181) - ) - (set_local $210 - (i32.const 272) - ) - (set_local $210 + (call_import $__ashlti3 (i32.add - (get_local $312) - (get_local $210) + (get_local $33) + (i32.const 848) ) + (get_local $11) + (get_local $12) + (get_local $35) ) (call_import $__ashlti3 - (get_local $210) - (get_local $3) - (get_local $4) - (get_local $180) - ) - (set_local $211 - (i32.const 304) - ) - (set_local $211 (i32.add - (get_local $312) - (get_local $211) + (get_local $33) + (i32.const 880) ) + (get_local $9) + (get_local $10) + (get_local $40) ) (call_import $__ashlti3 - (get_local $211) - (get_local $1) - (get_local $2) - (get_local $179) - ) - (set_local $212 - (i32.const 128) - ) - (set_local $212 (i32.add - (get_local $312) - (get_local $212) + (get_local $33) + (i32.const 1008) ) + (get_local $15) + (get_local $16) + (get_local $34) ) (call_import $__lshrti3 - (get_local $212) - (get_local $5) - (get_local $6) - (get_local $172) - ) - (set_local $213 - (i32.const 144) - ) - (set_local $213 (i32.add - (get_local $312) - (get_local $213) + (get_local $33) + (i32.const 960) ) + (get_local $13) + (get_local $14) + (get_local $42) ) (call_import $__ashlti3 - (get_local $213) - (get_local $7) - (get_local $8) - (i64.sub - (i64.const 384) - (get_local $171) - ) - ) - (set_local $214 - (i32.const 160) - ) - (set_local $214 (i32.add - (get_local $312) - (get_local $214) + (get_local $33) + (i32.const 976) ) + (get_local $13) + (get_local $14) + (get_local $43) ) (call_import $__lshrti3 - (get_local $214) - (get_local $7) - (get_local $8) - (get_local $174) - ) - (call_import $__lshrti3 - (get_local $312) - (get_local $1) - (get_local $2) - (get_local $171) - ) - (set_local $215 - (i32.const 16) - ) - (set_local $215 (i32.add - (get_local $312) - (get_local $215) + (get_local $33) + (i32.const 816) ) + (get_local $11) + (get_local $12) + (get_local $36) ) - (call_import $__ashlti3 - (get_local $215) - (get_local $3) - (get_local $4) - (get_local $169) - ) - (set_local $216 - (i32.const 32) - ) - (set_local $216 + (call_import $__lshrti3 (i32.add - (get_local $312) - (get_local $216) + (get_local $33) + (i32.const 240) + ) + (get_local $7) + (get_local $8) + (set_local $40 + (i32.sub + (i32.const 512) + (get_local $34) + ) ) ) (call_import $__lshrti3 - (get_local $216) - (get_local $3) - (get_local $4) - (get_local $177) - ) - (set_local $217 - (i32.const 64) - ) - (set_local $217 (i32.add - (get_local $312) - (get_local $217) + (get_local $33) + (i32.const 192) ) - ) - (call_import $__ashlti3 - (get_local $217) (get_local $5) (get_local $6) - (get_local $170) - ) - (set_local $218 - (i32.const 896) - ) - (set_local $218 - (i32.add - (get_local $312) - (get_local $218) - ) + (get_local $40) ) (call_import $__ashlti3 - (get_local $218) - (get_local $9) - (get_local $10) - (get_local $17) - ) - (set_local $219 - (i32.const 256) - ) - (set_local $219 (i32.add - (get_local $312) - (get_local $219) + (get_local $33) + (i32.const 208) ) - ) - (call_import $__ashlti3 - (get_local $219) - (get_local $1) - (get_local $2) - (get_local $180) - ) - (set_local $220 - (i32.const 192) - ) - (set_local $220 - (i32.add - (get_local $312) - (get_local $220) + (get_local $7) + (get_local $8) + (set_local $45 + (i32.sub + (i32.const 128) + (get_local $40) + ) ) ) (call_import $__lshrti3 - (get_local $220) - (get_local $5) - (get_local $6) - (get_local $171) - ) - (set_local $221 - (i32.const 208) - ) - (set_local $221 (i32.add - (get_local $312) - (get_local $221) + (get_local $33) + (i32.const 224) ) - ) - (call_import $__ashlti3 - (get_local $221) (get_local $7) (get_local $8) - (get_local $169) - ) - (set_local $222 - (i32.const 224) - ) - (set_local $222 - (i32.add - (get_local $312) - (get_local $222) - ) + (get_local $44) ) (call_import $__lshrti3 - (get_local $222) - (get_local $7) - (get_local $8) - (get_local $177) - ) - (set_local $223 - (i32.const 768) - ) - (set_local $223 (i32.add - (get_local $312) - (get_local $223) + (get_local $33) + (i32.const 768) ) - ) - (call_import $__lshrti3 - (get_local $223) (get_local $9) (get_local $10) - (get_local $172) + (get_local $36) ) - (set_local $224 - (i32.const 784) - ) - (set_local $224 + (call_import $__ashlti3 (i32.add - (get_local $312) - (get_local $224) + (get_local $33) + (i32.const 784) ) - ) - (call_import $__ashlti3 - (get_local $224) (get_local $11) (get_local $12) - (set_local $169 - (i64.sub - (i64.const 128) - (get_local $172) - ) - ) - ) - (set_local $225 - (i32.const 800) + (get_local $51) ) - (set_local $225 + (call_import $__lshrti3 (i32.add - (get_local $312) - (get_local $225) + (get_local $33) + (i32.const 800) ) - ) - (call_import $__lshrti3 - (get_local $225) (get_local $11) (get_local $12) - (get_local $174) - ) - (set_local $226 - (i32.const 992) + (get_local $42) ) - (set_local $226 + (call_import $__ashlti3 (i32.add - (get_local $312) - (get_local $226) + (get_local $33) + (i32.const 992) ) - ) - (call_import $__ashlti3 - (get_local $226) (get_local $13) (get_local $14) - (get_local $17) - ) - (set_local $227 - (i32.const 832) + (get_local $34) ) - (set_local $227 + (call_import $__ashlti3 (i32.add - (get_local $312) - (get_local $227) + (get_local $33) + (i32.const 832) ) - ) - (call_import $__ashlti3 - (get_local $227) (get_local $9) (get_local $10) - (get_local $176) - ) - (set_local $228 - (i32.const 384) + (get_local $35) ) - (set_local $228 + (call_import $__lshrti3 (i32.add - (get_local $312) - (get_local $228) + (get_local $33) + (i32.const 384) ) - ) - (call_import $__lshrti3 - (get_local $228) (get_local $1) (get_local $2) - (get_local $178) + (get_local $39) ) - (set_local $229 - (i32.const 400) - ) - (set_local $229 + (call_import $__ashlti3 (i32.add - (get_local $312) - (get_local $229) + (get_local $33) + (i32.const 400) ) - ) - (call_import $__ashlti3 - (get_local $229) (get_local $3) (get_local $4) - (i64.sub - (i64.const 128) - (get_local $178) + (i32.sub + (i32.const 128) + (get_local $39) ) ) - (set_local $230 - (i32.const 416) - ) - (set_local $230 + (call_import $__lshrti3 (i32.add - (get_local $312) - (get_local $230) + (get_local $33) + (i32.const 416) ) - ) - (call_import $__lshrti3 - (get_local $230) (get_local $3) (get_local $4) - (get_local $181) - ) - (set_local $231 - (i32.const 320) + (get_local $46) ) - (set_local $231 + (call_import $__ashlti3 (i32.add - (get_local $312) - (get_local $231) + (get_local $33) + (i32.const 320) ) - ) - (call_import $__ashlti3 - (get_local $231) (get_local $5) (get_local $6) - (get_local $180) - ) - (set_local $232 - (i32.const 448) - ) - (set_local $232 - (i32.add - (get_local $312) - (get_local $232) - ) + (get_local $38) ) (call_import $__ashlti3 - (get_local $232) - (get_local $1) - (get_local $2) - (get_local $182) - ) - (set_local $233 - (i32.const 736) - ) - (set_local $233 (i32.add - (get_local $312) - (get_local $233) + (get_local $33) + (i32.const 448) ) - ) - (call_import $__lshrti3 - (get_local $233) (get_local $1) (get_local $2) - (get_local $177) - ) - (set_local $234 - (i32.const 720) + (get_local $37) ) - (set_local $234 + (call_import $__lshrti3 (i32.add - (get_local $312) - (get_local $234) + (get_local $33) + (i32.const 128) ) + (get_local $5) + (get_local $6) + (get_local $36) ) (call_import $__ashlti3 - (get_local $234) - (get_local $3) - (get_local $4) - (get_local $176) - ) - (set_local $235 - (i32.const 752) - ) - (set_local $235 (i32.add - (get_local $312) - (get_local $235) + (get_local $33) + (i32.const 144) ) - ) - (call_import $__ashlti3 - (get_local $235) - (get_local $1) - (get_local $2) - (get_local $175) - ) - (set_local $236 - (i32.const 592) - ) - (set_local $236 - (i32.add - (get_local $312) - (get_local $236) - ) - ) - (call_import $__ashlti3 - (get_local $236) (get_local $7) (get_local $8) - (get_local $17) - ) - (set_local $237 - (i32.const 608) - ) - (set_local $237 - (i32.add - (get_local $312) - (get_local $237) - ) - ) - (call_import $__lshrti3 - (get_local $237) - (get_local $5) - (get_local $6) - (get_local $174) - ) - (set_local $238 - (i32.const 624) - ) - (set_local $238 - (i32.add - (get_local $312) - (get_local $238) - ) - ) - (call_import $__ashlti3 - (get_local $238) - (get_local $5) - (get_local $6) - (get_local $173) - ) - (set_local $239 - (i32.const 688) - ) - (set_local $239 - (i32.add - (get_local $312) - (get_local $239) + (i32.sub + (i32.const 384) + (get_local $40) ) ) (call_import $__lshrti3 - (get_local $239) - (get_local $3) - (get_local $4) - (get_local $172) - ) - (set_local $240 - (i32.const 640) - ) - (set_local $240 (i32.add - (get_local $312) - (get_local $240) + (get_local $33) + (i32.const 160) ) + (get_local $7) + (get_local $8) + (get_local $42) ) (call_import $__lshrti3 - (get_local $240) + (get_local $33) (get_local $1) (get_local $2) - (get_local $172) + (get_local $40) ) - (set_local $241 - (i32.const 656) - ) - (set_local $241 + (call_import $__ashlti3 (i32.add - (get_local $312) - (get_local $241) + (get_local $33) + (i32.const 16) ) - ) - (call_import $__ashlti3 - (get_local $241) (get_local $3) (get_local $4) - (get_local $169) + (get_local $45) ) - (set_local $242 - (i32.const 672) - ) - (set_local $242 + (call_import $__lshrti3 (i32.add - (get_local $312) - (get_local $242) + (get_local $33) + (i32.const 32) ) - ) - (call_import $__lshrti3 - (get_local $242) (get_local $3) (get_local $4) - (get_local $174) - ) - (set_local $243 - (i32.const 576) + (get_local $44) ) - (set_local $243 + (call_import $__ashlti3 (i32.add - (get_local $312) - (get_local $243) + (get_local $33) + (i32.const 64) ) - ) - (call_import $__ashlti3 - (get_local $243) (get_local $5) (get_local $6) - (get_local $17) - ) - (set_local $244 - (i32.const 704) - ) - (set_local $244 - (i32.add - (get_local $312) - (get_local $244) + (set_local $41 + (i32.sub + (i32.const 256) + (get_local $40) + ) ) ) (call_import $__ashlti3 - (get_local $244) - (get_local $1) - (get_local $2) - (get_local $176) - ) - (set_local $245 - (i32.const 528) - ) - (set_local $245 (i32.add - (get_local $312) - (get_local $245) + (get_local $33) + (i32.const 896) ) + (get_local $9) + (get_local $10) + (get_local $34) ) (call_import $__ashlti3 - (get_local $245) - (get_local $3) - (get_local $4) - (get_local $17) - ) - (set_local $246 - (i32.const 544) - ) - (set_local $246 - (i32.add - (get_local $312) - (get_local $246) - ) - ) - (call_import $__lshrti3 - (get_local $246) - (get_local $1) - (get_local $2) - (get_local $174) - ) - (set_local $247 - (i32.const 560) - ) - (set_local $247 (i32.add - (get_local $312) - (get_local $247) + (get_local $33) + (i32.const 256) ) - ) - (call_import $__ashlti3 - (get_local $247) (get_local $1) (get_local $2) - (get_local $173) - ) - (set_local $248 - (i32.const 512) - ) - (set_local $248 - (i32.add - (get_local $312) - (get_local $248) - ) + (get_local $38) ) (call_import $__ashlti3 - (get_local $248) - (get_local $1) - (get_local $2) - (get_local $17) - ) - (set_local $249 - (i32.const 480) - ) - (set_local $249 - (i32.add - (get_local $312) - (get_local $249) - ) - ) - (set_local $174 - (i64.load - (i32.add - (get_local $249) - (i32.const 8) - ) - ) - ) - (set_local $250 - (i32.const 464) - ) - (set_local $250 - (i32.add - (get_local $312) - (get_local $250) - ) - ) - (set_local $177 - (i64.load - (i32.add - (get_local $250) - (i32.const 8) - ) - ) - ) - (set_local $173 - (i64.load offset=480 - (get_local $312) - ) - ) - (set_local $181 - (i64.load offset=464 - (get_local $312) - ) - ) - (set_local $169 - (i64.load offset=496 - (get_local $312) - ) - ) - (set_local $251 - (i32.const 496) - ) - (set_local $251 - (i32.add - (get_local $312) - (get_local $251) - ) - ) - (set_local $179 - (i64.load - (i32.add - (get_local $251) - (i32.const 8) - ) - ) - ) - (set_local $252 - (i32.const 352) - ) - (set_local $252 - (i32.add - (get_local $312) - (get_local $252) - ) - ) - (set_local $175 - (i64.load - (i32.add - (get_local $252) - (i32.const 8) - ) - ) - ) - (set_local $253 - (i32.const 336) - ) - (set_local $253 - (i32.add - (get_local $312) - (get_local $253) - ) - ) - (set_local $45 - (i64.load - (i32.add - (get_local $253) - (i32.const 8) - ) - ) - ) - (set_local $254 - (i32.const 368) - ) - (set_local $254 - (i32.add - (get_local $312) - (get_local $254) - ) - ) - (set_local $46 - (i64.load - (i32.add - (get_local $254) - (i32.const 8) - ) - ) - ) - (set_local $255 - (i32.const 432) - ) - (set_local $255 - (i32.add - (get_local $312) - (get_local $255) - ) - ) - (set_local $47 - (i64.load - (i32.add - (get_local $255) - (i32.const 8) - ) - ) - ) - (set_local $256 - (i32.const 864) - ) - (set_local $256 - (i32.add - (get_local $312) - (get_local $256) - ) - ) - (set_local $48 - (i64.load - (i32.add - (get_local $256) - (i32.const 8) - ) - ) - ) - (set_local $257 - (i32.const 848) - ) - (set_local $257 - (i32.add - (get_local $312) - (get_local $257) - ) - ) - (set_local $49 - (i64.load - (i32.add - (get_local $257) - (i32.const 8) - ) - ) - ) - (set_local $258 - (i32.const 880) - ) - (set_local $258 - (i32.add - (get_local $312) - (get_local $258) - ) - ) - (set_local $50 - (i64.load - (i32.add - (get_local $258) - (i32.const 8) - ) - ) - ) - (set_local $259 - (i32.const 1008) - ) - (set_local $259 - (i32.add - (get_local $312) - (get_local $259) - ) - ) - (set_local $51 - (i64.load - (i32.add - (get_local $259) - (i32.const 8) - ) - ) - ) - (set_local $260 - (i32.const 960) - ) - (set_local $260 - (i32.add - (get_local $312) - (get_local $260) - ) - ) - (set_local $52 - (i64.load - (i32.add - (get_local $260) - (i32.const 8) - ) - ) - ) - (set_local $261 - (i32.const 976) - ) - (set_local $261 - (i32.add - (get_local $312) - (get_local $261) - ) - ) - (set_local $53 - (i64.load - (i32.add - (get_local $261) - (i32.const 8) - ) - ) - ) - (set_local $262 - (i32.const 816) - ) - (set_local $262 - (i32.add - (get_local $312) - (get_local $262) - ) - ) - (set_local $54 - (i64.load - (i32.add - (get_local $262) - (i32.const 8) - ) - ) - ) - (set_local $263 - (i32.const 240) - ) - (set_local $263 - (i32.add - (get_local $312) - (get_local $263) - ) - ) - (set_local $55 - (i64.load - (i32.add - (get_local $263) - (i32.const 8) - ) - ) - ) - (set_local $264 - (i32.const 912) - ) - (set_local $264 - (i32.add - (get_local $312) - (get_local $264) - ) - ) - (set_local $67 - (i64.load - (i32.add - (get_local $264) - (i32.const 8) - ) - ) - ) - (set_local $265 - (i32.const 928) - ) - (set_local $265 - (i32.add - (get_local $312) - (get_local $265) - ) - ) - (set_local $68 - (i64.load - (i32.add - (get_local $265) - (i32.const 8) - ) - ) - ) - (set_local $266 - (i32.const 944) - ) - (set_local $266 - (i32.add - (get_local $312) - (get_local $266) - ) - ) - (set_local $69 - (i64.load - (i32.add - (get_local $266) - (i32.const 8) - ) - ) - ) - (set_local $267 - (i32.const 80) - ) - (set_local $267 - (i32.add - (get_local $312) - (get_local $267) - ) - ) - (set_local $70 - (i64.load - (i32.add - (get_local $267) - (i32.const 8) - ) - ) - ) - (set_local $268 - (i32.const 96) - ) - (set_local $268 - (i32.add - (get_local $312) - (get_local $268) - ) - ) - (set_local $71 - (i64.load - (i32.add - (get_local $268) - (i32.const 8) - ) - ) - ) - (set_local $59 - (i64.load offset=80 - (get_local $312) - ) - ) - (set_local $60 - (i64.load offset=96 - (get_local $312) - ) - ) - (set_local $61 - (i64.load offset=112 - (get_local $312) - ) - ) - (set_local $269 - (i32.const 112) - ) - (set_local $269 - (i32.add - (get_local $312) - (get_local $269) - ) - ) - (set_local $72 - (i64.load - (i32.add - (get_local $269) - (i32.const 8) - ) - ) - ) - (set_local $270 - (i32.const 48) - ) - (set_local $270 - (i32.add - (get_local $312) - (get_local $270) - ) - ) - (set_local $73 - (i64.load - (i32.add - (get_local $270) - (i32.const 8) - ) - ) - ) - (set_local $271 - (i32.const 176) - ) - (set_local $271 - (i32.add - (get_local $312) - (get_local $271) - ) - ) - (set_local $74 - (i64.load - (i32.add - (get_local $271) - (i32.const 8) - ) - ) - ) - (set_local $272 - (i32.const 288) - ) - (set_local $272 - (i32.add - (get_local $312) - (get_local $272) - ) - ) - (set_local $75 - (i64.load - (i32.add - (get_local $272) - (i32.const 8) - ) - ) - ) - (set_local $273 - (i32.const 272) - ) - (set_local $273 - (i32.add - (get_local $312) - (get_local $273) - ) - ) - (set_local $76 - (i64.load - (i32.add - (get_local $273) - (i32.const 8) - ) - ) - ) - (set_local $274 - (i32.const 304) - ) - (set_local $274 - (i32.add - (get_local $312) - (get_local $274) - ) - ) - (set_local $77 - (i64.load - (i32.add - (get_local $274) - (i32.const 8) - ) - ) - ) - (set_local $275 - (i32.const 128) - ) - (set_local $275 - (i32.add - (get_local $312) - (get_local $275) - ) - ) - (set_local $87 - (i64.load - (i32.add - (get_local $275) - (i32.const 8) - ) - ) - ) - (set_local $276 - (i32.const 144) - ) - (set_local $276 - (i32.add - (get_local $312) - (get_local $276) - ) - ) - (set_local $88 - (i64.load - (i32.add - (get_local $276) - (i32.const 8) - ) - ) - ) - (set_local $277 - (i32.const 160) - ) - (set_local $277 - (i32.add - (get_local $312) - (get_local $277) - ) - ) - (set_local $89 - (i64.load - (i32.add - (get_local $277) - (i32.const 8) - ) - ) - ) - (set_local $90 - (i64.load - (i32.add - (get_local $312) - (i32.const 8) - ) - ) - ) - (set_local $278 - (i32.const 16) - ) - (set_local $278 - (i32.add - (get_local $312) - (get_local $278) - ) - ) - (set_local $91 - (i64.load - (i32.add - (get_local $278) - (i32.const 8) - ) - ) - ) - (set_local $84 - (i64.load offset=64 - (get_local $312) - ) - ) - (set_local $279 - (i32.const 64) - ) - (set_local $279 - (i32.add - (get_local $312) - (get_local $279) - ) - ) - (set_local $93 - (i64.load - (i32.add - (get_local $279) - (i32.const 8) - ) - ) - ) - (set_local $280 - (i32.const 32) - ) - (set_local $280 - (i32.add - (get_local $312) - (get_local $280) - ) - ) - (set_local $92 - (i64.load - (i32.add - (get_local $280) - (i32.const 8) - ) - ) - ) - (set_local $281 - (i32.const 896) - ) - (set_local $281 (i32.add - (get_local $312) - (get_local $281) + (get_local $33) + (i32.const 912) ) + (get_local $11) + (get_local $12) + (get_local $34) ) - (set_local $94 - (i64.load - (i32.add - (get_local $281) - (i32.const 8) - ) - ) - ) - (set_local $282 - (i32.const 256) - ) - (set_local $282 - (i32.add - (get_local $312) - (get_local $282) - ) - ) - (set_local $95 - (i64.load - (i32.add - (get_local $282) - (i32.const 8) - ) - ) - ) - (set_local $283 - (i32.const 192) - ) - (set_local $283 - (i32.add - (get_local $312) - (get_local $283) - ) - ) - (set_local $109 - (i64.load - (i32.add - (get_local $283) - (i32.const 8) - ) - ) - ) - (set_local $284 - (i32.const 208) - ) - (set_local $284 - (i32.add - (get_local $312) - (get_local $284) - ) - ) - (set_local $110 - (i64.load - (i32.add - (get_local $284) - (i32.const 8) - ) - ) - ) - (set_local $81 - (i64.load - (get_local $312) - ) - ) - (set_local $82 - (i64.load offset=16 - (get_local $312) - ) - ) - (set_local $83 - (i64.load offset=32 - (get_local $312) - ) - ) - (set_local $285 - (i32.const 224) - ) - (set_local $285 - (i32.add - (get_local $312) - (get_local $285) - ) - ) - (set_local $111 - (i64.load - (i32.add - (get_local $285) - (i32.const 8) - ) - ) - ) - (set_local $96 - (i64.load offset=192 - (get_local $312) - ) - ) - (set_local $97 - (i64.load offset=208 - (get_local $312) - ) - ) - (set_local $98 - (i64.load offset=224 - (get_local $312) - ) - ) - (set_local $44 - (i64.load offset=240 - (get_local $312) - ) - ) - (set_local $62 - (i64.load offset=48 - (get_local $312) - ) - ) - (set_local $63 - (i64.load offset=176 - (get_local $312) - ) - ) - (set_local $78 - (i64.load offset=128 - (get_local $312) - ) - ) - (set_local $79 - (i64.load offset=144 - (get_local $312) - ) - ) - (set_local $80 - (i64.load offset=160 - (get_local $312) - ) - ) - (set_local $286 - (i32.const 768) - ) - (set_local $286 - (i32.add - (get_local $312) - (get_local $286) - ) - ) - (set_local $112 - (i64.load - (i32.add - (get_local $286) - (i32.const 8) - ) - ) - ) - (set_local $287 - (i32.const 784) - ) - (set_local $287 - (i32.add - (get_local $312) - (get_local $287) - ) - ) - (set_local $113 - (i64.load - (i32.add - (get_local $287) - (i32.const 8) - ) - ) - ) - (set_local $288 - (i32.const 800) - ) - (set_local $288 - (i32.add - (get_local $312) - (get_local $288) - ) - ) - (set_local $114 - (i64.load - (i32.add - (get_local $288) - (i32.const 8) - ) - ) - ) - (set_local $289 - (i32.const 992) - ) - (set_local $289 - (i32.add - (get_local $312) - (get_local $289) - ) - ) - (set_local $115 - (i64.load - (i32.add - (get_local $289) - (i32.const 8) - ) - ) - ) - (set_local $290 - (i32.const 832) - ) - (set_local $290 - (i32.add - (get_local $312) - (get_local $290) - ) - ) - (set_local $116 - (i64.load - (i32.add - (get_local $290) - (i32.const 8) - ) - ) - ) - (set_local $291 - (i32.const 384) - ) - (set_local $291 - (i32.add - (get_local $312) - (get_local $291) - ) - ) - (set_local $117 - (i64.load - (i32.add - (get_local $291) - (i32.const 8) - ) - ) - ) - (set_local $292 - (i32.const 400) - ) - (set_local $292 - (i32.add - (get_local $312) - (get_local $292) - ) - ) - (set_local $118 - (i64.load - (i32.add - (get_local $292) - (i32.const 8) - ) - ) - ) - (set_local $104 - (i64.load offset=384 - (get_local $312) - ) - ) - (set_local $105 - (i64.load offset=400 - (get_local $312) - ) - ) - (set_local $293 - (i32.const 416) - ) - (set_local $293 - (i32.add - (get_local $312) - (get_local $293) - ) - ) - (set_local $119 - (i64.load - (i32.add - (get_local $293) - (i32.const 8) - ) - ) - ) - (set_local $106 - (i64.load offset=416 - (get_local $312) - ) - ) - (set_local $36 - (i64.load offset=432 - (get_local $312) - ) - ) - (set_local $294 - (i32.const 320) - ) - (set_local $294 - (i32.add - (get_local $312) - (get_local $294) - ) - ) - (set_local $120 - (i64.load - (i32.add - (get_local $294) - (i32.const 8) - ) - ) - ) - (set_local $33 - (i64.load offset=352 - (get_local $312) - ) - ) - (set_local $34 - (i64.load offset=336 - (get_local $312) - ) - ) - (set_local $35 - (i64.load offset=368 - (get_local $312) - ) - ) - (set_local $295 - (i32.const 448) - ) - (set_local $295 - (i32.add - (get_local $312) - (get_local $295) - ) - ) - (set_local $121 - (i64.load - (i32.add - (get_local $295) - (i32.const 8) - ) - ) - ) - (set_local $64 - (i64.load offset=288 - (get_local $312) - ) - ) - (set_local $65 - (i64.load offset=272 - (get_local $312) - ) - ) - (set_local $66 - (i64.load offset=304 - (get_local $312) - ) - ) - (set_local $86 - (i64.load offset=256 - (get_local $312) - ) - ) - (set_local $107 - (i64.load offset=320 - (get_local $312) - ) - ) - (set_local $108 - (i64.load offset=448 - (get_local $312) - ) - ) - (set_local $296 - (i32.const 736) - ) - (set_local $296 - (i32.add - (get_local $312) - (get_local $296) - ) - ) - (set_local $129 - (i64.load - (i32.add - (get_local $296) - (i32.const 8) - ) - ) - ) - (set_local $297 - (i32.const 720) - ) - (set_local $297 - (i32.add - (get_local $312) - (get_local $297) - ) - ) - (set_local $130 - (i64.load - (i32.add - (get_local $297) - (i32.const 8) - ) - ) - ) - (set_local $37 - (i64.load offset=864 - (get_local $312) - ) - ) - (set_local $38 - (i64.load offset=848 - (get_local $312) - ) - ) - (set_local $39 - (i64.load offset=880 - (get_local $312) - ) - ) - (set_local $298 - (i32.const 752) - ) - (set_local $298 - (i32.add - (get_local $312) - (get_local $298) - ) - ) - (set_local $131 - (i64.load - (i32.add - (get_local $298) - (i32.const 8) - ) - ) - ) - (set_local $122 - (i64.load offset=736 - (get_local $312) - ) - ) - (set_local $123 - (i64.load offset=720 - (get_local $312) - ) - ) - (set_local $124 - (i64.load offset=752 - (get_local $312) - ) - ) - (set_local $299 - (i32.const 592) - ) - (set_local $299 - (i32.add - (get_local $312) - (get_local $299) - ) - ) - (set_local $132 - (i64.load - (i32.add - (get_local $299) - (i32.const 8) - ) - ) - ) - (set_local $300 - (i32.const 608) - ) - (set_local $300 - (i32.add - (get_local $312) - (get_local $300) - ) - ) - (set_local $133 - (i64.load - (i32.add - (get_local $300) - (i32.const 8) - ) - ) - ) - (set_local $301 - (i32.const 624) - ) - (set_local $301 - (i32.add - (get_local $312) - (get_local $301) - ) - ) - (set_local $134 - (i64.load - (i32.add - (get_local $301) - (i32.const 8) - ) - ) - ) - (set_local $302 - (i32.const 688) - ) - (set_local $302 + (call_import $__lshrti3 (i32.add - (get_local $312) - (get_local $302) - ) - ) - (set_local $135 - (i64.load - (i32.add - (get_local $302) - (i32.const 8) - ) + (get_local $33) + (i32.const 928) ) + (get_local $9) + (get_local $10) + (get_local $42) ) - (set_local $303 - (i32.const 640) - ) - (set_local $303 + (call_import $__ashlti3 (i32.add - (get_local $312) - (get_local $303) + (get_local $33) + (i32.const 944) ) + (get_local $9) + (get_local $10) + (get_local $43) ) - (set_local $141 - (i64.load - (i32.add - (get_local $303) - (i32.const 8) - ) - ) - ) - (set_local $304 - (i32.const 656) - ) - (set_local $304 + (call_import $__ashlti3 (i32.add - (get_local $312) - (get_local $304) - ) - ) - (set_local $142 - (i64.load - (i32.add - (get_local $304) - (i32.const 8) - ) - ) - ) - (set_local $99 - (i64.load offset=768 - (get_local $312) - ) - ) - (set_local $100 - (i64.load offset=784 - (get_local $312) - ) - ) - (set_local $101 - (i64.load offset=800 - (get_local $312) + (get_local $33) + (i32.const 80) ) + (get_local $7) + (get_local $8) + (get_local $41) ) - (set_local $305 - (i32.const 672) - ) - (set_local $305 + (call_import $__lshrti3 (i32.add - (get_local $312) - (get_local $305) - ) - ) - (set_local $143 - (i64.load - (i32.add - (get_local $305) - (i32.const 8) - ) - ) - ) - (set_local $136 - (i64.load offset=640 - (get_local $312) - ) - ) - (set_local $137 - (i64.load offset=656 - (get_local $312) - ) - ) - (set_local $138 - (i64.load offset=672 - (get_local $312) - ) - ) - (set_local $43 - (i64.load offset=816 - (get_local $312) + (get_local $33) + (i32.const 96) ) - ) - (set_local $128 - (i64.load offset=688 - (get_local $312) + (get_local $5) + (get_local $6) + (i32.sub + (i32.const 128) + (get_local $41) ) ) - (set_local $306 - (i32.const 576) - ) - (set_local $306 + (call_import $__ashlti3 (i32.add - (get_local $312) - (get_local $306) - ) - ) - (set_local $144 - (i64.load - (i32.add - (get_local $306) - (i32.const 8) - ) - ) - ) - (set_local $103 - (i64.load offset=832 - (get_local $312) - ) - ) - (set_local $140 - (i64.load offset=704 - (get_local $312) + (get_local $33) + (i32.const 112) ) + (get_local $5) + (get_local $6) + (get_local $45) ) - (set_local $307 - (i32.const 704) - ) - (set_local $307 + (call_import $__lshrti3 (i32.add - (get_local $312) - (get_local $307) - ) - ) - (set_local $145 - (i64.load - (i32.add - (get_local $307) - (i32.const 8) - ) + (get_local $33) + (i32.const 48) ) + (get_local $3) + (get_local $4) + (get_local $40) ) - (set_local $308 - (i32.const 528) - ) - (set_local $308 + (call_import $__lshrti3 (i32.add - (get_local $312) - (get_local $308) + (get_local $33) + (i32.const 176) ) + (get_local $7) + (get_local $8) + (get_local $36) ) - (set_local $149 - (i64.load - (i32.add - (get_local $308) - (i32.const 8) - ) - ) - ) - (set_local $309 - (i32.const 544) - ) - (set_local $309 + (call_import $__lshrti3 (i32.add - (get_local $312) - (get_local $309) + (get_local $33) + (i32.const 288) ) + (get_local $1) + (get_local $2) + (get_local $46) ) - (set_local $150 - (i64.load - (i32.add - (get_local $309) - (i32.const 8) - ) - ) - ) - (set_local $310 - (i32.const 560) - ) - (set_local $310 + (call_import $__ashlti3 (i32.add - (get_local $312) - (get_local $310) - ) - ) - (set_local $151 - (i64.load - (i32.add - (get_local $310) - (i32.const 8) - ) - ) - ) - (set_local $40 - (i64.load offset=1008 - (get_local $312) - ) - ) - (set_local $41 - (i64.load offset=960 - (get_local $312) - ) - ) - (set_local $42 - (i64.load offset=976 - (get_local $312) - ) - ) - (set_local $56 - (i64.load offset=912 - (get_local $312) - ) - ) - (set_local $57 - (i64.load offset=928 - (get_local $312) - ) - ) - (set_local $58 - (i64.load offset=944 - (get_local $312) - ) - ) - (set_local $85 - (i64.load offset=896 - (get_local $312) - ) - ) - (set_local $102 - (i64.load offset=992 - (get_local $312) - ) - ) - (set_local $125 - (i64.load offset=592 - (get_local $312) - ) - ) - (set_local $126 - (i64.load offset=608 - (get_local $312) - ) - ) - (set_local $127 - (i64.load offset=624 - (get_local $312) - ) - ) - (set_local $139 - (i64.load offset=576 - (get_local $312) - ) - ) - (set_local $146 - (i64.load offset=528 - (get_local $312) - ) - ) - (set_local $147 - (i64.load offset=544 - (get_local $312) - ) - ) - (set_local $148 - (i64.load offset=560 - (get_local $312) - ) - ) - (set_local $152 - (i64.load offset=512 - (get_local $312) + (get_local $33) + (i32.const 272) ) + (get_local $3) + (get_local $4) + (get_local $38) ) - (set_local $311 - (i32.const 512) - ) - (set_local $311 + (call_import $__ashlti3 (i32.add - (get_local $312) - (get_local $311) + (get_local $33) + (i32.const 304) ) + (get_local $1) + (get_local $2) + (get_local $52) ) (i64.store (i32.add @@ -2812,31 +771,34 @@ (select (i64.load (i32.add - (get_local $311) + (i32.add + (get_local $33) + (i32.const 512) + ) (i32.const 8) ) ) (i64.const 0) - (set_local $168 - (i64.lt_u - (get_local $17) - (i64.const 128) + (set_local $42 + (i32.lt_u + (get_local $34) + (i32.const 128) ) ) ) (i64.const 0) - (set_local $167 - (i64.lt_u - (get_local $17) - (i64.const 256) + (set_local $43 + (i32.lt_u + (get_local $34) + (i32.const 256) ) ) ) (i64.const 0) - (set_local $166 - (i64.lt_u - (get_local $17) - (i64.const 512) + (set_local $44 + (i32.lt_u + (get_local $34) + (i32.const 512) ) ) ) @@ -2846,15 +808,17 @@ (select (select (select - (get_local $152) + (i64.load offset=512 + (get_local $33) + ) (i64.const 0) - (get_local $168) + (get_local $42) ) (i64.const 0) - (get_local $167) + (get_local $43) ) (i64.const 0) - (get_local $166) + (get_local $44) ) ) (i64.store @@ -2865,27 +829,46 @@ (select (select (select - (get_local $4) (select (i64.or - (get_local $149) - (get_local $150) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 528) + ) + (i32.const 8) + ) + ) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 544) + ) + (i32.const 8) + ) + ) ) - (get_local $151) - (get_local $168) - ) - (set_local $165 - (i64.eq - (get_local $17) - (i64.const 0) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 560) + ) + (i32.const 8) + ) ) + (get_local $42) ) + (get_local $4) + (get_local $34) ) (i64.const 0) - (get_local $167) + (get_local $43) ) (i64.const 0) - (get_local $166) + (get_local $44) ) ) (i64.store @@ -2896,22 +879,28 @@ (select (select (select - (get_local $3) (select (i64.or - (get_local $146) - (get_local $147) + (i64.load offset=528 + (get_local $33) + ) + (i64.load offset=544 + (get_local $33) + ) + ) + (i64.load offset=560 + (get_local $33) ) - (get_local $148) - (get_local $168) + (get_local $42) ) - (get_local $165) + (get_local $3) + (get_local $34) ) (i64.const 0) - (get_local $167) + (get_local $43) ) (i64.const 0) - (get_local $166) + (get_local $44) ) ) (i64.store @@ -2921,60 +910,111 @@ ) (select (select - (get_local $8) (select (i64.or (select - (get_local $8) (select (i64.or - (get_local $132) - (get_local $133) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 592) + ) + (i32.const 8) + ) + ) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 608) + ) + (i32.const 8) + ) + ) + ) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 624) + ) + (i32.const 8) + ) ) - (get_local $134) - (get_local $168) + (get_local $42) ) - (get_local $165) + (get_local $8) + (get_local $34) ) (select - (get_local $135) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 688) + ) + (i32.const 8) + ) + ) (i64.const 0) - (set_local $164 - (i64.lt_u - (get_local $172) - (i64.const 128) + (set_local $46 + (i32.lt_u + (get_local $36) + (i32.const 128) ) ) ) ) (select - (get_local $4) (select (i64.or - (get_local $130) - (get_local $129) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 720) + ) + (i32.const 8) + ) + ) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 736) + ) + (i32.const 8) + ) + ) ) - (get_local $131) - (set_local $163 - (i64.lt_u - (get_local $176) - (i64.const 128) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 752) + ) + (i32.const 8) ) ) - ) - (set_local $153 - (i64.eq - (get_local $176) - (i64.const 0) + (set_local $45 + (i32.lt_u + (get_local $35) + (i32.const 128) + ) ) ) + (get_local $4) + (get_local $35) ) - (get_local $167) + (get_local $43) ) - (get_local $165) + (get_local $8) + (get_local $34) ) (i64.const 0) - (get_local $166) + (get_local $44) ) ) (i64.store @@ -2984,45 +1024,59 @@ ) (select (select - (get_local $7) (select (i64.or (select - (get_local $7) (select (i64.or - (get_local $125) - (get_local $126) + (i64.load offset=592 + (get_local $33) + ) + (i64.load offset=608 + (get_local $33) + ) ) - (get_local $127) - (get_local $168) + (i64.load offset=624 + (get_local $33) + ) + (get_local $42) ) - (get_local $165) + (get_local $7) + (get_local $34) ) (select - (get_local $128) + (i64.load offset=688 + (get_local $33) + ) (i64.const 0) - (get_local $164) + (get_local $46) ) ) (select - (get_local $3) (select (i64.or - (get_local $123) - (get_local $122) + (i64.load offset=720 + (get_local $33) + ) + (i64.load offset=736 + (get_local $33) + ) + ) + (i64.load offset=752 + (get_local $33) ) - (get_local $124) - (get_local $163) + (get_local $45) ) - (get_local $153) + (get_local $3) + (get_local $35) ) - (get_local $167) + (get_local $43) ) - (get_local $165) + (get_local $7) + (get_local $34) ) (i64.const 0) - (get_local $166) + (get_local $44) ) ) (i64.store @@ -3032,43 +1086,78 @@ ) (select (select - (get_local $6) (select (i64.or (select - (get_local $144) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 576) + ) + (i32.const 8) + ) + ) (i64.const 0) - (get_local $168) + (get_local $42) ) (select - (get_local $2) (select (i64.or - (get_local $141) - (get_local $142) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 640) + ) + (i32.const 8) + ) + ) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 656) + ) + (i32.const 8) + ) + ) ) - (get_local $143) - (get_local $164) - ) - (set_local $162 - (i64.eq - (get_local $172) - (i64.const 0) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 672) + ) + (i32.const 8) + ) ) + (get_local $46) ) + (get_local $2) + (get_local $36) ) ) (select - (get_local $145) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 704) + ) + (i32.const 8) + ) + ) (i64.const 0) - (get_local $163) + (get_local $45) ) - (get_local $167) + (get_local $43) ) - (get_local $165) + (get_local $6) + (get_local $34) ) (i64.const 0) - (get_local $166) + (get_local $44) ) ) (i64.store @@ -3078,38 +1167,48 @@ ) (select (select - (get_local $5) (select (i64.or (select - (get_local $139) + (i64.load offset=576 + (get_local $33) + ) (i64.const 0) - (get_local $168) + (get_local $42) ) (select - (get_local $1) (select (i64.or - (get_local $136) - (get_local $137) + (i64.load offset=640 + (get_local $33) + ) + (i64.load offset=656 + (get_local $33) + ) + ) + (i64.load offset=672 + (get_local $33) ) - (get_local $138) - (get_local $164) + (get_local $46) ) - (get_local $162) + (get_local $1) + (get_local $36) ) ) (select - (get_local $140) + (i64.load offset=704 + (get_local $33) + ) (i64.const 0) - (get_local $163) + (get_local $45) ) - (get_local $167) + (get_local $43) ) - (get_local $165) + (get_local $5) + (get_local $34) ) (i64.const 0) - (get_local $166) + (get_local $44) ) ) (i64.store @@ -3118,138 +1217,248 @@ (i32.const 120) ) (select - (get_local $16) (select (i64.or (select - (get_local $16) (select (i64.or (select - (get_local $16) (select (i64.or - (get_local $51) - (get_local $52) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 1008) + ) + (i32.const 8) + ) + ) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 960) + ) + (i32.const 8) + ) + ) + ) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 976) + ) + (i32.const 8) + ) ) - (get_local $53) - (get_local $168) + (get_local $42) ) - (get_local $165) + (get_local $16) + (get_local $34) ) (select - (get_local $54) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 816) + ) + (i32.const 8) + ) + ) (i64.const 0) - (get_local $164) + (get_local $46) ) ) (select - (get_local $12) (select (i64.or - (get_local $49) - (get_local $48) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 848) + ) + (i32.const 8) + ) + ) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 864) + ) + (i32.const 8) + ) + ) + ) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 880) + ) + (i32.const 8) + ) ) - (get_local $50) - (get_local $163) + (get_local $45) ) - (get_local $153) + (get_local $12) + (get_local $35) ) - (get_local $167) + (get_local $43) ) - (get_local $165) + (get_local $16) + (get_local $34) ) (select (select - (get_local $55) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 240) + ) + (i32.const 8) + ) + ) (i64.const 0) - (set_local $161 - (i64.lt_u - (get_local $171) - (i64.const 128) + (set_local $51 + (i32.lt_u + (get_local $40) + (i32.const 128) ) ) ) (i64.const 0) - (set_local $160 - (i64.lt_u - (get_local $171) - (i64.const 256) + (set_local $52 + (i32.lt_u + (get_local $40) + (i32.const 256) ) ) ) ) (select - (get_local $8) (select (i64.or (select - (get_local $8) (select (i64.or - (get_local $45) - (get_local $175) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 336) + ) + (i32.const 8) + ) + ) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 352) + ) + (i32.const 8) + ) + ) ) - (get_local $46) - (set_local $159 - (i64.lt_u - (get_local $180) - (i64.const 128) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 368) + ) + (i32.const 8) ) ) - ) - (set_local $158 - (i64.eq - (get_local $180) - (i64.const 0) + (set_local $48 + (i32.lt_u + (get_local $38) + (i32.const 128) + ) ) ) + (get_local $8) + (get_local $38) ) (select - (get_local $47) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 432) + ) + (i32.const 8) + ) + ) (i64.const 0) - (set_local $157 - (i64.lt_u - (get_local $178) - (i64.const 128) + (set_local $49 + (i32.lt_u + (get_local $39) + (i32.const 128) ) ) ) ) (select - (get_local $4) (select (i64.or - (get_local $177) - (get_local $174) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 464) + ) + (i32.const 8) + ) + ) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 480) + ) + (i32.const 8) + ) + ) ) - (get_local $179) - (set_local $156 - (i64.lt_u - (get_local $182) - (i64.const 128) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 496) + ) + (i32.const 8) ) ) - ) - (set_local $155 - (i64.eq - (get_local $182) - (i64.const 0) + (set_local $47 + (i32.lt_u + (get_local $37) + (i32.const 128) + ) ) ) + (get_local $4) + (get_local $37) ) - (set_local $154 - (i64.lt_u - (get_local $180) - (i64.const 256) + (set_local $50 + (i32.lt_u + (get_local $38) + (i32.const 256) ) ) ) - (get_local $158) + (get_local $8) + (get_local $38) ) - (get_local $166) + (get_local $44) ) - (get_local $165) + (get_local $16) + (get_local $34) ) ) (i64.store @@ -3258,98 +1467,128 @@ (i32.const 112) ) (select - (get_local $15) (select (i64.or (select - (get_local $15) (select (i64.or (select - (get_local $15) (select (i64.or - (get_local $40) - (get_local $41) + (i64.load offset=1008 + (get_local $33) + ) + (i64.load offset=960 + (get_local $33) + ) + ) + (i64.load offset=976 + (get_local $33) ) (get_local $42) - (get_local $168) ) - (get_local $165) + (get_local $15) + (get_local $34) ) (select - (get_local $43) + (i64.load offset=816 + (get_local $33) + ) (i64.const 0) - (get_local $164) + (get_local $46) ) ) (select - (get_local $11) (select (i64.or - (get_local $38) - (get_local $37) + (i64.load offset=848 + (get_local $33) + ) + (i64.load offset=864 + (get_local $33) + ) + ) + (i64.load offset=880 + (get_local $33) ) - (get_local $39) - (get_local $163) + (get_local $45) ) - (get_local $153) + (get_local $11) + (get_local $35) ) - (get_local $167) + (get_local $43) ) - (get_local $165) + (get_local $15) + (get_local $34) ) (select (select - (get_local $44) + (i64.load offset=240 + (get_local $33) + ) (i64.const 0) - (get_local $161) + (get_local $51) ) (i64.const 0) - (get_local $160) + (get_local $52) ) ) (select - (get_local $7) (select (i64.or (select - (get_local $7) (select (i64.or - (get_local $34) + (i64.load offset=336 + (get_local $33) + ) + (i64.load offset=352 + (get_local $33) + ) + ) + (i64.load offset=368 (get_local $33) ) - (get_local $35) - (get_local $159) + (get_local $48) ) - (get_local $158) + (get_local $7) + (get_local $38) ) (select - (get_local $36) + (i64.load offset=432 + (get_local $33) + ) (i64.const 0) - (get_local $157) + (get_local $49) ) ) (select - (get_local $3) (select (i64.or - (get_local $181) - (get_local $173) + (i64.load offset=464 + (get_local $33) + ) + (i64.load offset=480 + (get_local $33) + ) + ) + (i64.load offset=496 + (get_local $33) ) - (get_local $169) - (get_local $156) + (get_local $47) ) - (get_local $155) + (get_local $3) + (get_local $37) ) - (get_local $154) + (get_local $50) ) - (get_local $158) + (get_local $7) + (get_local $38) ) - (get_local $166) + (get_local $44) ) - (get_local $165) + (get_local $15) + (get_local $34) ) ) (i64.store @@ -3358,101 +1597,195 @@ (i32.const 104) ) (select - (get_local $14) (select (i64.or (select - (get_local $14) (select (i64.or (select - (get_local $115) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 992) + ) + (i32.const 8) + ) + ) (i64.const 0) - (get_local $168) + (get_local $42) ) (select - (get_local $10) (select (i64.or - (get_local $112) - (get_local $113) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 768) + ) + (i32.const 8) + ) + ) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 784) + ) + (i32.const 8) + ) + ) ) - (get_local $114) - (get_local $164) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 800) + ) + (i32.const 8) + ) + ) + (get_local $46) ) - (get_local $162) + (get_local $10) + (get_local $36) ) ) (select - (get_local $116) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 832) + ) + (i32.const 8) + ) + ) (i64.const 0) - (get_local $163) + (get_local $45) ) - (get_local $167) + (get_local $43) ) - (get_local $165) + (get_local $14) + (get_local $34) ) (select (select - (get_local $6) (select (i64.or - (get_local $109) - (get_local $110) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 192) + ) + (i32.const 8) + ) + ) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 208) + ) + (i32.const 8) + ) + ) ) - (get_local $111) - (get_local $161) - ) - (set_local $153 - (i64.eq - (get_local $171) - (i64.const 0) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 224) + ) + (i32.const 8) + ) ) + (get_local $51) ) + (get_local $6) + (get_local $40) ) (i64.const 0) - (get_local $160) + (get_local $52) ) ) (select - (get_local $6) (select (i64.or (select - (get_local $120) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 320) + ) + (i32.const 8) + ) + ) (i64.const 0) - (get_local $159) + (get_local $48) ) (select - (get_local $2) (select (i64.or - (get_local $117) - (get_local $118) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 384) + ) + (i32.const 8) + ) + ) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 400) + ) + (i32.const 8) + ) + ) ) - (get_local $119) - (get_local $157) - ) - (set_local $155 - (i64.eq - (get_local $178) - (i64.const 0) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 416) + ) + (i32.const 8) + ) ) + (get_local $49) ) + (get_local $2) + (get_local $39) ) ) (select - (get_local $121) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 448) + ) + (i32.const 8) + ) + ) (i64.const 0) - (get_local $156) + (get_local $47) ) - (get_local $154) + (get_local $50) ) - (get_local $158) + (get_local $6) + (get_local $38) ) - (get_local $166) + (get_local $44) ) - (get_local $165) + (get_local $14) + (get_local $34) ) ) (i64.store @@ -3461,91 +1794,117 @@ (i32.const 96) ) (select - (get_local $13) (select (i64.or (select - (get_local $13) (select (i64.or (select - (get_local $102) + (i64.load offset=992 + (get_local $33) + ) (i64.const 0) - (get_local $168) + (get_local $42) ) (select - (get_local $9) (select (i64.or - (get_local $99) - (get_local $100) + (i64.load offset=768 + (get_local $33) + ) + (i64.load offset=784 + (get_local $33) + ) + ) + (i64.load offset=800 + (get_local $33) ) - (get_local $101) - (get_local $164) + (get_local $46) ) - (get_local $162) + (get_local $9) + (get_local $36) ) ) (select - (get_local $103) + (i64.load offset=832 + (get_local $33) + ) (i64.const 0) - (get_local $163) + (get_local $45) ) - (get_local $167) + (get_local $43) ) - (get_local $165) + (get_local $13) + (get_local $34) ) (select (select - (get_local $5) (select (i64.or - (get_local $96) - (get_local $97) + (i64.load offset=192 + (get_local $33) + ) + (i64.load offset=208 + (get_local $33) + ) + ) + (i64.load offset=224 + (get_local $33) ) - (get_local $98) - (get_local $161) + (get_local $51) ) - (get_local $153) + (get_local $5) + (get_local $40) ) (i64.const 0) - (get_local $160) + (get_local $52) ) ) (select - (get_local $5) (select (i64.or (select - (get_local $107) + (i64.load offset=320 + (get_local $33) + ) (i64.const 0) - (get_local $159) + (get_local $48) ) (select - (get_local $1) (select (i64.or - (get_local $104) - (get_local $105) + (i64.load offset=384 + (get_local $33) + ) + (i64.load offset=400 + (get_local $33) + ) + ) + (i64.load offset=416 + (get_local $33) ) - (get_local $106) - (get_local $157) + (get_local $49) ) - (get_local $155) + (get_local $1) + (get_local $39) ) ) (select - (get_local $108) + (i64.load offset=448 + (get_local $33) + ) (i64.const 0) - (get_local $156) + (get_local $47) ) - (get_local $154) + (get_local $50) ) - (get_local $158) + (get_local $5) + (get_local $38) ) - (get_local $166) + (get_local $44) ) - (get_local $165) + (get_local $13) + (get_local $34) ) ) (i64.store @@ -3554,74 +1913,143 @@ (i32.const 72) ) (select - (get_local $10) (select (i64.or (select (select - (get_local $94) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 896) + ) + (i32.const 8) + ) + ) (i64.const 0) - (get_local $168) + (get_local $42) ) (i64.const 0) - (get_local $167) + (get_local $43) ) (select - (get_local $2) (select (i64.or (select - (get_local $2) (select (i64.or - (get_local $90) - (get_local $91) + (i64.load + (i32.add + (get_local $33) + (i32.const 8) + ) + ) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 16) + ) + (i32.const 8) + ) + ) ) - (get_local $92) - (get_local $161) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 32) + ) + (i32.const 8) + ) + ) + (get_local $51) ) - (get_local $153) + (get_local $2) + (get_local $40) ) (select - (get_local $93) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 64) + ) + (i32.const 8) + ) + ) (i64.const 0) - (set_local $163 - (i64.lt_u - (get_local $170) - (i64.const 128) + (set_local $35 + (i32.lt_u + (get_local $41) + (i32.const 128) ) ) ) ) (select - (get_local $6) (select (i64.or - (get_local $87) - (get_local $88) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 128) + ) + (i32.const 8) + ) + ) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 144) + ) + (i32.const 8) + ) + ) ) - (get_local $89) - (get_local $164) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 160) + ) + (i32.const 8) + ) + ) + (get_local $46) ) - (get_local $162) + (get_local $6) + (get_local $36) ) - (get_local $160) + (get_local $52) ) - (get_local $153) + (get_local $2) + (get_local $40) ) ) (select (select - (get_local $95) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 256) + ) + (i32.const 8) + ) + ) (i64.const 0) - (get_local $159) + (get_local $48) ) (i64.const 0) - (get_local $154) + (get_local $50) ) - (get_local $166) + (get_local $44) ) - (get_local $165) + (get_local $10) + (get_local $34) ) ) (i64.store @@ -3630,69 +2058,87 @@ (i32.const 64) ) (select - (get_local $9) (select (i64.or (select (select - (get_local $85) + (i64.load offset=896 + (get_local $33) + ) (i64.const 0) - (get_local $168) + (get_local $42) ) (i64.const 0) - (get_local $167) + (get_local $43) ) (select - (get_local $1) (select (i64.or (select - (get_local $1) (select (i64.or - (get_local $81) - (get_local $82) + (i64.load + (get_local $33) + ) + (i64.load offset=16 + (get_local $33) + ) ) - (get_local $83) - (get_local $161) + (i64.load offset=32 + (get_local $33) + ) + (get_local $51) ) - (get_local $153) + (get_local $1) + (get_local $40) ) (select - (get_local $84) + (i64.load offset=64 + (get_local $33) + ) (i64.const 0) - (get_local $163) + (get_local $35) ) ) (select - (get_local $5) (select (i64.or - (get_local $78) - (get_local $79) + (i64.load offset=128 + (get_local $33) + ) + (i64.load offset=144 + (get_local $33) + ) ) - (get_local $80) - (get_local $164) + (i64.load offset=160 + (get_local $33) + ) + (get_local $46) ) - (get_local $162) + (get_local $5) + (get_local $36) ) - (get_local $160) + (get_local $52) ) - (get_local $153) + (get_local $1) + (get_local $40) ) ) (select (select - (get_local $86) + (i64.load offset=256 + (get_local $33) + ) (i64.const 0) - (get_local $159) + (get_local $48) ) (i64.const 0) - (get_local $154) + (get_local $50) ) - (get_local $166) + (get_local $44) ) - (get_local $165) + (get_local $9) + (get_local $34) ) ) (i64.store @@ -3701,81 +2147,164 @@ (i32.const 88) ) (select - (get_local $12) (select (i64.or (select (select - (get_local $12) (select (i64.or - (get_local $67) - (get_local $68) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 912) + ) + (i32.const 8) + ) + ) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 928) + ) + (i32.const 8) + ) + ) ) - (get_local $69) - (get_local $168) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 944) + ) + (i32.const 8) + ) + ) + (get_local $42) ) - (get_local $165) + (get_local $12) + (get_local $34) ) (i64.const 0) - (get_local $167) + (get_local $43) ) (select - (get_local $4) (select (i64.or (select - (get_local $73) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 48) + ) + (i32.const 8) + ) + ) (i64.const 0) - (get_local $161) + (get_local $51) ) (select - (get_local $8) (select (i64.or - (get_local $70) - (get_local $71) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 80) + ) + (i32.const 8) + ) + ) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 96) + ) + (i32.const 8) + ) + ) ) - (get_local $72) - (get_local $163) - ) - (set_local $162 - (i64.eq - (get_local $170) - (i64.const 0) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 112) + ) + (i32.const 8) + ) ) + (get_local $35) ) + (get_local $8) + (get_local $41) ) ) (select - (get_local $74) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 176) + ) + (i32.const 8) + ) + ) (i64.const 0) - (get_local $164) + (get_local $46) ) - (get_local $160) + (get_local $52) ) - (get_local $153) + (get_local $4) + (get_local $40) ) ) (select (select - (get_local $4) (select (i64.or - (get_local $76) - (get_local $75) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 272) + ) + (i32.const 8) + ) + ) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 288) + ) + (i32.const 8) + ) + ) + ) + (i64.load + (i32.add + (i32.add + (get_local $33) + (i32.const 304) + ) + (i32.const 8) + ) ) - (get_local $77) - (get_local $159) + (get_local $48) ) - (get_local $158) + (get_local $4) + (get_local $38) ) (i64.const 0) - (get_local $154) + (get_local $50) ) - (get_local $166) + (get_local $44) ) - (get_local $165) + (get_local $12) + (get_local $34) ) ) (i64.store @@ -3784,94 +2313,105 @@ (i32.const 80) ) (select - (get_local $11) (select (i64.or (select (select - (get_local $11) (select (i64.or - (get_local $56) - (get_local $57) + (i64.load offset=912 + (get_local $33) + ) + (i64.load offset=928 + (get_local $33) + ) ) - (get_local $58) - (get_local $168) + (i64.load offset=944 + (get_local $33) + ) + (get_local $42) ) - (get_local $165) + (get_local $11) + (get_local $34) ) (i64.const 0) - (get_local $167) + (get_local $43) ) (select - (get_local $3) (select (i64.or (select - (get_local $62) + (i64.load offset=48 + (get_local $33) + ) (i64.const 0) - (get_local $161) + (get_local $51) ) (select - (get_local $7) (select (i64.or - (get_local $59) - (get_local $60) + (i64.load offset=80 + (get_local $33) + ) + (i64.load offset=96 + (get_local $33) + ) ) - (get_local $61) - (get_local $163) + (i64.load offset=112 + (get_local $33) + ) + (get_local $35) ) - (get_local $162) + (get_local $7) + (get_local $41) ) ) (select - (get_local $63) + (i64.load offset=176 + (get_local $33) + ) (i64.const 0) - (get_local $164) + (get_local $46) ) - (get_local $160) + (get_local $52) ) - (get_local $153) + (get_local $3) + (get_local $40) ) ) (select (select - (get_local $3) (select (i64.or - (get_local $65) - (get_local $64) + (i64.load offset=272 + (get_local $33) + ) + (i64.load offset=288 + (get_local $33) + ) + ) + (i64.load offset=304 + (get_local $33) ) - (get_local $66) - (get_local $159) + (get_local $48) ) - (get_local $158) + (get_local $3) + (get_local $38) ) (i64.const 0) - (get_local $154) + (get_local $50) ) - (get_local $166) + (get_local $44) ) - (get_local $165) - ) - ) - (set_local $185 - (i32.const 1024) - ) - (set_local $312 - (i32.add - (get_local $312) - (get_local $185) + (get_local $11) + (get_local $34) ) ) - (set_local $185 + (i32.store (i32.const 4) - ) - (set_local $312 - (i32.store - (get_local $185) - (get_local $312) + (i32.add + (get_local $33) + (i32.const 1024) ) ) (return) diff --git a/test/llvm_autogenerated/llvm-to-s.py b/test/llvm_autogenerated/llvm-to-s.py index 05a03da2b..cae3dfcee 100755 --- a/test/llvm_autogenerated/llvm-to-s.py +++ b/test/llvm_autogenerated/llvm-to-s.py @@ -58,6 +58,7 @@ def main(args): 'vtable', # external global symbol 'offset-folding', # external global symbol 'address-offsets', # external global symbol + 'memory-addr64', # wasm64 ] if name_noext in BLACKLIST: continue diff --git a/test/llvm_autogenerated/mem-intrinsics.s b/test/llvm_autogenerated/mem-intrinsics.s index 41cc1b319..5efdeba00 100644 --- a/test/llvm_autogenerated/mem-intrinsics.s +++ b/test/llvm_autogenerated/mem-intrinsics.s @@ -66,25 +66,26 @@ set_no: .globl frame_index .type frame_index,@function frame_index: - .local i32, i32, i32, i32, i32 - i32.const $0=, __stack_pointer - i32.load $0=, 0($0) - i32.const $1=, 4096 - i32.sub $4=, $0, $1 - i32.const $1=, __stack_pointer - i32.store $4=, 0($1), $4 - i32.const $push1=, 0 - i32.const $push0=, 1024 - i32.const $3=, 2048 - i32.add $3=, $4, $3 - i32.call $drop=, memset@FUNCTION, $3, $pop1, $pop0 - i32.const $push3=, 0 - i32.const $push2=, 1024 - i32.call $drop=, memset@FUNCTION, $4, $pop3, $pop2 - i32.const $2=, 4096 - i32.add $4=, $4, $2 - i32.const $2=, __stack_pointer - i32.store $4=, 0($2), $4 + .local i32 + i32.const $push6=, __stack_pointer + i32.const $push3=, __stack_pointer + i32.load $push4=, 0($pop3) + i32.const $push5=, 4096 + i32.sub $push12=, $pop4, $pop5 + i32.store $push16=, 0($pop6), $pop12 + tee_local $push15=, $0=, $pop16 + i32.const $push10=, 2048 + i32.add $push11=, $pop15, $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 $push7=, 4096 + i32.add $push8=, $pop0, $pop7 + i32.store $drop=, 0($pop9), $pop8 return .endfunc .Lfunc_end6: @@ -97,20 +98,53 @@ drop_result: .result i32 block block - i32.const $push0=, 0 - i32.eq $push1=, $3, $pop0 - br_if 0, $pop1 + block + i32.eqz $push0=, $3 + br_if 0, $pop0 i32.call $0=, def@FUNCTION br 1 .LBB7_2: end_block - br_if 0, $4 - i32.call $drop=, memset@FUNCTION, $0, $1, $2 + i32.eqz $push1=, $4 + br_if 1, $pop1 +.LBB7_3: + end_block + call block_tail_dup@FUNCTION + return $0 .LBB7_4: end_block + i32.call $drop=, memset@FUNCTION, $0, $1, $2 + call block_tail_dup@FUNCTION return $0 .endfunc .Lfunc_end7: .size drop_result, .Lfunc_end7-drop_result + .globl tail_dup_to_reuse_result + .type tail_dup_to_reuse_result,@function +tail_dup_to_reuse_result: + .param i32, i32, i32, i32, i32 + .result i32 + block + block + block + i32.eqz $push1=, $3 + br_if 0, $pop1 + i32.call $0=, def@FUNCTION + br 1 +.LBB8_2: + end_block + i32.eqz $push2=, $4 + br_if 1, $pop2 +.LBB8_3: + end_block + return $0 +.LBB8_4: + end_block + i32.call $push0=, memset@FUNCTION, $0, $1, $2 + return $pop0 + .endfunc +.Lfunc_end8: + .size tail_dup_to_reuse_result, .Lfunc_end8-tail_dup_to_reuse_result + diff --git a/test/llvm_autogenerated/mem-intrinsics.wast b/test/llvm_autogenerated/mem-intrinsics.wast index 8fd21837d..6f3416a14 100644 --- a/test/llvm_autogenerated/mem-intrinsics.wast +++ b/test/llvm_autogenerated/mem-intrinsics.wast @@ -3,8 +3,10 @@ (segment 4 "\10\04\00\00") ) (export "memory" memory) + (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$iiii (func (param 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)) @@ -17,6 +19,7 @@ (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 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (return (call_import $memcpy @@ -70,71 +73,33 @@ ) (func $frame_index (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (set_local $0 - (i32.const 4) - ) - (set_local $0 - (i32.load - (get_local $0) - ) - ) - (set_local $1 - (i32.const 4096) - ) - (set_local $4 - (i32.sub - (get_local $0) - (get_local $1) - ) - ) - (set_local $1 - (i32.const 4) - ) - (set_local $4 - (i32.store - (get_local $1) - (get_local $4) - ) - ) - (set_local $3 - (i32.const 2048) - ) - (set_local $3 + (call_import $memset (i32.add - (get_local $4) - (get_local $3) + (set_local $0 + (i32.store + (i32.const 4) + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 4096) + ) + ) + ) + (i32.const 2048) ) - ) - (call_import $memset - (get_local $3) - (i32.const 0) - (i32.const 1024) - ) - (call_import $memset - (get_local $4) (i32.const 0) (i32.const 1024) ) - (set_local $2 - (i32.const 4096) - ) - (set_local $4 - (i32.add - (get_local $4) - (get_local $2) - ) - ) - (set_local $2 + (i32.store (i32.const 4) - ) - (set_local $4 - (i32.store - (get_local $2) - (get_local $4) + (i32.add + (call_import $memset + (get_local $0) + (i32.const 0) + (i32.const 1024) + ) + (i32.const 4096) ) ) (return) @@ -142,29 +107,69 @@ (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 - (br_if $label$1 - (i32.eq - (get_local $3) - (i32.const 0) + (block $label$2 + (br_if $label$2 + (i32.eqz + (get_local $3) + ) + ) + (set_local $0 + (call_import $def) ) + (br $label$1) ) - (set_local $0 - (call_import $def) + (br_if $label$0 + (i32.eqz + (get_local $4) + ) + ) + ) + (call_import $block_tail_dup) + (return + (get_local $0) + ) + ) + (call_import $memset + (get_local $0) + (get_local $1) + (get_local $2) + ) + (call_import $block_tail_dup) + (return + (get_local $0) + ) + ) + (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 + (br_if $label$2 + (i32.eqz + (get_local $3) + ) + ) + (set_local $0 + (call_import $def) + ) + (br $label$1) + ) + (br_if $label$0 + (i32.eqz + (get_local $4) + ) ) - (br $label$0) ) - (br_if $label$0 - (get_local $4) + (return + (get_local $0) ) + ) + (return (call_import $memset (get_local $0) (get_local $1) (get_local $2) ) ) - (return - (get_local $0) - ) ) ) ;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/memory-addr32.s b/test/llvm_autogenerated/memory-addr32.s index f693e4769..3e71e78d4 100644 --- a/test/llvm_autogenerated/memory-addr32.s +++ b/test/llvm_autogenerated/memory-addr32.s @@ -1,14 +1,14 @@ .text .file "/s/llvm/llvm/test/CodeGen/WebAssembly/memory-addr32.ll" - .globl memory_size - .type memory_size,@function -memory_size: + .globl current_memory + .type current_memory,@function +current_memory: .result i32 - memory_size $push0= + current_memory $push0= return $pop0 .endfunc .Lfunc_end0: - .size memory_size, .Lfunc_end0-memory_size + .size current_memory, .Lfunc_end0-current_memory .globl grow_memory .type grow_memory,@function diff --git a/test/llvm_autogenerated/memory-addr32.wast b/test/llvm_autogenerated/memory-addr32.wast index 09494f014..e75c80eaf 100644 --- a/test/llvm_autogenerated/memory-addr32.wast +++ b/test/llvm_autogenerated/memory-addr32.wast @@ -3,9 +3,9 @@ (segment 4 "\10\04\00\00") ) (export "memory" memory) - (export "memory_size" $memory_size) + (export "current_memory" $current_memory) (export "grow_memory" $grow_memory) - (func $memory_size (result i32) + (func $current_memory (result i32) (return (current_memory) ) diff --git a/test/llvm_autogenerated/offset-folding.s b/test/llvm_autogenerated/offset-folding.s deleted file mode 100644 index 897b0d45a..000000000 --- a/test/llvm_autogenerated/offset-folding.s +++ /dev/null @@ -1,54 +0,0 @@ - .text - .file "/s/llvm/llvm/test/CodeGen/WebAssembly/offset-folding.ll" - .globl test0 - .type test0,@function -test0: - .result i32 - i32.const $push0=, x+188 - return $pop0 -.Lfunc_end0: - .size test0, .Lfunc_end0-test0 - - .globl test1 - .type test1,@function -test1: - .result i32 - i32.const $push0=, y+188 - return $pop0 -.Lfunc_end1: - .size test1, .Lfunc_end1-test1 - - .globl test2 - .type test2,@function -test2: - .result i32 - i32.const $push0=, x - return $pop0 -.Lfunc_end2: - .size test2, .Lfunc_end2-test2 - - .globl test3 - .type test3,@function -test3: - .result i32 - i32.const $push0=, y - return $pop0 -.Lfunc_end3: - .size test3, .Lfunc_end3-test3 - - .type x,@object - .bss - .globl x - .align 2 -x: - .size x, 0 - - .type y,@object - .globl y - .align 4 -y: - .skip 200 - .size y, 200 - - - .section ".note.GNU-stack","",@progbits diff --git a/test/llvm_autogenerated/offset-folding.wast b/test/llvm_autogenerated/offset-folding.wast deleted file mode 100644 index 9b21a7572..000000000 --- a/test/llvm_autogenerated/offset-folding.wast +++ /dev/null @@ -1,31 +0,0 @@ -(module - (memory 1 - (segment 4 "\e0\04\00\00") - ) - (export "memory" memory) - (export "test0" $test0) - (export "test1" $test1) - (export "test2" $test2) - (export "test3" $test3) - (func $test0 (result i32) - (return - (i32.const 200) - ) - ) - (func $test1 (result i32) - (return - (i32.const 204) - ) - ) - (func $test2 (result i32) - (return - (i32.const 12) - ) - ) - (func $test3 (result i32) - (return - (i32.const 16) - ) - ) -) -;; METADATA: { "asmConsts": {},"staticBump": 1248, "initializers": [] } diff --git a/test/llvm_autogenerated/offset.s b/test/llvm_autogenerated/offset.s index 015d0ae16..f267ea537 100644 --- a/test/llvm_autogenerated/offset.s +++ b/test/llvm_autogenerated/offset.s @@ -6,7 +6,6 @@ load_i32_with_folded_offset: .param i32 .result i32 i32.load $push0=, 24($0) - return $pop0 .endfunc .Lfunc_end0: .size load_i32_with_folded_offset, .Lfunc_end0-load_i32_with_folded_offset @@ -17,7 +16,6 @@ load_i32_with_folded_gep_offset: .param i32 .result i32 i32.load $push0=, 24($0) - return $pop0 .endfunc .Lfunc_end1: .size load_i32_with_folded_gep_offset, .Lfunc_end1-load_i32_with_folded_gep_offset @@ -30,7 +28,6 @@ load_i32_with_unfolded_gep_negative_offset: i32.const $push0=, -24 i32.add $push1=, $0, $pop0 i32.load $push2=, 0($pop1) - return $pop2 .endfunc .Lfunc_end2: .size load_i32_with_unfolded_gep_negative_offset, .Lfunc_end2-load_i32_with_unfolded_gep_negative_offset @@ -43,7 +40,6 @@ load_i32_with_unfolded_offset: i32.const $push0=, 24 i32.add $push1=, $0, $pop0 i32.load $push2=, 0($pop1) - return $pop2 .endfunc .Lfunc_end3: .size load_i32_with_unfolded_offset, .Lfunc_end3-load_i32_with_unfolded_offset @@ -56,7 +52,6 @@ load_i32_with_unfolded_gep_offset: i32.const $push0=, 24 i32.add $push1=, $0, $pop0 i32.load $push2=, 0($pop1) - return $pop2 .endfunc .Lfunc_end4: .size load_i32_with_unfolded_gep_offset, .Lfunc_end4-load_i32_with_unfolded_gep_offset @@ -67,7 +62,6 @@ load_i64_with_folded_offset: .param i32 .result i64 i64.load $push0=, 24($0) - return $pop0 .endfunc .Lfunc_end5: .size load_i64_with_folded_offset, .Lfunc_end5-load_i64_with_folded_offset @@ -78,7 +72,6 @@ load_i64_with_folded_gep_offset: .param i32 .result i64 i64.load $push0=, 24($0) - return $pop0 .endfunc .Lfunc_end6: .size load_i64_with_folded_gep_offset, .Lfunc_end6-load_i64_with_folded_gep_offset @@ -91,7 +84,6 @@ load_i64_with_unfolded_gep_negative_offset: i32.const $push0=, -24 i32.add $push1=, $0, $pop0 i64.load $push2=, 0($pop1) - return $pop2 .endfunc .Lfunc_end7: .size load_i64_with_unfolded_gep_negative_offset, .Lfunc_end7-load_i64_with_unfolded_gep_negative_offset @@ -104,7 +96,6 @@ load_i64_with_unfolded_offset: i32.const $push0=, 24 i32.add $push1=, $0, $pop0 i64.load $push2=, 0($pop1) - return $pop2 .endfunc .Lfunc_end8: .size load_i64_with_unfolded_offset, .Lfunc_end8-load_i64_with_unfolded_offset @@ -117,21 +108,31 @@ load_i64_with_unfolded_gep_offset: i32.const $push0=, 24 i32.add $push1=, $0, $pop0 i64.load $push2=, 0($pop1) - return $pop2 .endfunc .Lfunc_end9: .size load_i64_with_unfolded_gep_offset, .Lfunc_end9-load_i64_with_unfolded_gep_offset + .globl load_i32_with_folded_or_offset + .type load_i32_with_folded_or_offset,@function +load_i32_with_folded_or_offset: + .param i32 + .result i32 + i32.const $push0=, -4 + i32.and $push1=, $0, $pop0 + i32.load8_s $push2=, 2($pop1) + .endfunc +.Lfunc_end10: + .size load_i32_with_folded_or_offset, .Lfunc_end10-load_i32_with_folded_or_offset + .globl store_i32_with_folded_offset .type store_i32_with_folded_offset,@function store_i32_with_folded_offset: .param i32 i32.const $push0=, 0 i32.store $drop=, 24($0), $pop0 - return .endfunc -.Lfunc_end10: - .size store_i32_with_folded_offset, .Lfunc_end10-store_i32_with_folded_offset +.Lfunc_end11: + .size store_i32_with_folded_offset, .Lfunc_end11-store_i32_with_folded_offset .globl store_i32_with_folded_gep_offset .type store_i32_with_folded_gep_offset,@function @@ -139,10 +140,9 @@ store_i32_with_folded_gep_offset: .param i32 i32.const $push0=, 0 i32.store $drop=, 24($0), $pop0 - return .endfunc -.Lfunc_end11: - .size store_i32_with_folded_gep_offset, .Lfunc_end11-store_i32_with_folded_gep_offset +.Lfunc_end12: + .size store_i32_with_folded_gep_offset, .Lfunc_end12-store_i32_with_folded_gep_offset .globl store_i32_with_unfolded_gep_negative_offset .type store_i32_with_unfolded_gep_negative_offset,@function @@ -152,10 +152,9 @@ store_i32_with_unfolded_gep_negative_offset: i32.add $push1=, $0, $pop0 i32.const $push2=, 0 i32.store $drop=, 0($pop1), $pop2 - return .endfunc -.Lfunc_end12: - .size store_i32_with_unfolded_gep_negative_offset, .Lfunc_end12-store_i32_with_unfolded_gep_negative_offset +.Lfunc_end13: + .size store_i32_with_unfolded_gep_negative_offset, .Lfunc_end13-store_i32_with_unfolded_gep_negative_offset .globl store_i32_with_unfolded_offset .type store_i32_with_unfolded_offset,@function @@ -165,10 +164,9 @@ store_i32_with_unfolded_offset: i32.add $push1=, $0, $pop0 i32.const $push2=, 0 i32.store $drop=, 0($pop1), $pop2 - return .endfunc -.Lfunc_end13: - .size store_i32_with_unfolded_offset, .Lfunc_end13-store_i32_with_unfolded_offset +.Lfunc_end14: + .size store_i32_with_unfolded_offset, .Lfunc_end14-store_i32_with_unfolded_offset .globl store_i32_with_unfolded_gep_offset .type store_i32_with_unfolded_gep_offset,@function @@ -178,10 +176,9 @@ store_i32_with_unfolded_gep_offset: i32.add $push1=, $0, $pop0 i32.const $push2=, 0 i32.store $drop=, 0($pop1), $pop2 - return .endfunc -.Lfunc_end14: - .size store_i32_with_unfolded_gep_offset, .Lfunc_end14-store_i32_with_unfolded_gep_offset +.Lfunc_end15: + .size store_i32_with_unfolded_gep_offset, .Lfunc_end15-store_i32_with_unfolded_gep_offset .globl store_i64_with_folded_offset .type store_i64_with_folded_offset,@function @@ -189,10 +186,9 @@ store_i64_with_folded_offset: .param i32 i64.const $push0=, 0 i64.store $drop=, 24($0), $pop0 - return .endfunc -.Lfunc_end15: - .size store_i64_with_folded_offset, .Lfunc_end15-store_i64_with_folded_offset +.Lfunc_end16: + .size store_i64_with_folded_offset, .Lfunc_end16-store_i64_with_folded_offset .globl store_i64_with_folded_gep_offset .type store_i64_with_folded_gep_offset,@function @@ -200,10 +196,9 @@ store_i64_with_folded_gep_offset: .param i32 i64.const $push0=, 0 i64.store $drop=, 24($0), $pop0 - return .endfunc -.Lfunc_end16: - .size store_i64_with_folded_gep_offset, .Lfunc_end16-store_i64_with_folded_gep_offset +.Lfunc_end17: + .size store_i64_with_folded_gep_offset, .Lfunc_end17-store_i64_with_folded_gep_offset .globl store_i64_with_unfolded_gep_negative_offset .type store_i64_with_unfolded_gep_negative_offset,@function @@ -213,10 +208,9 @@ store_i64_with_unfolded_gep_negative_offset: i32.add $push1=, $0, $pop0 i64.const $push2=, 0 i64.store $drop=, 0($pop1), $pop2 - return .endfunc -.Lfunc_end17: - .size store_i64_with_unfolded_gep_negative_offset, .Lfunc_end17-store_i64_with_unfolded_gep_negative_offset +.Lfunc_end18: + .size store_i64_with_unfolded_gep_negative_offset, .Lfunc_end18-store_i64_with_unfolded_gep_negative_offset .globl store_i64_with_unfolded_offset .type store_i64_with_unfolded_offset,@function @@ -226,10 +220,9 @@ store_i64_with_unfolded_offset: i32.add $push1=, $0, $pop0 i64.const $push2=, 0 i64.store $drop=, 0($pop1), $pop2 - return .endfunc -.Lfunc_end18: - .size store_i64_with_unfolded_offset, .Lfunc_end18-store_i64_with_unfolded_offset +.Lfunc_end19: + .size store_i64_with_unfolded_offset, .Lfunc_end19-store_i64_with_unfolded_offset .globl store_i64_with_unfolded_gep_offset .type store_i64_with_unfolded_gep_offset,@function @@ -239,10 +232,21 @@ store_i64_with_unfolded_gep_offset: i32.add $push1=, $0, $pop0 i64.const $push2=, 0 i64.store $drop=, 0($pop1), $pop2 - return .endfunc -.Lfunc_end19: - .size store_i64_with_unfolded_gep_offset, .Lfunc_end19-store_i64_with_unfolded_gep_offset +.Lfunc_end20: + .size store_i64_with_unfolded_gep_offset, .Lfunc_end20-store_i64_with_unfolded_gep_offset + + .globl store_i32_with_folded_or_offset + .type store_i32_with_folded_or_offset,@function +store_i32_with_folded_or_offset: + .param i32 + i32.const $push0=, -4 + i32.and $push1=, $0, $pop0 + i32.const $push2=, 0 + i32.store8 $drop=, 2($pop1), $pop2 + .endfunc +.Lfunc_end21: + .size store_i32_with_folded_or_offset, .Lfunc_end21-store_i32_with_folded_or_offset .globl load_i32_from_numeric_address .type load_i32_from_numeric_address,@function @@ -250,10 +254,9 @@ load_i32_from_numeric_address: .result i32 i32.const $push0=, 0 i32.load $push1=, 42($pop0) - return $pop1 .endfunc -.Lfunc_end20: - .size load_i32_from_numeric_address, .Lfunc_end20-load_i32_from_numeric_address +.Lfunc_end22: + .size load_i32_from_numeric_address, .Lfunc_end22-load_i32_from_numeric_address .globl load_i32_from_global_address .type load_i32_from_global_address,@function @@ -261,10 +264,9 @@ load_i32_from_global_address: .result i32 i32.const $push0=, 0 i32.load $push1=, gv($pop0) - return $pop1 .endfunc -.Lfunc_end21: - .size load_i32_from_global_address, .Lfunc_end21-load_i32_from_global_address +.Lfunc_end23: + .size load_i32_from_global_address, .Lfunc_end23-load_i32_from_global_address .globl store_i32_to_numeric_address .type store_i32_to_numeric_address,@function @@ -272,10 +274,9 @@ store_i32_to_numeric_address: i32.const $push0=, 0 i32.const $push1=, 0 i32.store $drop=, 42($pop0), $pop1 - return .endfunc -.Lfunc_end22: - .size store_i32_to_numeric_address, .Lfunc_end22-store_i32_to_numeric_address +.Lfunc_end24: + .size store_i32_to_numeric_address, .Lfunc_end24-store_i32_to_numeric_address .globl store_i32_to_global_address .type store_i32_to_global_address,@function @@ -283,10 +284,9 @@ store_i32_to_global_address: i32.const $push0=, 0 i32.const $push1=, 0 i32.store $drop=, gv($pop0), $pop1 - return .endfunc -.Lfunc_end23: - .size store_i32_to_global_address, .Lfunc_end23-store_i32_to_global_address +.Lfunc_end25: + .size store_i32_to_global_address, .Lfunc_end25-store_i32_to_global_address .globl load_i8_s_with_folded_offset .type load_i8_s_with_folded_offset,@function @@ -294,10 +294,9 @@ load_i8_s_with_folded_offset: .param i32 .result i32 i32.load8_s $push0=, 24($0) - return $pop0 .endfunc -.Lfunc_end24: - .size load_i8_s_with_folded_offset, .Lfunc_end24-load_i8_s_with_folded_offset +.Lfunc_end26: + .size load_i8_s_with_folded_offset, .Lfunc_end26-load_i8_s_with_folded_offset .globl load_i8_s_with_folded_gep_offset .type load_i8_s_with_folded_gep_offset,@function @@ -305,10 +304,9 @@ load_i8_s_with_folded_gep_offset: .param i32 .result i32 i32.load8_s $push0=, 24($0) - return $pop0 .endfunc -.Lfunc_end25: - .size load_i8_s_with_folded_gep_offset, .Lfunc_end25-load_i8_s_with_folded_gep_offset +.Lfunc_end27: + .size load_i8_s_with_folded_gep_offset, .Lfunc_end27-load_i8_s_with_folded_gep_offset .globl load_i8_u_with_folded_offset .type load_i8_u_with_folded_offset,@function @@ -316,10 +314,9 @@ load_i8_u_with_folded_offset: .param i32 .result i32 i32.load8_u $push0=, 24($0) - return $pop0 .endfunc -.Lfunc_end26: - .size load_i8_u_with_folded_offset, .Lfunc_end26-load_i8_u_with_folded_offset +.Lfunc_end28: + .size load_i8_u_with_folded_offset, .Lfunc_end28-load_i8_u_with_folded_offset .globl load_i8_u_with_folded_gep_offset .type load_i8_u_with_folded_gep_offset,@function @@ -327,10 +324,9 @@ load_i8_u_with_folded_gep_offset: .param i32 .result i32 i32.load8_u $push0=, 24($0) - return $pop0 .endfunc -.Lfunc_end27: - .size load_i8_u_with_folded_gep_offset, .Lfunc_end27-load_i8_u_with_folded_gep_offset +.Lfunc_end29: + .size load_i8_u_with_folded_gep_offset, .Lfunc_end29-load_i8_u_with_folded_gep_offset .globl store_i8_with_folded_offset .type store_i8_with_folded_offset,@function @@ -338,10 +334,9 @@ store_i8_with_folded_offset: .param i32 i32.const $push0=, 0 i32.store8 $drop=, 24($0), $pop0 - return .endfunc -.Lfunc_end28: - .size store_i8_with_folded_offset, .Lfunc_end28-store_i8_with_folded_offset +.Lfunc_end30: + .size store_i8_with_folded_offset, .Lfunc_end30-store_i8_with_folded_offset .globl store_i8_with_folded_gep_offset .type store_i8_with_folded_gep_offset,@function @@ -349,10 +344,9 @@ store_i8_with_folded_gep_offset: .param i32 i32.const $push0=, 0 i32.store8 $drop=, 24($0), $pop0 - return .endfunc -.Lfunc_end29: - .size store_i8_with_folded_gep_offset, .Lfunc_end29-store_i8_with_folded_gep_offset +.Lfunc_end31: + .size store_i8_with_folded_gep_offset, .Lfunc_end31-store_i8_with_folded_gep_offset .globl aggregate_load_store .type aggregate_load_store,@function @@ -367,37 +361,34 @@ aggregate_load_store: i32.store $drop=, 8($1), $4 i32.store $drop=, 4($1), $3 i32.store $drop=, 0($1), $2 - return .endfunc -.Lfunc_end30: - .size aggregate_load_store, .Lfunc_end30-aggregate_load_store +.Lfunc_end32: + .size aggregate_load_store, .Lfunc_end32-aggregate_load_store .globl aggregate_return .type aggregate_return,@function aggregate_return: .param i32 - i64.const $push0=, 0 - i64.store $push1=, 8($0):p2align=2, $pop0 - i64.store $drop=, 0($0):p2align=2, $pop1 - return + i64.const $push1=, 0 + i64.store $push0=, 8($0):p2align=2, $pop1 + i64.store $drop=, 0($0):p2align=2, $pop0 .endfunc -.Lfunc_end31: - .size aggregate_return, .Lfunc_end31-aggregate_return +.Lfunc_end33: + .size aggregate_return, .Lfunc_end33-aggregate_return .globl aggregate_return_without_merge .type aggregate_return_without_merge,@function aggregate_return_without_merge: .param i32 - i32.const $push0=, 0 - i32.store8 $push1=, 14($0), $pop0 - i32.store16 $push2=, 12($0), $pop1 - i32.store $drop=, 8($0), $pop2 + 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 - return .endfunc -.Lfunc_end32: - .size aggregate_return_without_merge, .Lfunc_end32-aggregate_return_without_merge +.Lfunc_end34: + .size aggregate_return_without_merge, .Lfunc_end34-aggregate_return_without_merge .type gv,@object .bss diff --git a/test/llvm_autogenerated/offset.wast b/test/llvm_autogenerated/offset.wast index 753d72170..63383af3a 100644 --- a/test/llvm_autogenerated/offset.wast +++ b/test/llvm_autogenerated/offset.wast @@ -14,6 +14,7 @@ (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) @@ -24,6 +25,7 @@ (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) @@ -38,90 +40,78 @@ (export "aggregate_return" $aggregate_return) (export "aggregate_return_without_merge" $aggregate_return_without_merge) (func $load_i32_with_folded_offset (param $0 i32) (result i32) - (return - (i32.load offset=24 - (get_local $0) - ) + (i32.load offset=24 + (get_local $0) ) ) (func $load_i32_with_folded_gep_offset (param $0 i32) (result i32) - (return - (i32.load offset=24 - (get_local $0) - ) + (i32.load offset=24 + (get_local $0) ) ) (func $load_i32_with_unfolded_gep_negative_offset (param $0 i32) (result i32) - (return - (i32.load - (i32.add - (get_local $0) - (i32.const -24) - ) + (i32.load + (i32.add + (get_local $0) + (i32.const -24) ) ) ) (func $load_i32_with_unfolded_offset (param $0 i32) (result i32) - (return - (i32.load - (i32.add - (get_local $0) - (i32.const 24) - ) + (i32.load + (i32.add + (get_local $0) + (i32.const 24) ) ) ) (func $load_i32_with_unfolded_gep_offset (param $0 i32) (result i32) - (return - (i32.load - (i32.add - (get_local $0) - (i32.const 24) - ) + (i32.load + (i32.add + (get_local $0) + (i32.const 24) ) ) ) (func $load_i64_with_folded_offset (param $0 i32) (result i64) - (return - (i64.load offset=24 - (get_local $0) - ) + (i64.load offset=24 + (get_local $0) ) ) (func $load_i64_with_folded_gep_offset (param $0 i32) (result i64) - (return - (i64.load offset=24 - (get_local $0) - ) + (i64.load offset=24 + (get_local $0) ) ) (func $load_i64_with_unfolded_gep_negative_offset (param $0 i32) (result i64) - (return - (i64.load - (i32.add - (get_local $0) - (i32.const -24) - ) + (i64.load + (i32.add + (get_local $0) + (i32.const -24) ) ) ) (func $load_i64_with_unfolded_offset (param $0 i32) (result i64) - (return - (i64.load - (i32.add - (get_local $0) - (i32.const 24) - ) + (i64.load + (i32.add + (get_local $0) + (i32.const 24) ) ) ) (func $load_i64_with_unfolded_gep_offset (param $0 i32) (result i64) - (return - (i64.load - (i32.add - (get_local $0) - (i32.const 24) - ) + (i64.load + (i32.add + (get_local $0) + (i32.const 24) + ) + ) + ) + (func $load_i32_with_folded_or_offset (param $0 i32) (result i32) + (i32.load8_s offset=2 + (i32.and + (get_local $0) + (i32.const -4) ) ) ) @@ -130,14 +120,12 @@ (get_local $0) (i32.const 0) ) - (return) ) (func $store_i32_with_folded_gep_offset (param $0 i32) (i32.store offset=24 (get_local $0) (i32.const 0) ) - (return) ) (func $store_i32_with_unfolded_gep_negative_offset (param $0 i32) (i32.store @@ -147,7 +135,6 @@ ) (i32.const 0) ) - (return) ) (func $store_i32_with_unfolded_offset (param $0 i32) (i32.store @@ -157,7 +144,6 @@ ) (i32.const 0) ) - (return) ) (func $store_i32_with_unfolded_gep_offset (param $0 i32) (i32.store @@ -167,21 +153,18 @@ ) (i32.const 0) ) - (return) ) (func $store_i64_with_folded_offset (param $0 i32) (i64.store offset=24 (get_local $0) (i64.const 0) ) - (return) ) (func $store_i64_with_folded_gep_offset (param $0 i32) (i64.store offset=24 (get_local $0) (i64.const 0) ) - (return) ) (func $store_i64_with_unfolded_gep_negative_offset (param $0 i32) (i64.store @@ -191,7 +174,6 @@ ) (i64.const 0) ) - (return) ) (func $store_i64_with_unfolded_offset (param $0 i32) (i64.store @@ -201,7 +183,6 @@ ) (i64.const 0) ) - (return) ) (func $store_i64_with_unfolded_gep_offset (param $0 i32) (i64.store @@ -211,20 +192,24 @@ ) (i64.const 0) ) - (return) ) - (func $load_i32_from_numeric_address (result i32) - (return - (i32.load offset=42 - (i32.const 0) + (func $store_i32_with_folded_or_offset (param $0 i32) + (i32.store8 offset=2 + (i32.and + (get_local $0) + (i32.const -4) ) + (i32.const 0) + ) + ) + (func $load_i32_from_numeric_address (result i32) + (i32.load offset=42 + (i32.const 0) ) ) (func $load_i32_from_global_address (result i32) - (return - (i32.load offset=12 - (i32.const 0) - ) + (i32.load offset=12 + (i32.const 0) ) ) (func $store_i32_to_numeric_address @@ -232,41 +217,31 @@ (i32.const 0) (i32.const 0) ) - (return) ) (func $store_i32_to_global_address (i32.store offset=12 (i32.const 0) (i32.const 0) ) - (return) ) (func $load_i8_s_with_folded_offset (param $0 i32) (result i32) - (return - (i32.load8_s offset=24 - (get_local $0) - ) + (i32.load8_s offset=24 + (get_local $0) ) ) (func $load_i8_s_with_folded_gep_offset (param $0 i32) (result i32) - (return - (i32.load8_s offset=24 - (get_local $0) - ) + (i32.load8_s offset=24 + (get_local $0) ) ) (func $load_i8_u_with_folded_offset (param $0 i32) (result i32) - (return - (i32.load8_u offset=24 - (get_local $0) - ) + (i32.load8_u offset=24 + (get_local $0) ) ) (func $load_i8_u_with_folded_gep_offset (param $0 i32) (result i32) - (return - (i32.load8_u offset=24 - (get_local $0) - ) + (i32.load8_u offset=24 + (get_local $0) ) ) (func $store_i8_with_folded_offset (param $0 i32) @@ -274,14 +249,12 @@ (get_local $0) (i32.const 0) ) - (return) ) (func $store_i8_with_folded_gep_offset (param $0 i32) (i32.store8 offset=24 (get_local $0) (i32.const 0) ) - (return) ) (func $aggregate_load_store (param $0 i32) (param $1 i32) (local $2 i32) @@ -320,7 +293,6 @@ (get_local $1) (get_local $2) ) - (return) ) (func $aggregate_return (param $0 i32) (i64.store align=4 @@ -330,7 +302,6 @@ (i64.const 0) ) ) - (return) ) (func $aggregate_return_without_merge (param $0 i32) (i32.store offset=8 @@ -347,7 +318,6 @@ (get_local $0) (i64.const 0) ) - (return) ) ) ;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/phi.s b/test/llvm_autogenerated/phi.s index 81605658c..d028a2883 100644 --- a/test/llvm_autogenerated/phi.s +++ b/test/llvm_autogenerated/phi.s @@ -29,15 +29,16 @@ test1: i32.const $4=, 0 .LBB1_1: loop - copy_local $1=, $3 - copy_local $3=, $2 - i32.const $push1=, 1 - i32.add $4=, $4, $pop1 - copy_local $2=, $1 - i32.lt_s $push0=, $4, $0 + copy_local $1=, $2 + copy_local $2=, $3 + copy_local $3=, $1 + i32.const $push3=, 1 + i32.add $push2=, $4, $pop3 + tee_local $push1=, $4=, $pop2 + i32.lt_s $push0=, $pop1, $0 br_if 0, $pop0 end_loop - return $3 + return $1 .endfunc .Lfunc_end1: .size test1, .Lfunc_end1-test1 diff --git a/test/llvm_autogenerated/phi.wast b/test/llvm_autogenerated/phi.wast index e7c717c65..30c5aa12c 100644 --- a/test/llvm_autogenerated/phi.wast +++ b/test/llvm_autogenerated/phi.wast @@ -40,29 +40,28 @@ ) (loop $label$1 $label$0 (set_local $1 - (get_local $3) - ) - (set_local $3 (get_local $2) ) - (set_local $4 - (i32.add - (get_local $4) - (i32.const 1) - ) - ) (set_local $2 + (get_local $3) + ) + (set_local $3 (get_local $1) ) (br_if $label$0 (i32.lt_s - (get_local $4) + (set_local $4 + (i32.add + (get_local $4) + (i32.const 1) + ) + ) (get_local $0) ) ) ) (return - (get_local $3) + (get_local $1) ) ) ) diff --git a/test/llvm_autogenerated/reg-stackify.s b/test/llvm_autogenerated/reg-stackify.s index e9544bb2c..cb813d3cc 100644 --- a/test/llvm_autogenerated/reg-stackify.s +++ b/test/llvm_autogenerated/reg-stackify.s @@ -3,6 +3,7 @@ .globl no0 .type no0,@function no0: +.Lfunc_begin0: .param i32, i32 .result i32 i32.load $1=, 0($1) @@ -16,6 +17,7 @@ no0: .globl no1 .type no1,@function no1: +.Lfunc_begin1: .param i32, i32 .result i32 i32.load $1=, 0($1) @@ -29,12 +31,13 @@ no1: .globl yes0 .type yes0,@function yes0: +.Lfunc_begin2: .param i32, i32 .result i32 - i32.const $push1=, 0 - i32.store $drop=, 0($0), $pop1 - i32.load $push0=, 0($1) - return $pop0 + i32.const $push0=, 0 + i32.store $drop=, 0($0), $pop0 + i32.load $push1=, 0($1) + return $pop1 .endfunc .Lfunc_end2: .size yes0, .Lfunc_end2-yes0 @@ -42,6 +45,7 @@ yes0: .globl yes1 .type yes1,@function yes1: +.Lfunc_begin3: .param i32 .result i32 i32.load $push0=, 0($0) @@ -50,60 +54,106 @@ yes1: .Lfunc_end3: .size yes1, .Lfunc_end3-yes1 + .globl sink_trap + .type sink_trap,@function +sink_trap: +.Lfunc_begin4: + .param i32, i32, i32 + .result i32 + i32.const $push0=, 0 + i32.store $drop=, 0($2), $pop0 + i32.div_s $push1=, $0, $1 + return $pop1 + .endfunc +.Lfunc_end4: + .size sink_trap, .Lfunc_end4-sink_trap + + .globl sink_readnone_call + .type sink_readnone_call,@function +sink_readnone_call: +.Lfunc_begin5: + .param i32, i32, i32 + .result i32 + i32.const $push1=, 0 + i32.store $drop=, 0($2), $pop1 + i32.call $push0=, readnone_callee@FUNCTION + return $pop0 + .endfunc +.Lfunc_end5: + .size sink_readnone_call, .Lfunc_end5-sink_readnone_call + + .globl no_sink_readonly_call + .type no_sink_readonly_call,@function +no_sink_readonly_call: +.Lfunc_begin6: + .param i32, i32, i32 + .result i32 + .local i32 + i32.call $3=, readonly_callee@FUNCTION + i32.const $push0=, 0 + i32.store $drop=, 0($2), $pop0 + return $3 + .endfunc +.Lfunc_end6: + .size no_sink_readonly_call, .Lfunc_end6-no_sink_readonly_call + .globl stack_uses .type stack_uses,@function stack_uses: +.Lfunc_begin7: .param i32, i32, i32, i32 .result i32 block i32.const $push13=, 1 - i32.lt_s $push0=, $0, $pop13 - i32.const $push1=, 2 - i32.lt_s $push2=, $1, $pop1 - i32.xor $push5=, $pop0, $pop2 + i32.lt_s $push5=, $0, $pop13 + i32.const $push0=, 2 + i32.lt_s $push4=, $1, $pop0 + i32.xor $push6=, $pop5, $pop4 i32.const $push12=, 1 - i32.lt_s $push3=, $2, $pop12 + i32.lt_s $push2=, $2, $pop12 i32.const $push11=, 2 - i32.lt_s $push4=, $3, $pop11 - i32.xor $push6=, $pop3, $pop4 - i32.xor $push7=, $pop5, $pop6 + i32.lt_s $push1=, $3, $pop11 + i32.xor $push3=, $pop2, $pop1 + i32.xor $push7=, $pop6, $pop3 i32.const $push10=, 1 i32.ne $push8=, $pop7, $pop10 br_if 0, $pop8 i32.const $push9=, 0 return $pop9 -.LBB4_2: +.LBB7_2: end_block i32.const $push14=, 1 return $pop14 .endfunc -.Lfunc_end4: - .size stack_uses, .Lfunc_end4-stack_uses +.Lfunc_end7: + .size stack_uses, .Lfunc_end7-stack_uses .globl multiple_uses .type multiple_uses,@function multiple_uses: +.Lfunc_begin8: .param i32, i32, i32 .local i32 block - i32.load $push0=, 0($2) - tee_local $push3=, $3=, $pop0 - i32.ge_u $push1=, $pop3, $1 + i32.load $push3=, 0($2) + tee_local $push2=, $3=, $pop3 + i32.ge_u $push0=, $pop2, $1 + br_if 0, $pop0 + i32.lt_u $push1=, $3, $0 br_if 0, $pop1 - i32.lt_u $push2=, $3, $0 - br_if 0, $pop2 i32.store $drop=, 0($2), $3 -.LBB5_3: +.LBB8_3: end_block return .endfunc -.Lfunc_end5: - .size multiple_uses, .Lfunc_end5-multiple_uses +.Lfunc_end8: + .size multiple_uses, .Lfunc_end8-multiple_uses .hidden stackify_store_across_side_effects .globl stackify_store_across_side_effects .type stackify_store_across_side_effects,@function stackify_store_across_side_effects: +.Lfunc_begin9: .param i32 .local i64 i64.const $push0=, 4611686018427387904 @@ -113,62 +163,66 @@ stackify_store_across_side_effects: call evoke_side_effects@FUNCTION return .endfunc -.Lfunc_end6: - .size stackify_store_across_side_effects, .Lfunc_end6-stackify_store_across_side_effects +.Lfunc_end9: + .size stackify_store_across_side_effects, .Lfunc_end9-stackify_store_across_side_effects .globl div_tree .type div_tree,@function div_tree: +.Lfunc_begin10: .param i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 .result i32 - i32.div_s $push0=, $0, $1 - i32.div_s $push1=, $2, $3 - i32.div_s $push2=, $pop0, $pop1 - i32.div_s $push3=, $4, $5 - i32.div_s $push4=, $6, $7 - i32.div_s $push5=, $pop3, $pop4 - i32.div_s $push6=, $pop2, $pop5 - i32.div_s $push7=, $8, $9 - i32.div_s $push8=, $10, $11 - i32.div_s $push9=, $pop7, $pop8 - i32.div_s $push10=, $12, $13 - i32.div_s $push11=, $14, $15 - i32.div_s $push12=, $pop10, $pop11 - i32.div_s $push13=, $pop9, $pop12 - i32.div_s $push14=, $pop6, $pop13 + i32.div_s $push11=, $0, $1 + i32.div_s $push10=, $2, $3 + i32.div_s $push12=, $pop11, $pop10 + i32.div_s $push8=, $4, $5 + i32.div_s $push7=, $6, $7 + i32.div_s $push9=, $pop8, $pop7 + i32.div_s $push13=, $pop12, $pop9 + i32.div_s $push4=, $8, $9 + i32.div_s $push3=, $10, $11 + i32.div_s $push5=, $pop4, $pop3 + i32.div_s $push1=, $12, $13 + i32.div_s $push0=, $14, $15 + i32.div_s $push2=, $pop1, $pop0 + i32.div_s $push6=, $pop5, $pop2 + i32.div_s $push14=, $pop13, $pop6 return $pop14 .endfunc -.Lfunc_end7: - .size div_tree, .Lfunc_end7-div_tree +.Lfunc_end10: + .size div_tree, .Lfunc_end10-div_tree .globl simple_multiple_use .type simple_multiple_use,@function simple_multiple_use: +.Lfunc_begin11: .param i32, i32 - i32.mul $push0=, $1, $0 - tee_local $push1=, $0=, $pop0 - call use_a@FUNCTION, $pop1 - call use_b@FUNCTION, $0 + i32.mul $push1=, $1, $0 + tee_local $push0=, $1=, $pop1 + call use_a@FUNCTION, $pop0 + call use_b@FUNCTION, $1 return .endfunc -.Lfunc_end8: - .size simple_multiple_use, .Lfunc_end8-simple_multiple_use +.Lfunc_end11: + .size simple_multiple_use, .Lfunc_end11-simple_multiple_use .globl multiple_uses_in_same_insn .type multiple_uses_in_same_insn,@function multiple_uses_in_same_insn: +.Lfunc_begin12: .param i32, i32 - i32.mul $push0=, $1, $0 - tee_local $push1=, $0=, $pop0 - call use_2@FUNCTION, $pop1, $0 + i32.mul $push1=, $1, $0 + tee_local $push0=, $1=, $pop1 + call use_2@FUNCTION, $pop0, $1 return .endfunc -.Lfunc_end9: - .size multiple_uses_in_same_insn, .Lfunc_end9-multiple_uses_in_same_insn +.Lfunc_end12: + .size multiple_uses_in_same_insn, .Lfunc_end12-multiple_uses_in_same_insn .globl commute .type commute,@function commute: +.Lfunc_begin13: .result i32 i32.call $push0=, red@FUNCTION i32.call $push1=, green@FUNCTION @@ -177,12 +231,13 @@ commute: i32.add $push4=, $pop2, $pop3 return $pop4 .endfunc -.Lfunc_end10: - .size commute, .Lfunc_end10-commute +.Lfunc_end13: + .size commute, .Lfunc_end13-commute .globl no_stackify_past_use .type no_stackify_past_use,@function no_stackify_past_use: +.Lfunc_begin14: .param i32 .result i32 .local i32 @@ -190,11 +245,216 @@ no_stackify_past_use: i32.const $push0=, 1 i32.add $push1=, $0, $pop0 i32.call $push2=, callee@FUNCTION, $pop1 + i32.sub $push3=, $pop2, $1 + i32.div_s $push4=, $pop3, $1 + return $pop4 + .endfunc +.Lfunc_end14: + .size no_stackify_past_use, .Lfunc_end14-no_stackify_past_use + + .globl commute_to_fix_ordering + .type commute_to_fix_ordering,@function +commute_to_fix_ordering: +.Lfunc_begin15: + .param i32 + .result i32 + .local i32 + i32.call $push6=, callee@FUNCTION, $0 + tee_local $push5=, $1=, $pop6 + i32.const $push0=, 1 + i32.add $push1=, $0, $pop0 + i32.call $push2=, callee@FUNCTION, $pop1 i32.add $push3=, $1, $pop2 - i32.mul $push4=, $1, $pop3 + i32.mul $push4=, $pop5, $pop3 return $pop4 .endfunc -.Lfunc_end11: - .size no_stackify_past_use, .Lfunc_end11-no_stackify_past_use +.Lfunc_end15: + .size commute_to_fix_ordering, .Lfunc_end15-commute_to_fix_ordering + + .globl multiple_defs + .type multiple_defs,@function +multiple_defs: +.Lfunc_begin16: + .param i32, i32, i32, i32, i32 + .local f64, f64, f64, f64, f64 + f64.const $6=, 0x0p0 + i32.const $push3=, 1 + i32.and $2=, $2, $pop3 + i32.const $push12=, 1 + i32.and $3=, $3, $pop12 + f64.const $push11=, -0x1.62cc8f5c28f5cp13 + f64.const $push9=, -0x1.e147ae147bp-3 + i32.const $push5=, 2 + i32.or $push6=, $1, $pop5 + i32.const $push7=, 14 + i32.eq $push8=, $pop6, $pop7 + f64.select $5=, $pop11, $pop9, $pop8 + f64.const $7=, 0x0p0 +.LBB16_1: + loop + block + f64.const $push14=, 0x1.73c083126e979p4 + f64.ge $push0=, $7, $pop14 + f64.ne $push1=, $7, $7 + i32.or $push2=, $pop0, $pop1 + br_if 0, $pop2 + copy_local $8=, $6 +.LBB16_3: + loop + f64.const $push20=, -0x1.62cc8f5c28f5cp13 + f64.const $push19=, -0x1p0 + f64.add $push18=, $7, $pop19 + tee_local $push17=, $9=, $pop18 + f64.select $push4=, $pop20, $pop17, $2 + copy_local $push16=, $8 + tee_local $push15=, $6=, $pop16 + f64.add $8=, $pop4, $pop15 + block + br_if 0, $3 + copy_local $9=, $5 +.LBB16_5: + end_block + f64.add $8=, $9, $8 + f64.const $push21=, 0x1.73c083126e979p4 + f64.lt $push10=, $7, $pop21 + br_if 0, $pop10 +.LBB16_6: + end_loop + end_block + f64.const $push13=, 0x1p0 + f64.add $7=, $7, $pop13 + br 0 +.LBB16_7: + end_loop + .endfunc +.Lfunc_end16: + .size multiple_defs, .Lfunc_end16-multiple_defs + + .globl no_stackify_call_past_load + .type no_stackify_call_past_load,@function +no_stackify_call_past_load: +.Lfunc_begin17: + .result i32 + .local i32, i32 + i32.call $0=, red@FUNCTION + i32.const $push0=, 0 + i32.load $1=, count($pop0) + i32.call $drop=, callee@FUNCTION, $0 + return $1 + .endfunc +.Lfunc_end17: + .size no_stackify_call_past_load, .Lfunc_end17-no_stackify_call_past_load + + .globl no_stackify_store_past_load + .type no_stackify_store_past_load,@function +no_stackify_store_past_load: +.Lfunc_begin18: + .param i32, i32, i32 + .result i32 + i32.store $1=, 0($1), $0 + i32.load $2=, 0($2) + i32.call $drop=, callee@FUNCTION, $1 + return $2 + .endfunc +.Lfunc_end18: + .size no_stackify_store_past_load, .Lfunc_end18-no_stackify_store_past_load + + .globl store_past_invar_load + .type store_past_invar_load,@function +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 + .endfunc +.Lfunc_end19: + .size store_past_invar_load, .Lfunc_end19-store_past_invar_load + + .globl ignore_dbg_value + .type ignore_dbg_value,@function +ignore_dbg_value: +.Lfunc_begin20: + unreachable + .endfunc +.Lfunc_end20: + .size ignore_dbg_value, .Lfunc_end20-ignore_dbg_value + + .globl no_stackify_past_epilogue + .type no_stackify_past_epilogue,@function +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 $push2=, 16 + i32.sub $push9=, $pop1, $pop2 + i32.store $push11=, 0($pop3), $pop9 + tee_local $push10=, $0=, $pop11 + i32.const $push7=, 12 + i32.add $push8=, $pop10, $pop7 + i32.call $1=, use_memory@FUNCTION, $pop8 + i32.const $push6=, __stack_pointer + i32.const $push4=, 16 + i32.add $push5=, $0, $pop4 + i32.store $drop=, 0($pop6), $pop5 + return $1 + .endfunc +.Lfunc_end21: + .size no_stackify_past_epilogue, .Lfunc_end21-no_stackify_past_epilogue + + .globl stackify_indvar + .type stackify_indvar,@function +stackify_indvar: +.Lfunc_begin22: + .param i32, i32 + .local i32 + i32.const $2=, 0 +.LBB22_1: + loop + i32.load $push0=, 0($1) + i32.add $push1=, $2, $pop0 + i32.store $drop=, 0($1), $pop1 + i32.const $push5=, 1 + i32.add $push4=, $2, $pop5 + tee_local $push3=, $2=, $pop4 + i32.ne $push2=, $0, $pop3 + br_if 0, $pop2 + end_loop + return + .endfunc +.Lfunc_end22: + .size stackify_indvar, .Lfunc_end22-stackify_indvar + + .globl stackpointer_dependency + .type stackpointer_dependency,@function +stackpointer_dependency: +.Lfunc_begin23: + .param i32 + .result i32 + .local i32 + i32.const $push0=, __stack_pointer + i32.load $push2=, 0($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 + return $0 + .endfunc +.Lfunc_end23: + .size stackpointer_dependency, .Lfunc_end23-stackpointer_dependency + .hidden count + .type count,@object + .bss + .globl count + .p2align 2 +count: + .int32 0 + .size count, 4 diff --git a/test/llvm_autogenerated/reg-stackify.wast b/test/llvm_autogenerated/reg-stackify.wast index c5d8477a9..eea7e8bbf 100644 --- a/test/llvm_autogenerated/reg-stackify.wast +++ b/test/llvm_autogenerated/reg-stackify.wast @@ -1,25 +1,34 @@ (module (memory 1 (segment 4 "\10\04\00\00") + (segment 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))) (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) @@ -28,6 +37,15 @@ (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 (param $0 i32) (param $1 i32) (result i32) (set_local $1 (i32.load @@ -74,6 +92,40 @@ ) ) ) + (func $sink_trap (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (i32.store + (get_local $2) + (i32.const 0) + ) + (return + (i32.div_s + (get_local $0) + (get_local $1) + ) + ) + ) + (func $sink_readnone_call (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (i32.store + (get_local $2) + (i32.const 0) + ) + (return + (call_import $readnone_callee) + ) + ) + (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) + ) + (return + (get_local $3) + ) + ) (func $stack_uses (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (block $label$0 (br_if $label$0 @@ -205,7 +257,7 @@ ) (func $simple_multiple_use (param $0 i32) (param $1 i32) (call_import $use_a - (set_local $0 + (set_local $1 (i32.mul (get_local $1) (get_local $0) @@ -213,19 +265,19 @@ ) ) (call_import $use_b - (get_local $0) + (get_local $1) ) (return) ) (func $multiple_uses_in_same_insn (param $0 i32) (param $1 i32) (call_import $use_2 - (set_local $0 + (set_local $1 (i32.mul (get_local $1) (get_local $0) ) ) - (get_local $0) + (get_local $1) ) (return) ) @@ -248,8 +300,29 @@ ) ) (return - (i32.mul + (i32.div_s + (i32.sub + (call_import $callee + (i32.add + (get_local $0) + (i32.const 1) + ) + ) + (get_local $1) + ) (get_local $1) + ) + ) + ) + (func $commute_to_fix_ordering (param $0 i32) (result i32) + (local $1 i32) + (return + (i32.mul + (set_local $1 + (call_import $callee + (get_local $0) + ) + ) (i32.add (get_local $1) (call_import $callee @@ -262,5 +335,242 @@ ) ) ) + (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) + (local $8 f64) + (local $9 f64) + (set_local $6 + (f64.const 0) + ) + (set_local $2 + (i32.and + (get_local $2) + (i32.const 1) + ) + ) + (set_local $3 + (i32.and + (get_local $3) + (i32.const 1) + ) + ) + (set_local $5 + (select + (f64.const -11353.57) + (f64.const -0.23500000000001364) + (i32.eq + (i32.or + (get_local $1) + (i32.const 2) + ) + (i32.const 14) + ) + ) + ) + (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) + ) + ) + ) + (set_local $8 + (get_local $6) + ) + (loop $label$4 $label$3 + (set_local $8 + (f64.add + (select + (f64.const -11353.57) + (set_local $9 + (f64.add + (get_local $7) + (f64.const -1) + ) + ) + (get_local $2) + ) + (set_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) + ) + ) + ) + ) + (set_local $7 + (f64.add + (get_local $7) + (f64.const 1) + ) + ) + (br $label$0) + ) + ) + (func $no_stackify_call_past_load (result i32) + (local $0 i32) + (local $1 i32) + (set_local $0 + (call_import $red) + ) + (set_local $1 + (i32.load offset=12 + (i32.const 0) + ) + ) + (call_import $callee + (get_local $0) + ) + (return + (get_local $1) + ) + ) + (func $no_stackify_store_past_load (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (set_local $1 + (i32.store + (get_local $1) + (get_local $0) + ) + ) + (set_local $2 + (i32.load + (get_local $2) + ) + ) + (call_import $callee + (get_local $1) + ) + (return + (get_local $2) + ) + ) + (func $store_past_invar_load (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (call_import $callee + (i32.store + (get_local $1) + (get_local $0) + ) + ) + (return + (i32.load + (get_local $2) + ) + ) + ) + (func $ignore_dbg_value + (unreachable) + ) + (func $no_stackify_past_epilogue (result i32) + (local $0 i32) + (local $1 i32) + (set_local $1 + (call_import $use_memory + (i32.add + (set_local $0 + (i32.store + (i32.const 4) + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 16) + ) + ) + ) + (i32.const 12) + ) + ) + ) + (i32.store + (i32.const 4) + (i32.add + (get_local $0) + (i32.const 16) + ) + ) + (return + (get_local $1) + ) + ) + (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 + (get_local $1) + ) + ) + ) + (br_if $label$0 + (i32.ne + (get_local $0) + (set_local $2 + (i32.add + (get_local $2) + (i32.const 1) + ) + ) + ) + ) + ) + (return) + ) + (func $stackpointer_dependency (param $0 i32) (result i32) + (local $1 i32) + (set_local $0 + (call_import $stackpointer_callee + (get_local $0) + (set_local $1 + (i32.load + (i32.const 4) + ) + ) + ) + ) + (i32.store + (i32.const 4) + (get_local $1) + ) + (return + (get_local $0) + ) + ) ) ;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/return-int32.s b/test/llvm_autogenerated/return-int32.s index 1083e3a1d..bbbdb0006 100644 --- a/test/llvm_autogenerated/return-int32.s +++ b/test/llvm_autogenerated/return-int32.s @@ -5,9 +5,32 @@ return_i32: .param i32 .result i32 - return $0 + copy_local $push0=, $0 .endfunc .Lfunc_end0: .size return_i32, .Lfunc_end0-return_i32 + .globl return_i32_twice + .type return_i32_twice,@function +return_i32_twice: + .param i32 + .result i32 + block + i32.eqz $push6=, $0 + br_if 0, $pop6 + i32.const $push3=, 0 + i32.const $push5=, 0 + i32.store $drop=, 0($pop3), $pop5 + i32.const $push4=, 1 + return $pop4 +.LBB1_2: + end_block + i32.const $push1=, 0 + i32.const $push0=, 2 + i32.store $drop=, 0($pop1), $pop0 + i32.const $push2=, 3 + .endfunc +.Lfunc_end1: + .size return_i32_twice, .Lfunc_end1-return_i32_twice + diff --git a/test/llvm_autogenerated/return-int32.wast b/test/llvm_autogenerated/return-int32.wast index f65c88764..8a10e58e4 100644 --- a/test/llvm_autogenerated/return-int32.wast +++ b/test/llvm_autogenerated/return-int32.wast @@ -4,10 +4,30 @@ ) (export "memory" memory) (export "return_i32" $return_i32) + (export "return_i32_twice" $return_i32_twice) (func $return_i32 (param $0 i32) (result i32) - (return - (get_local $0) + (get_local $0) + ) + (func $return_i32_twice (param $0 i32) (result i32) + (block $label$0 + (br_if $label$0 + (i32.eqz + (get_local $0) + ) + ) + (i32.store + (i32.const 0) + (i32.const 0) + ) + (return + (i32.const 1) + ) + ) + (i32.store + (i32.const 0) + (i32.const 2) ) + (i32.const 3) ) ) ;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/return-void.s b/test/llvm_autogenerated/return-void.s index 2293d11fc..a1c70a02f 100644 --- a/test/llvm_autogenerated/return-void.s +++ b/test/llvm_autogenerated/return-void.s @@ -3,9 +3,28 @@ .globl return_void .type return_void,@function return_void: - return .endfunc .Lfunc_end0: .size return_void, .Lfunc_end0-return_void + .globl return_void_twice + .type return_void_twice,@function +return_void_twice: + .param i32 + block + i32.eqz $push4=, $0 + br_if 0, $pop4 + i32.const $push2=, 0 + i32.const $push3=, 0 + i32.store $drop=, 0($pop2), $pop3 + return +.LBB1_2: + end_block + i32.const $push1=, 0 + i32.const $push0=, 1 + i32.store $drop=, 0($pop1), $pop0 + .endfunc +.Lfunc_end1: + .size return_void_twice, .Lfunc_end1-return_void_twice + diff --git a/test/llvm_autogenerated/return-void.wast b/test/llvm_autogenerated/return-void.wast index bdcdbf300..e8c9ba861 100644 --- a/test/llvm_autogenerated/return-void.wast +++ b/test/llvm_autogenerated/return-void.wast @@ -4,8 +4,26 @@ ) (export "memory" memory) (export "return_void" $return_void) + (export "return_void_twice" $return_void_twice) (func $return_void - (return) + ) + (func $return_void_twice (param $0 i32) + (block $label$0 + (br_if $label$0 + (i32.eqz + (get_local $0) + ) + ) + (i32.store + (i32.const 0) + (i32.const 0) + ) + (return) + ) + (i32.store + (i32.const 0) + (i32.const 1) + ) ) ) ;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/store-results.s b/test/llvm_autogenerated/store-results.s index 3de20fa96..6522ffa7a 100644 --- a/test/llvm_autogenerated/store-results.s +++ b/test/llvm_autogenerated/store-results.s @@ -5,9 +5,9 @@ single_block: .param i32 .result i32 - i32.const $push0=, 0 - i32.store $push1=, 0($0), $pop0 - return $pop1 + i32.const $push1=, 0 + i32.store $push0=, 0($0), $pop1 + return $pop0 .endfunc .Lfunc_end0: .size single_block, .Lfunc_end0-single_block @@ -19,13 +19,14 @@ foo: i32.const $0=, 0 .LBB1_1: loop - i32.const $push4=, 0 - i32.const $push3=, 0 - i32.store $drop=, pos($pop4), $pop3 - i32.const $push2=, 1 - i32.add $0=, $0, $pop2 + 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=, $0, $pop1 + i32.ne $push0=, $pop2, $pop1 br_if 0, $pop0 end_loop return @@ -40,13 +41,14 @@ bar: f32.const $0=, 0x0p0 .LBB2_1: loop - i32.const $push4=, 0 - i32.const $push3=, 0 - i32.store $drop=, pos($pop4), $pop3 - f32.const $push2=, 0x1p0 - f32.add $0=, $0, $pop2 + 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=, $0, $pop1 + f32.ne $push0=, $pop2, $pop1 br_if 0, $pop0 end_loop return @@ -60,19 +62,12 @@ bar: fi_ret: .param i32 .result i32 - .local i32, i32, i32, i32 - i32.const $1=, __stack_pointer - i32.load $1=, 0($1) - i32.const $2=, 32 - i32.sub $4=, $1, $2 - i32.const $2=, __stack_pointer - i32.store $4=, 0($2), $4 - i32.store $drop=, 0($0), $4 - i32.const $3=, 32 - i32.add $4=, $4, $3 - i32.const $3=, __stack_pointer - i32.store $4=, 0($3), $4 - return $4 + 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 diff --git a/test/llvm_autogenerated/store-results.wast b/test/llvm_autogenerated/store-results.wast index 40d00d130..dd974db29 100644 --- a/test/llvm_autogenerated/store-results.wast +++ b/test/llvm_autogenerated/store-results.wast @@ -25,15 +25,14 @@ (i32.const 0) (i32.const 0) ) - (set_local $0 - (i32.add - (get_local $0) - (i32.const 1) - ) - ) (br_if $label$0 (i32.ne - (get_local $0) + (set_local $0 + (i32.add + (get_local $0) + (i32.const 1) + ) + ) (i32.const 256) ) ) @@ -50,15 +49,14 @@ (i32.const 0) (i32.const 0) ) - (set_local $0 - (f32.add - (get_local $0) - (f32.const 1) - ) - ) (br_if $label$0 (f32.ne - (get_local $0) + (set_local $0 + (f32.add + (get_local $0) + (f32.const 1) + ) + ) (f32.const 256) ) ) @@ -66,61 +64,17 @@ (return) ) (func $fi_ret (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (set_local $1 - (i32.const 4) - ) - (set_local $1 - (i32.load - (get_local $1) - ) - ) - (set_local $2 - (i32.const 32) - ) - (set_local $4 - (i32.sub - (get_local $1) - (get_local $2) - ) - ) - (set_local $2 - (i32.const 4) - ) - (set_local $4 - (i32.store - (get_local $2) - (get_local $4) - ) - ) - (i32.store - (get_local $0) - (get_local $4) - ) - (set_local $3 - (i32.const 32) - ) - (set_local $4 - (i32.add - (get_local $4) - (get_local $3) - ) - ) - (set_local $3 - (i32.const 4) - ) - (set_local $4 + (return (i32.store - (get_local $3) - (get_local $4) + (get_local $0) + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 32) + ) ) ) - (return - (get_local $4) - ) ) ) ;; METADATA: { "asmConsts": {},"staticBump": 1056, "initializers": [] } diff --git a/test/llvm_autogenerated/store-trunc.s b/test/llvm_autogenerated/store-trunc.s index 560e5802b..271ed8552 100644 --- a/test/llvm_autogenerated/store-trunc.s +++ b/test/llvm_autogenerated/store-trunc.s @@ -5,7 +5,6 @@ trunc_i8_i32: .param i32, i32 i32.store8 $drop=, 0($0), $1 - return .endfunc .Lfunc_end0: .size trunc_i8_i32, .Lfunc_end0-trunc_i8_i32 @@ -15,7 +14,6 @@ trunc_i8_i32: trunc_i16_i32: .param i32, i32 i32.store16 $drop=, 0($0), $1 - return .endfunc .Lfunc_end1: .size trunc_i16_i32, .Lfunc_end1-trunc_i16_i32 @@ -25,7 +23,6 @@ trunc_i16_i32: trunc_i8_i64: .param i32, i64 i64.store8 $drop=, 0($0), $1 - return .endfunc .Lfunc_end2: .size trunc_i8_i64, .Lfunc_end2-trunc_i8_i64 @@ -35,7 +32,6 @@ trunc_i8_i64: trunc_i16_i64: .param i32, i64 i64.store16 $drop=, 0($0), $1 - return .endfunc .Lfunc_end3: .size trunc_i16_i64, .Lfunc_end3-trunc_i16_i64 @@ -45,7 +41,6 @@ trunc_i16_i64: trunc_i32_i64: .param i32, i64 i64.store32 $drop=, 0($0), $1 - return .endfunc .Lfunc_end4: .size trunc_i32_i64, .Lfunc_end4-trunc_i32_i64 diff --git a/test/llvm_autogenerated/store-trunc.wast b/test/llvm_autogenerated/store-trunc.wast index da7625496..c337018bf 100644 --- a/test/llvm_autogenerated/store-trunc.wast +++ b/test/llvm_autogenerated/store-trunc.wast @@ -13,35 +13,30 @@ (get_local $0) (get_local $1) ) - (return) ) (func $trunc_i16_i32 (param $0 i32) (param $1 i32) (i32.store16 (get_local $0) (get_local $1) ) - (return) ) (func $trunc_i8_i64 (param $0 i32) (param $1 i64) (i64.store8 (get_local $0) (get_local $1) ) - (return) ) (func $trunc_i16_i64 (param $0 i32) (param $1 i64) (i64.store16 (get_local $0) (get_local $1) ) - (return) ) (func $trunc_i32_i64 (param $0 i32) (param $1 i64) (i64.store32 (get_local $0) (get_local $1) ) - (return) ) ) ;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/switch.s b/test/llvm_autogenerated/switch.s index 4bacc6e78..f59a7c415 100644 --- a/test/llvm_autogenerated/switch.s +++ b/test/llvm_autogenerated/switch.s @@ -14,27 +14,27 @@ bar32: block block block - br_table $0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 4, 5, 0 + br_table $0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 4, 5, 0 .LBB0_2: end_block call foo0@FUNCTION - br 5 + return .LBB0_3: end_block call foo1@FUNCTION - br 4 + return .LBB0_4: end_block call foo2@FUNCTION - br 3 + return .LBB0_5: end_block call foo3@FUNCTION - br 2 + return .LBB0_6: end_block call foo4@FUNCTION - br 1 + return .LBB0_7: end_block call foo5@FUNCTION @@ -60,27 +60,27 @@ bar64: block block i32.wrap/i64 $push0=, $0 - br_table $pop0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 4, 5, 0 + br_table $pop0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 4, 5, 0 .LBB1_2: end_block call foo0@FUNCTION - br 5 + return .LBB1_3: end_block call foo1@FUNCTION - br 4 + return .LBB1_4: end_block call foo2@FUNCTION - br 3 + return .LBB1_5: end_block call foo3@FUNCTION - br 2 + return .LBB1_6: end_block call foo4@FUNCTION - br 1 + return .LBB1_7: end_block call foo5@FUNCTION diff --git a/test/llvm_autogenerated/switch.wast b/test/llvm_autogenerated/switch.wast index 8528aee07..78f9a2859 100644 --- a/test/llvm_autogenerated/switch.wast +++ b/test/llvm_autogenerated/switch.wast @@ -31,19 +31,19 @@ ) ) (call_import $foo0) - (br $label$0) + (return) ) (call_import $foo1) - (br $label$0) + (return) ) (call_import $foo2) - (br $label$0) + (return) ) (call_import $foo3) - (br $label$0) + (return) ) (call_import $foo4) - (br $label$0) + (return) ) (call_import $foo5) ) @@ -70,19 +70,19 @@ ) ) (call_import $foo0) - (br $label$0) + (return) ) (call_import $foo1) - (br $label$0) + (return) ) (call_import $foo2) - (br $label$0) + (return) ) (call_import $foo3) - (br $label$0) + (return) ) (call_import $foo4) - (br $label$0) + (return) ) (call_import $foo5) ) diff --git a/test/llvm_autogenerated/unreachable.s b/test/llvm_autogenerated/unreachable.s index 94c5dff17..dc0695441 100644 --- a/test/llvm_autogenerated/unreachable.s +++ b/test/llvm_autogenerated/unreachable.s @@ -14,7 +14,6 @@ f1: .type f2,@function f2: unreachable - return .endfunc .Lfunc_end1: .size f2, .Lfunc_end1-f2 @@ -23,7 +22,6 @@ f2: .type f3,@function f3: unreachable - return .endfunc .Lfunc_end2: .size f3, .Lfunc_end2-f3 diff --git a/test/llvm_autogenerated/unreachable.wast b/test/llvm_autogenerated/unreachable.wast index e075972fe..8c9838b3d 100644 --- a/test/llvm_autogenerated/unreachable.wast +++ b/test/llvm_autogenerated/unreachable.wast @@ -14,11 +14,9 @@ ) (func $f2 (unreachable) - (return) ) (func $f3 (unreachable) - (return) ) ) ;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/userstack.s b/test/llvm_autogenerated/userstack.s index a56ea7ba6..9f6dfeb24 100644 --- a/test/llvm_autogenerated/userstack.s +++ b/test/llvm_autogenerated/userstack.s @@ -3,19 +3,20 @@ .globl alloca32 .type alloca32,@function alloca32: - .local i32, i32, i32, i32 - i32.const $0=, __stack_pointer - i32.load $0=, 0($0) - i32.const $1=, 16 - i32.sub $3=, $0, $1 - i32.const $1=, __stack_pointer - i32.store $3=, 0($1), $3 + .local i32 + i32.const $push4=, __stack_pointer + i32.const $push1=, __stack_pointer + i32.load $push2=, 0($pop1) + i32.const $push3=, 16 + i32.sub $push8=, $pop2, $pop3 + i32.store $push10=, 0($pop4), $pop8 + tee_local $push9=, $0=, $pop10 i32.const $push0=, 0 - i32.store $drop=, 12($3), $pop0 - i32.const $2=, 16 - i32.add $3=, $3, $2 - i32.const $2=, __stack_pointer - i32.store $3=, 0($2), $3 + i32.store $drop=, 12($pop9), $pop0 + i32.const $push7=, __stack_pointer + i32.const $push5=, 16 + i32.add $push6=, $0, $pop5 + i32.store $drop=, 0($pop7), $pop6 return .endfunc .Lfunc_end0: @@ -24,21 +25,16 @@ alloca32: .globl alloca3264 .type alloca3264,@function alloca3264: - .local i32, i32, i32, i32 - i32.const $0=, __stack_pointer - i32.load $0=, 0($0) - i32.const $1=, 16 - i32.sub $3=, $0, $1 - i32.const $1=, __stack_pointer - i32.store $3=, 0($1), $3 + .local i32 + i32.const $push2=, __stack_pointer + i32.load $push3=, 0($pop2) + i32.const $push4=, 16 + i32.sub $push6=, $pop3, $pop4 + tee_local $push5=, $0=, $pop6 i32.const $push0=, 0 - i32.store $drop=, 12($3), $pop0 + i32.store $drop=, 12($pop5), $pop0 i64.const $push1=, 0 - i64.store $drop=, 0($3), $pop1 - i32.const $2=, 16 - i32.add $3=, $3, $2 - i32.const $2=, __stack_pointer - i32.store $3=, 0($2), $3 + i64.store $drop=, 0($0), $pop1 return .endfunc .Lfunc_end1: @@ -47,24 +43,23 @@ alloca3264: .globl allocarray .type allocarray,@function allocarray: - .local i32, i32, i32, i32, i32 - i32.const $0=, __stack_pointer - i32.load $0=, 0($0) - i32.const $1=, 32 - i32.sub $4=, $0, $1 - i32.const $1=, __stack_pointer - i32.store $4=, 0($1), $4 - i32.const $push2=, 12 - i32.const $3=, 12 - i32.add $3=, $4, $3 - i32.add $push3=, $3, $pop2 - i32.const $push0=, 1 - i32.store $push1=, 12($4), $pop0 - i32.store $drop=, 0($pop3), $pop1 - i32.const $2=, 32 - i32.add $4=, $4, $2 - i32.const $2=, __stack_pointer - i32.store $4=, 0($2), $4 + .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 return .endfunc .Lfunc_end2: @@ -74,24 +69,25 @@ allocarray: .type non_mem_use,@function non_mem_use: .param i32 - .local i32, i32, i32, i32, i32, i32 - i32.const $1=, __stack_pointer - i32.load $1=, 0($1) - i32.const $2=, 48 - i32.sub $6=, $1, $2 - i32.const $2=, __stack_pointer - i32.store $6=, 0($2), $6 - i32.const $4=, 8 - i32.add $4=, $6, $4 - call ext_func@FUNCTION, $4 - call ext_func@FUNCTION, $6 - i32.const $5=, 16 - i32.add $5=, $6, $5 - i32.store $drop=, 0($0), $5 - i32.const $3=, 48 - i32.add $6=, $6, $3 - i32.const $3=, __stack_pointer - i32.store $6=, 0($3), $6 + .local i32 + i32.const $push3=, __stack_pointer + i32.const $push0=, __stack_pointer + i32.load $push1=, 0($pop0) + i32.const $push2=, 48 + i32.sub $push11=, $pop1, $pop2 + i32.store $push13=, 0($pop3), $pop11 + tee_local $push12=, $1=, $pop13 + i32.const $push7=, 8 + i32.add $push8=, $pop12, $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 $push4=, 48 + i32.add $push5=, $1, $pop4 + i32.store $drop=, 0($pop6), $pop5 return .endfunc .Lfunc_end3: @@ -100,20 +96,23 @@ non_mem_use: .globl allocarray_inbounds .type allocarray_inbounds,@function allocarray_inbounds: - .local i32, i32, i32, i32 - i32.const $0=, __stack_pointer - i32.load $0=, 0($0) - i32.const $1=, 32 - i32.sub $3=, $0, $1 - i32.const $1=, __stack_pointer - i32.store $3=, 0($1), $3 - i32.const $push0=, 1 - i32.store $push1=, 12($3), $pop0 - i32.store $drop=, 24($3), $pop1 - i32.const $2=, 32 - i32.add $3=, $3, $2 - i32.const $2=, __stack_pointer - i32.store $3=, 0($2), $3 + .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 $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 return .endfunc .Lfunc_end4: @@ -123,56 +122,159 @@ allocarray_inbounds: .type dynamic_alloca,@function dynamic_alloca: .param i32 - .local i32, i32, i32, i32 - i32.const $1=, __stack_pointer - i32.load $3=, 0($1) - copy_local $4=, $3 + .local i32 + i32.const $push6=, __stack_pointer + i32.const $push7=, __stack_pointer + i32.load $push14=, 0($pop7) + tee_local $push13=, $1=, $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 $0=, $3, $pop5 - copy_local $3=, $0 - i32.const $push6=, 0 - i32.store $drop=, 0($0), $pop6 - i32.const $2=, __stack_pointer - i32.store $3=, 0($2), $4 + i32.sub $push12=, $pop13, $pop5 + tee_local $push11=, $0=, $pop12 + copy_local $push10=, $pop11 + i32.store $drop=, 0($pop6), $pop10 + call ext_func_i32@FUNCTION, $0 + i32.const $push8=, __stack_pointer + copy_local $push9=, $1 + i32.store $drop=, 0($pop8), $pop9 return .endfunc .Lfunc_end5: .size dynamic_alloca, .Lfunc_end5-dynamic_alloca - .globl dynamic_static_alloca - .type dynamic_static_alloca,@function -dynamic_static_alloca: + .globl dynamic_alloca_redzone + .type dynamic_alloca_redzone,@function +dynamic_alloca_redzone: .param i32 - .local i32, i32, i32, i32, i32 - i32.const $1=, __stack_pointer - i32.load $1=, 0($1) - i32.const $2=, 16 - i32.sub $4=, $1, $2 - copy_local $5=, $4 - i32.const $2=, __stack_pointer - i32.store $4=, 0($2), $4 + .local i32 + i32.const $push7=, __stack_pointer + i32.load $push11=, 0($pop7) + tee_local $push10=, $1=, $pop11 + copy_local $drop=, $pop10 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 $0=, $4, $pop5 - copy_local $4=, $0 + i32.sub $push9=, $1, $pop5 + tee_local $push8=, $0=, $pop9 + copy_local $drop=, $pop8 i32.const $push6=, 0 i32.store $drop=, 0($0), $pop6 - i32.const $3=, 16 - i32.add $4=, $5, $3 - i32.const $3=, __stack_pointer - i32.store $4=, 0($3), $4 return .endfunc .Lfunc_end6: - .size dynamic_static_alloca, .Lfunc_end6-dynamic_static_alloca + .size dynamic_alloca_redzone, .Lfunc_end6-dynamic_alloca_redzone + + .globl dynamic_static_alloca + .type dynamic_static_alloca,@function +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 $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 + return + .endfunc +.Lfunc_end7: + .size dynamic_static_alloca, .Lfunc_end7-dynamic_static_alloca + + .globl copytoreg_fi + .type copytoreg_fi,@function +copytoreg_fi: + .param i32, i32 + .local i32 + i32.const $push0=, __stack_pointer + i32.load $push1=, 0($pop0) + i32.const $push2=, 16 + i32.sub $push5=, $pop1, $pop2 + i32.const $push3=, 12 + i32.add $push4=, $pop5, $pop3 + copy_local $2=, $pop4 + i32.const $push6=, 1 + i32.and $0=, $0, $pop6 +.LBB8_1: + loop + i32.const $push7=, 1 + i32.store $drop=, 0($2), $pop7 + copy_local $2=, $1 + br_if 0, $0 + end_loop + return + .endfunc +.Lfunc_end8: + .size copytoreg_fi, .Lfunc_end8-copytoreg_fi + + .globl frameaddress_0 + .type frameaddress_0,@function +frameaddress_0: + .local i32 + i32.const $push0=, __stack_pointer + i32.load $push2=, 0($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 + return + .endfunc +.Lfunc_end9: + .size frameaddress_0, .Lfunc_end9-frameaddress_0 + + .globl frameaddress_1 + .type frameaddress_1,@function +frameaddress_1: + i32.const $push0=, 0 + call use_i8_star@FUNCTION, $pop0 + return + .endfunc +.Lfunc_end10: + .size frameaddress_1, .Lfunc_end10-frameaddress_1 + + .globl inline_asm + .type inline_asm,@function +inline_asm: + .local i32 + i32.const $push0=, __stack_pointer + i32.load $push1=, 0($pop0) + i32.const $push2=, 16 + i32.sub $push5=, $pop1, $pop2 + i32.const $push3=, 15 + i32.add $push4=, $pop5, $pop3 + copy_local $0=, $pop4 + #APP + # %0 + #NO_APP + return + .endfunc +.Lfunc_end11: + .size inline_asm, .Lfunc_end11-inline_asm diff --git a/test/llvm_autogenerated/userstack.wast b/test/llvm_autogenerated/userstack.wast index 37c5805fb..c2b38605e 100644 --- a/test/llvm_autogenerated/userstack.wast +++ b/test/llvm_autogenerated/userstack.wast @@ -5,356 +5,206 @@ (export "memory" memory) (type $FUNCSIG$vi (func (param 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 (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (set_local $0 - (i32.const 4) - ) - (set_local $0 - (i32.load - (get_local $0) - ) - ) - (set_local $1 - (i32.const 16) - ) - (set_local $3 - (i32.sub - (get_local $0) - (get_local $1) - ) - ) - (set_local $1 - (i32.const 4) - ) - (set_local $3 - (i32.store - (get_local $1) - (get_local $3) - ) - ) (i32.store offset=12 - (get_local $3) - (i32.const 0) - ) - (set_local $2 - (i32.const 16) - ) - (set_local $3 - (i32.add - (get_local $3) - (get_local $2) + (set_local $0 + (i32.store + (i32.const 4) + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 16) + ) + ) ) + (i32.const 0) ) - (set_local $2 + (i32.store (i32.const 4) - ) - (set_local $3 - (i32.store - (get_local $2) - (get_local $3) + (i32.add + (get_local $0) + (i32.const 16) ) ) (return) ) (func $alloca3264 (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (set_local $0 - (i32.const 4) - ) - (set_local $0 - (i32.load - (get_local $0) - ) - ) - (set_local $1 - (i32.const 16) - ) - (set_local $3 - (i32.sub - (get_local $0) - (get_local $1) - ) - ) - (set_local $1 - (i32.const 4) - ) - (set_local $3 - (i32.store - (get_local $1) - (get_local $3) - ) - ) (i32.store offset=12 - (get_local $3) + (set_local $0 + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 16) + ) + ) (i32.const 0) ) (i64.store - (get_local $3) + (get_local $0) (i64.const 0) ) - (set_local $2 - (i32.const 16) - ) - (set_local $3 - (i32.add - (get_local $3) - (get_local $2) - ) - ) - (set_local $2 - (i32.const 4) - ) - (set_local $3 - (i32.store - (get_local $2) - (get_local $3) - ) - ) (return) ) (func $allocarray (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (set_local $0 - (i32.const 4) - ) - (set_local $0 - (i32.load - (get_local $0) - ) - ) - (set_local $1 - (i32.const 32) - ) - (set_local $4 - (i32.sub - (get_local $0) - (get_local $1) + (i32.store offset=12 + (set_local $0 + (i32.store + (i32.const 4) + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 144) + ) + ) ) - ) - (set_local $1 - (i32.const 4) - ) - (set_local $4 (i32.store - (get_local $1) - (get_local $4) - ) - ) - (set_local $3 - (i32.const 12) - ) - (set_local $3 - (i32.add - (get_local $4) - (get_local $3) - ) - ) - (i32.store - (i32.add - (get_local $3) - (i32.const 12) - ) - (i32.store offset=12 - (get_local $4) + (i32.add + (get_local $0) + (i32.const 24) + ) (i32.const 1) ) ) - (set_local $2 - (i32.const 32) - ) - (set_local $4 - (i32.add - (get_local $4) - (get_local $2) - ) - ) - (set_local $2 + (i32.store (i32.const 4) - ) - (set_local $4 - (i32.store - (get_local $2) - (get_local $4) + (i32.add + (get_local $0) + (i32.const 144) ) ) (return) ) (func $non_mem_use (param $0 i32) (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (set_local $1 - (i32.const 4) - ) - (set_local $1 - (i32.load - (get_local $1) - ) - ) - (set_local $2 - (i32.const 48) - ) - (set_local $6 - (i32.sub - (get_local $1) - (get_local $2) - ) - ) - (set_local $2 - (i32.const 4) - ) - (set_local $6 - (i32.store - (get_local $2) - (get_local $6) - ) - ) - (set_local $4 - (i32.const 8) - ) - (set_local $4 + (call_import $ext_func (i32.add - (get_local $6) - (get_local $4) + (set_local $1 + (i32.store + (i32.const 4) + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 48) + ) + ) + ) + (i32.const 8) ) ) (call_import $ext_func - (get_local $4) - ) - (call_import $ext_func - (get_local $6) - ) - (set_local $5 - (i32.const 16) - ) - (set_local $5 - (i32.add - (get_local $6) - (get_local $5) - ) + (get_local $1) ) (i32.store (get_local $0) - (get_local $5) - ) - (set_local $3 - (i32.const 48) - ) - (set_local $6 (i32.add - (get_local $6) - (get_local $3) + (get_local $1) + (i32.const 16) ) ) - (set_local $3 + (i32.store (i32.const 4) - ) - (set_local $6 - (i32.store - (get_local $3) - (get_local $6) + (i32.add + (get_local $1) + (i32.const 48) ) ) (return) ) (func $allocarray_inbounds (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (set_local $0 - (i32.const 4) - ) - (set_local $0 - (i32.load + (i32.store offset=12 + (set_local $0 + (i32.store + (i32.const 4) + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 32) + ) + ) + ) + (i32.store offset=24 (get_local $0) + (i32.const 1) ) ) - (set_local $1 - (i32.const 32) + (call_import $ext_func + (i32.const 0) ) - (set_local $3 - (i32.sub + (i32.store + (i32.const 4) + (i32.add (get_local $0) - (get_local $1) + (i32.const 32) ) ) - (set_local $1 + (return) + ) + (func $dynamic_alloca (param $0 i32) + (local $1 i32) + (i32.store (i32.const 4) - ) - (set_local $3 - (i32.store - (get_local $1) - (get_local $3) - ) - ) - (i32.store offset=24 - (get_local $3) - (i32.store offset=12 - (get_local $3) - (i32.const 1) + (set_local $0 + (i32.sub + (set_local $1 + (i32.load + (i32.const 4) + ) + ) + (i32.and + (i32.add + (i32.shl + (get_local $0) + (i32.const 2) + ) + (i32.const 15) + ) + (i32.const -16) + ) + ) ) ) - (set_local $2 - (i32.const 32) - ) - (set_local $3 - (i32.add - (get_local $3) - (get_local $2) - ) + (call_import $ext_func_i32 + (get_local $0) ) - (set_local $2 + (i32.store (i32.const 4) - ) - (set_local $3 - (i32.store - (get_local $2) - (get_local $3) - ) + (get_local $1) ) (return) ) - (func $dynamic_alloca (param $0 i32) + (func $dynamic_alloca_redzone (param $0 i32) (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) (set_local $1 - (i32.const 4) - ) - (set_local $3 (i32.load - (get_local $1) + (i32.const 4) ) ) - (set_local $4 - (get_local $3) - ) (set_local $0 (i32.sub - (get_local $3) + (get_local $1) (i32.and (i32.add (i32.shl @@ -367,97 +217,120 @@ ) ) ) - (set_local $3 - (get_local $0) - ) (i32.store (get_local $0) (i32.const 0) ) - (set_local $2 - (i32.const 4) - ) - (set_local $3 - (i32.store - (get_local $2) - (get_local $4) - ) - ) (return) ) (func $dynamic_static_alloca (param $0 i32) (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (set_local $1 + (i32.store (i32.const 4) - ) - (set_local $1 - (i32.load - (get_local $1) + (set_local $0 + (i32.sub + (i32.store + (i32.const 4) + (set_local $1 + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 16) + ) + ) + ) + (i32.and + (i32.add + (i32.shl + (get_local $0) + (i32.const 2) + ) + (i32.const 15) + ) + (i32.const -16) + ) + ) ) ) - (set_local $2 - (i32.const 16) + (i32.store + (get_local $0) + (i32.const 0) ) - (set_local $4 - (i32.sub + (i32.store + (i32.const 4) + (i32.add (get_local $1) - (get_local $2) + (i32.const 16) ) ) - (set_local $5 - (get_local $4) - ) + (return) + ) + (func $copytoreg_fi (param $0 i32) (param $1 i32) + (local $2 i32) (set_local $2 - (i32.const 4) + (i32.add + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 16) + ) + (i32.const 12) + ) ) - (set_local $4 + (set_local $0 + (i32.and + (get_local $0) + (i32.const 1) + ) + ) + (loop $label$1 $label$0 (i32.store (get_local $2) - (get_local $4) + (i32.const 1) + ) + (set_local $2 + (get_local $1) + ) + (br_if $label$0 + (get_local $0) ) ) - (set_local $0 - (i32.sub - (get_local $4) - (i32.and - (i32.add - (i32.shl - (get_local $0) - (i32.const 2) - ) - (i32.const 15) - ) - (i32.const -16) + (return) + ) + (func $frameaddress_0 + (local $0 i32) + (call_import $use_i8_star + (set_local $0 + (i32.load + (i32.const 4) ) ) ) - (set_local $4 - (get_local $0) - ) (i32.store + (i32.const 4) (get_local $0) - (i32.const 0) ) - (set_local $3 - (i32.const 16) + (return) + ) + (func $frameaddress_1 + (call_import $use_i8_star + (i32.const 0) ) - (set_local $4 + (return) + ) + (func $inline_asm + (local $0 i32) + (set_local $0 (i32.add - (get_local $5) - (get_local $3) - ) - ) - (set_local $3 - (i32.const 4) - ) - (set_local $4 - (i32.store - (get_local $3) - (get_local $4) + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 16) + ) + (i32.const 15) ) ) (return) diff --git a/test/llvm_autogenerated/varargs.s b/test/llvm_autogenerated/varargs.s index 26e8e084a..4b3e7c214 100644 --- a/test/llvm_autogenerated/varargs.s +++ b/test/llvm_autogenerated/varargs.s @@ -1,13 +1,23 @@ .text .file "/s/llvm/llvm/test/CodeGen/WebAssembly/varargs.ll" + .globl start + .type start,@function +start: + .param i32, i32 + i32.store $drop=, 0($0), $1 + return + .endfunc +.Lfunc_end0: + .size start, .Lfunc_end0-start + .globl end .type end,@function end: .param i32 return .endfunc -.Lfunc_end0: - .size end, .Lfunc_end0-end +.Lfunc_end1: + .size end, .Lfunc_end1-end .globl copy .type copy,@function @@ -17,8 +27,8 @@ copy: i32.store $drop=, 0($0), $pop0 return .endfunc -.Lfunc_end1: - .size copy, .Lfunc_end1-copy +.Lfunc_end2: + .size copy, .Lfunc_end2-copy .globl arg_i8 .type arg_i8,@function @@ -26,16 +36,16 @@ arg_i8: .param i32 .result i32 .local i32 - i32.load $push0=, 0($0) - tee_local $push4=, $1=, $pop0 - i32.const $push1=, 4 - i32.add $push2=, $pop4, $pop1 - i32.store $drop=, 0($0), $pop2 - i32.load $push3=, 0($1) - return $pop3 + i32.load $push4=, 0($0) + tee_local $push3=, $1=, $pop4 + i32.const $push0=, 4 + i32.add $push1=, $pop3, $pop0 + i32.store $drop=, 0($0), $pop1 + i32.load $push2=, 0($1) + return $pop2 .endfunc -.Lfunc_end2: - .size arg_i8, .Lfunc_end2-arg_i8 +.Lfunc_end3: + .size arg_i8, .Lfunc_end3-arg_i8 .globl arg_i32 .type arg_i32,@function @@ -47,90 +57,96 @@ arg_i32: i32.const $push1=, 3 i32.add $push2=, $pop0, $pop1 i32.const $push3=, -4 - i32.and $push4=, $pop2, $pop3 - tee_local $push8=, $1=, $pop4 - i32.const $push5=, 4 - i32.add $push6=, $pop8, $pop5 - i32.store $drop=, 0($0), $pop6 - i32.load $push7=, 0($1) - return $pop7 + i32.and $push8=, $pop2, $pop3 + tee_local $push7=, $1=, $pop8 + i32.const $push4=, 4 + i32.add $push5=, $pop7, $pop4 + i32.store $drop=, 0($0), $pop5 + i32.load $push6=, 0($1) + return $pop6 .endfunc -.Lfunc_end3: - .size arg_i32, .Lfunc_end3-arg_i32 +.Lfunc_end4: + .size arg_i32, .Lfunc_end4-arg_i32 .globl arg_i128 .type arg_i128,@function arg_i128: .param i32, i32 - .local i32, i64, i32 + .local i32, i32, i64 i32.load $push0=, 0($1) i32.const $push1=, 7 i32.add $push2=, $pop0, $pop1 i32.const $push3=, -8 - i32.and $push4=, $pop2, $pop3 - tee_local $push12=, $4=, $pop4 - i32.const $push5=, 8 - i32.add $push6=, $pop12, $pop5 - i32.store $2=, 0($1), $pop6 - i64.load $3=, 0($4) - i32.const $push7=, 16 - i32.add $push8=, $4, $pop7 - i32.store $drop=, 0($1), $pop8 - i32.const $push11=, 8 - i32.add $push10=, $0, $pop11 + i32.and $push12=, $pop2, $pop3 + tee_local $push11=, $3=, $pop12 + 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($pop10), $pop9 - i64.store $drop=, 0($0), $3 + i64.store $drop=, 0($pop8), $pop9 + i64.store $drop=, 0($0), $4 return .endfunc -.Lfunc_end4: - .size arg_i128, .Lfunc_end4-arg_i128 +.Lfunc_end5: + .size arg_i128, .Lfunc_end5-arg_i128 .globl caller_none .type caller_none,@function caller_none: - call callee@FUNCTION + i32.const $push0=, 0 + call callee@FUNCTION, $pop0 return .endfunc -.Lfunc_end5: - .size caller_none, .Lfunc_end5-caller_none +.Lfunc_end6: + .size caller_none, .Lfunc_end6-caller_none .globl caller_some .type caller_some,@function caller_some: - .local i32, i32, i32, i32, i32, i32, i32, i32, i32 - i32.const $5=, __stack_pointer - i32.load $5=, 0($5) - i32.const $6=, 16 - i32.sub $8=, $5, $6 - i32.const $6=, __stack_pointer - i32.store $8=, 0($6), $8 - i32.const $1=, __stack_pointer - i32.load $1=, 0($1) - i32.const $2=, 16 - i32.sub $8=, $1, $2 - i32.const $2=, __stack_pointer - i32.store $8=, 0($2), $8 - i32.const $push0=, 0 - i32.store $drop=, 0($8), $pop0 - i32.const $push1=, 8 - i32.add $0=, $8, $pop1 - i64.const $push2=, 4611686018427387904 - i64.store $drop=, 0($0), $pop2 - call callee@FUNCTION - i32.const $3=, __stack_pointer - i32.load $3=, 0($3) - i32.const $4=, 16 - i32.add $8=, $3, $4 - i32.const $4=, __stack_pointer - i32.store $8=, 0($4), $8 - i32.const $7=, 16 - i32.add $8=, $8, $7 - i32.const $7=, __stack_pointer - i32.store $8=, 0($7), $8 + .local i32 + i32.const $push5=, __stack_pointer + i32.const $push2=, __stack_pointer + i32.load $push3=, 0($pop2) + i32.const $push4=, 16 + i32.sub $push9=, $pop3, $pop4 + i32.store $push11=, 0($pop5), $pop9 + tee_local $push10=, $0=, $pop11 + i64.const $push0=, 4611686018427387904 + i64.store $drop=, 8($pop10), $pop0 + i32.const $push1=, 0 + i32.store $drop=, 0($0), $pop1 + call callee@FUNCTION, $0 + i32.const $push8=, __stack_pointer + i32.const $push6=, 16 + i32.add $push7=, $0, $pop6 + i32.store $drop=, 0($pop8), $pop7 return .endfunc -.Lfunc_end6: - .size caller_some, .Lfunc_end6-caller_some +.Lfunc_end7: + .size caller_some, .Lfunc_end7-caller_some + + .globl startbb + .type startbb,@function +startbb: + .param i32, i32, i32 + block + i32.const $push0=, 1 + i32.and $push1=, $0, $pop0 + i32.eqz $push2=, $pop1 + br_if 0, $pop2 + return +.LBB8_2: + end_block + i32.store $drop=, 0($1), $2 + return + .endfunc +.Lfunc_end8: + .size startbb, .Lfunc_end8-startbb diff --git a/test/llvm_autogenerated/varargs.wast b/test/llvm_autogenerated/varargs.wast index bc27efeb0..d460e2efb 100644 --- a/test/llvm_autogenerated/varargs.wast +++ b/test/llvm_autogenerated/varargs.wast @@ -3,8 +3,9 @@ (segment 4 "\10\04\00\00") ) (export "memory" memory) - (type $FUNCSIG$v (func)) - (import $callee "env" "callee") + (type $FUNCSIG$vi (func (param i32))) + (import $callee "env" "callee" (param i32)) + (export "start" $start) (export "end" $end) (export "copy" $copy) (export "arg_i8" $arg_i8) @@ -12,6 +13,14 @@ (export "arg_i128" $arg_i128) (export "caller_none" $caller_none) (export "caller_some" $caller_some) + (export "startbb" $startbb) + (func $start (param $0 i32) (param $1 i32) + (i32.store + (get_local $0) + (get_local $1) + ) + (return) + ) (func $end (param $0 i32) (return) ) @@ -70,13 +79,13 @@ ) (func $arg_i128 (param $0 i32) (param $1 i32) (local $2 i32) - (local $3 i64) - (local $4 i32) + (local $3 i32) + (local $4 i64) (set_local $2 (i32.store (get_local $1) (i32.add - (set_local $4 + (set_local $3 (i32.and (i32.add (i32.load @@ -91,15 +100,15 @@ ) ) ) - (set_local $3 + (set_local $4 (i64.load - (get_local $4) + (get_local $3) ) ) (i32.store (get_local $1) (i32.add - (get_local $4) + (get_local $3) (i32.const 16) ) ) @@ -114,134 +123,63 @@ ) (i64.store (get_local $0) - (get_local $3) + (get_local $4) ) (return) ) (func $caller_none - (call_import $callee) + (call_import $callee + (i32.const 0) + ) (return) ) (func $caller_some (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (set_local $5 - (i32.const 4) - ) - (set_local $5 - (i32.load - (get_local $5) - ) - ) - (set_local $6 - (i32.const 16) - ) - (set_local $8 - (i32.sub - (get_local $5) - (get_local $6) - ) - ) - (set_local $6 - (i32.const 4) - ) - (set_local $8 - (i32.store - (get_local $6) - (get_local $8) - ) - ) - (set_local $1 - (i32.const 4) - ) - (set_local $1 - (i32.load - (get_local $1) - ) - ) - (set_local $2 - (i32.const 16) - ) - (set_local $8 - (i32.sub - (get_local $1) - (get_local $2) - ) - ) - (set_local $2 - (i32.const 4) - ) - (set_local $8 - (i32.store - (get_local $2) - (get_local $8) + (i64.store offset=8 + (set_local $0 + (i32.store + (i32.const 4) + (i32.sub + (i32.load + (i32.const 4) + ) + (i32.const 16) + ) + ) ) + (i64.const 4611686018427387904) ) (i32.store - (get_local $8) + (get_local $0) (i32.const 0) ) - (set_local $0 - (i32.add - (get_local $8) - (i32.const 8) - ) - ) - (i64.store + (call_import $callee (get_local $0) - (i64.const 4611686018427387904) ) - (call_import $callee) - (set_local $3 + (i32.store (i32.const 4) - ) - (set_local $3 - (i32.load - (get_local $3) - ) - ) - (set_local $4 - (i32.const 16) - ) - (set_local $8 (i32.add - (get_local $3) - (get_local $4) - ) - ) - (set_local $4 - (i32.const 4) - ) - (set_local $8 - (i32.store - (get_local $4) - (get_local $8) + (get_local $0) + (i32.const 16) ) ) - (set_local $7 - (i32.const 16) - ) - (set_local $8 - (i32.add - (get_local $8) - (get_local $7) + (return) + ) + (func $startbb (param $0 i32) (param $1 i32) (param $2 i32) + (block $label$0 + (br_if $label$0 + (i32.eqz + (i32.and + (get_local $0) + (i32.const 1) + ) + ) ) + (return) ) - (set_local $7 - (i32.const 4) - ) - (set_local $8 - (i32.store - (get_local $7) - (get_local $8) - ) + (i32.store + (get_local $1) + (get_local $2) ) (return) ) |