diff options
author | Heejin Ahn <aheejin@gmail.com> | 2023-12-13 10:53:50 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-13 10:53:50 -0800 |
commit | 0024c8bdd28f701d57e49e65d38b28aad0594299 (patch) | |
tree | 19b9eb323836843d147dedf40495042edcf9404f /test | |
parent | 9e636855b582d1499a87fb73f55d85102ce95a58 (diff) | |
download | binaryen-0024c8bdd28f701d57e49e65d38b28aad0594299.tar.gz binaryen-0024c8bdd28f701d57e49e65d38b28aad0594299.tar.bz2 binaryen-0024c8bdd28f701d57e49e65d38b28aad0594299.zip |
[test] Port tests in test/ to test/lit/basic/ (#6160)
This ports all tests from `test/` to `test/lit/basic/`. The set of
commands and `CHECK` lines used are the same as the ones in #6159. Now
we use `lit` to test these, this also deletes all `.wast`,
`.wast.from-wast`, `.wast.fromBinary`, and
`.wast.fromBinary.noDebugInfo` files from `test/` and all related test
routines from the python scripts.
All `CHECK` lines are generated by `update_lit_checks.py --all-items`.
This also deletes these three multi-memory tests in `test/lit/`, because
they seem to contain the same code with the ones in `test/`, which have
been ported to `test/lit/basic/` along with other tests.
- `test/lit/multi-memories-atomics64.wast`
- `test/lit/multi-memories-basics.wast`
- `test/lit/multi-memories-simd.wast`
This also adds newlines between `(func`s in case there are none to make
`CHECK` lines easy to view, and removes some extra existing newlines
here and there.
Diffstat (limited to 'test')
216 files changed, 23378 insertions, 24167 deletions
diff --git a/test/atomics-unshared.wast b/test/atomics-unshared.wast deleted file mode 100644 index 7b6d7bc3b..000000000 --- a/test/atomics-unshared.wast +++ /dev/null @@ -1,10 +0,0 @@ -(module - (memory $0 1 1) - (func $foo - (drop (i32.atomic.rmw.cmpxchg - (i32.const 0) - (i32.const 0) - (i32.const 0) - )) - ) -) diff --git a/test/atomics-unshared.wast.from-wast b/test/atomics-unshared.wast.from-wast deleted file mode 100644 index 2e0ed82b9..000000000 --- a/test/atomics-unshared.wast.from-wast +++ /dev/null @@ -1,13 +0,0 @@ -(module - (type $0 (func)) - (memory $0 1 1) - (func $foo (type $0) - (drop - (i32.atomic.rmw.cmpxchg - (i32.const 0) - (i32.const 0) - (i32.const 0) - ) - ) - ) -) diff --git a/test/atomics-unshared.wast.fromBinary b/test/atomics-unshared.wast.fromBinary deleted file mode 100644 index 321c8141e..000000000 --- a/test/atomics-unshared.wast.fromBinary +++ /dev/null @@ -1,14 +0,0 @@ -(module - (type $0 (func)) - (memory $0 1 1) - (func $foo (type $0) - (drop - (i32.atomic.rmw.cmpxchg - (i32.const 0) - (i32.const 0) - (i32.const 0) - ) - ) - ) -) - diff --git a/test/atomics-unshared.wast.fromBinary.noDebugInfo b/test/atomics-unshared.wast.fromBinary.noDebugInfo deleted file mode 100644 index 0c47138fc..000000000 --- a/test/atomics-unshared.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,14 +0,0 @@ -(module - (type $0 (func)) - (memory $0 1 1) - (func $0 (type $0) - (drop - (i32.atomic.rmw.cmpxchg - (i32.const 0) - (i32.const 0) - (i32.const 0) - ) - ) - ) -) - diff --git a/test/atomics.wast b/test/atomics.wast deleted file mode 100644 index 792772a51..000000000 --- a/test/atomics.wast +++ /dev/null @@ -1,184 +0,0 @@ -(module - (type $0 (func)) - (memory $0 (shared 23 256)) - (func $atomic-loadstore (type $0) - (local $0 i32) - (local $1 i64) - (drop - (i32.atomic.load8_u offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load16_u offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load offset=4 - (local.get $0) - ) - ) - (drop - (i64.atomic.load8_u - (local.get $0) - ) - ) - (drop - (i64.atomic.load16_u - (local.get $0) - ) - ) - (drop - (i64.atomic.load32_u - (local.get $0) - ) - ) - (drop - (i64.atomic.load - (local.get $0) - ) - ) - (i32.atomic.store offset=4 align=4 - (local.get $0) - (local.get $0) - ) - (i32.atomic.store8 offset=4 align=1 - (local.get $0) - (local.get $0) - ) - (i32.atomic.store16 offset=4 - (local.get $0) - (local.get $0) - ) - (i64.atomic.store offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store8 offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store16 offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store32 offset=4 - (local.get $0) - (local.get $1) - ) - ) - (func $atomic-rmw (type $0) - (local $0 i32) - (local $1 i64) - (drop - (i32.atomic.rmw.add offset=4 - (local.get $0) - (local.get $0) - ) - ) - (drop - (i32.atomic.rmw8.add_u offset=4 - (local.get $0) - (local.get $0) - ) - ) - (drop - (i32.atomic.rmw16.and_u align=2 - (local.get $0) - (local.get $0) - ) - ) - (drop - (i64.atomic.rmw32.or_u - (local.get $0) - (local.get $1) - ) - ) - (drop - (i32.atomic.rmw8.xchg_u align=1 - (local.get $0) - (local.get $0) - ) - ) - ) - (func $atomic-cmpxchg (type $0) - (local $0 i32) - (local $1 i64) - (drop - (i32.atomic.rmw.cmpxchg offset=4 - (local.get $0) - (local.get $0) - (local.get $0) - ) - ) - (drop - (i32.atomic.rmw8.cmpxchg_u - (local.get $0) - (local.get $0) - (local.get $0) - ) - ) - (drop - (i64.atomic.rmw.cmpxchg offset=4 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (i64.atomic.rmw32.cmpxchg_u align=4 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - ) - (func $atomic-wait-notify (type $0) - (local $0 i32) - (local $1 i64) - (drop - (memory.atomic.wait32 - (local.get $0) - (local.get $0) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait32 offset=4 align=4 - (local.get $0) - (local.get $0) - (local.get $1) - ) - ) - (drop - (memory.atomic.notify - (local.get $0) - (local.get $0) - ) - ) - (drop - (memory.atomic.notify offset=24 align=4 - (local.get $0) - (local.get $0) - ) - ) - (drop - (memory.atomic.wait64 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait64 align=8 offset=16 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - ) - (func $atomic-fence (type $0) - (atomic.fence) - ) -) diff --git a/test/atomics.wast.from-wast b/test/atomics.wast.from-wast deleted file mode 100644 index 7c9d18076..000000000 --- a/test/atomics.wast.from-wast +++ /dev/null @@ -1,184 +0,0 @@ -(module - (type $0 (func)) - (memory $0 (shared 23 256)) - (func $atomic-loadstore (type $0) - (local $0 i32) - (local $1 i64) - (drop - (i32.atomic.load8_u offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load16_u offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load offset=4 - (local.get $0) - ) - ) - (drop - (i64.atomic.load8_u - (local.get $0) - ) - ) - (drop - (i64.atomic.load16_u - (local.get $0) - ) - ) - (drop - (i64.atomic.load32_u - (local.get $0) - ) - ) - (drop - (i64.atomic.load - (local.get $0) - ) - ) - (i32.atomic.store offset=4 - (local.get $0) - (local.get $0) - ) - (i32.atomic.store8 offset=4 - (local.get $0) - (local.get $0) - ) - (i32.atomic.store16 offset=4 - (local.get $0) - (local.get $0) - ) - (i64.atomic.store offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store8 offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store16 offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store32 offset=4 - (local.get $0) - (local.get $1) - ) - ) - (func $atomic-rmw (type $0) - (local $0 i32) - (local $1 i64) - (drop - (i32.atomic.rmw.add offset=4 - (local.get $0) - (local.get $0) - ) - ) - (drop - (i32.atomic.rmw8.add_u offset=4 - (local.get $0) - (local.get $0) - ) - ) - (drop - (i32.atomic.rmw16.and_u - (local.get $0) - (local.get $0) - ) - ) - (drop - (i64.atomic.rmw32.or_u - (local.get $0) - (local.get $1) - ) - ) - (drop - (i32.atomic.rmw8.xchg_u - (local.get $0) - (local.get $0) - ) - ) - ) - (func $atomic-cmpxchg (type $0) - (local $0 i32) - (local $1 i64) - (drop - (i32.atomic.rmw.cmpxchg offset=4 - (local.get $0) - (local.get $0) - (local.get $0) - ) - ) - (drop - (i32.atomic.rmw8.cmpxchg_u - (local.get $0) - (local.get $0) - (local.get $0) - ) - ) - (drop - (i64.atomic.rmw.cmpxchg offset=4 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (i64.atomic.rmw32.cmpxchg_u - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - ) - (func $atomic-wait-notify (type $0) - (local $0 i32) - (local $1 i64) - (drop - (memory.atomic.wait32 - (local.get $0) - (local.get $0) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait32 offset=4 - (local.get $0) - (local.get $0) - (local.get $1) - ) - ) - (drop - (memory.atomic.notify - (local.get $0) - (local.get $0) - ) - ) - (drop - (memory.atomic.notify offset=24 - (local.get $0) - (local.get $0) - ) - ) - (drop - (memory.atomic.wait64 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait64 offset=16 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - ) - (func $atomic-fence (type $0) - (atomic.fence) - ) -) diff --git a/test/atomics.wast.fromBinary b/test/atomics.wast.fromBinary deleted file mode 100644 index 751684f72..000000000 --- a/test/atomics.wast.fromBinary +++ /dev/null @@ -1,185 +0,0 @@ -(module - (type $0 (func)) - (memory $0 (shared 23 256)) - (func $atomic-loadstore (type $0) - (local $0 i32) - (local $1 i64) - (drop - (i32.atomic.load8_u offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load16_u offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load offset=4 - (local.get $0) - ) - ) - (drop - (i64.atomic.load8_u - (local.get $0) - ) - ) - (drop - (i64.atomic.load16_u - (local.get $0) - ) - ) - (drop - (i64.atomic.load32_u - (local.get $0) - ) - ) - (drop - (i64.atomic.load - (local.get $0) - ) - ) - (i32.atomic.store offset=4 - (local.get $0) - (local.get $0) - ) - (i32.atomic.store8 offset=4 - (local.get $0) - (local.get $0) - ) - (i32.atomic.store16 offset=4 - (local.get $0) - (local.get $0) - ) - (i64.atomic.store offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store8 offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store16 offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store32 offset=4 - (local.get $0) - (local.get $1) - ) - ) - (func $atomic-rmw (type $0) - (local $0 i32) - (local $1 i64) - (drop - (i32.atomic.rmw.add offset=4 - (local.get $0) - (local.get $0) - ) - ) - (drop - (i32.atomic.rmw8.add_u offset=4 - (local.get $0) - (local.get $0) - ) - ) - (drop - (i32.atomic.rmw16.and_u - (local.get $0) - (local.get $0) - ) - ) - (drop - (i64.atomic.rmw32.or_u - (local.get $0) - (local.get $1) - ) - ) - (drop - (i32.atomic.rmw8.xchg_u - (local.get $0) - (local.get $0) - ) - ) - ) - (func $atomic-cmpxchg (type $0) - (local $0 i32) - (local $1 i64) - (drop - (i32.atomic.rmw.cmpxchg offset=4 - (local.get $0) - (local.get $0) - (local.get $0) - ) - ) - (drop - (i32.atomic.rmw8.cmpxchg_u - (local.get $0) - (local.get $0) - (local.get $0) - ) - ) - (drop - (i64.atomic.rmw.cmpxchg offset=4 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (i64.atomic.rmw32.cmpxchg_u - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - ) - (func $atomic-wait-notify (type $0) - (local $0 i32) - (local $1 i64) - (drop - (memory.atomic.wait32 - (local.get $0) - (local.get $0) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait32 offset=4 - (local.get $0) - (local.get $0) - (local.get $1) - ) - ) - (drop - (memory.atomic.notify - (local.get $0) - (local.get $0) - ) - ) - (drop - (memory.atomic.notify offset=24 - (local.get $0) - (local.get $0) - ) - ) - (drop - (memory.atomic.wait64 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait64 offset=16 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - ) - (func $atomic-fence (type $0) - (atomic.fence) - ) -) - diff --git a/test/atomics.wast.fromBinary.noDebugInfo b/test/atomics.wast.fromBinary.noDebugInfo deleted file mode 100644 index 375782db2..000000000 --- a/test/atomics.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,185 +0,0 @@ -(module - (type $0 (func)) - (memory $0 (shared 23 256)) - (func $0 (type $0) - (local $0 i32) - (local $1 i64) - (drop - (i32.atomic.load8_u offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load16_u offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load offset=4 - (local.get $0) - ) - ) - (drop - (i64.atomic.load8_u - (local.get $0) - ) - ) - (drop - (i64.atomic.load16_u - (local.get $0) - ) - ) - (drop - (i64.atomic.load32_u - (local.get $0) - ) - ) - (drop - (i64.atomic.load - (local.get $0) - ) - ) - (i32.atomic.store offset=4 - (local.get $0) - (local.get $0) - ) - (i32.atomic.store8 offset=4 - (local.get $0) - (local.get $0) - ) - (i32.atomic.store16 offset=4 - (local.get $0) - (local.get $0) - ) - (i64.atomic.store offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store8 offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store16 offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store32 offset=4 - (local.get $0) - (local.get $1) - ) - ) - (func $1 (type $0) - (local $0 i32) - (local $1 i64) - (drop - (i32.atomic.rmw.add offset=4 - (local.get $0) - (local.get $0) - ) - ) - (drop - (i32.atomic.rmw8.add_u offset=4 - (local.get $0) - (local.get $0) - ) - ) - (drop - (i32.atomic.rmw16.and_u - (local.get $0) - (local.get $0) - ) - ) - (drop - (i64.atomic.rmw32.or_u - (local.get $0) - (local.get $1) - ) - ) - (drop - (i32.atomic.rmw8.xchg_u - (local.get $0) - (local.get $0) - ) - ) - ) - (func $2 (type $0) - (local $0 i32) - (local $1 i64) - (drop - (i32.atomic.rmw.cmpxchg offset=4 - (local.get $0) - (local.get $0) - (local.get $0) - ) - ) - (drop - (i32.atomic.rmw8.cmpxchg_u - (local.get $0) - (local.get $0) - (local.get $0) - ) - ) - (drop - (i64.atomic.rmw.cmpxchg offset=4 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (i64.atomic.rmw32.cmpxchg_u - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - ) - (func $3 (type $0) - (local $0 i32) - (local $1 i64) - (drop - (memory.atomic.wait32 - (local.get $0) - (local.get $0) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait32 offset=4 - (local.get $0) - (local.get $0) - (local.get $1) - ) - ) - (drop - (memory.atomic.notify - (local.get $0) - (local.get $0) - ) - ) - (drop - (memory.atomic.notify offset=24 - (local.get $0) - (local.get $0) - ) - ) - (drop - (memory.atomic.wait64 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait64 offset=16 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - ) - (func $4 (type $0) - (atomic.fence) - ) -) - diff --git a/test/atomics64.wast b/test/atomics64.wast deleted file mode 100644 index 6ccab9cfa..000000000 --- a/test/atomics64.wast +++ /dev/null @@ -1,188 +0,0 @@ -(module - (type $0 (func)) - (memory $0 (shared i64 23 256)) - (func $atomic-loadstore (type $0) - (local $0 i64) - (local $1 i64) - (local $2 i32) - (drop - (i32.atomic.load8_u offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load16_u offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load offset=4 - (local.get $0) - ) - ) - (drop - (i64.atomic.load8_u - (local.get $0) - ) - ) - (drop - (i64.atomic.load16_u - (local.get $0) - ) - ) - (drop - (i64.atomic.load32_u - (local.get $0) - ) - ) - (drop - (i64.atomic.load - (local.get $0) - ) - ) - (i32.atomic.store offset=4 align=4 - (local.get $0) - (local.get $2) - ) - (i32.atomic.store8 offset=4 align=1 - (local.get $0) - (local.get $2) - ) - (i32.atomic.store16 offset=4 - (local.get $0) - (local.get $2) - ) - (i64.atomic.store offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store8 offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store16 offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store32 offset=4 - (local.get $0) - (local.get $1) - ) - ) - (func $atomic-rmw (type $0) - (local $0 i64) - (local $1 i64) - (local $2 i32) - (drop - (i32.atomic.rmw.add offset=4 - (local.get $0) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw8.add_u offset=4 - (local.get $0) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw16.and_u align=2 - (local.get $0) - (local.get $2) - ) - ) - (drop - (i64.atomic.rmw32.or_u - (local.get $0) - (local.get $1) - ) - ) - (drop - (i32.atomic.rmw8.xchg_u align=1 - (local.get $0) - (local.get $2) - ) - ) - ) - (func $atomic-cmpxchg (type $0) - (local $0 i64) - (local $1 i64) - (local $2 i32) - (drop - (i32.atomic.rmw.cmpxchg offset=4 - (local.get $0) - (local.get $2) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw8.cmpxchg_u - (local.get $0) - (local.get $2) - (local.get $2) - ) - ) - (drop - (i64.atomic.rmw.cmpxchg offset=4 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (i64.atomic.rmw32.cmpxchg_u align=4 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - ) - (func $atomic-wait-notify (type $0) - (local $0 i64) - (local $1 i64) - (local $2 i32) - (drop - (memory.atomic.wait32 - (local.get $0) - (local.get $2) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait32 offset=4 align=4 - (local.get $0) - (local.get $2) - (local.get $1) - ) - ) - (drop - (memory.atomic.notify - (local.get $0) - (local.get $2) - ) - ) - (drop - (memory.atomic.notify offset=24 align=4 - (local.get $0) - (local.get $2) - ) - ) - (drop - (memory.atomic.wait64 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait64 align=8 offset=16 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - ) - (func $atomic-fence (type $0) - (atomic.fence) - ) -) diff --git a/test/atomics64.wast.from-wast b/test/atomics64.wast.from-wast deleted file mode 100644 index d2e030309..000000000 --- a/test/atomics64.wast.from-wast +++ /dev/null @@ -1,188 +0,0 @@ -(module - (type $0 (func)) - (memory $0 (shared i64 23 256)) - (func $atomic-loadstore (type $0) - (local $0 i64) - (local $1 i64) - (local $2 i32) - (drop - (i32.atomic.load8_u offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load16_u offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load offset=4 - (local.get $0) - ) - ) - (drop - (i64.atomic.load8_u - (local.get $0) - ) - ) - (drop - (i64.atomic.load16_u - (local.get $0) - ) - ) - (drop - (i64.atomic.load32_u - (local.get $0) - ) - ) - (drop - (i64.atomic.load - (local.get $0) - ) - ) - (i32.atomic.store offset=4 - (local.get $0) - (local.get $2) - ) - (i32.atomic.store8 offset=4 - (local.get $0) - (local.get $2) - ) - (i32.atomic.store16 offset=4 - (local.get $0) - (local.get $2) - ) - (i64.atomic.store offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store8 offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store16 offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store32 offset=4 - (local.get $0) - (local.get $1) - ) - ) - (func $atomic-rmw (type $0) - (local $0 i64) - (local $1 i64) - (local $2 i32) - (drop - (i32.atomic.rmw.add offset=4 - (local.get $0) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw8.add_u offset=4 - (local.get $0) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw16.and_u - (local.get $0) - (local.get $2) - ) - ) - (drop - (i64.atomic.rmw32.or_u - (local.get $0) - (local.get $1) - ) - ) - (drop - (i32.atomic.rmw8.xchg_u - (local.get $0) - (local.get $2) - ) - ) - ) - (func $atomic-cmpxchg (type $0) - (local $0 i64) - (local $1 i64) - (local $2 i32) - (drop - (i32.atomic.rmw.cmpxchg offset=4 - (local.get $0) - (local.get $2) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw8.cmpxchg_u - (local.get $0) - (local.get $2) - (local.get $2) - ) - ) - (drop - (i64.atomic.rmw.cmpxchg offset=4 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (i64.atomic.rmw32.cmpxchg_u - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - ) - (func $atomic-wait-notify (type $0) - (local $0 i64) - (local $1 i64) - (local $2 i32) - (drop - (memory.atomic.wait32 - (local.get $0) - (local.get $2) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait32 offset=4 - (local.get $0) - (local.get $2) - (local.get $1) - ) - ) - (drop - (memory.atomic.notify - (local.get $0) - (local.get $2) - ) - ) - (drop - (memory.atomic.notify offset=24 - (local.get $0) - (local.get $2) - ) - ) - (drop - (memory.atomic.wait64 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait64 offset=16 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - ) - (func $atomic-fence (type $0) - (atomic.fence) - ) -) diff --git a/test/atomics64.wast.fromBinary b/test/atomics64.wast.fromBinary deleted file mode 100644 index f1be9008d..000000000 --- a/test/atomics64.wast.fromBinary +++ /dev/null @@ -1,189 +0,0 @@ -(module - (type $0 (func)) - (memory $0 (shared i64 23 256)) - (func $atomic-loadstore (type $0) - (local $0 i64) - (local $1 i64) - (local $2 i32) - (drop - (i32.atomic.load8_u offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load16_u offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load offset=4 - (local.get $0) - ) - ) - (drop - (i64.atomic.load8_u - (local.get $0) - ) - ) - (drop - (i64.atomic.load16_u - (local.get $0) - ) - ) - (drop - (i64.atomic.load32_u - (local.get $0) - ) - ) - (drop - (i64.atomic.load - (local.get $0) - ) - ) - (i32.atomic.store offset=4 - (local.get $0) - (local.get $2) - ) - (i32.atomic.store8 offset=4 - (local.get $0) - (local.get $2) - ) - (i32.atomic.store16 offset=4 - (local.get $0) - (local.get $2) - ) - (i64.atomic.store offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store8 offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store16 offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store32 offset=4 - (local.get $0) - (local.get $1) - ) - ) - (func $atomic-rmw (type $0) - (local $0 i64) - (local $1 i64) - (local $2 i32) - (drop - (i32.atomic.rmw.add offset=4 - (local.get $0) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw8.add_u offset=4 - (local.get $0) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw16.and_u - (local.get $0) - (local.get $2) - ) - ) - (drop - (i64.atomic.rmw32.or_u - (local.get $0) - (local.get $1) - ) - ) - (drop - (i32.atomic.rmw8.xchg_u - (local.get $0) - (local.get $2) - ) - ) - ) - (func $atomic-cmpxchg (type $0) - (local $0 i64) - (local $1 i64) - (local $2 i32) - (drop - (i32.atomic.rmw.cmpxchg offset=4 - (local.get $0) - (local.get $2) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw8.cmpxchg_u - (local.get $0) - (local.get $2) - (local.get $2) - ) - ) - (drop - (i64.atomic.rmw.cmpxchg offset=4 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (i64.atomic.rmw32.cmpxchg_u - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - ) - (func $atomic-wait-notify (type $0) - (local $0 i64) - (local $1 i64) - (local $2 i32) - (drop - (memory.atomic.wait32 - (local.get $0) - (local.get $2) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait32 offset=4 - (local.get $0) - (local.get $2) - (local.get $1) - ) - ) - (drop - (memory.atomic.notify - (local.get $0) - (local.get $2) - ) - ) - (drop - (memory.atomic.notify offset=24 - (local.get $0) - (local.get $2) - ) - ) - (drop - (memory.atomic.wait64 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait64 offset=16 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - ) - (func $atomic-fence (type $0) - (atomic.fence) - ) -) - diff --git a/test/atomics64.wast.fromBinary.noDebugInfo b/test/atomics64.wast.fromBinary.noDebugInfo deleted file mode 100644 index 2dce1d5f5..000000000 --- a/test/atomics64.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,189 +0,0 @@ -(module - (type $0 (func)) - (memory $0 (shared i64 23 256)) - (func $0 (type $0) - (local $0 i64) - (local $1 i64) - (local $2 i32) - (drop - (i32.atomic.load8_u offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load16_u offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load offset=4 - (local.get $0) - ) - ) - (drop - (i64.atomic.load8_u - (local.get $0) - ) - ) - (drop - (i64.atomic.load16_u - (local.get $0) - ) - ) - (drop - (i64.atomic.load32_u - (local.get $0) - ) - ) - (drop - (i64.atomic.load - (local.get $0) - ) - ) - (i32.atomic.store offset=4 - (local.get $0) - (local.get $2) - ) - (i32.atomic.store8 offset=4 - (local.get $0) - (local.get $2) - ) - (i32.atomic.store16 offset=4 - (local.get $0) - (local.get $2) - ) - (i64.atomic.store offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store8 offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store16 offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store32 offset=4 - (local.get $0) - (local.get $1) - ) - ) - (func $1 (type $0) - (local $0 i64) - (local $1 i64) - (local $2 i32) - (drop - (i32.atomic.rmw.add offset=4 - (local.get $0) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw8.add_u offset=4 - (local.get $0) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw16.and_u - (local.get $0) - (local.get $2) - ) - ) - (drop - (i64.atomic.rmw32.or_u - (local.get $0) - (local.get $1) - ) - ) - (drop - (i32.atomic.rmw8.xchg_u - (local.get $0) - (local.get $2) - ) - ) - ) - (func $2 (type $0) - (local $0 i64) - (local $1 i64) - (local $2 i32) - (drop - (i32.atomic.rmw.cmpxchg offset=4 - (local.get $0) - (local.get $2) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw8.cmpxchg_u - (local.get $0) - (local.get $2) - (local.get $2) - ) - ) - (drop - (i64.atomic.rmw.cmpxchg offset=4 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (i64.atomic.rmw32.cmpxchg_u - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - ) - (func $3 (type $0) - (local $0 i64) - (local $1 i64) - (local $2 i32) - (drop - (memory.atomic.wait32 - (local.get $0) - (local.get $2) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait32 offset=4 - (local.get $0) - (local.get $2) - (local.get $1) - ) - ) - (drop - (memory.atomic.notify - (local.get $0) - (local.get $2) - ) - ) - (drop - (memory.atomic.notify offset=24 - (local.get $0) - (local.get $2) - ) - ) - (drop - (memory.atomic.wait64 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait64 offset=16 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - ) - (func $4 (type $0) - (atomic.fence) - ) -) - diff --git a/test/complexTextNames.wast b/test/complexTextNames.wast deleted file mode 100644 index f27ca56b3..000000000 --- a/test/complexTextNames.wast +++ /dev/null @@ -1,4 +0,0 @@ -(module - (func $foo\20\28.bar\29) - (func "$zoo (.bar)" (call $foo\20\28.bar\29)) -) diff --git a/test/complexTextNames.wast.from-wast b/test/complexTextNames.wast.from-wast deleted file mode 100644 index f055f0850..000000000 --- a/test/complexTextNames.wast.from-wast +++ /dev/null @@ -1,10 +0,0 @@ -(module - (type $0 (func)) - (export "$zoo (.bar)" (func $1)) - (func $foo\20\28.bar\29 (type $0) - (nop) - ) - (func $1 (type $0) - (call $foo\20\28.bar\29) - ) -) diff --git a/test/complexTextNames.wast.fromBinary b/test/complexTextNames.wast.fromBinary deleted file mode 100644 index ed3994dd0..000000000 --- a/test/complexTextNames.wast.fromBinary +++ /dev/null @@ -1,11 +0,0 @@ -(module - (type $0 (func)) - (export "$zoo (.bar)" (func $1)) - (func $foo\20\28.bar\29 (type $0) - (nop) - ) - (func $1 (type $0) - (call $foo\20\28.bar\29) - ) -) - diff --git a/test/complexTextNames.wast.fromBinary.noDebugInfo b/test/complexTextNames.wast.fromBinary.noDebugInfo deleted file mode 100644 index 2cc81f708..000000000 --- a/test/complexTextNames.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,11 +0,0 @@ -(module - (type $0 (func)) - (export "$zoo (.bar)" (func $1)) - (func $0 (type $0) - (nop) - ) - (func $1 (type $0) - (call $0) - ) -) - diff --git a/test/duplicate_types.wast b/test/duplicate_types.wast deleted file mode 100644 index 2fd5e2f4b..000000000 --- a/test/duplicate_types.wast +++ /dev/null @@ -1,15 +0,0 @@ -(module ;; tests duplicate types are named properly - (type (func)) - (type (func)) - (type (func)) - (type (func (param i32))) - (type $0 (func (param i32))) - (type (func (param i32))) - (type $b (func (param i32) (result f32))) - (type (func (param i32) (result f32))) - - (func $f0 (param i32)) - (func $f1 (param i32) (result i32) - (i32.const 0) - ) -) diff --git a/test/duplicate_types.wast.from-wast b/test/duplicate_types.wast.from-wast deleted file mode 100644 index 20d2faba5..000000000 --- a/test/duplicate_types.wast.from-wast +++ /dev/null @@ -1,10 +0,0 @@ -(module - (type $0 (func (param i32))) - (type $1 (func (param i32) (result i32))) - (func $f0 (type $0) (param $0 i32) - (nop) - ) - (func $f1 (type $1) (param $0 i32) (result i32) - (i32.const 0) - ) -) diff --git a/test/duplicate_types.wast.fromBinary b/test/duplicate_types.wast.fromBinary deleted file mode 100644 index ead3abc9f..000000000 --- a/test/duplicate_types.wast.fromBinary +++ /dev/null @@ -1,11 +0,0 @@ -(module - (type $0 (func (param i32))) - (type $1 (func (param i32) (result i32))) - (func $f0 (type $0) (param $0 i32) - (nop) - ) - (func $f1 (type $1) (param $0 i32) (result i32) - (i32.const 0) - ) -) - diff --git a/test/duplicate_types.wast.fromBinary.noDebugInfo b/test/duplicate_types.wast.fromBinary.noDebugInfo deleted file mode 100644 index f0a97e488..000000000 --- a/test/duplicate_types.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,11 +0,0 @@ -(module - (type $0 (func (param i32))) - (type $1 (func (param i32) (result i32))) - (func $0 (type $0) (param $0 i32) - (nop) - ) - (func $1 (type $1) (param $0 i32) (result i32) - (i32.const 0) - ) -) - diff --git a/test/empty_imported_table.wast b/test/empty_imported_table.wast deleted file mode 100644 index e4314d59f..000000000 --- a/test/empty_imported_table.wast +++ /dev/null @@ -1,4 +0,0 @@ -(module - (import "env" "table" (table 0 0 funcref)) - (memory $0 0) -) diff --git a/test/empty_imported_table.wast.from-wast b/test/empty_imported_table.wast.from-wast deleted file mode 100644 index 29a9780b1..000000000 --- a/test/empty_imported_table.wast.from-wast +++ /dev/null @@ -1,4 +0,0 @@ -(module - (import "env" "table" (table $timport$0 0 0 funcref)) - (memory $0 0) -) diff --git a/test/empty_imported_table.wast.fromBinary b/test/empty_imported_table.wast.fromBinary deleted file mode 100644 index c29363236..000000000 --- a/test/empty_imported_table.wast.fromBinary +++ /dev/null @@ -1,5 +0,0 @@ -(module - (import "env" "table" (table $timport$0 0 0 funcref)) - (memory $0 0) -) - diff --git a/test/empty_imported_table.wast.fromBinary.noDebugInfo b/test/empty_imported_table.wast.fromBinary.noDebugInfo deleted file mode 100644 index c29363236..000000000 --- a/test/empty_imported_table.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,5 +0,0 @@ -(module - (import "env" "table" (table $timport$0 0 0 funcref)) - (memory $0 0) -) - diff --git a/test/empty_table.wast b/test/empty_table.wast deleted file mode 100644 index 04f4026af..000000000 --- a/test/empty_table.wast +++ /dev/null @@ -1,4 +0,0 @@ -(module - (table 0 0 funcref) - (memory $0 0) -) diff --git a/test/empty_table.wast.from-wast b/test/empty_table.wast.from-wast deleted file mode 100644 index 78d1b5937..000000000 --- a/test/empty_table.wast.from-wast +++ /dev/null @@ -1,4 +0,0 @@ -(module - (memory $0 0) - (table $0 0 0 funcref) -) diff --git a/test/empty_table.wast.fromBinary b/test/empty_table.wast.fromBinary deleted file mode 100644 index f43b3c001..000000000 --- a/test/empty_table.wast.fromBinary +++ /dev/null @@ -1,5 +0,0 @@ -(module - (memory $0 0) - (table $0 0 0 funcref) -) - diff --git a/test/empty_table.wast.fromBinary.noDebugInfo b/test/empty_table.wast.fromBinary.noDebugInfo deleted file mode 100644 index f43b3c001..000000000 --- a/test/empty_table.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,5 +0,0 @@ -(module - (memory $0 0) - (table $0 0 0 funcref) -) - diff --git a/test/exception-handling.wast b/test/exception-handling.wast deleted file mode 100644 index 6a4b3b897..000000000 --- a/test/exception-handling.wast +++ /dev/null @@ -1,386 +0,0 @@ -(module - (tag $e-i32 (param i32)) - (tag $e-i64 (param i64)) - (tag $e-i32-i64 (param i32 i64)) - (tag $e-eqref (param (ref null eq))) - (tag $e-empty) - - (func $foo) - (func $bar) - - ;; --------------------------------------------------------------------------- - ;; Old Phase 3 exception handling - - (func $eh-test (local $x (i32 i64)) - ;; Simple try-catch - (try - (do - (throw $e-i32 (i32.const 0)) - ) - (catch $e-i32 - (drop (pop i32)) - ) - ) - - ;; try-catch with multivalue tag - (try - (do - (throw $e-i32-i64 (i32.const 0) (i64.const 0)) - ) - (catch $e-i32-i64 - (local.set $x (pop i32 i64)) - (drop - (tuple.extract 2 0 - (local.get $x) - ) - ) - ) - ) - - ;; Try with a block label - (try $l1 - (do - (br $l1) - ) - (catch $e-i32 - (drop (pop i32)) - (br $l1) - ) - ) - - ;; Empty try body - (try - (do) - (catch $e-i32 - (drop (pop i32)) - ) - ) - - ;; Multiple instructions within try and catch bodies - (try - (do - (call $foo) - (call $bar) - ) - (catch $e-i32 - (drop (pop i32)) - (call $foo) - (call $bar) - ) - ) - - ;; Multiple catch clauses - (try - (do - (throw $e-i32 (i32.const 0)) - ) - (catch $e-i32 - (drop (pop i32)) - ) - (catch $e-i64 - (drop (pop i64)) - ) - ) - - ;; Single catch-all clause - (try - (do - (throw $e-i32 (i32.const 0)) - ) - (catch_all) - ) - - ;; catch and catch-all clauses together - (try - (do - (throw $e-i32 (i32.const 0)) - ) - (catch $e-i32 - (drop (pop i32)) - ) - (catch $e-i64 - (drop (pop i64)) - ) - (catch_all - (call $foo) - (call $bar) - ) - ) - - ;; nested try-catch - (try - (do - (try - (do - (throw $e-i32 (i32.const 0)) - ) - (catch $e-i32 - (drop (pop i32)) - ) - (catch_all) - ) - ) - (catch $e-i32 - (drop (pop i32)) - ) - (catch_all - (try - (do - (throw $e-i32 (i32.const 0)) - ) - (catch $e-i32 - (drop (pop i32)) - ) - (catch_all) - ) - ) - ) - - ;; try without catch or delegate - (try - (do - (throw $e-i32 (i32.const 0)) - ) - ) - ) - - (func $delegate-test - ;; Inner delegates target an outer catch - (try $l0 - (do - (try - (do - (call $foo) - ) - (delegate $l0) ;; by label - ) - (try - (do - (call $foo) - ) - (delegate 0) ;; by depth - ) - ) - (catch_all) - ) - - ;; When there are both a branch and a delegate that target the same try - ;; label. Because binaryen only allows blocks and loops to be targetted by - ;; branches, we wrap the try with a block and make branches that block - ;; instead, resulting in the br and delegate target different labels in the - ;; output. - (try $l0 - (do - (try - (do - (br_if $l0 (i32.const 1)) - ) - (delegate $l0) ;; by label - ) - (try - (do - (br_if $l0 (i32.const 1)) - ) - (delegate 0) ;; by depth - ) - ) - (catch_all) - ) - - ;; The inner delegate targets the outer delegate, which in turn targets the - ;; caller. - (try $l0 - (do - (try - (do - (call $foo) - ) - (delegate $l0) - ) - ) - (delegate 0) - ) - - ;; 'catch' body can be empty when the tag's type is none. - (try - (do) - (catch $e-empty) - ) - ) - - (func $rethrow-test - ;; Simple try-catch-rethrow - (try $l0 - (do - (call $foo) - ) - (catch $e-i32 - (drop (pop i32)) - (rethrow $l0) ;; by label - ) - (catch_all - (rethrow 0) ;; by depth - ) - ) - - ;; When there are both a branch and a rethrow that target the same try - ;; label. Because binaryen only allows blocks and loops to be targetted by - ;; branches, we wrap the try with a block and make branches that block - ;; instead, resulting in the br and rethrow target different labels in the - ;; output. - (try $l0 - (do - (call $foo) - ) - (catch $e-i32 - (drop (pop i32)) - (rethrow $l0) - ) - (catch_all - (br $l0) - ) - ) - - ;; One more level deep - (try $l0 - (do - (call $foo) - ) - (catch_all - (try - (do - (call $foo) - ) - (catch $e-i32 - (drop (pop i32)) - (rethrow $l0) ;; by label - ) - (catch_all - (rethrow 1) ;; by depth - ) - ) - ) - ) - - ;; Interleaving block - (try $l0 - (do - (call $foo) - ) - (catch_all - (try - (do - (call $foo) - ) - (catch $e-i32 - (drop (pop i32)) - (block $b0 - (rethrow $l0) ;; by label - ) - ) - (catch_all - (block $b1 - (rethrow 2) ;; by depth - ) - ) - ) - ) - ) - - ;; Within nested try, but rather in 'try' part and not 'catch' - (try $l0 - (do - (call $foo) - ) - (catch_all - (try - (do - (rethrow $l0) ;; by label - ) - (catch_all) - ) - ) - ) - (try $l0 - (do - (call $foo) - ) - (catch_all - (try - (do - (rethrow 1) ;; by depth - ) - (catch_all) - ) - ) - ) - ) - - (func $pop-test - (try - (do) - (catch $e-i32 - (throw $e-i32 - (if (result i32) - ;; pop is within an if condition, so this is OK. - (pop i32) - (i32.const 0) - (i32.const 3) - ) - ) - ) - ) - - (try - (do) - (catch $e-eqref - (drop - (pop anyref) ;; pop can be supertype - ) - ) - ) - ) - - (func $catchless-try-with-inner-delegate - (try $label$0 - (do - (try - (do - (throw $e-i32 - (i32.const 0) - ) - ) - (delegate $label$0) - ) - ) - ) - ) - - ;; When 'delegate' is next to a nested block, make sure its delegate argument - ;; is parsed correctly. - (func $nested-block-and-try - (block $l0 - (block $l1) - (try - (do) - (delegate 1) ;; to caller - ) - ) - (nop) - ) - - ;; --------------------------------------------------------------------------- - ;; New exception handling - - (func $exnref-test (result exnref) (local $exn exnref) (local $null-exn nullexnref) - (if (result exnref) - (i32.const 1) - (if (result nullexnref) - (i32.const 1) - (local.get $null-exn) - (ref.null noexn) - ) - (local.get $exn) - ) - ) -) diff --git a/test/exception-handling.wast.from-wast b/test/exception-handling.wast.from-wast deleted file mode 100644 index 8bd46bd87..000000000 --- a/test/exception-handling.wast.from-wast +++ /dev/null @@ -1,423 +0,0 @@ -(module - (type $0 (func)) - (type $1 (func (param i32))) - (type $2 (func (param i64))) - (type $3 (func (param i32 i64))) - (type $4 (func (param eqref))) - (type $5 (func (result exnref))) - (tag $e-i32 (param i32)) - (tag $e-i64 (param i64)) - (tag $e-i32-i64 (param i32 i64)) - (tag $e-eqref (param eqref)) - (tag $e-empty) - (func $foo (type $0) - (nop) - ) - (func $bar (type $0) - (nop) - ) - (func $eh-test (type $0) - (local $x (i32 i64)) - (try $try - (do - (throw $e-i32 - (i32.const 0) - ) - ) - (catch $e-i32 - (drop - (pop i32) - ) - ) - ) - (try $try0 - (do - (throw $e-i32-i64 - (i32.const 0) - (i64.const 0) - ) - ) - (catch $e-i32-i64 - (local.set $x - (pop i32 i64) - ) - (drop - (tuple.extract 2 0 - (local.get $x) - ) - ) - ) - ) - (block $l11 - (try $l1 - (do - (br $l11) - ) - (catch $e-i32 - (drop - (pop i32) - ) - (br $l11) - ) - ) - ) - (try $try2 - (do - (nop) - ) - (catch $e-i32 - (drop - (pop i32) - ) - ) - ) - (try $try3 - (do - (call $foo) - (call $bar) - ) - (catch $e-i32 - (drop - (pop i32) - ) - (call $foo) - (call $bar) - ) - ) - (try $try4 - (do - (throw $e-i32 - (i32.const 0) - ) - ) - (catch $e-i32 - (drop - (pop i32) - ) - ) - (catch $e-i64 - (drop - (pop i64) - ) - ) - ) - (try $try5 - (do - (throw $e-i32 - (i32.const 0) - ) - ) - (catch_all - (nop) - ) - ) - (try $try6 - (do - (throw $e-i32 - (i32.const 0) - ) - ) - (catch $e-i32 - (drop - (pop i32) - ) - ) - (catch $e-i64 - (drop - (pop i64) - ) - ) - (catch_all - (call $foo) - (call $bar) - ) - ) - (try $try7 - (do - (try $try8 - (do - (throw $e-i32 - (i32.const 0) - ) - ) - (catch $e-i32 - (drop - (pop i32) - ) - ) - (catch_all - (nop) - ) - ) - ) - (catch $e-i32 - (drop - (pop i32) - ) - ) - (catch_all - (try $try9 - (do - (throw $e-i32 - (i32.const 0) - ) - ) - (catch $e-i32 - (drop - (pop i32) - ) - ) - (catch_all - (nop) - ) - ) - ) - ) - (try $try10 - (do - (throw $e-i32 - (i32.const 0) - ) - ) - ) - ) - (func $delegate-test (type $0) - (try $l0 - (do - (try $try - (do - (call $foo) - ) - (delegate $l0) - ) - (try $try11 - (do - (call $foo) - ) - (delegate $l0) - ) - ) - (catch_all - (nop) - ) - ) - (block $l015 - (try $l012 - (do - (try $try13 - (do - (br_if $l015 - (i32.const 1) - ) - ) - (delegate $l012) - ) - (try $try14 - (do - (br_if $l015 - (i32.const 1) - ) - ) - (delegate $l012) - ) - ) - (catch_all - (nop) - ) - ) - ) - (try $l016 - (do - (try $try17 - (do - (call $foo) - ) - (delegate $l016) - ) - ) - (delegate 0) - ) - (try $try18 - (do - (nop) - ) - (catch $e-empty - (nop) - ) - ) - ) - (func $rethrow-test (type $0) - (try $l0 - (do - (call $foo) - ) - (catch $e-i32 - (drop - (pop i32) - ) - (rethrow $l0) - ) - (catch_all - (rethrow $l0) - ) - ) - (block $l020 - (try $l019 - (do - (call $foo) - ) - (catch $e-i32 - (drop - (pop i32) - ) - (rethrow $l019) - ) - (catch_all - (br $l020) - ) - ) - ) - (try $l021 - (do - (call $foo) - ) - (catch_all - (try $try - (do - (call $foo) - ) - (catch $e-i32 - (drop - (pop i32) - ) - (rethrow $l021) - ) - (catch_all - (rethrow $l021) - ) - ) - ) - ) - (try $l022 - (do - (call $foo) - ) - (catch_all - (try $try23 - (do - (call $foo) - ) - (catch $e-i32 - (drop - (pop i32) - ) - (block $b0 - (rethrow $l022) - ) - ) - (catch_all - (block $b1 - (rethrow $l022) - ) - ) - ) - ) - ) - (try $l024 - (do - (call $foo) - ) - (catch_all - (try $try25 - (do - (rethrow $l024) - ) - (catch_all - (nop) - ) - ) - ) - ) - (try $l026 - (do - (call $foo) - ) - (catch_all - (try $try27 - (do - (rethrow $l026) - ) - (catch_all - (nop) - ) - ) - ) - ) - ) - (func $pop-test (type $0) - (try $try - (do - (nop) - ) - (catch $e-i32 - (throw $e-i32 - (if (result i32) - (pop i32) - (i32.const 0) - (i32.const 3) - ) - ) - ) - ) - (try $try28 - (do - (nop) - ) - (catch $e-eqref - (drop - (pop anyref) - ) - ) - ) - ) - (func $catchless-try-with-inner-delegate (type $0) - (try $label$0 - (do - (try $try - (do - (throw $e-i32 - (i32.const 0) - ) - ) - (delegate $label$0) - ) - ) - ) - ) - (func $nested-block-and-try (type $0) - (block $l0 - (block $l1 - ) - (try $try - (do - (nop) - ) - (delegate 1) - ) - ) - (nop) - ) - (func $exnref-test (type $5) (result exnref) - (local $exn exnref) - (local $null-exn nullexnref) - (if (result exnref) - (i32.const 1) - (if (result nullexnref) - (i32.const 1) - (local.get $null-exn) - (ref.null noexn) - ) - (local.get $exn) - ) - ) -) diff --git a/test/exception-handling.wast.fromBinary b/test/exception-handling.wast.fromBinary deleted file mode 100644 index aa6e92788..000000000 --- a/test/exception-handling.wast.fromBinary +++ /dev/null @@ -1,446 +0,0 @@ -(module - (type $0 (func)) - (type $1 (func (param i32))) - (type $2 (func (param i64))) - (type $3 (func (param i32 i64))) - (type $4 (func (param eqref))) - (type $5 (func (result exnref))) - (tag $e-i32 (param i32)) - (tag $e-i64 (param i64)) - (tag $e-i32-i64 (param i32 i64)) - (tag $e-eqref (param eqref)) - (tag $e-empty) - (func $foo (type $0) - (nop) - ) - (func $bar (type $0) - (nop) - ) - (func $eh-test (type $0) - (local $x i32) - (local $1 i64) - (local $2 (i32 i64)) - (local $3 i32) - (try $label$3 - (do - (throw $e-i32 - (i32.const 0) - ) - ) - (catch $e-i32 - (drop - (pop i32) - ) - ) - ) - (try $label$6 - (do - (throw $e-i32-i64 - (i32.const 0) - (i64.const 0) - ) - ) - (catch $e-i32-i64 - (local.set $2 - (pop i32 i64) - ) - (local.set $x - (block (result i32) - (local.set $3 - (tuple.extract 2 0 - (local.get $2) - ) - ) - (local.set $1 - (tuple.extract 2 1 - (local.get $2) - ) - ) - (local.get $3) - ) - ) - (drop - (local.get $x) - ) - ) - ) - (block $label$7 - (try $label$10 - (do - (br $label$7) - ) - (catch $e-i32 - (drop - (pop i32) - ) - (br $label$7) - ) - ) - ) - (try $label$13 - (do - (nop) - ) - (catch $e-i32 - (drop - (pop i32) - ) - ) - ) - (try $label$16 - (do - (call $foo) - (call $bar) - ) - (catch $e-i32 - (drop - (pop i32) - ) - (call $foo) - (call $bar) - ) - ) - (try $label$19 - (do - (throw $e-i32 - (i32.const 0) - ) - ) - (catch $e-i32 - (drop - (pop i32) - ) - ) - (catch $e-i64 - (drop - (pop i64) - ) - ) - ) - (try $label$22 - (do - (throw $e-i32 - (i32.const 0) - ) - ) - (catch_all - (nop) - ) - ) - (try $label$25 - (do - (throw $e-i32 - (i32.const 0) - ) - ) - (catch $e-i32 - (drop - (pop i32) - ) - ) - (catch $e-i64 - (drop - (pop i64) - ) - ) - (catch_all - (call $foo) - (call $bar) - ) - ) - (try $label$34 - (do - (try $label$29 - (do - (throw $e-i32 - (i32.const 0) - ) - ) - (catch $e-i32 - (drop - (pop i32) - ) - ) - (catch_all - (nop) - ) - ) - ) - (catch $e-i32 - (drop - (pop i32) - ) - ) - (catch_all - (try $label$33 - (do - (throw $e-i32 - (i32.const 0) - ) - ) - (catch $e-i32 - (drop - (pop i32) - ) - ) - (catch_all - (nop) - ) - ) - ) - ) - (try $label$37 - (do - (throw $e-i32 - (i32.const 0) - ) - ) - ) - ) - (func $delegate-test (type $0) - (try $label$9 - (do - (block $label$1 - (try $label$4 - (do - (call $foo) - ) - (delegate $label$9) - ) - (try $label$7 - (do - (call $foo) - ) - (delegate $label$9) - ) - ) - ) - (catch_all - (nop) - ) - ) - (block $label$10 - (try $label$19 - (do - (block $label$11 - (try $label$14 - (do - (br_if $label$10 - (i32.const 1) - ) - ) - (delegate $label$19) - ) - (try $label$17 - (do - (br_if $label$10 - (i32.const 1) - ) - ) - (delegate $label$19) - ) - ) - ) - (catch_all - (nop) - ) - ) - ) - (try $label$25 - (do - (block $label$20 - (try $label$23 - (do - (call $foo) - ) - (delegate $label$25) - ) - ) - ) - (delegate 0) - ) - (try $label$28 - (do - (nop) - ) - (catch $e-empty - (nop) - ) - ) - ) - (func $rethrow-test (type $0) - (try $label$3 - (do - (call $foo) - ) - (catch $e-i32 - (drop - (pop i32) - ) - (rethrow $label$3) - ) - (catch_all - (rethrow $label$3) - ) - ) - (block $label$4 - (try $label$7 - (do - (call $foo) - ) - (catch $e-i32 - (drop - (pop i32) - ) - (rethrow $label$7) - ) - (catch_all - (br $label$4) - ) - ) - ) - (try $label$13 - (do - (call $foo) - ) - (catch_all - (try $label$12 - (do - (call $foo) - ) - (catch $e-i32 - (drop - (pop i32) - ) - (rethrow $label$13) - ) - (catch_all - (rethrow $label$13) - ) - ) - ) - ) - (try $label$20 - (do - (call $foo) - ) - (catch_all - (try $label$19 - (do - (call $foo) - ) - (catch $e-i32 - (drop - (pop i32) - ) - (block $label$18 - (rethrow $label$20) - ) - ) - (catch_all - (rethrow $label$20) - ) - ) - ) - ) - (try $label$26 - (do - (call $foo) - ) - (catch_all - (try $label$25 - (do - (rethrow $label$26) - ) - (catch_all - (nop) - ) - ) - ) - ) - (try $label$32 - (do - (call $foo) - ) - (catch_all - (try $label$31 - (do - (rethrow $label$32) - ) - (catch_all - (nop) - ) - ) - ) - ) - ) - (func $pop-test (type $0) - (try $label$5 - (do - (nop) - ) - (catch $e-i32 - (throw $e-i32 - (if (result i32) - (pop i32) - (i32.const 0) - (i32.const 3) - ) - ) - ) - ) - (try $label$8 - (do - (nop) - ) - (catch $e-eqref - (drop - (pop eqref) - ) - ) - ) - ) - (func $catchless-try-with-inner-delegate (type $0) - (try $label$6 - (do - (block $label$1 - (try $label$4 - (do - (throw $e-i32 - (i32.const 0) - ) - ) - (delegate $label$6) - ) - ) - ) - ) - ) - (func $nested-block-and-try (type $0) - (block $label$1 - (block $label$2 - ) - (try $label$5 - (do - (nop) - ) - (delegate 1) - ) - ) - (nop) - ) - (func $exnref-test (type $5) (result exnref) - (local $exn exnref) - (local $null-exn nullexnref) - (if (result exnref) - (i32.const 1) - (if (result nullexnref) - (i32.const 1) - (local.get $null-exn) - (ref.null noexn) - ) - (local.get $exn) - ) - ) -) - diff --git a/test/exception-handling.wast.fromBinary.noDebugInfo b/test/exception-handling.wast.fromBinary.noDebugInfo deleted file mode 100644 index b0da0391b..000000000 --- a/test/exception-handling.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,446 +0,0 @@ -(module - (type $0 (func)) - (type $1 (func (param i32))) - (type $2 (func (param i64))) - (type $3 (func (param i32 i64))) - (type $4 (func (param eqref))) - (type $5 (func (result exnref))) - (tag $tag$0 (param i32)) - (tag $tag$1 (param i64)) - (tag $tag$2 (param i32 i64)) - (tag $tag$3 (param eqref)) - (tag $tag$4) - (func $0 (type $0) - (nop) - ) - (func $1 (type $0) - (nop) - ) - (func $2 (type $0) - (local $0 i32) - (local $1 i64) - (local $2 (i32 i64)) - (local $3 i32) - (try $label$3 - (do - (throw $tag$0 - (i32.const 0) - ) - ) - (catch $tag$0 - (drop - (pop i32) - ) - ) - ) - (try $label$6 - (do - (throw $tag$2 - (i32.const 0) - (i64.const 0) - ) - ) - (catch $tag$2 - (local.set $2 - (pop i32 i64) - ) - (local.set $0 - (block (result i32) - (local.set $3 - (tuple.extract 2 0 - (local.get $2) - ) - ) - (local.set $1 - (tuple.extract 2 1 - (local.get $2) - ) - ) - (local.get $3) - ) - ) - (drop - (local.get $0) - ) - ) - ) - (block $label$7 - (try $label$10 - (do - (br $label$7) - ) - (catch $tag$0 - (drop - (pop i32) - ) - (br $label$7) - ) - ) - ) - (try $label$13 - (do - (nop) - ) - (catch $tag$0 - (drop - (pop i32) - ) - ) - ) - (try $label$16 - (do - (call $0) - (call $1) - ) - (catch $tag$0 - (drop - (pop i32) - ) - (call $0) - (call $1) - ) - ) - (try $label$19 - (do - (throw $tag$0 - (i32.const 0) - ) - ) - (catch $tag$0 - (drop - (pop i32) - ) - ) - (catch $tag$1 - (drop - (pop i64) - ) - ) - ) - (try $label$22 - (do - (throw $tag$0 - (i32.const 0) - ) - ) - (catch_all - (nop) - ) - ) - (try $label$25 - (do - (throw $tag$0 - (i32.const 0) - ) - ) - (catch $tag$0 - (drop - (pop i32) - ) - ) - (catch $tag$1 - (drop - (pop i64) - ) - ) - (catch_all - (call $0) - (call $1) - ) - ) - (try $label$34 - (do - (try $label$29 - (do - (throw $tag$0 - (i32.const 0) - ) - ) - (catch $tag$0 - (drop - (pop i32) - ) - ) - (catch_all - (nop) - ) - ) - ) - (catch $tag$0 - (drop - (pop i32) - ) - ) - (catch_all - (try $label$33 - (do - (throw $tag$0 - (i32.const 0) - ) - ) - (catch $tag$0 - (drop - (pop i32) - ) - ) - (catch_all - (nop) - ) - ) - ) - ) - (try $label$37 - (do - (throw $tag$0 - (i32.const 0) - ) - ) - ) - ) - (func $3 (type $0) - (try $label$9 - (do - (block $label$1 - (try $label$4 - (do - (call $0) - ) - (delegate $label$9) - ) - (try $label$7 - (do - (call $0) - ) - (delegate $label$9) - ) - ) - ) - (catch_all - (nop) - ) - ) - (block $label$10 - (try $label$19 - (do - (block $label$11 - (try $label$14 - (do - (br_if $label$10 - (i32.const 1) - ) - ) - (delegate $label$19) - ) - (try $label$17 - (do - (br_if $label$10 - (i32.const 1) - ) - ) - (delegate $label$19) - ) - ) - ) - (catch_all - (nop) - ) - ) - ) - (try $label$25 - (do - (block $label$20 - (try $label$23 - (do - (call $0) - ) - (delegate $label$25) - ) - ) - ) - (delegate 0) - ) - (try $label$28 - (do - (nop) - ) - (catch $tag$4 - (nop) - ) - ) - ) - (func $4 (type $0) - (try $label$3 - (do - (call $0) - ) - (catch $tag$0 - (drop - (pop i32) - ) - (rethrow $label$3) - ) - (catch_all - (rethrow $label$3) - ) - ) - (block $label$4 - (try $label$7 - (do - (call $0) - ) - (catch $tag$0 - (drop - (pop i32) - ) - (rethrow $label$7) - ) - (catch_all - (br $label$4) - ) - ) - ) - (try $label$13 - (do - (call $0) - ) - (catch_all - (try $label$12 - (do - (call $0) - ) - (catch $tag$0 - (drop - (pop i32) - ) - (rethrow $label$13) - ) - (catch_all - (rethrow $label$13) - ) - ) - ) - ) - (try $label$20 - (do - (call $0) - ) - (catch_all - (try $label$19 - (do - (call $0) - ) - (catch $tag$0 - (drop - (pop i32) - ) - (block $label$18 - (rethrow $label$20) - ) - ) - (catch_all - (rethrow $label$20) - ) - ) - ) - ) - (try $label$26 - (do - (call $0) - ) - (catch_all - (try $label$25 - (do - (rethrow $label$26) - ) - (catch_all - (nop) - ) - ) - ) - ) - (try $label$32 - (do - (call $0) - ) - (catch_all - (try $label$31 - (do - (rethrow $label$32) - ) - (catch_all - (nop) - ) - ) - ) - ) - ) - (func $5 (type $0) - (try $label$5 - (do - (nop) - ) - (catch $tag$0 - (throw $tag$0 - (if (result i32) - (pop i32) - (i32.const 0) - (i32.const 3) - ) - ) - ) - ) - (try $label$8 - (do - (nop) - ) - (catch $tag$3 - (drop - (pop eqref) - ) - ) - ) - ) - (func $6 (type $0) - (try $label$6 - (do - (block $label$1 - (try $label$4 - (do - (throw $tag$0 - (i32.const 0) - ) - ) - (delegate $label$6) - ) - ) - ) - ) - ) - (func $7 (type $0) - (block $label$1 - (block $label$2 - ) - (try $label$5 - (do - (nop) - ) - (delegate 1) - ) - ) - (nop) - ) - (func $8 (type $5) (result exnref) - (local $0 exnref) - (local $1 nullexnref) - (if (result exnref) - (i32.const 1) - (if (result nullexnref) - (i32.const 1) - (local.get $1) - (ref.null noexn) - ) - (local.get $0) - ) - ) -) - diff --git a/test/export-import.wast b/test/export-import.wast deleted file mode 100644 index 5dc2185c6..000000000 --- a/test/export-import.wast +++ /dev/null @@ -1,8 +0,0 @@ -(module - (type $v (func)) - (import "env" "test1" (func $test1)) - (import "env" "test2" (global $test2 i32)) - (export "test1" (func $test1)) - (export "test2" (global $test2)) -) - diff --git a/test/export-import.wast.from-wast b/test/export-import.wast.from-wast deleted file mode 100644 index b56bd3f93..000000000 --- a/test/export-import.wast.from-wast +++ /dev/null @@ -1,7 +0,0 @@ -(module - (type $v (func)) - (import "env" "test2" (global $test2 i32)) - (import "env" "test1" (func $test1 (type $v))) - (export "test1" (func $test1)) - (export "test2" (global $test2)) -) diff --git a/test/export-import.wast.fromBinary b/test/export-import.wast.fromBinary deleted file mode 100644 index 37a701e07..000000000 --- a/test/export-import.wast.fromBinary +++ /dev/null @@ -1,8 +0,0 @@ -(module - (type $v (func)) - (import "env" "test2" (global $test2 i32)) - (import "env" "test1" (func $test1 (type $v))) - (export "test1" (func $test1)) - (export "test2" (global $test2)) -) - diff --git a/test/export-import.wast.fromBinary.noDebugInfo b/test/export-import.wast.fromBinary.noDebugInfo deleted file mode 100644 index 0ac0ec0c9..000000000 --- a/test/export-import.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,8 +0,0 @@ -(module - (type $0 (func)) - (import "env" "test2" (global $gimport$0 i32)) - (import "env" "test1" (func $fimport$0 (type $0))) - (export "test1" (func $fimport$0)) - (export "test2" (global $gimport$0)) -) - diff --git a/test/extended-names.wast b/test/extended-names.wast deleted file mode 100644 index 009ef5689..000000000 --- a/test/extended-names.wast +++ /dev/null @@ -1,6 +0,0 @@ -(module $foo - (table $t1 1 funcref) - (memory $m1 1 1) - (data $mydata (i32.const 0) "a") - (data $passive_data "b") -) diff --git a/test/extended-names.wast.from-wast b/test/extended-names.wast.from-wast deleted file mode 100644 index 5719e9e44..000000000 --- a/test/extended-names.wast.from-wast +++ /dev/null @@ -1,6 +0,0 @@ -(module $foo - (memory $m1 1 1) - (data $mydata (i32.const 0) "a") - (data $passive_data "b") - (table $t1 1 funcref) -) diff --git a/test/extended-names.wast.fromBinary b/test/extended-names.wast.fromBinary deleted file mode 100644 index 18a08262d..000000000 --- a/test/extended-names.wast.fromBinary +++ /dev/null @@ -1,7 +0,0 @@ -(module $foo - (memory $m1 1 1) - (data $mydata (i32.const 0) "a") - (data $passive_data "b") - (table $t1 1 funcref) -) - diff --git a/test/extended-names.wast.fromBinary.noDebugInfo b/test/extended-names.wast.fromBinary.noDebugInfo deleted file mode 100644 index 48a5ec9e5..000000000 --- a/test/extended-names.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,7 +0,0 @@ -(module - (memory $0 1 1) - (data $0 (i32.const 0) "a") - (data $1 "b") - (table $0 1 funcref) -) - diff --git a/test/externref.wast.from-wast b/test/externref.wast.from-wast deleted file mode 100644 index 514123aab..000000000 --- a/test/externref.wast.from-wast +++ /dev/null @@ -1,19 +0,0 @@ -(module - (type $externref_=>_externref (func (param externref) (result externref))) - (import "env" "test2" (global $test2 externref)) - (import "env" "test1" (func $test1 (param externref) (result externref))) - (memory $0 1 1) - (export "test1" (func $test1)) - (export "test2" (global $test2)) - (func $externref_test (; 1 ;) (param $0 externref) (result externref) - (local $1 externref) - (local.set $1 - (call $test1 - (local.get $0) - ) - ) - (return - (local.get $1) - ) - ) -) diff --git a/test/externref.wast.fromBinary b/test/externref.wast.fromBinary deleted file mode 100644 index ab2d2f963..000000000 --- a/test/externref.wast.fromBinary +++ /dev/null @@ -1,20 +0,0 @@ -(module - (type $externref_=>_externref (func (param externref) (result externref))) - (import "env" "test2" (global $gimport$1 externref)) - (import "env" "test1" (func $test1 (param externref) (result externref))) - (memory $0 1 1) - (export "test1" (func $test1)) - (export "test2" (global $gimport$1)) - (func $externref_test (; 1 ;) (param $0 externref) (result externref) - (local $1 externref) - (local.set $1 - (call $test1 - (local.get $0) - ) - ) - (return - (local.get $1) - ) - ) -) - diff --git a/test/externref.wast.fromBinary.noDebugInfo b/test/externref.wast.fromBinary.noDebugInfo deleted file mode 100644 index 44d9029be..000000000 --- a/test/externref.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,20 +0,0 @@ -(module - (type $externref_=>_externref (func (param externref) (result externref))) - (import "env" "test2" (global $gimport$1 externref)) - (import "env" "test1" (func $fimport$0 (param externref) (result externref))) - (memory $0 1 1) - (export "test1" (func $fimport$0)) - (export "test2" (global $gimport$1)) - (func $0 (; 1 ;) (param $0 externref) (result externref) - (local $1 externref) - (local.set $1 - (call $fimport$0 - (local.get $0) - ) - ) - (return - (local.get $1) - ) - ) -) - diff --git a/test/fn_prolog_epilog.debugInfo.wast b/test/fn_prolog_epilog.debugInfo.wast deleted file mode 100644 index 39c893fbb..000000000 --- a/test/fn_prolog_epilog.debugInfo.wast +++ /dev/null @@ -1,16 +0,0 @@ -(module - ;;@ src.cpp:1:1 - (func - (nop) - ;;@ src.cpp:2:1 - (block $l0 - ;;@ src.cpp:2:2 - (block $l1 - (br $l1) - ) - ) - ;;@ src.cpp:3:1 - (return) - ;;@ src.cpp:3:2 - ) -) diff --git a/test/fn_prolog_epilog.debugInfo.wast.from-wast b/test/fn_prolog_epilog.debugInfo.wast.from-wast deleted file mode 100644 index 990d4e140..000000000 --- a/test/fn_prolog_epilog.debugInfo.wast.from-wast +++ /dev/null @@ -1,17 +0,0 @@ -(module - (type $0 (func)) - ;;@ src.cpp:1:1 - (func $0 (type $0) - (nop) - ;;@ src.cpp:2:1 - (block $l0 - ;;@ src.cpp:2:2 - (block $l1 - (br $l1) - ) - ) - ;;@ src.cpp:3:1 - (return) - ;;@ src.cpp:3:2 - ) -) diff --git a/test/fn_prolog_epilog.debugInfo.wast.fromBinary b/test/fn_prolog_epilog.debugInfo.wast.fromBinary deleted file mode 100644 index e3b343451..000000000 --- a/test/fn_prolog_epilog.debugInfo.wast.fromBinary +++ /dev/null @@ -1,13 +0,0 @@ -(module - (type $0 (func)) - (func $0 (type $0) - (nop) - (block $label$1 - (block $label$2 - (br $label$2) - ) - ) - (return) - ) -) - diff --git a/test/fn_prolog_epilog.debugInfo.wast.fromBinary.noDebugInfo b/test/fn_prolog_epilog.debugInfo.wast.fromBinary.noDebugInfo deleted file mode 100644 index e3b343451..000000000 --- a/test/fn_prolog_epilog.debugInfo.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,13 +0,0 @@ -(module - (type $0 (func)) - (func $0 (type $0) - (nop) - (block $label$1 - (block $label$2 - (br $label$2) - ) - ) - (return) - ) -) - diff --git a/test/gc.wast.from-wast b/test/gc.wast.from-wast deleted file mode 100644 index 38f7eb9f6..000000000 --- a/test/gc.wast.from-wast +++ /dev/null @@ -1,154 +0,0 @@ -(module - (type $i31ref_structref_=>_none (func (param i31ref structref))) - (type $i31ref_ref|i31|_structref_ref|struct|_=>_none (func (param i31ref (ref i31) structref (ref struct)))) - (global $global_anyref (mut anyref) (ref.null none)) - (global $global_eqref (mut eqref) (ref.null none)) - (global $global_i31ref (mut i31ref) (ref.i31 - (i32.const 0) - )) - (global $global_anyref2 (mut anyref) (ref.null none)) - (global $global_anyref3 (mut anyref) (ref.i31 - (i32.const 0) - )) - (global $global_eqref2 (mut eqref) (ref.i31 - (i32.const 0) - )) - (func $test (type $i31ref_structref_=>_none) (param $local_i31ref i31ref) (param $local_structref structref) - (local $local_i32 i32) - (local $local_anyref anyref) - (local $local_eqref eqref) - (local.set $local_anyref - (local.get $local_anyref) - ) - (local.set $local_anyref - (global.get $global_anyref) - ) - (local.set $local_anyref - (ref.null none) - ) - (local.set $local_eqref - (local.get $local_eqref) - ) - (local.set $local_eqref - (global.get $global_eqref) - ) - (local.set $local_eqref - (ref.null none) - ) - (local.set $local_i31ref - (local.get $local_i31ref) - ) - (local.set $local_i31ref - (global.get $global_i31ref) - ) - (local.set $local_i31ref - (ref.i31 - (i32.const 0) - ) - ) - (local.set $local_anyref - (local.get $local_eqref) - ) - (local.set $local_anyref - (global.get $global_eqref) - ) - (local.set $local_anyref - (ref.null none) - ) - (local.set $local_anyref - (local.get $local_i31ref) - ) - (local.set $local_anyref - (global.get $global_i31ref) - ) - (local.set $local_anyref - (ref.i31 - (i32.const 0) - ) - ) - (local.set $local_eqref - (local.get $local_i31ref) - ) - (local.set $local_eqref - (global.get $global_i31ref) - ) - (local.set $local_eqref - (ref.i31 - (i32.const 0) - ) - ) - (global.set $global_anyref - (local.get $local_anyref) - ) - (global.set $global_anyref - (global.get $global_anyref) - ) - (global.set $global_anyref - (ref.null none) - ) - (global.set $global_eqref - (local.get $local_eqref) - ) - (global.set $global_eqref - (global.get $global_eqref) - ) - (global.set $global_eqref - (ref.null none) - ) - (global.set $global_i31ref - (local.get $local_i31ref) - ) - (global.set $global_i31ref - (global.get $global_i31ref) - ) - (global.set $global_i31ref - (ref.i31 - (i32.const 0) - ) - ) - (global.set $global_anyref - (local.get $local_eqref) - ) - (global.set $global_anyref - (global.get $global_eqref) - ) - (global.set $global_anyref - (ref.null none) - ) - (global.set $global_anyref - (local.get $local_i31ref) - ) - (global.set $global_anyref - (global.get $global_i31ref) - ) - (global.set $global_anyref - (ref.i31 - (i32.const 0) - ) - ) - (global.set $global_eqref - (local.get $local_i31ref) - ) - (global.set $global_eqref - (global.get $global_i31ref) - ) - (global.set $global_eqref - (ref.i31 - (i32.const 0) - ) - ) - (local.set $local_i32 - (i31.get_s - (local.get $local_i31ref) - ) - ) - (local.set $local_i32 - (i31.get_u - (local.get $local_i31ref) - ) - ) - ) - (func $test-variants (type $i31ref_ref|i31|_structref_ref|struct|_=>_none) (param $local_i31refnull i31ref) (param $local_i31refnonnull (ref i31)) (param $local_structrefnull structref) (param $local_structrefnonnull (ref struct)) - (nop) - ) -) diff --git a/test/gc.wast.fromBinary b/test/gc.wast.fromBinary deleted file mode 100644 index 8e5f11a0c..000000000 --- a/test/gc.wast.fromBinary +++ /dev/null @@ -1,155 +0,0 @@ -(module - (type $i31ref_structref_=>_none (func (param i31ref structref))) - (type $i31ref_ref|i31|_structref_ref|struct|_=>_none (func (param i31ref (ref i31) structref (ref struct)))) - (global $global_anyref (mut anyref) (ref.null none)) - (global $global_eqref (mut eqref) (ref.null none)) - (global $global_i31ref (mut i31ref) (ref.i31 - (i32.const 0) - )) - (global $global_anyref2 (mut anyref) (ref.null none)) - (global $global_anyref3 (mut anyref) (ref.i31 - (i32.const 0) - )) - (global $global_eqref2 (mut eqref) (ref.i31 - (i32.const 0) - )) - (func $test (type $i31ref_structref_=>_none) (param $local_i31ref i31ref) (param $local_structref structref) - (local $local_i32 i32) - (local $local_anyref anyref) - (local $local_eqref eqref) - (local.set $local_anyref - (local.get $local_anyref) - ) - (local.set $local_anyref - (global.get $global_anyref) - ) - (local.set $local_anyref - (ref.null none) - ) - (local.set $local_eqref - (local.get $local_eqref) - ) - (local.set $local_eqref - (global.get $global_eqref) - ) - (local.set $local_eqref - (ref.null none) - ) - (local.set $local_i31ref - (local.get $local_i31ref) - ) - (local.set $local_i31ref - (global.get $global_i31ref) - ) - (local.set $local_i31ref - (ref.i31 - (i32.const 0) - ) - ) - (local.set $local_anyref - (local.get $local_eqref) - ) - (local.set $local_anyref - (global.get $global_eqref) - ) - (local.set $local_anyref - (ref.null none) - ) - (local.set $local_anyref - (local.get $local_i31ref) - ) - (local.set $local_anyref - (global.get $global_i31ref) - ) - (local.set $local_anyref - (ref.i31 - (i32.const 0) - ) - ) - (local.set $local_eqref - (local.get $local_i31ref) - ) - (local.set $local_eqref - (global.get $global_i31ref) - ) - (local.set $local_eqref - (ref.i31 - (i32.const 0) - ) - ) - (global.set $global_anyref - (local.get $local_anyref) - ) - (global.set $global_anyref - (global.get $global_anyref) - ) - (global.set $global_anyref - (ref.null none) - ) - (global.set $global_eqref - (local.get $local_eqref) - ) - (global.set $global_eqref - (global.get $global_eqref) - ) - (global.set $global_eqref - (ref.null none) - ) - (global.set $global_i31ref - (local.get $local_i31ref) - ) - (global.set $global_i31ref - (global.get $global_i31ref) - ) - (global.set $global_i31ref - (ref.i31 - (i32.const 0) - ) - ) - (global.set $global_anyref - (local.get $local_eqref) - ) - (global.set $global_anyref - (global.get $global_eqref) - ) - (global.set $global_anyref - (ref.null none) - ) - (global.set $global_anyref - (local.get $local_i31ref) - ) - (global.set $global_anyref - (global.get $global_i31ref) - ) - (global.set $global_anyref - (ref.i31 - (i32.const 0) - ) - ) - (global.set $global_eqref - (local.get $local_i31ref) - ) - (global.set $global_eqref - (global.get $global_i31ref) - ) - (global.set $global_eqref - (ref.i31 - (i32.const 0) - ) - ) - (local.set $local_i32 - (i31.get_s - (local.get $local_i31ref) - ) - ) - (local.set $local_i32 - (i31.get_u - (local.get $local_i31ref) - ) - ) - ) - (func $test-variants (type $i31ref_ref|i31|_structref_ref|struct|_=>_none) (param $local_i31refnull i31ref) (param $local_i31refnonnull (ref i31)) (param $local_structrefnull structref) (param $local_structrefnonnull (ref struct)) - (nop) - ) -) - diff --git a/test/gc.wast.fromBinary.noDebugInfo b/test/gc.wast.fromBinary.noDebugInfo deleted file mode 100644 index 64f11cfaf..000000000 --- a/test/gc.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,155 +0,0 @@ -(module - (type $i31ref_structref_=>_none (func (param i31ref structref))) - (type $i31ref_ref|i31|_structref_ref|struct|_=>_none (func (param i31ref (ref i31) structref (ref struct)))) - (global $global$0 (mut anyref) (ref.null none)) - (global $global$1 (mut eqref) (ref.null none)) - (global $global$2 (mut i31ref) (ref.i31 - (i32.const 0) - )) - (global $global$3 (mut anyref) (ref.null none)) - (global $global$4 (mut anyref) (ref.i31 - (i32.const 0) - )) - (global $global$5 (mut eqref) (ref.i31 - (i32.const 0) - )) - (func $0 (type $i31ref_structref_=>_none) (param $0 i31ref) (param $1 structref) - (local $2 i32) - (local $3 anyref) - (local $4 eqref) - (local.set $3 - (local.get $3) - ) - (local.set $3 - (global.get $global$0) - ) - (local.set $3 - (ref.null none) - ) - (local.set $4 - (local.get $4) - ) - (local.set $4 - (global.get $global$1) - ) - (local.set $4 - (ref.null none) - ) - (local.set $0 - (local.get $0) - ) - (local.set $0 - (global.get $global$2) - ) - (local.set $0 - (ref.i31 - (i32.const 0) - ) - ) - (local.set $3 - (local.get $4) - ) - (local.set $3 - (global.get $global$1) - ) - (local.set $3 - (ref.null none) - ) - (local.set $3 - (local.get $0) - ) - (local.set $3 - (global.get $global$2) - ) - (local.set $3 - (ref.i31 - (i32.const 0) - ) - ) - (local.set $4 - (local.get $0) - ) - (local.set $4 - (global.get $global$2) - ) - (local.set $4 - (ref.i31 - (i32.const 0) - ) - ) - (global.set $global$0 - (local.get $3) - ) - (global.set $global$0 - (global.get $global$0) - ) - (global.set $global$0 - (ref.null none) - ) - (global.set $global$1 - (local.get $4) - ) - (global.set $global$1 - (global.get $global$1) - ) - (global.set $global$1 - (ref.null none) - ) - (global.set $global$2 - (local.get $0) - ) - (global.set $global$2 - (global.get $global$2) - ) - (global.set $global$2 - (ref.i31 - (i32.const 0) - ) - ) - (global.set $global$0 - (local.get $4) - ) - (global.set $global$0 - (global.get $global$1) - ) - (global.set $global$0 - (ref.null none) - ) - (global.set $global$0 - (local.get $0) - ) - (global.set $global$0 - (global.get $global$2) - ) - (global.set $global$0 - (ref.i31 - (i32.const 0) - ) - ) - (global.set $global$1 - (local.get $0) - ) - (global.set $global$1 - (global.get $global$2) - ) - (global.set $global$1 - (ref.i31 - (i32.const 0) - ) - ) - (local.set $2 - (i31.get_s - (local.get $0) - ) - ) - (local.set $2 - (i31.get_u - (local.get $0) - ) - ) - ) - (func $1 (type $i31ref_ref|i31|_structref_ref|struct|_=>_none) (param $0 i31ref) (param $1 (ref i31)) (param $2 structref) (param $3 (ref struct)) - (nop) - ) -) - diff --git a/test/grow_memory.wast b/test/grow_memory.wast deleted file mode 100644 index 002247713..000000000 --- a/test/grow_memory.wast +++ /dev/null @@ -1,17 +0,0 @@ -(module - (type $0 (func (param i32) (result i32))) - (type $1 (func (result i32))) - (memory $0 1) - (export "memory" (memory $0)) - (export "grow" (func $0)) - (export "current" (func $1)) - (func $0 (; 0 ;) (type $0) (param $var$0 i32) (result i32) - (memory.grow - (local.get $var$0) - ) - ) - (func $1 (; 1 ;) (type $1) (result i32) - (memory.size) - ) -) - diff --git a/test/grow_memory.wast.from-wast b/test/grow_memory.wast.from-wast deleted file mode 100644 index 9994eb61d..000000000 --- a/test/grow_memory.wast.from-wast +++ /dev/null @@ -1,16 +0,0 @@ -(module - (type $0 (func (param i32) (result i32))) - (type $1 (func (result i32))) - (memory $0 1) - (export "memory" (memory $0)) - (export "grow" (func $0)) - (export "current" (func $1)) - (func $0 (type $0) (param $var$0 i32) (result i32) - (memory.grow - (local.get $var$0) - ) - ) - (func $1 (type $1) (result i32) - (memory.size) - ) -) diff --git a/test/grow_memory.wast.fromBinary b/test/grow_memory.wast.fromBinary deleted file mode 100644 index ea4be8816..000000000 --- a/test/grow_memory.wast.fromBinary +++ /dev/null @@ -1,17 +0,0 @@ -(module - (type $0 (func (param i32) (result i32))) - (type $1 (func (result i32))) - (memory $0 1) - (export "memory" (memory $0)) - (export "grow" (func $0)) - (export "current" (func $1)) - (func $0 (type $0) (param $var$0 i32) (result i32) - (memory.grow - (local.get $var$0) - ) - ) - (func $1 (type $1) (result i32) - (memory.size) - ) -) - diff --git a/test/grow_memory.wast.fromBinary.noDebugInfo b/test/grow_memory.wast.fromBinary.noDebugInfo deleted file mode 100644 index 2b7ab97d1..000000000 --- a/test/grow_memory.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,17 +0,0 @@ -(module - (type $0 (func (param i32) (result i32))) - (type $1 (func (result i32))) - (memory $0 1) - (export "memory" (memory $0)) - (export "grow" (func $0)) - (export "current" (func $1)) - (func $0 (type $0) (param $0 i32) (result i32) - (memory.grow - (local.get $0) - ) - ) - (func $1 (type $1) (result i32) - (memory.size) - ) -) - diff --git a/test/hello_world.wast.from-wast b/test/hello_world.wast.from-wast deleted file mode 100644 index cbe9cb5ae..000000000 --- a/test/hello_world.wast.from-wast +++ /dev/null @@ -1,11 +0,0 @@ -(module - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (memory $0 256 256) - (export "add" (func $add)) - (func $add (; 0 ;) (param $x i32) (param $y i32) (result i32) - (i32.add - (local.get $x) - (local.get $y) - ) - ) -) diff --git a/test/hello_world.wast.fromBinary b/test/hello_world.wast.fromBinary deleted file mode 100644 index 9b96024e2..000000000 --- a/test/hello_world.wast.fromBinary +++ /dev/null @@ -1,12 +0,0 @@ -(module - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (memory $0 256 256) - (export "add" (func $add)) - (func $add (; 0 ;) (param $0 i32) (param $1 i32) (result i32) - (i32.add - (local.get $0) - (local.get $1) - ) - ) -) - diff --git a/test/hello_world.wast.fromBinary.noDebugInfo b/test/hello_world.wast.fromBinary.noDebugInfo deleted file mode 100644 index f44465c5e..000000000 --- a/test/hello_world.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,12 +0,0 @@ -(module - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (memory $0 256 256) - (export "add" (func $0)) - (func $0 (; 0 ;) (param $0 i32) (param $1 i32) (result i32) - (i32.add - (local.get $0) - (local.get $1) - ) - ) -) - diff --git a/test/imported_memory.wast b/test/imported_memory.wast deleted file mode 100644 index 51bd9ce46..000000000 --- a/test/imported_memory.wast +++ /dev/null @@ -1,4 +0,0 @@ -(module - (import "env" "memory" (memory $0 256 256)) - (import "env" "table" (table 256 256 funcref)) -) diff --git a/test/imported_memory.wast.from-wast b/test/imported_memory.wast.from-wast deleted file mode 100644 index f36ba7396..000000000 --- a/test/imported_memory.wast.from-wast +++ /dev/null @@ -1,4 +0,0 @@ -(module - (import "env" "memory" (memory $0 256 256)) - (import "env" "table" (table $timport$0 256 256 funcref)) -) diff --git a/test/imported_memory.wast.fromBinary b/test/imported_memory.wast.fromBinary deleted file mode 100644 index ae1205de0..000000000 --- a/test/imported_memory.wast.fromBinary +++ /dev/null @@ -1,5 +0,0 @@ -(module - (import "env" "memory" (memory $0 256 256)) - (import "env" "table" (table $timport$0 256 256 funcref)) -) - diff --git a/test/imported_memory.wast.fromBinary.noDebugInfo b/test/imported_memory.wast.fromBinary.noDebugInfo deleted file mode 100644 index 46ecefe0f..000000000 --- a/test/imported_memory.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,5 +0,0 @@ -(module - (import "env" "memory" (memory $mimport$0 256 256)) - (import "env" "table" (table $timport$0 256 256 funcref)) -) - diff --git a/test/imported_memory_growth.wast b/test/imported_memory_growth.wast deleted file mode 100644 index 8f47fb8a1..000000000 --- a/test/imported_memory_growth.wast +++ /dev/null @@ -1,4 +0,0 @@ -(module - (import "env" "memory" (memory $0 256)) - (import "env" "table" (table 256 funcref)) -) diff --git a/test/imported_memory_growth.wast.from-wast b/test/imported_memory_growth.wast.from-wast deleted file mode 100644 index a2533591b..000000000 --- a/test/imported_memory_growth.wast.from-wast +++ /dev/null @@ -1,4 +0,0 @@ -(module - (import "env" "memory" (memory $0 256)) - (import "env" "table" (table $timport$0 256 funcref)) -) diff --git a/test/imported_memory_growth.wast.fromBinary b/test/imported_memory_growth.wast.fromBinary deleted file mode 100644 index 75fe9ff14..000000000 --- a/test/imported_memory_growth.wast.fromBinary +++ /dev/null @@ -1,5 +0,0 @@ -(module - (import "env" "memory" (memory $0 256)) - (import "env" "table" (table $timport$0 256 funcref)) -) - diff --git a/test/imported_memory_growth.wast.fromBinary.noDebugInfo b/test/imported_memory_growth.wast.fromBinary.noDebugInfo deleted file mode 100644 index e0dc8ab7a..000000000 --- a/test/imported_memory_growth.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,5 +0,0 @@ -(module - (import "env" "memory" (memory $mimport$0 256)) - (import "env" "table" (table $timport$0 256 funcref)) -) - diff --git a/test/kitchen_sink.wast b/test/kitchen_sink.wast deleted file mode 100644 index e8c6cd589..000000000 --- a/test/kitchen_sink.wast +++ /dev/null @@ -1,707 +0,0 @@ -(module - (type $0 (func (result i32))) - (memory $0 4096 4096) - (data (i32.const 1026) "\14\00") - (func $kitchensink (type $0) (result i32) - (block $block0 (result i32) - (drop - (i32.add - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.sub - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.mul - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.div_s - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.div_u - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.rem_s - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.rem_u - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.and - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.or - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.xor - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.shl - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.shr_u - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.shr_s - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.eq - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.ne - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.lt_s - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.le_s - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.lt_u - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.le_u - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.gt_s - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.ge_s - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.gt_u - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.ge_u - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.clz - (i32.const 10) - ) - ) - (drop - (i32.ctz - (i32.const 10) - ) - ) - (drop - (i32.popcnt - (i32.const 10) - ) - ) - (drop - (i64.add - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.sub - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.mul - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.div_s - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.div_u - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.rem_s - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.rem_u - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.and - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.or - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.xor - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.shl - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.shr_u - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.shr_s - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.eq - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.ne - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.lt_s - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.le_s - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.lt_u - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.le_u - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.gt_s - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.ge_s - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.gt_u - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.ge_u - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.clz - (i64.const 100) - ) - ) - (drop - (i64.ctz - (i64.const 100) - ) - ) - (drop - (i64.popcnt - (i64.const 100) - ) - ) - (drop - (f32.add - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.sub - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.mul - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.div - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.min - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.max - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.abs - (f32.const 10) - ) - ) - (drop - (f32.neg - (f32.const 10) - ) - ) - (drop - (f32.copysign - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.ceil - (f32.const 10) - ) - ) - (drop - (f32.floor - (f32.const 10) - ) - ) - (drop - (f32.trunc - (f32.const 10) - ) - ) - (drop - (f32.nearest - (f32.const 10) - ) - ) - (drop - (f32.sqrt - (f32.const 10) - ) - ) - (drop - (f32.eq - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.ne - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.lt - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.le - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.gt - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.ge - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f64.add - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.sub - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.mul - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.div - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.min - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.max - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.abs - (f64.const 10) - ) - ) - (drop - (f64.neg - (f64.const 10) - ) - ) - (drop - (f64.copysign - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.ceil - (f64.const 10) - ) - ) - (drop - (f64.floor - (f64.const 10) - ) - ) - (drop - (f64.trunc - (f64.const 10) - ) - ) - (drop - (f64.nearest - (f64.const 10) - ) - ) - (drop - (f64.sqrt - (f64.const 10) - ) - ) - (drop - (f64.eq - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.ne - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.lt - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.le - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.gt - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.ge - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (i32.trunc_f32_s - (f32.const 10) - ) - ) - (drop - (i32.trunc_f64_s - (f64.const 10) - ) - ) - (drop - (i32.trunc_f32_u - (f32.const 10) - ) - ) - (drop - (i32.trunc_f64_u - (f64.const 10) - ) - ) - (drop - (i32.trunc_sat_f32_s - (f32.const 10) - ) - ) - (drop - (i32.trunc_sat_f32_u - (f32.const 10) - ) - ) - (drop - (i32.trunc_sat_f64_s - (f64.const 10) - ) - ) - (drop - (i32.trunc_sat_f64_u - (f64.const 10) - ) - ) - (drop - (i32.wrap_i64 - (i64.const 100) - ) - ) - (drop - (i64.trunc_f32_s - (f32.const 10) - ) - ) - (drop - (i64.trunc_f64_s - (f64.const 10) - ) - ) - (drop - (i64.trunc_f32_u - (f32.const 10) - ) - ) - (drop - (i64.trunc_f64_u - (f64.const 10) - ) - ) - (drop - (i64.trunc_sat_f32_s - (f32.const 10) - ) - ) - (drop - (i64.trunc_sat_f32_u - (f32.const 10) - ) - ) - (drop - (i64.trunc_sat_f64_s - (f64.const 10) - ) - ) - (drop - (i64.trunc_sat_f64_u - (f64.const 10) - ) - ) - (drop - (i64.extend_i32_s - (i32.const 10) - ) - ) - (drop - (i64.extend_i32_u - (i32.const 10) - ) - ) - (drop - (f32.convert_i32_s - (i32.const 10) - ) - ) - (drop - (f32.convert_i32_u - (i32.const 10) - ) - ) - (drop - (f32.convert_i64_s - (i64.const 100) - ) - ) - (drop - (f32.convert_i64_u - (i64.const 100) - ) - ) - (drop - (f32.demote_f64 - (f64.const 10) - ) - ) - (drop - (f32.reinterpret_i32 - (i32.const 10) - ) - ) - (drop - (f64.convert_i32_s - (i32.const 10) - ) - ) - (drop - (f64.convert_i32_u - (i32.const 10) - ) - ) - (drop - (f64.convert_i64_s - (i64.const 100) - ) - ) - (drop - (f64.convert_i64_u - (i64.const 100) - ) - ) - (drop - (f64.promote_f32 - (f32.const 10) - ) - ) - (drop - (f64.reinterpret_i64 - (i64.const 100) - ) - ) - (drop - (i32.reinterpret_f32 - (f32.const 10) - ) - ) - (drop - (i64.reinterpret_f64 - (f64.const 10) - ) - ) - (i32.const 0) - ) - ) -) diff --git a/test/kitchen_sink.wast.from-wast b/test/kitchen_sink.wast.from-wast deleted file mode 100644 index 522f9d3b5..000000000 --- a/test/kitchen_sink.wast.from-wast +++ /dev/null @@ -1,707 +0,0 @@ -(module - (type $0 (func (result i32))) - (memory $0 4096 4096) - (data $0 (i32.const 1026) "\14\00") - (func $kitchensink (type $0) (result i32) - (block $block0 (result i32) - (drop - (i32.add - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.sub - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.mul - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.div_s - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.div_u - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.rem_s - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.rem_u - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.and - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.or - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.xor - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.shl - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.shr_u - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.shr_s - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.eq - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.ne - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.lt_s - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.le_s - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.lt_u - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.le_u - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.gt_s - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.ge_s - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.gt_u - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.ge_u - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.clz - (i32.const 10) - ) - ) - (drop - (i32.ctz - (i32.const 10) - ) - ) - (drop - (i32.popcnt - (i32.const 10) - ) - ) - (drop - (i64.add - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.sub - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.mul - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.div_s - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.div_u - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.rem_s - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.rem_u - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.and - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.or - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.xor - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.shl - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.shr_u - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.shr_s - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.eq - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.ne - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.lt_s - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.le_s - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.lt_u - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.le_u - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.gt_s - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.ge_s - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.gt_u - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.ge_u - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.clz - (i64.const 100) - ) - ) - (drop - (i64.ctz - (i64.const 100) - ) - ) - (drop - (i64.popcnt - (i64.const 100) - ) - ) - (drop - (f32.add - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.sub - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.mul - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.div - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.min - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.max - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.abs - (f32.const 10) - ) - ) - (drop - (f32.neg - (f32.const 10) - ) - ) - (drop - (f32.copysign - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.ceil - (f32.const 10) - ) - ) - (drop - (f32.floor - (f32.const 10) - ) - ) - (drop - (f32.trunc - (f32.const 10) - ) - ) - (drop - (f32.nearest - (f32.const 10) - ) - ) - (drop - (f32.sqrt - (f32.const 10) - ) - ) - (drop - (f32.eq - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.ne - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.lt - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.le - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.gt - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.ge - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f64.add - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.sub - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.mul - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.div - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.min - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.max - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.abs - (f64.const 10) - ) - ) - (drop - (f64.neg - (f64.const 10) - ) - ) - (drop - (f64.copysign - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.ceil - (f64.const 10) - ) - ) - (drop - (f64.floor - (f64.const 10) - ) - ) - (drop - (f64.trunc - (f64.const 10) - ) - ) - (drop - (f64.nearest - (f64.const 10) - ) - ) - (drop - (f64.sqrt - (f64.const 10) - ) - ) - (drop - (f64.eq - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.ne - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.lt - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.le - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.gt - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.ge - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (i32.trunc_f32_s - (f32.const 10) - ) - ) - (drop - (i32.trunc_f64_s - (f64.const 10) - ) - ) - (drop - (i32.trunc_f32_u - (f32.const 10) - ) - ) - (drop - (i32.trunc_f64_u - (f64.const 10) - ) - ) - (drop - (i32.trunc_sat_f32_s - (f32.const 10) - ) - ) - (drop - (i32.trunc_sat_f32_u - (f32.const 10) - ) - ) - (drop - (i32.trunc_sat_f64_s - (f64.const 10) - ) - ) - (drop - (i32.trunc_sat_f64_u - (f64.const 10) - ) - ) - (drop - (i32.wrap_i64 - (i64.const 100) - ) - ) - (drop - (i64.trunc_f32_s - (f32.const 10) - ) - ) - (drop - (i64.trunc_f64_s - (f64.const 10) - ) - ) - (drop - (i64.trunc_f32_u - (f32.const 10) - ) - ) - (drop - (i64.trunc_f64_u - (f64.const 10) - ) - ) - (drop - (i64.trunc_sat_f32_s - (f32.const 10) - ) - ) - (drop - (i64.trunc_sat_f32_u - (f32.const 10) - ) - ) - (drop - (i64.trunc_sat_f64_s - (f64.const 10) - ) - ) - (drop - (i64.trunc_sat_f64_u - (f64.const 10) - ) - ) - (drop - (i64.extend_i32_s - (i32.const 10) - ) - ) - (drop - (i64.extend_i32_u - (i32.const 10) - ) - ) - (drop - (f32.convert_i32_s - (i32.const 10) - ) - ) - (drop - (f32.convert_i32_u - (i32.const 10) - ) - ) - (drop - (f32.convert_i64_s - (i64.const 100) - ) - ) - (drop - (f32.convert_i64_u - (i64.const 100) - ) - ) - (drop - (f32.demote_f64 - (f64.const 10) - ) - ) - (drop - (f32.reinterpret_i32 - (i32.const 10) - ) - ) - (drop - (f64.convert_i32_s - (i32.const 10) - ) - ) - (drop - (f64.convert_i32_u - (i32.const 10) - ) - ) - (drop - (f64.convert_i64_s - (i64.const 100) - ) - ) - (drop - (f64.convert_i64_u - (i64.const 100) - ) - ) - (drop - (f64.promote_f32 - (f32.const 10) - ) - ) - (drop - (f64.reinterpret_i64 - (i64.const 100) - ) - ) - (drop - (i32.reinterpret_f32 - (f32.const 10) - ) - ) - (drop - (i64.reinterpret_f64 - (f64.const 10) - ) - ) - (i32.const 0) - ) - ) -) diff --git a/test/kitchen_sink.wast.fromBinary b/test/kitchen_sink.wast.fromBinary deleted file mode 100644 index 12b3aaf5c..000000000 --- a/test/kitchen_sink.wast.fromBinary +++ /dev/null @@ -1,706 +0,0 @@ -(module - (type $0 (func (result i32))) - (memory $0 4096 4096) - (data $0 (i32.const 1026) "\14\00") - (func $kitchensink (type $0) (result i32) - (drop - (i32.add - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.sub - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.mul - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.div_s - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.div_u - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.rem_s - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.rem_u - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.and - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.or - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.xor - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.shl - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.shr_u - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.shr_s - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.eq - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.ne - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.lt_s - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.le_s - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.lt_u - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.le_u - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.gt_s - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.ge_s - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.gt_u - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.ge_u - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.clz - (i32.const 10) - ) - ) - (drop - (i32.ctz - (i32.const 10) - ) - ) - (drop - (i32.popcnt - (i32.const 10) - ) - ) - (drop - (i64.add - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.sub - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.mul - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.div_s - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.div_u - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.rem_s - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.rem_u - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.and - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.or - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.xor - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.shl - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.shr_u - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.shr_s - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.eq - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.ne - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.lt_s - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.le_s - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.lt_u - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.le_u - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.gt_s - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.ge_s - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.gt_u - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.ge_u - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.clz - (i64.const 100) - ) - ) - (drop - (i64.ctz - (i64.const 100) - ) - ) - (drop - (i64.popcnt - (i64.const 100) - ) - ) - (drop - (f32.add - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.sub - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.mul - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.div - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.min - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.max - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.abs - (f32.const 10) - ) - ) - (drop - (f32.neg - (f32.const 10) - ) - ) - (drop - (f32.copysign - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.ceil - (f32.const 10) - ) - ) - (drop - (f32.floor - (f32.const 10) - ) - ) - (drop - (f32.trunc - (f32.const 10) - ) - ) - (drop - (f32.nearest - (f32.const 10) - ) - ) - (drop - (f32.sqrt - (f32.const 10) - ) - ) - (drop - (f32.eq - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.ne - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.lt - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.le - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.gt - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.ge - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f64.add - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.sub - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.mul - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.div - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.min - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.max - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.abs - (f64.const 10) - ) - ) - (drop - (f64.neg - (f64.const 10) - ) - ) - (drop - (f64.copysign - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.ceil - (f64.const 10) - ) - ) - (drop - (f64.floor - (f64.const 10) - ) - ) - (drop - (f64.trunc - (f64.const 10) - ) - ) - (drop - (f64.nearest - (f64.const 10) - ) - ) - (drop - (f64.sqrt - (f64.const 10) - ) - ) - (drop - (f64.eq - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.ne - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.lt - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.le - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.gt - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.ge - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (i32.trunc_f32_s - (f32.const 10) - ) - ) - (drop - (i32.trunc_f64_s - (f64.const 10) - ) - ) - (drop - (i32.trunc_f32_u - (f32.const 10) - ) - ) - (drop - (i32.trunc_f64_u - (f64.const 10) - ) - ) - (drop - (i32.trunc_sat_f32_s - (f32.const 10) - ) - ) - (drop - (i32.trunc_sat_f32_u - (f32.const 10) - ) - ) - (drop - (i32.trunc_sat_f64_s - (f64.const 10) - ) - ) - (drop - (i32.trunc_sat_f64_u - (f64.const 10) - ) - ) - (drop - (i32.wrap_i64 - (i64.const 100) - ) - ) - (drop - (i64.trunc_f32_s - (f32.const 10) - ) - ) - (drop - (i64.trunc_f64_s - (f64.const 10) - ) - ) - (drop - (i64.trunc_f32_u - (f32.const 10) - ) - ) - (drop - (i64.trunc_f64_u - (f64.const 10) - ) - ) - (drop - (i64.trunc_sat_f32_s - (f32.const 10) - ) - ) - (drop - (i64.trunc_sat_f32_u - (f32.const 10) - ) - ) - (drop - (i64.trunc_sat_f64_s - (f64.const 10) - ) - ) - (drop - (i64.trunc_sat_f64_u - (f64.const 10) - ) - ) - (drop - (i64.extend_i32_s - (i32.const 10) - ) - ) - (drop - (i64.extend_i32_u - (i32.const 10) - ) - ) - (drop - (f32.convert_i32_s - (i32.const 10) - ) - ) - (drop - (f32.convert_i32_u - (i32.const 10) - ) - ) - (drop - (f32.convert_i64_s - (i64.const 100) - ) - ) - (drop - (f32.convert_i64_u - (i64.const 100) - ) - ) - (drop - (f32.demote_f64 - (f64.const 10) - ) - ) - (drop - (f32.reinterpret_i32 - (i32.const 10) - ) - ) - (drop - (f64.convert_i32_s - (i32.const 10) - ) - ) - (drop - (f64.convert_i32_u - (i32.const 10) - ) - ) - (drop - (f64.convert_i64_s - (i64.const 100) - ) - ) - (drop - (f64.convert_i64_u - (i64.const 100) - ) - ) - (drop - (f64.promote_f32 - (f32.const 10) - ) - ) - (drop - (f64.reinterpret_i64 - (i64.const 100) - ) - ) - (drop - (i32.reinterpret_f32 - (f32.const 10) - ) - ) - (drop - (i64.reinterpret_f64 - (f64.const 10) - ) - ) - (i32.const 0) - ) -) - diff --git a/test/kitchen_sink.wast.fromBinary.noDebugInfo b/test/kitchen_sink.wast.fromBinary.noDebugInfo deleted file mode 100644 index 30b110662..000000000 --- a/test/kitchen_sink.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,706 +0,0 @@ -(module - (type $0 (func (result i32))) - (memory $0 4096 4096) - (data $0 (i32.const 1026) "\14\00") - (func $0 (type $0) (result i32) - (drop - (i32.add - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.sub - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.mul - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.div_s - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.div_u - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.rem_s - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.rem_u - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.and - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.or - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.xor - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.shl - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.shr_u - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.shr_s - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.eq - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.ne - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.lt_s - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.le_s - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.lt_u - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.le_u - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.gt_s - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.ge_s - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.gt_u - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.ge_u - (i32.const 10) - (i32.const 10) - ) - ) - (drop - (i32.clz - (i32.const 10) - ) - ) - (drop - (i32.ctz - (i32.const 10) - ) - ) - (drop - (i32.popcnt - (i32.const 10) - ) - ) - (drop - (i64.add - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.sub - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.mul - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.div_s - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.div_u - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.rem_s - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.rem_u - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.and - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.or - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.xor - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.shl - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.shr_u - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.shr_s - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.eq - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.ne - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.lt_s - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.le_s - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.lt_u - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.le_u - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.gt_s - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.ge_s - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.gt_u - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.ge_u - (i64.const 100) - (i64.const 100) - ) - ) - (drop - (i64.clz - (i64.const 100) - ) - ) - (drop - (i64.ctz - (i64.const 100) - ) - ) - (drop - (i64.popcnt - (i64.const 100) - ) - ) - (drop - (f32.add - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.sub - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.mul - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.div - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.min - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.max - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.abs - (f32.const 10) - ) - ) - (drop - (f32.neg - (f32.const 10) - ) - ) - (drop - (f32.copysign - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.ceil - (f32.const 10) - ) - ) - (drop - (f32.floor - (f32.const 10) - ) - ) - (drop - (f32.trunc - (f32.const 10) - ) - ) - (drop - (f32.nearest - (f32.const 10) - ) - ) - (drop - (f32.sqrt - (f32.const 10) - ) - ) - (drop - (f32.eq - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.ne - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.lt - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.le - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.gt - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f32.ge - (f32.const 10) - (f32.const 10) - ) - ) - (drop - (f64.add - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.sub - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.mul - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.div - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.min - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.max - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.abs - (f64.const 10) - ) - ) - (drop - (f64.neg - (f64.const 10) - ) - ) - (drop - (f64.copysign - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.ceil - (f64.const 10) - ) - ) - (drop - (f64.floor - (f64.const 10) - ) - ) - (drop - (f64.trunc - (f64.const 10) - ) - ) - (drop - (f64.nearest - (f64.const 10) - ) - ) - (drop - (f64.sqrt - (f64.const 10) - ) - ) - (drop - (f64.eq - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.ne - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.lt - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.le - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.gt - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (f64.ge - (f64.const 10) - (f64.const 10) - ) - ) - (drop - (i32.trunc_f32_s - (f32.const 10) - ) - ) - (drop - (i32.trunc_f64_s - (f64.const 10) - ) - ) - (drop - (i32.trunc_f32_u - (f32.const 10) - ) - ) - (drop - (i32.trunc_f64_u - (f64.const 10) - ) - ) - (drop - (i32.trunc_sat_f32_s - (f32.const 10) - ) - ) - (drop - (i32.trunc_sat_f32_u - (f32.const 10) - ) - ) - (drop - (i32.trunc_sat_f64_s - (f64.const 10) - ) - ) - (drop - (i32.trunc_sat_f64_u - (f64.const 10) - ) - ) - (drop - (i32.wrap_i64 - (i64.const 100) - ) - ) - (drop - (i64.trunc_f32_s - (f32.const 10) - ) - ) - (drop - (i64.trunc_f64_s - (f64.const 10) - ) - ) - (drop - (i64.trunc_f32_u - (f32.const 10) - ) - ) - (drop - (i64.trunc_f64_u - (f64.const 10) - ) - ) - (drop - (i64.trunc_sat_f32_s - (f32.const 10) - ) - ) - (drop - (i64.trunc_sat_f32_u - (f32.const 10) - ) - ) - (drop - (i64.trunc_sat_f64_s - (f64.const 10) - ) - ) - (drop - (i64.trunc_sat_f64_u - (f64.const 10) - ) - ) - (drop - (i64.extend_i32_s - (i32.const 10) - ) - ) - (drop - (i64.extend_i32_u - (i32.const 10) - ) - ) - (drop - (f32.convert_i32_s - (i32.const 10) - ) - ) - (drop - (f32.convert_i32_u - (i32.const 10) - ) - ) - (drop - (f32.convert_i64_s - (i64.const 100) - ) - ) - (drop - (f32.convert_i64_u - (i64.const 100) - ) - ) - (drop - (f32.demote_f64 - (f64.const 10) - ) - ) - (drop - (f32.reinterpret_i32 - (i32.const 10) - ) - ) - (drop - (f64.convert_i32_s - (i32.const 10) - ) - ) - (drop - (f64.convert_i32_u - (i32.const 10) - ) - ) - (drop - (f64.convert_i64_s - (i64.const 100) - ) - ) - (drop - (f64.convert_i64_u - (i64.const 100) - ) - ) - (drop - (f64.promote_f32 - (f32.const 10) - ) - ) - (drop - (f64.reinterpret_i64 - (i64.const 100) - ) - ) - (drop - (i32.reinterpret_f32 - (f32.const 10) - ) - ) - (drop - (i64.reinterpret_f64 - (f64.const 10) - ) - ) - (i32.const 0) - ) -) - diff --git a/test/lit/basic/atomics-unshared.wast b/test/lit/basic/atomics-unshared.wast new file mode 100644 index 000000000..3a2196bb3 --- /dev/null +++ b/test/lit/basic/atomics-unshared.wast @@ -0,0 +1,58 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wast -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast +;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +(module + ;; CHECK-TEXT: (type $0 (func)) + + ;; CHECK-TEXT: (memory $0 1 1) + ;; CHECK-BIN: (type $0 (func)) + + ;; CHECK-BIN: (memory $0 1 1) + ;; CHECK-BIN-NODEBUG: (type $0 (func)) + + ;; CHECK-BIN-NODEBUG: (memory $0 1 1) + (memory $0 1 1) + + ;; CHECK-TEXT: (func $foo (type $0) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.atomic.rmw.cmpxchg + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $foo (type $0) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.atomic.rmw.cmpxchg + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $foo + (drop (i32.atomic.rmw.cmpxchg + (i32.const 0) + (i32.const 0) + (i32.const 0) + )) + ) +) +;; CHECK-BIN-NODEBUG: (func $0 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.rmw.cmpxchg +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) diff --git a/test/lit/basic/atomics.wast b/test/lit/basic/atomics.wast new file mode 100644 index 000000000..ef98afe4e --- /dev/null +++ b/test/lit/basic/atomics.wast @@ -0,0 +1,750 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wast -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast +;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +(module + ;; CHECK-TEXT: (type $0 (func)) + ;; CHECK-BIN: (type $0 (func)) + ;; CHECK-BIN-NODEBUG: (type $0 (func)) + (type $0 (func)) + ;; CHECK-TEXT: (memory $0 (shared 23 256)) + ;; CHECK-BIN: (memory $0 (shared 23 256)) + ;; CHECK-BIN-NODEBUG: (memory $0 (shared 23 256)) + (memory $0 (shared 23 256)) + + ;; CHECK-TEXT: (func $atomic-loadstore (type $0) + ;; CHECK-TEXT-NEXT: (local $0 i32) + ;; CHECK-TEXT-NEXT: (local $1 i64) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.atomic.load8_u offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.atomic.load16_u offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.atomic.load offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.atomic.load8_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.atomic.load16_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.atomic.load32_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.atomic.load + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i32.atomic.store offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i32.atomic.store8 offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i32.atomic.store16 offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i64.atomic.store offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i64.atomic.store8 offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i64.atomic.store16 offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i64.atomic.store32 offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $atomic-loadstore (type $0) + ;; CHECK-BIN-NEXT: (local $0 i32) + ;; CHECK-BIN-NEXT: (local $1 i64) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.atomic.load8_u offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.atomic.load16_u offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.atomic.load offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.atomic.load8_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.atomic.load16_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.atomic.load32_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.atomic.load + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i32.atomic.store offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i32.atomic.store8 offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i32.atomic.store16 offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i64.atomic.store offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i64.atomic.store8 offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i64.atomic.store16 offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i64.atomic.store32 offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $atomic-loadstore (type $0) + (local $0 i32) + (local $1 i64) + (drop + (i32.atomic.load8_u offset=4 + (local.get $0) + ) + ) + (drop + (i32.atomic.load16_u offset=4 + (local.get $0) + ) + ) + (drop + (i32.atomic.load offset=4 + (local.get $0) + ) + ) + (drop + (i64.atomic.load8_u + (local.get $0) + ) + ) + (drop + (i64.atomic.load16_u + (local.get $0) + ) + ) + (drop + (i64.atomic.load32_u + (local.get $0) + ) + ) + (drop + (i64.atomic.load + (local.get $0) + ) + ) + (i32.atomic.store offset=4 align=4 + (local.get $0) + (local.get $0) + ) + (i32.atomic.store8 offset=4 align=1 + (local.get $0) + (local.get $0) + ) + (i32.atomic.store16 offset=4 + (local.get $0) + (local.get $0) + ) + (i64.atomic.store offset=4 + (local.get $0) + (local.get $1) + ) + (i64.atomic.store8 offset=4 + (local.get $0) + (local.get $1) + ) + (i64.atomic.store16 offset=4 + (local.get $0) + (local.get $1) + ) + (i64.atomic.store32 offset=4 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $atomic-rmw (type $0) + ;; CHECK-TEXT-NEXT: (local $0 i32) + ;; CHECK-TEXT-NEXT: (local $1 i64) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.atomic.rmw.add offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.atomic.rmw8.add_u offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.atomic.rmw16.and_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.atomic.rmw32.or_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.atomic.rmw8.xchg_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $atomic-rmw (type $0) + ;; CHECK-BIN-NEXT: (local $0 i32) + ;; CHECK-BIN-NEXT: (local $1 i64) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.atomic.rmw.add offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.atomic.rmw8.add_u offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.atomic.rmw16.and_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.atomic.rmw32.or_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.atomic.rmw8.xchg_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $atomic-rmw (type $0) + (local $0 i32) + (local $1 i64) + (drop + (i32.atomic.rmw.add offset=4 + (local.get $0) + (local.get $0) + ) + ) + (drop + (i32.atomic.rmw8.add_u offset=4 + (local.get $0) + (local.get $0) + ) + ) + (drop + (i32.atomic.rmw16.and_u align=2 + (local.get $0) + (local.get $0) + ) + ) + (drop + (i64.atomic.rmw32.or_u + (local.get $0) + (local.get $1) + ) + ) + (drop + (i32.atomic.rmw8.xchg_u align=1 + (local.get $0) + (local.get $0) + ) + ) + ) + + ;; CHECK-TEXT: (func $atomic-cmpxchg (type $0) + ;; CHECK-TEXT-NEXT: (local $0 i32) + ;; CHECK-TEXT-NEXT: (local $1 i64) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.atomic.rmw.cmpxchg offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.atomic.rmw8.cmpxchg_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.atomic.rmw.cmpxchg offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.atomic.rmw32.cmpxchg_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $atomic-cmpxchg (type $0) + ;; CHECK-BIN-NEXT: (local $0 i32) + ;; CHECK-BIN-NEXT: (local $1 i64) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.atomic.rmw.cmpxchg offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.atomic.rmw8.cmpxchg_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.atomic.rmw.cmpxchg offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.atomic.rmw32.cmpxchg_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $atomic-cmpxchg (type $0) + (local $0 i32) + (local $1 i64) + (drop + (i32.atomic.rmw.cmpxchg offset=4 + (local.get $0) + (local.get $0) + (local.get $0) + ) + ) + (drop + (i32.atomic.rmw8.cmpxchg_u + (local.get $0) + (local.get $0) + (local.get $0) + ) + ) + (drop + (i64.atomic.rmw.cmpxchg offset=4 + (local.get $0) + (local.get $1) + (local.get $1) + ) + ) + (drop + (i64.atomic.rmw32.cmpxchg_u align=4 + (local.get $0) + (local.get $1) + (local.get $1) + ) + ) + ) + + ;; CHECK-TEXT: (func $atomic-wait-notify (type $0) + ;; CHECK-TEXT-NEXT: (local $0 i32) + ;; CHECK-TEXT-NEXT: (local $1 i64) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (memory.atomic.wait32 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (memory.atomic.wait32 offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (memory.atomic.notify + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (memory.atomic.notify offset=24 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (memory.atomic.wait64 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (memory.atomic.wait64 offset=16 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $atomic-wait-notify (type $0) + ;; CHECK-BIN-NEXT: (local $0 i32) + ;; CHECK-BIN-NEXT: (local $1 i64) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (memory.atomic.wait32 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (memory.atomic.wait32 offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (memory.atomic.notify + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (memory.atomic.notify offset=24 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (memory.atomic.wait64 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (memory.atomic.wait64 offset=16 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $atomic-wait-notify (type $0) + (local $0 i32) + (local $1 i64) + (drop + (memory.atomic.wait32 + (local.get $0) + (local.get $0) + (local.get $1) + ) + ) + (drop + (memory.atomic.wait32 offset=4 align=4 + (local.get $0) + (local.get $0) + (local.get $1) + ) + ) + (drop + (memory.atomic.notify + (local.get $0) + (local.get $0) + ) + ) + (drop + (memory.atomic.notify offset=24 align=4 + (local.get $0) + (local.get $0) + ) + ) + (drop + (memory.atomic.wait64 + (local.get $0) + (local.get $1) + (local.get $1) + ) + ) + (drop + (memory.atomic.wait64 align=8 offset=16 + (local.get $0) + (local.get $1) + (local.get $1) + ) + ) + ) + + ;; CHECK-TEXT: (func $atomic-fence (type $0) + ;; CHECK-TEXT-NEXT: (atomic.fence) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $atomic-fence (type $0) + ;; CHECK-BIN-NEXT: (atomic.fence) + ;; CHECK-BIN-NEXT: ) + (func $atomic-fence (type $0) + (atomic.fence) + ) +) +;; CHECK-BIN-NODEBUG: (func $0 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (local $0 i32) +;; CHECK-BIN-NODEBUG-NEXT: (local $1 i64) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.load8_u offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.load16_u offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.load offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.load8_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.load16_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.load32_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.load +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.store offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.store8 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.store16 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.store offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.store8 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.store16 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.store32 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $1 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (local $0 i32) +;; CHECK-BIN-NODEBUG-NEXT: (local $1 i64) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.rmw.add offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.rmw8.add_u offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.rmw16.and_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.rmw32.or_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.rmw8.xchg_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $2 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (local $0 i32) +;; CHECK-BIN-NODEBUG-NEXT: (local $1 i64) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.rmw.cmpxchg offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.rmw8.cmpxchg_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.rmw.cmpxchg offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.rmw32.cmpxchg_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $3 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (local $0 i32) +;; CHECK-BIN-NODEBUG-NEXT: (local $1 i64) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (memory.atomic.wait32 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (memory.atomic.wait32 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (memory.atomic.notify +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (memory.atomic.notify offset=24 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (memory.atomic.wait64 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (memory.atomic.wait64 offset=16 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $4 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (atomic.fence) +;; CHECK-BIN-NODEBUG-NEXT: ) diff --git a/test/lit/basic/atomics64.wast b/test/lit/basic/atomics64.wast new file mode 100644 index 000000000..b30b1ce6e --- /dev/null +++ b/test/lit/basic/atomics64.wast @@ -0,0 +1,766 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wast -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast +;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +(module + ;; CHECK-TEXT: (type $0 (func)) + ;; CHECK-BIN: (type $0 (func)) + ;; CHECK-BIN-NODEBUG: (type $0 (func)) + (type $0 (func)) + ;; CHECK-TEXT: (memory $0 (shared i64 23 256)) + ;; CHECK-BIN: (memory $0 (shared i64 23 256)) + ;; CHECK-BIN-NODEBUG: (memory $0 (shared i64 23 256)) + (memory $0 (shared i64 23 256)) + + ;; CHECK-TEXT: (func $atomic-loadstore (type $0) + ;; CHECK-TEXT-NEXT: (local $0 i64) + ;; CHECK-TEXT-NEXT: (local $1 i64) + ;; CHECK-TEXT-NEXT: (local $2 i32) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.atomic.load8_u offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.atomic.load16_u offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.atomic.load offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.atomic.load8_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.atomic.load16_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.atomic.load32_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.atomic.load + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i32.atomic.store offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i32.atomic.store8 offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i32.atomic.store16 offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i64.atomic.store offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i64.atomic.store8 offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i64.atomic.store16 offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i64.atomic.store32 offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $atomic-loadstore (type $0) + ;; CHECK-BIN-NEXT: (local $0 i64) + ;; CHECK-BIN-NEXT: (local $1 i64) + ;; CHECK-BIN-NEXT: (local $2 i32) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.atomic.load8_u offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.atomic.load16_u offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.atomic.load offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.atomic.load8_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.atomic.load16_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.atomic.load32_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.atomic.load + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i32.atomic.store offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i32.atomic.store8 offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i32.atomic.store16 offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i64.atomic.store offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i64.atomic.store8 offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i64.atomic.store16 offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i64.atomic.store32 offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $atomic-loadstore (type $0) + (local $0 i64) + (local $1 i64) + (local $2 i32) + (drop + (i32.atomic.load8_u offset=4 + (local.get $0) + ) + ) + (drop + (i32.atomic.load16_u offset=4 + (local.get $0) + ) + ) + (drop + (i32.atomic.load offset=4 + (local.get $0) + ) + ) + (drop + (i64.atomic.load8_u + (local.get $0) + ) + ) + (drop + (i64.atomic.load16_u + (local.get $0) + ) + ) + (drop + (i64.atomic.load32_u + (local.get $0) + ) + ) + (drop + (i64.atomic.load + (local.get $0) + ) + ) + (i32.atomic.store offset=4 align=4 + (local.get $0) + (local.get $2) + ) + (i32.atomic.store8 offset=4 align=1 + (local.get $0) + (local.get $2) + ) + (i32.atomic.store16 offset=4 + (local.get $0) + (local.get $2) + ) + (i64.atomic.store offset=4 + (local.get $0) + (local.get $1) + ) + (i64.atomic.store8 offset=4 + (local.get $0) + (local.get $1) + ) + (i64.atomic.store16 offset=4 + (local.get $0) + (local.get $1) + ) + (i64.atomic.store32 offset=4 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $atomic-rmw (type $0) + ;; CHECK-TEXT-NEXT: (local $0 i64) + ;; CHECK-TEXT-NEXT: (local $1 i64) + ;; CHECK-TEXT-NEXT: (local $2 i32) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.atomic.rmw.add offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.atomic.rmw8.add_u offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.atomic.rmw16.and_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.atomic.rmw32.or_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.atomic.rmw8.xchg_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $atomic-rmw (type $0) + ;; CHECK-BIN-NEXT: (local $0 i64) + ;; CHECK-BIN-NEXT: (local $1 i64) + ;; CHECK-BIN-NEXT: (local $2 i32) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.atomic.rmw.add offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.atomic.rmw8.add_u offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.atomic.rmw16.and_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.atomic.rmw32.or_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.atomic.rmw8.xchg_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $atomic-rmw (type $0) + (local $0 i64) + (local $1 i64) + (local $2 i32) + (drop + (i32.atomic.rmw.add offset=4 + (local.get $0) + (local.get $2) + ) + ) + (drop + (i32.atomic.rmw8.add_u offset=4 + (local.get $0) + (local.get $2) + ) + ) + (drop + (i32.atomic.rmw16.and_u align=2 + (local.get $0) + (local.get $2) + ) + ) + (drop + (i64.atomic.rmw32.or_u + (local.get $0) + (local.get $1) + ) + ) + (drop + (i32.atomic.rmw8.xchg_u align=1 + (local.get $0) + (local.get $2) + ) + ) + ) + + ;; CHECK-TEXT: (func $atomic-cmpxchg (type $0) + ;; CHECK-TEXT-NEXT: (local $0 i64) + ;; CHECK-TEXT-NEXT: (local $1 i64) + ;; CHECK-TEXT-NEXT: (local $2 i32) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.atomic.rmw.cmpxchg offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.atomic.rmw8.cmpxchg_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.atomic.rmw.cmpxchg offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.atomic.rmw32.cmpxchg_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $atomic-cmpxchg (type $0) + ;; CHECK-BIN-NEXT: (local $0 i64) + ;; CHECK-BIN-NEXT: (local $1 i64) + ;; CHECK-BIN-NEXT: (local $2 i32) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.atomic.rmw.cmpxchg offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.atomic.rmw8.cmpxchg_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.atomic.rmw.cmpxchg offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.atomic.rmw32.cmpxchg_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $atomic-cmpxchg (type $0) + (local $0 i64) + (local $1 i64) + (local $2 i32) + (drop + (i32.atomic.rmw.cmpxchg offset=4 + (local.get $0) + (local.get $2) + (local.get $2) + ) + ) + (drop + (i32.atomic.rmw8.cmpxchg_u + (local.get $0) + (local.get $2) + (local.get $2) + ) + ) + (drop + (i64.atomic.rmw.cmpxchg offset=4 + (local.get $0) + (local.get $1) + (local.get $1) + ) + ) + (drop + (i64.atomic.rmw32.cmpxchg_u align=4 + (local.get $0) + (local.get $1) + (local.get $1) + ) + ) + ) + + ;; CHECK-TEXT: (func $atomic-wait-notify (type $0) + ;; CHECK-TEXT-NEXT: (local $0 i64) + ;; CHECK-TEXT-NEXT: (local $1 i64) + ;; CHECK-TEXT-NEXT: (local $2 i32) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (memory.atomic.wait32 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (memory.atomic.wait32 offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (memory.atomic.notify + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (memory.atomic.notify offset=24 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (memory.atomic.wait64 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (memory.atomic.wait64 offset=16 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $atomic-wait-notify (type $0) + ;; CHECK-BIN-NEXT: (local $0 i64) + ;; CHECK-BIN-NEXT: (local $1 i64) + ;; CHECK-BIN-NEXT: (local $2 i32) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (memory.atomic.wait32 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (memory.atomic.wait32 offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (memory.atomic.notify + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (memory.atomic.notify offset=24 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (memory.atomic.wait64 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (memory.atomic.wait64 offset=16 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $atomic-wait-notify (type $0) + (local $0 i64) + (local $1 i64) + (local $2 i32) + (drop + (memory.atomic.wait32 + (local.get $0) + (local.get $2) + (local.get $1) + ) + ) + (drop + (memory.atomic.wait32 offset=4 align=4 + (local.get $0) + (local.get $2) + (local.get $1) + ) + ) + (drop + (memory.atomic.notify + (local.get $0) + (local.get $2) + ) + ) + (drop + (memory.atomic.notify offset=24 align=4 + (local.get $0) + (local.get $2) + ) + ) + (drop + (memory.atomic.wait64 + (local.get $0) + (local.get $1) + (local.get $1) + ) + ) + (drop + (memory.atomic.wait64 align=8 offset=16 + (local.get $0) + (local.get $1) + (local.get $1) + ) + ) + ) + + ;; CHECK-TEXT: (func $atomic-fence (type $0) + ;; CHECK-TEXT-NEXT: (atomic.fence) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $atomic-fence (type $0) + ;; CHECK-BIN-NEXT: (atomic.fence) + ;; CHECK-BIN-NEXT: ) + (func $atomic-fence (type $0) + (atomic.fence) + ) +) +;; CHECK-BIN-NODEBUG: (func $0 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (local $0 i64) +;; CHECK-BIN-NODEBUG-NEXT: (local $1 i64) +;; CHECK-BIN-NODEBUG-NEXT: (local $2 i32) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.load8_u offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.load16_u offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.load offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.load8_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.load16_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.load32_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.load +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.store offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.store8 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.store16 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.store offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.store8 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.store16 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.store32 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $1 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (local $0 i64) +;; CHECK-BIN-NODEBUG-NEXT: (local $1 i64) +;; CHECK-BIN-NODEBUG-NEXT: (local $2 i32) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.rmw.add offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.rmw8.add_u offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.rmw16.and_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.rmw32.or_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.rmw8.xchg_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $2 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (local $0 i64) +;; CHECK-BIN-NODEBUG-NEXT: (local $1 i64) +;; CHECK-BIN-NODEBUG-NEXT: (local $2 i32) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.rmw.cmpxchg offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.rmw8.cmpxchg_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.rmw.cmpxchg offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.rmw32.cmpxchg_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $3 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (local $0 i64) +;; CHECK-BIN-NODEBUG-NEXT: (local $1 i64) +;; CHECK-BIN-NODEBUG-NEXT: (local $2 i32) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (memory.atomic.wait32 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (memory.atomic.wait32 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (memory.atomic.notify +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (memory.atomic.notify offset=24 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (memory.atomic.wait64 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (memory.atomic.wait64 offset=16 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $4 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (atomic.fence) +;; CHECK-BIN-NODEBUG-NEXT: ) diff --git a/test/lit/basic/complexTextNames.wast b/test/lit/basic/complexTextNames.wast new file mode 100644 index 000000000..4605f0165 --- /dev/null +++ b/test/lit/basic/complexTextNames.wast @@ -0,0 +1,49 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wast -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast +;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +(module + ;; CHECK-TEXT: (type $0 (func)) + + ;; CHECK-TEXT: (export "$zoo (.bar)" (func $1)) + + ;; CHECK-TEXT: (func $foo\20\28.bar\29 (type $0) + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (type $0 (func)) + + ;; CHECK-BIN: (export "$zoo (.bar)" (func $1)) + + ;; CHECK-BIN: (func $foo\20\28.bar\29 (type $0) + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: ) + (func $foo\20\28.bar\29) + + (func "$zoo (.bar)" (call $foo\20\28.bar\29)) +) +;; CHECK-TEXT: (func $1 (type $0) +;; CHECK-TEXT-NEXT: (call $foo\20\28.bar\29) +;; CHECK-TEXT-NEXT: ) + +;; CHECK-BIN: (func $1 (type $0) +;; CHECK-BIN-NEXT: (call $foo\20\28.bar\29) +;; CHECK-BIN-NEXT: ) + +;; CHECK-BIN-NODEBUG: (type $0 (func)) + +;; CHECK-BIN-NODEBUG: (export "$zoo (.bar)" (func $1)) + +;; CHECK-BIN-NODEBUG: (func $0 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $1 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (call $0) +;; CHECK-BIN-NODEBUG-NEXT: ) diff --git a/test/lit/basic/duplicate_types.wast b/test/lit/basic/duplicate_types.wast new file mode 100644 index 000000000..244d97bc9 --- /dev/null +++ b/test/lit/basic/duplicate_types.wast @@ -0,0 +1,55 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wast -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast +;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +(module ;; tests duplicate types are named properly + (type (func)) + (type (func)) + (type (func)) + (type (func (param i32))) + ;; CHECK-TEXT: (type $0 (func (param i32))) + ;; CHECK-BIN: (type $0 (func (param i32))) + ;; CHECK-BIN-NODEBUG: (type $0 (func (param i32))) + (type $0 (func (param i32))) + (type (func (param i32))) + (type $b (func (param i32) (result f32))) + (type (func (param i32) (result f32))) + + ;; CHECK-TEXT: (type $1 (func (param i32) (result i32))) + + ;; CHECK-TEXT: (func $f0 (type $0) (param $0 i32) + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (type $1 (func (param i32) (result i32))) + + ;; CHECK-BIN: (func $f0 (type $0) (param $0 i32) + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: ) + (func $f0 (param i32)) + + ;; CHECK-TEXT: (func $f1 (type $1) (param $0 i32) (result i32) + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f1 (type $1) (param $0 i32) (result i32) + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: ) + (func $f1 (param i32) (result i32) + (i32.const 0) + ) +) +;; CHECK-BIN-NODEBUG: (type $1 (func (param i32) (result i32))) + +;; CHECK-BIN-NODEBUG: (func $0 (type $0) (param $0 i32) +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $1 (type $1) (param $0 i32) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: ) diff --git a/test/lit/basic/empty_imported_table.wast b/test/lit/basic/empty_imported_table.wast new file mode 100644 index 000000000..1a874dc08 --- /dev/null +++ b/test/lit/basic/empty_imported_table.wast @@ -0,0 +1,21 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wast -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast +;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +(module + ;; CHECK-TEXT: (import "env" "table" (table $timport$0 0 0 funcref)) + ;; CHECK-BIN: (import "env" "table" (table $timport$0 0 0 funcref)) + ;; CHECK-BIN-NODEBUG: (import "env" "table" (table $timport$0 0 0 funcref)) + (import "env" "table" (table 0 0 funcref)) + ;; CHECK-TEXT: (memory $0 0) + ;; CHECK-BIN: (memory $0 0) + ;; CHECK-BIN-NODEBUG: (memory $0 0) + (memory $0 0) +) diff --git a/test/lit/basic/empty_table.wast b/test/lit/basic/empty_table.wast new file mode 100644 index 000000000..06e06edac --- /dev/null +++ b/test/lit/basic/empty_table.wast @@ -0,0 +1,23 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wast -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast +;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +(module + (table 0 0 funcref) + ;; CHECK-TEXT: (memory $0 0) + ;; CHECK-BIN: (memory $0 0) + ;; CHECK-BIN-NODEBUG: (memory $0 0) + (memory $0 0) +) +;; CHECK-TEXT: (table $0 0 0 funcref) + +;; CHECK-BIN: (table $0 0 0 funcref) + +;; CHECK-BIN-NODEBUG: (table $0 0 0 funcref) diff --git a/test/lit/basic/exception-handling.wast b/test/lit/basic/exception-handling.wast new file mode 100644 index 000000000..ed85338e8 --- /dev/null +++ b/test/lit/basic/exception-handling.wast @@ -0,0 +1,1737 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wast -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast +;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +(module + ;; CHECK-TEXT: (type $0 (func)) + + ;; CHECK-TEXT: (type $1 (func (param i32))) + + ;; CHECK-TEXT: (type $2 (func (param i64))) + + ;; CHECK-TEXT: (type $3 (func (param i32 i64))) + + ;; CHECK-TEXT: (type $4 (func (param eqref))) + + ;; CHECK-TEXT: (type $5 (func (result exnref))) + + ;; CHECK-TEXT: (tag $e-i32 (param i32)) + ;; CHECK-BIN: (type $0 (func)) + + ;; CHECK-BIN: (type $1 (func (param i32))) + + ;; CHECK-BIN: (type $2 (func (param i64))) + + ;; CHECK-BIN: (type $3 (func (param i32 i64))) + + ;; CHECK-BIN: (type $4 (func (param eqref))) + + ;; CHECK-BIN: (type $5 (func (result exnref))) + + ;; CHECK-BIN: (tag $e-i32 (param i32)) + (tag $e-i32 (param i32)) + ;; CHECK-TEXT: (tag $e-i64 (param i64)) + ;; CHECK-BIN: (tag $e-i64 (param i64)) + (tag $e-i64 (param i64)) + ;; CHECK-TEXT: (tag $e-i32-i64 (param i32 i64)) + ;; CHECK-BIN: (tag $e-i32-i64 (param i32 i64)) + (tag $e-i32-i64 (param i32 i64)) + ;; CHECK-TEXT: (tag $e-eqref (param eqref)) + ;; CHECK-BIN: (tag $e-eqref (param eqref)) + (tag $e-eqref (param (ref null eq))) + ;; CHECK-TEXT: (tag $e-empty) + ;; CHECK-BIN: (tag $e-empty) + (tag $e-empty) + + ;; CHECK-TEXT: (func $foo (type $0) + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $foo (type $0) + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: ) + (func $foo) + + ;; CHECK-TEXT: (func $bar (type $0) + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $bar (type $0) + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: ) + (func $bar) + + ;; --------------------------------------------------------------------------- + ;; Old Phase 3 exception handling + + ;; CHECK-TEXT: (func $eh-test (type $0) + ;; CHECK-TEXT-NEXT: (local $x (i32 i64)) + ;; CHECK-TEXT-NEXT: (try $try + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (throw $e-i32 + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch $e-i32 + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (pop i32) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (try $try0 + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (throw $e-i32-i64 + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: (i64.const 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch $e-i32-i64 + ;; CHECK-TEXT-NEXT: (local.set $x + ;; CHECK-TEXT-NEXT: (pop i32 i64) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (tuple.extract 2 0 + ;; CHECK-TEXT-NEXT: (local.get $x) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (block $l11 + ;; CHECK-TEXT-NEXT: (try $l1 + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (br $l11) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch $e-i32 + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (pop i32) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (br $l11) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (try $try2 + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch $e-i32 + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (pop i32) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (try $try3 + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (call $foo) + ;; CHECK-TEXT-NEXT: (call $bar) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch $e-i32 + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (pop i32) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (call $foo) + ;; CHECK-TEXT-NEXT: (call $bar) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (try $try4 + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (throw $e-i32 + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch $e-i32 + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (pop i32) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch $e-i64 + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (pop i64) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (try $try5 + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (throw $e-i32 + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch_all + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (try $try6 + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (throw $e-i32 + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch $e-i32 + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (pop i32) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch $e-i64 + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (pop i64) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch_all + ;; CHECK-TEXT-NEXT: (call $foo) + ;; CHECK-TEXT-NEXT: (call $bar) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (try $try7 + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (try $try8 + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (throw $e-i32 + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch $e-i32 + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (pop i32) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch_all + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch $e-i32 + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (pop i32) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch_all + ;; CHECK-TEXT-NEXT: (try $try9 + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (throw $e-i32 + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch $e-i32 + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (pop i32) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch_all + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (try $try10 + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (throw $e-i32 + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $eh-test (type $0) + ;; CHECK-BIN-NEXT: (local $x i32) + ;; CHECK-BIN-NEXT: (local $1 i64) + ;; CHECK-BIN-NEXT: (local $2 (i32 i64)) + ;; CHECK-BIN-NEXT: (local $3 i32) + ;; CHECK-BIN-NEXT: (try $label$3 + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (throw $e-i32 + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch $e-i32 + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (pop i32) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (try $label$6 + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (throw $e-i32-i64 + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: (i64.const 0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch $e-i32-i64 + ;; CHECK-BIN-NEXT: (local.set $2 + ;; CHECK-BIN-NEXT: (pop i32 i64) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (local.set $x + ;; CHECK-BIN-NEXT: (block (result i32) + ;; CHECK-BIN-NEXT: (local.set $3 + ;; CHECK-BIN-NEXT: (tuple.extract 2 0 + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (local.set $1 + ;; CHECK-BIN-NEXT: (tuple.extract 2 1 + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (local.get $3) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (local.get $x) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (block $label$7 + ;; CHECK-BIN-NEXT: (try $label$10 + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (br $label$7) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch $e-i32 + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (pop i32) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (br $label$7) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (try $label$13 + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch $e-i32 + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (pop i32) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (try $label$16 + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (call $foo) + ;; CHECK-BIN-NEXT: (call $bar) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch $e-i32 + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (pop i32) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (call $foo) + ;; CHECK-BIN-NEXT: (call $bar) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (try $label$19 + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (throw $e-i32 + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch $e-i32 + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (pop i32) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch $e-i64 + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (pop i64) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (try $label$22 + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (throw $e-i32 + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch_all + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (try $label$25 + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (throw $e-i32 + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch $e-i32 + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (pop i32) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch $e-i64 + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (pop i64) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch_all + ;; CHECK-BIN-NEXT: (call $foo) + ;; CHECK-BIN-NEXT: (call $bar) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (try $label$34 + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (try $label$29 + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (throw $e-i32 + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch $e-i32 + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (pop i32) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch_all + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch $e-i32 + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (pop i32) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch_all + ;; CHECK-BIN-NEXT: (try $label$33 + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (throw $e-i32 + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch $e-i32 + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (pop i32) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch_all + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (try $label$37 + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (throw $e-i32 + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $eh-test (local $x (i32 i64)) + ;; Simple try-catch + (try + (do + (throw $e-i32 (i32.const 0)) + ) + (catch $e-i32 + (drop (pop i32)) + ) + ) + + ;; try-catch with multivalue tag + (try + (do + (throw $e-i32-i64 (i32.const 0) (i64.const 0)) + ) + (catch $e-i32-i64 + (local.set $x (pop i32 i64)) + (drop + (tuple.extract 2 0 + (local.get $x) + ) + ) + ) + ) + + ;; Try with a block label + (try $l1 + (do + (br $l1) + ) + (catch $e-i32 + (drop (pop i32)) + (br $l1) + ) + ) + + ;; Empty try body + (try + (do) + (catch $e-i32 + (drop (pop i32)) + ) + ) + + ;; Multiple instructions within try and catch bodies + (try + (do + (call $foo) + (call $bar) + ) + (catch $e-i32 + (drop (pop i32)) + (call $foo) + (call $bar) + ) + ) + + ;; Multiple catch clauses + (try + (do + (throw $e-i32 (i32.const 0)) + ) + (catch $e-i32 + (drop (pop i32)) + ) + (catch $e-i64 + (drop (pop i64)) + ) + ) + + ;; Single catch-all clause + (try + (do + (throw $e-i32 (i32.const 0)) + ) + (catch_all) + ) + + ;; catch and catch-all clauses together + (try + (do + (throw $e-i32 (i32.const 0)) + ) + (catch $e-i32 + (drop (pop i32)) + ) + (catch $e-i64 + (drop (pop i64)) + ) + (catch_all + (call $foo) + (call $bar) + ) + ) + + ;; nested try-catch + (try + (do + (try + (do + (throw $e-i32 (i32.const 0)) + ) + (catch $e-i32 + (drop (pop i32)) + ) + (catch_all) + ) + ) + (catch $e-i32 + (drop (pop i32)) + ) + (catch_all + (try + (do + (throw $e-i32 (i32.const 0)) + ) + (catch $e-i32 + (drop (pop i32)) + ) + (catch_all) + ) + ) + ) + + ;; try without catch or delegate + (try + (do + (throw $e-i32 (i32.const 0)) + ) + ) + ) + + ;; CHECK-TEXT: (func $delegate-test (type $0) + ;; CHECK-TEXT-NEXT: (try $l0 + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (try $try + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (call $foo) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (delegate $l0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (try $try11 + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (call $foo) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (delegate $l0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch_all + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (block $l015 + ;; CHECK-TEXT-NEXT: (try $l012 + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (try $try13 + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (br_if $l015 + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (delegate $l012) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (try $try14 + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (br_if $l015 + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (delegate $l012) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch_all + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (try $l016 + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (try $try17 + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (call $foo) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (delegate $l016) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (delegate 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (try $try18 + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch $e-empty + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $delegate-test (type $0) + ;; CHECK-BIN-NEXT: (try $label$9 + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (block $label$1 + ;; CHECK-BIN-NEXT: (try $label$4 + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (call $foo) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (delegate $label$9) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (try $label$7 + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (call $foo) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (delegate $label$9) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch_all + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (block $label$10 + ;; CHECK-BIN-NEXT: (try $label$19 + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (block $label$11 + ;; CHECK-BIN-NEXT: (try $label$14 + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (br_if $label$10 + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (delegate $label$19) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (try $label$17 + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (br_if $label$10 + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (delegate $label$19) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch_all + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (try $label$25 + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (block $label$20 + ;; CHECK-BIN-NEXT: (try $label$23 + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (call $foo) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (delegate $label$25) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (delegate 0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (try $label$28 + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch $e-empty + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $delegate-test + ;; Inner delegates target an outer catch + (try $l0 + (do + (try + (do + (call $foo) + ) + (delegate $l0) ;; by label + ) + (try + (do + (call $foo) + ) + (delegate 0) ;; by depth + ) + ) + (catch_all) + ) + + ;; When there are both a branch and a delegate that target the same try + ;; label. Because binaryen only allows blocks and loops to be targetted by + ;; branches, we wrap the try with a block and make branches that block + ;; instead, resulting in the br and delegate target different labels in the + ;; output. + (try $l0 + (do + (try + (do + (br_if $l0 (i32.const 1)) + ) + (delegate $l0) ;; by label + ) + (try + (do + (br_if $l0 (i32.const 1)) + ) + (delegate 0) ;; by depth + ) + ) + (catch_all) + ) + + ;; The inner delegate targets the outer delegate, which in turn targets the + ;; caller. + (try $l0 + (do + (try + (do + (call $foo) + ) + (delegate $l0) + ) + ) + (delegate 0) + ) + + ;; 'catch' body can be empty when the tag's type is none. + (try + (do) + (catch $e-empty) + ) + ) + + ;; CHECK-TEXT: (func $rethrow-test (type $0) + ;; CHECK-TEXT-NEXT: (try $l0 + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (call $foo) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch $e-i32 + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (pop i32) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (rethrow $l0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch_all + ;; CHECK-TEXT-NEXT: (rethrow $l0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (block $l020 + ;; CHECK-TEXT-NEXT: (try $l019 + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (call $foo) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch $e-i32 + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (pop i32) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (rethrow $l019) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch_all + ;; CHECK-TEXT-NEXT: (br $l020) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (try $l021 + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (call $foo) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch_all + ;; CHECK-TEXT-NEXT: (try $try + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (call $foo) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch $e-i32 + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (pop i32) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (rethrow $l021) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch_all + ;; CHECK-TEXT-NEXT: (rethrow $l021) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (try $l022 + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (call $foo) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch_all + ;; CHECK-TEXT-NEXT: (try $try23 + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (call $foo) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch $e-i32 + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (pop i32) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (block $b0 + ;; CHECK-TEXT-NEXT: (rethrow $l022) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch_all + ;; CHECK-TEXT-NEXT: (block $b1 + ;; CHECK-TEXT-NEXT: (rethrow $l022) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (try $l024 + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (call $foo) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch_all + ;; CHECK-TEXT-NEXT: (try $try25 + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (rethrow $l024) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch_all + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (try $l026 + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (call $foo) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch_all + ;; CHECK-TEXT-NEXT: (try $try27 + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (rethrow $l026) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch_all + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $rethrow-test (type $0) + ;; CHECK-BIN-NEXT: (try $label$3 + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (call $foo) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch $e-i32 + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (pop i32) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (rethrow $label$3) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch_all + ;; CHECK-BIN-NEXT: (rethrow $label$3) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (block $label$4 + ;; CHECK-BIN-NEXT: (try $label$7 + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (call $foo) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch $e-i32 + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (pop i32) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (rethrow $label$7) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch_all + ;; CHECK-BIN-NEXT: (br $label$4) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (try $label$13 + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (call $foo) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch_all + ;; CHECK-BIN-NEXT: (try $label$12 + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (call $foo) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch $e-i32 + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (pop i32) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (rethrow $label$13) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch_all + ;; CHECK-BIN-NEXT: (rethrow $label$13) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (try $label$20 + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (call $foo) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch_all + ;; CHECK-BIN-NEXT: (try $label$19 + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (call $foo) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch $e-i32 + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (pop i32) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (block $label$18 + ;; CHECK-BIN-NEXT: (rethrow $label$20) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch_all + ;; CHECK-BIN-NEXT: (rethrow $label$20) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (try $label$26 + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (call $foo) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch_all + ;; CHECK-BIN-NEXT: (try $label$25 + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (rethrow $label$26) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch_all + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (try $label$32 + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (call $foo) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch_all + ;; CHECK-BIN-NEXT: (try $label$31 + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (rethrow $label$32) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch_all + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $rethrow-test + ;; Simple try-catch-rethrow + (try $l0 + (do + (call $foo) + ) + (catch $e-i32 + (drop (pop i32)) + (rethrow $l0) ;; by label + ) + (catch_all + (rethrow 0) ;; by depth + ) + ) + + ;; When there are both a branch and a rethrow that target the same try + ;; label. Because binaryen only allows blocks and loops to be targetted by + ;; branches, we wrap the try with a block and make branches that block + ;; instead, resulting in the br and rethrow target different labels in the + ;; output. + (try $l0 + (do + (call $foo) + ) + (catch $e-i32 + (drop (pop i32)) + (rethrow $l0) + ) + (catch_all + (br $l0) + ) + ) + + ;; One more level deep + (try $l0 + (do + (call $foo) + ) + (catch_all + (try + (do + (call $foo) + ) + (catch $e-i32 + (drop (pop i32)) + (rethrow $l0) ;; by label + ) + (catch_all + (rethrow 1) ;; by depth + ) + ) + ) + ) + + ;; Interleaving block + (try $l0 + (do + (call $foo) + ) + (catch_all + (try + (do + (call $foo) + ) + (catch $e-i32 + (drop (pop i32)) + (block $b0 + (rethrow $l0) ;; by label + ) + ) + (catch_all + (block $b1 + (rethrow 2) ;; by depth + ) + ) + ) + ) + ) + + ;; Within nested try, but rather in 'try' part and not 'catch' + (try $l0 + (do + (call $foo) + ) + (catch_all + (try + (do + (rethrow $l0) ;; by label + ) + (catch_all) + ) + ) + ) + (try $l0 + (do + (call $foo) + ) + (catch_all + (try + (do + (rethrow 1) ;; by depth + ) + (catch_all) + ) + ) + ) + ) + + ;; CHECK-TEXT: (func $pop-test (type $0) + ;; CHECK-TEXT-NEXT: (try $try + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch $e-i32 + ;; CHECK-TEXT-NEXT: (throw $e-i32 + ;; CHECK-TEXT-NEXT: (if (result i32) + ;; CHECK-TEXT-NEXT: (pop i32) + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: (i32.const 3) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (try $try28 + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch $e-eqref + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (pop anyref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $pop-test (type $0) + ;; CHECK-BIN-NEXT: (try $label$5 + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch $e-i32 + ;; CHECK-BIN-NEXT: (throw $e-i32 + ;; CHECK-BIN-NEXT: (if (result i32) + ;; CHECK-BIN-NEXT: (pop i32) + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: (i32.const 3) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (try $label$8 + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch $e-eqref + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (pop eqref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $pop-test + (try + (do) + (catch $e-i32 + (throw $e-i32 + (if (result i32) + ;; pop is within an if condition, so this is OK. + (pop i32) + (i32.const 0) + (i32.const 3) + ) + ) + ) + ) + + (try + (do) + (catch $e-eqref + (drop + (pop anyref) ;; pop can be supertype + ) + ) + ) + ) + + ;; CHECK-TEXT: (func $catchless-try-with-inner-delegate (type $0) + ;; CHECK-TEXT-NEXT: (try $label$0 + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (try $try + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (throw $e-i32 + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (delegate $label$0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $catchless-try-with-inner-delegate (type $0) + ;; CHECK-BIN-NEXT: (try $label$6 + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (block $label$1 + ;; CHECK-BIN-NEXT: (try $label$4 + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (throw $e-i32 + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (delegate $label$6) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $catchless-try-with-inner-delegate + (try $label$0 + (do + (try + (do + (throw $e-i32 + (i32.const 0) + ) + ) + (delegate $label$0) + ) + ) + ) + ) + + ;; When 'delegate' is next to a nested block, make sure its delegate argument + ;; is parsed correctly. + + ;; CHECK-TEXT: (func $nested-block-and-try (type $0) + ;; CHECK-TEXT-NEXT: (block $l0 + ;; CHECK-TEXT-NEXT: (block $l1 + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (try $try + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (delegate 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $nested-block-and-try (type $0) + ;; CHECK-BIN-NEXT: (block $label$1 + ;; CHECK-BIN-NEXT: (block $label$2 + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (try $label$5 + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (delegate 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: ) + (func $nested-block-and-try + (block $l0 + (block $l1) + (try + (do) + (delegate 1) ;; to caller + ) + ) + (nop) + ) + + ;; --------------------------------------------------------------------------- + ;; New exception handling + + ;; CHECK-TEXT: (func $exnref-test (type $5) (result exnref) + ;; CHECK-TEXT-NEXT: (local $exn exnref) + ;; CHECK-TEXT-NEXT: (local $null-exn nullexnref) + ;; CHECK-TEXT-NEXT: (if (result exnref) + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: (if (result nullexnref) + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: (local.get $null-exn) + ;; CHECK-TEXT-NEXT: (ref.null noexn) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (local.get $exn) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $exnref-test (type $5) (result exnref) + ;; CHECK-BIN-NEXT: (local $exn exnref) + ;; CHECK-BIN-NEXT: (local $null-exn nullexnref) + ;; CHECK-BIN-NEXT: (if (result exnref) + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: (if (result nullexnref) + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: (local.get $null-exn) + ;; CHECK-BIN-NEXT: (ref.null noexn) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (local.get $exn) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $exnref-test (result exnref) (local $exn exnref) (local $null-exn nullexnref) + (if (result exnref) + (i32.const 1) + (if (result nullexnref) + (i32.const 1) + (local.get $null-exn) + (ref.null noexn) + ) + (local.get $exn) + ) + ) +) +;; CHECK-BIN-NODEBUG: (type $0 (func)) + +;; CHECK-BIN-NODEBUG: (type $1 (func (param i32))) + +;; CHECK-BIN-NODEBUG: (type $2 (func (param i64))) + +;; CHECK-BIN-NODEBUG: (type $3 (func (param i32 i64))) + +;; CHECK-BIN-NODEBUG: (type $4 (func (param eqref))) + +;; CHECK-BIN-NODEBUG: (type $5 (func (result exnref))) + +;; CHECK-BIN-NODEBUG: (tag $tag$0 (param i32)) + +;; CHECK-BIN-NODEBUG: (tag $tag$1 (param i64)) + +;; CHECK-BIN-NODEBUG: (tag $tag$2 (param i32 i64)) + +;; CHECK-BIN-NODEBUG: (tag $tag$3 (param eqref)) + +;; CHECK-BIN-NODEBUG: (tag $tag$4) + +;; CHECK-BIN-NODEBUG: (func $0 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $1 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $2 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (local $0 i32) +;; CHECK-BIN-NODEBUG-NEXT: (local $1 i64) +;; CHECK-BIN-NODEBUG-NEXT: (local $2 (i32 i64)) +;; CHECK-BIN-NODEBUG-NEXT: (local $3 i32) +;; CHECK-BIN-NODEBUG-NEXT: (try $label$3 +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (throw $tag$0 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch $tag$0 +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (pop i32) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (try $label$6 +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (throw $tag$2 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch $tag$2 +;; CHECK-BIN-NODEBUG-NEXT: (local.set $2 +;; CHECK-BIN-NODEBUG-NEXT: (pop i32 i64) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (local.set $0 +;; CHECK-BIN-NODEBUG-NEXT: (block (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (local.set $3 +;; CHECK-BIN-NODEBUG-NEXT: (tuple.extract 2 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (local.set $1 +;; CHECK-BIN-NODEBUG-NEXT: (tuple.extract 2 1 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $3) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (block $label$7 +;; CHECK-BIN-NODEBUG-NEXT: (try $label$10 +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (br $label$7) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch $tag$0 +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (pop i32) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (br $label$7) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (try $label$13 +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch $tag$0 +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (pop i32) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (try $label$16 +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (call $0) +;; CHECK-BIN-NODEBUG-NEXT: (call $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch $tag$0 +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (pop i32) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (call $0) +;; CHECK-BIN-NODEBUG-NEXT: (call $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (try $label$19 +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (throw $tag$0 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch $tag$0 +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (pop i32) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch $tag$1 +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (pop i64) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (try $label$22 +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (throw $tag$0 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch_all +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (try $label$25 +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (throw $tag$0 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch $tag$0 +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (pop i32) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch $tag$1 +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (pop i64) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch_all +;; CHECK-BIN-NODEBUG-NEXT: (call $0) +;; CHECK-BIN-NODEBUG-NEXT: (call $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (try $label$34 +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (try $label$29 +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (throw $tag$0 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch $tag$0 +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (pop i32) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch_all +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch $tag$0 +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (pop i32) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch_all +;; CHECK-BIN-NODEBUG-NEXT: (try $label$33 +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (throw $tag$0 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch $tag$0 +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (pop i32) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch_all +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (try $label$37 +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (throw $tag$0 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $3 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (try $label$9 +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (block $label$1 +;; CHECK-BIN-NODEBUG-NEXT: (try $label$4 +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (call $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (delegate $label$9) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (try $label$7 +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (call $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (delegate $label$9) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch_all +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (block $label$10 +;; CHECK-BIN-NODEBUG-NEXT: (try $label$19 +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (block $label$11 +;; CHECK-BIN-NODEBUG-NEXT: (try $label$14 +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (br_if $label$10 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (delegate $label$19) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (try $label$17 +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (br_if $label$10 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (delegate $label$19) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch_all +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (try $label$25 +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (block $label$20 +;; CHECK-BIN-NODEBUG-NEXT: (try $label$23 +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (call $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (delegate $label$25) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (delegate 0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (try $label$28 +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch $tag$4 +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $4 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (try $label$3 +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (call $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch $tag$0 +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (pop i32) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (rethrow $label$3) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch_all +;; CHECK-BIN-NODEBUG-NEXT: (rethrow $label$3) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (block $label$4 +;; CHECK-BIN-NODEBUG-NEXT: (try $label$7 +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (call $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch $tag$0 +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (pop i32) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (rethrow $label$7) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch_all +;; CHECK-BIN-NODEBUG-NEXT: (br $label$4) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (try $label$13 +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (call $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch_all +;; CHECK-BIN-NODEBUG-NEXT: (try $label$12 +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (call $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch $tag$0 +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (pop i32) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (rethrow $label$13) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch_all +;; CHECK-BIN-NODEBUG-NEXT: (rethrow $label$13) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (try $label$20 +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (call $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch_all +;; CHECK-BIN-NODEBUG-NEXT: (try $label$19 +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (call $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch $tag$0 +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (pop i32) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (block $label$18 +;; CHECK-BIN-NODEBUG-NEXT: (rethrow $label$20) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch_all +;; CHECK-BIN-NODEBUG-NEXT: (rethrow $label$20) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (try $label$26 +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (call $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch_all +;; CHECK-BIN-NODEBUG-NEXT: (try $label$25 +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (rethrow $label$26) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch_all +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (try $label$32 +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (call $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch_all +;; CHECK-BIN-NODEBUG-NEXT: (try $label$31 +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (rethrow $label$32) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch_all +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $5 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (try $label$5 +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch $tag$0 +;; CHECK-BIN-NODEBUG-NEXT: (throw $tag$0 +;; CHECK-BIN-NODEBUG-NEXT: (if (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (pop i32) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 3) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (try $label$8 +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch $tag$3 +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (pop eqref) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $6 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (try $label$6 +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (block $label$1 +;; CHECK-BIN-NODEBUG-NEXT: (try $label$4 +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (throw $tag$0 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (delegate $label$6) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $7 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (block $label$1 +;; CHECK-BIN-NODEBUG-NEXT: (block $label$2 +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (try $label$5 +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (delegate 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $8 (type $5) (result exnref) +;; CHECK-BIN-NODEBUG-NEXT: (local $0 exnref) +;; CHECK-BIN-NODEBUG-NEXT: (local $1 nullexnref) +;; CHECK-BIN-NODEBUG-NEXT: (if (result exnref) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: (if (result nullexnref) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: (ref.null noexn) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) diff --git a/test/lit/basic/export-import.wast b/test/lit/basic/export-import.wast new file mode 100644 index 000000000..853e1d93a --- /dev/null +++ b/test/lit/basic/export-import.wast @@ -0,0 +1,34 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wast -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast +;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +(module + ;; CHECK-TEXT: (type $v (func)) + ;; CHECK-BIN: (type $v (func)) + (type $v (func)) + ;; CHECK-TEXT: (import "env" "test2" (global $test2 i32)) + ;; CHECK-BIN: (import "env" "test2" (global $test2 i32)) + ;; CHECK-BIN-NODEBUG: (type $0 (func)) + + ;; CHECK-BIN-NODEBUG: (import "env" "test2" (global $gimport$0 i32)) + (import "env" "test1" (func $test1)) + ;; CHECK-TEXT: (import "env" "test1" (func $test1 (type $v))) + ;; CHECK-BIN: (import "env" "test1" (func $test1 (type $v))) + ;; CHECK-BIN-NODEBUG: (import "env" "test1" (func $fimport$0 (type $0))) + (import "env" "test2" (global $test2 i32)) + ;; CHECK-TEXT: (export "test1" (func $test1)) + ;; CHECK-BIN: (export "test1" (func $test1)) + ;; CHECK-BIN-NODEBUG: (export "test1" (func $fimport$0)) + (export "test1" (func $test1)) + ;; CHECK-TEXT: (export "test2" (global $test2)) + ;; CHECK-BIN: (export "test2" (global $test2)) + ;; CHECK-BIN-NODEBUG: (export "test2" (global $gimport$0)) + (export "test2" (global $test2)) +) diff --git a/test/lit/basic/extended-names.wast b/test/lit/basic/extended-names.wast new file mode 100644 index 000000000..b6c4d52ae --- /dev/null +++ b/test/lit/basic/extended-names.wast @@ -0,0 +1,38 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wast -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast +;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +(module $foo + ;; CHECK-TEXT: (memory $m1 1 1) + + ;; CHECK-TEXT: (data $mydata (i32.const 0) "a") + + ;; CHECK-TEXT: (data $passive_data "b") + + ;; CHECK-TEXT: (table $t1 1 funcref) + ;; CHECK-BIN: (memory $m1 1 1) + + ;; CHECK-BIN: (data $mydata (i32.const 0) "a") + + ;; CHECK-BIN: (data $passive_data "b") + + ;; CHECK-BIN: (table $t1 1 funcref) + (table $t1 1 funcref) + (memory $m1 1 1) + (data $mydata (i32.const 0) "a") + (data $passive_data "b") +) +;; CHECK-BIN-NODEBUG: (memory $0 1 1) + +;; CHECK-BIN-NODEBUG: (data $0 (i32.const 0) "a") + +;; CHECK-BIN-NODEBUG: (data $1 "b") + +;; CHECK-BIN-NODEBUG: (table $0 1 funcref) diff --git a/test/lit/basic/fn_prolog_epilog.debugInfo.wast b/test/lit/basic/fn_prolog_epilog.debugInfo.wast new file mode 100644 index 000000000..636c3346e --- /dev/null +++ b/test/lit/basic/fn_prolog_epilog.debugInfo.wast @@ -0,0 +1,66 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wast -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast +;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +(module + ;;@ src.cpp:1:1 + (func + (nop) + ;;@ src.cpp:2:1 + (block $l0 + ;;@ src.cpp:2:2 + (block $l1 + (br $l1) + ) + ) + ;;@ src.cpp:3:1 + (return) + ;;@ src.cpp:3:2 + ) +) +;; CHECK-TEXT: (type $0 (func)) + +;; CHECK-TEXT: (func $0 (type $0) +;; CHECK-TEXT-NEXT: (nop) +;; CHECK-TEXT-NEXT: ;;@ src.cpp:2:1 +;; CHECK-TEXT-NEXT: (block $l0 +;; CHECK-TEXT-NEXT: ;;@ src.cpp:2:2 +;; CHECK-TEXT-NEXT: (block $l1 +;; CHECK-TEXT-NEXT: (br $l1) +;; CHECK-TEXT-NEXT: ) +;; CHECK-TEXT-NEXT: ) +;; CHECK-TEXT-NEXT: ;;@ src.cpp:3:1 +;; CHECK-TEXT-NEXT: (return) +;; CHECK-TEXT-NEXT: ;;@ src.cpp:3:2 +;; CHECK-TEXT-NEXT: ) + +;; CHECK-BIN: (type $0 (func)) + +;; CHECK-BIN: (func $0 (type $0) +;; CHECK-BIN-NEXT: (nop) +;; CHECK-BIN-NEXT: (block $label$1 +;; CHECK-BIN-NEXT: (block $label$2 +;; CHECK-BIN-NEXT: (br $label$2) +;; CHECK-BIN-NEXT: ) +;; CHECK-BIN-NEXT: ) +;; CHECK-BIN-NEXT: (return) +;; CHECK-BIN-NEXT: ) + +;; CHECK-BIN-NODEBUG: (type $0 (func)) + +;; CHECK-BIN-NODEBUG: (func $0 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: (block $label$1 +;; CHECK-BIN-NODEBUG-NEXT: (block $label$2 +;; CHECK-BIN-NODEBUG-NEXT: (br $label$2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (return) +;; CHECK-BIN-NODEBUG-NEXT: ) diff --git a/test/lit/basic/grow_memory.wast b/test/lit/basic/grow_memory.wast new file mode 100644 index 000000000..2a8c45ece --- /dev/null +++ b/test/lit/basic/grow_memory.wast @@ -0,0 +1,71 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wast -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast +;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +(module + ;; CHECK-TEXT: (type $0 (func (param i32) (result i32))) + ;; CHECK-BIN: (type $0 (func (param i32) (result i32))) + ;; CHECK-BIN-NODEBUG: (type $0 (func (param i32) (result i32))) + (type $0 (func (param i32) (result i32))) + ;; CHECK-TEXT: (type $1 (func (result i32))) + ;; CHECK-BIN: (type $1 (func (result i32))) + ;; CHECK-BIN-NODEBUG: (type $1 (func (result i32))) + (type $1 (func (result i32))) + ;; CHECK-TEXT: (memory $0 1) + ;; CHECK-BIN: (memory $0 1) + ;; CHECK-BIN-NODEBUG: (memory $0 1) + (memory $0 1) + ;; CHECK-TEXT: (export "memory" (memory $0)) + ;; CHECK-BIN: (export "memory" (memory $0)) + ;; CHECK-BIN-NODEBUG: (export "memory" (memory $0)) + (export "memory" (memory $0)) + ;; CHECK-TEXT: (export "grow" (func $0)) + ;; CHECK-BIN: (export "grow" (func $0)) + ;; CHECK-BIN-NODEBUG: (export "grow" (func $0)) + (export "grow" (func $0)) + ;; CHECK-TEXT: (export "current" (func $1)) + ;; CHECK-BIN: (export "current" (func $1)) + ;; CHECK-BIN-NODEBUG: (export "current" (func $1)) + (export "current" (func $1)) + + ;; CHECK-TEXT: (func $0 (type $0) (param $var$0 i32) (result i32) + ;; CHECK-TEXT-NEXT: (memory.grow + ;; CHECK-TEXT-NEXT: (local.get $var$0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $0 (type $0) (param $var$0 i32) (result i32) + ;; CHECK-BIN-NEXT: (memory.grow + ;; CHECK-BIN-NEXT: (local.get $var$0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NODEBUG: (func $0 (type $0) (param $0 i32) (result i32) + ;; CHECK-BIN-NODEBUG-NEXT: (memory.grow + ;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) + ;; CHECK-BIN-NODEBUG-NEXT: ) + ;; CHECK-BIN-NODEBUG-NEXT: ) + (func $0 (; 0 ;) (type $0) (param $var$0 i32) (result i32) + (memory.grow + (local.get $var$0) + ) + ) + + ;; CHECK-TEXT: (func $1 (type $1) (result i32) + ;; CHECK-TEXT-NEXT: (memory.size) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $1 (type $1) (result i32) + ;; CHECK-BIN-NEXT: (memory.size) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NODEBUG: (func $1 (type $1) (result i32) + ;; CHECK-BIN-NODEBUG-NEXT: (memory.size) + ;; CHECK-BIN-NODEBUG-NEXT: ) + (func $1 (; 1 ;) (type $1) (result i32) + (memory.size) + ) +) diff --git a/test/lit/basic/hello_world.wat b/test/lit/basic/hello_world.wat new file mode 100644 index 000000000..5ddb30128 --- /dev/null +++ b/test/lit/basic/hello_world.wat @@ -0,0 +1,50 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wat -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wat +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wat +;; RUN: cat %t.text.wat | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wat | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wat | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +(module + ;; CHECK-TEXT: (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + ;; CHECK-BIN: (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + ;; CHECK-TEXT: (memory $0 256 256) + ;; CHECK-BIN: (memory $0 256 256) + ;; CHECK-BIN-NODEBUG: (type $0 (func (param i32 i32) (result i32))) + + ;; CHECK-BIN-NODEBUG: (memory $0 256 256) + (memory $0 256 256) + ;; CHECK-TEXT: (export "add" (func $add)) + ;; CHECK-BIN: (export "add" (func $add)) + ;; CHECK-BIN-NODEBUG: (export "add" (func $0)) + (export "add" (func $add)) + ;; CHECK-TEXT: (func $add (type $i32_i32_=>_i32) (param $x i32) (param $y i32) (result i32) + ;; CHECK-TEXT-NEXT: (i32.add + ;; CHECK-TEXT-NEXT: (local.get $x) + ;; CHECK-TEXT-NEXT: (local.get $y) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $add (type $i32_i32_=>_i32) (param $x i32) (param $y i32) (result i32) + ;; CHECK-BIN-NEXT: (i32.add + ;; CHECK-BIN-NEXT: (local.get $x) + ;; CHECK-BIN-NEXT: (local.get $y) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $add (param $x i32) (param $y i32) (result i32) + (i32.add + (local.get $x) + (local.get $y) + ) + ) +) +;; CHECK-BIN-NODEBUG: (func $0 (type $0) (param $0 i32) (param $1 i32) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (i32.add +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) diff --git a/test/lit/basic/imported_memory.wast b/test/lit/basic/imported_memory.wast new file mode 100644 index 000000000..52eccce7f --- /dev/null +++ b/test/lit/basic/imported_memory.wast @@ -0,0 +1,21 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wast -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast +;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +(module + ;; CHECK-TEXT: (import "env" "memory" (memory $0 256 256)) + ;; CHECK-BIN: (import "env" "memory" (memory $0 256 256)) + ;; CHECK-BIN-NODEBUG: (import "env" "memory" (memory $mimport$0 256 256)) + (import "env" "memory" (memory $0 256 256)) + ;; CHECK-TEXT: (import "env" "table" (table $timport$0 256 256 funcref)) + ;; CHECK-BIN: (import "env" "table" (table $timport$0 256 256 funcref)) + ;; CHECK-BIN-NODEBUG: (import "env" "table" (table $timport$0 256 256 funcref)) + (import "env" "table" (table 256 256 funcref)) +) diff --git a/test/lit/basic/imported_memory_growth.wast b/test/lit/basic/imported_memory_growth.wast new file mode 100644 index 000000000..d1d62c2d9 --- /dev/null +++ b/test/lit/basic/imported_memory_growth.wast @@ -0,0 +1,21 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wast -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast +;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +(module + ;; CHECK-TEXT: (import "env" "memory" (memory $0 256)) + ;; CHECK-BIN: (import "env" "memory" (memory $0 256)) + ;; CHECK-BIN-NODEBUG: (import "env" "memory" (memory $mimport$0 256)) + (import "env" "memory" (memory $0 256)) + ;; CHECK-TEXT: (import "env" "table" (table $timport$0 256 funcref)) + ;; CHECK-BIN: (import "env" "table" (table $timport$0 256 funcref)) + ;; CHECK-BIN-NODEBUG: (import "env" "table" (table $timport$0 256 funcref)) + (import "env" "table" (table 256 funcref)) +) diff --git a/test/lit/basic/kitchen_sink.wast b/test/lit/basic/kitchen_sink.wast new file mode 100644 index 000000000..ca20996e7 --- /dev/null +++ b/test/lit/basic/kitchen_sink.wast @@ -0,0 +1,2833 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wast -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast +;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +(module + ;; CHECK-TEXT: (type $0 (func (result i32))) + ;; CHECK-BIN: (type $0 (func (result i32))) + ;; CHECK-BIN-NODEBUG: (type $0 (func (result i32))) + (type $0 (func (result i32))) + ;; CHECK-TEXT: (memory $0 4096 4096) + ;; CHECK-BIN: (memory $0 4096 4096) + ;; CHECK-BIN-NODEBUG: (memory $0 4096 4096) + (memory $0 4096 4096) + (data (i32.const 1026) "\14\00") + + ;; CHECK-TEXT: (data $0 (i32.const 1026) "\14\00") + + ;; CHECK-TEXT: (func $kitchensink (type $0) (result i32) + ;; CHECK-TEXT-NEXT: (block $block0 (result i32) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.add + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.sub + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.mul + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.div_s + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.div_u + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.rem_s + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.rem_u + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.and + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.or + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.xor + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.shl + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.shr_u + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.shr_s + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.eq + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.ne + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.lt_s + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.le_s + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.lt_u + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.le_u + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.gt_s + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.ge_s + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.gt_u + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.ge_u + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.clz + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.ctz + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.popcnt + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.add + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.sub + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.mul + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.div_s + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.div_u + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.rem_s + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.rem_u + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.and + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.or + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.xor + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.shl + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.shr_u + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.shr_s + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.eq + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.ne + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.lt_s + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.le_s + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.lt_u + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.le_u + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.gt_s + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.ge_s + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.gt_u + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.ge_u + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.clz + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.ctz + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.popcnt + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f32.add + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f32.sub + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f32.mul + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f32.div + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f32.min + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f32.max + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f32.abs + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f32.neg + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f32.copysign + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f32.ceil + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f32.floor + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f32.trunc + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f32.nearest + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f32.sqrt + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f32.eq + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f32.ne + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f32.lt + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f32.le + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f32.gt + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f32.ge + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f64.add + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f64.sub + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f64.mul + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f64.div + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f64.min + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f64.max + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f64.abs + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f64.neg + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f64.copysign + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f64.ceil + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f64.floor + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f64.trunc + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f64.nearest + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f64.sqrt + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f64.eq + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f64.ne + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f64.lt + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f64.le + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f64.gt + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f64.ge + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.trunc_f32_s + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.trunc_f64_s + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.trunc_f32_u + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.trunc_f64_u + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.trunc_sat_f32_s + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.trunc_sat_f32_u + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.trunc_sat_f64_s + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.trunc_sat_f64_u + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.wrap_i64 + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.trunc_f32_s + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.trunc_f64_s + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.trunc_f32_u + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.trunc_f64_u + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.trunc_sat_f32_s + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.trunc_sat_f32_u + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.trunc_sat_f64_s + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.trunc_sat_f64_u + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.extend_i32_s + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.extend_i32_u + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f32.convert_i32_s + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f32.convert_i32_u + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f32.convert_i64_s + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f32.convert_i64_u + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f32.demote_f64 + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f32.reinterpret_i32 + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f64.convert_i32_s + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f64.convert_i32_u + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f64.convert_i64_s + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f64.convert_i64_u + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f64.promote_f32 + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f64.reinterpret_i64 + ;; CHECK-TEXT-NEXT: (i64.const 100) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.reinterpret_f32 + ;; CHECK-TEXT-NEXT: (f32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.reinterpret_f64 + ;; CHECK-TEXT-NEXT: (f64.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (data $0 (i32.const 1026) "\14\00") + + ;; CHECK-BIN: (func $kitchensink (type $0) (result i32) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.add + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.sub + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.mul + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.div_s + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.div_u + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.rem_s + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.rem_u + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.and + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.or + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.xor + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.shl + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.shr_u + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.shr_s + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.eq + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.ne + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.lt_s + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.le_s + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.lt_u + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.le_u + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.gt_s + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.ge_s + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.gt_u + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.ge_u + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.clz + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.ctz + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.popcnt + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.add + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.sub + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.mul + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.div_s + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.div_u + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.rem_s + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.rem_u + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.and + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.or + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.xor + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.shl + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.shr_u + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.shr_s + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.eq + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.ne + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.lt_s + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.le_s + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.lt_u + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.le_u + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.gt_s + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.ge_s + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.gt_u + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.ge_u + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.clz + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.ctz + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.popcnt + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f32.add + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f32.sub + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f32.mul + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f32.div + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f32.min + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f32.max + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f32.abs + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f32.neg + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f32.copysign + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f32.ceil + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f32.floor + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f32.trunc + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f32.nearest + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f32.sqrt + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f32.eq + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f32.ne + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f32.lt + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f32.le + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f32.gt + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f32.ge + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f64.add + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f64.sub + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f64.mul + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f64.div + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f64.min + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f64.max + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f64.abs + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f64.neg + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f64.copysign + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f64.ceil + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f64.floor + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f64.trunc + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f64.nearest + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f64.sqrt + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f64.eq + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f64.ne + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f64.lt + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f64.le + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f64.gt + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f64.ge + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.trunc_f32_s + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.trunc_f64_s + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.trunc_f32_u + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.trunc_f64_u + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.trunc_sat_f32_s + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.trunc_sat_f32_u + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.trunc_sat_f64_s + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.trunc_sat_f64_u + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.wrap_i64 + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.trunc_f32_s + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.trunc_f64_s + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.trunc_f32_u + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.trunc_f64_u + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.trunc_sat_f32_s + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.trunc_sat_f32_u + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.trunc_sat_f64_s + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.trunc_sat_f64_u + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.extend_i32_s + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.extend_i32_u + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f32.convert_i32_s + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f32.convert_i32_u + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f32.convert_i64_s + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f32.convert_i64_u + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f32.demote_f64 + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f32.reinterpret_i32 + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f64.convert_i32_s + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f64.convert_i32_u + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f64.convert_i64_s + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f64.convert_i64_u + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f64.promote_f32 + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f64.reinterpret_i64 + ;; CHECK-BIN-NEXT: (i64.const 100) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.reinterpret_f32 + ;; CHECK-BIN-NEXT: (f32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.reinterpret_f64 + ;; CHECK-BIN-NEXT: (f64.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: ) + (func $kitchensink (type $0) (result i32) + (block $block0 (result i32) + (drop + (i32.add + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.sub + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.mul + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.div_s + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.div_u + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.rem_s + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.rem_u + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.and + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.or + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.xor + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.shl + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.shr_u + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.shr_s + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.eq + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.ne + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.lt_s + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.le_s + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.lt_u + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.le_u + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.gt_s + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.ge_s + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.gt_u + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.ge_u + (i32.const 10) + (i32.const 10) + ) + ) + (drop + (i32.clz + (i32.const 10) + ) + ) + (drop + (i32.ctz + (i32.const 10) + ) + ) + (drop + (i32.popcnt + (i32.const 10) + ) + ) + (drop + (i64.add + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.sub + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.mul + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.div_s + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.div_u + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.rem_s + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.rem_u + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.and + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.or + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.xor + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.shl + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.shr_u + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.shr_s + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.eq + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.ne + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.lt_s + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.le_s + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.lt_u + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.le_u + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.gt_s + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.ge_s + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.gt_u + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.ge_u + (i64.const 100) + (i64.const 100) + ) + ) + (drop + (i64.clz + (i64.const 100) + ) + ) + (drop + (i64.ctz + (i64.const 100) + ) + ) + (drop + (i64.popcnt + (i64.const 100) + ) + ) + (drop + (f32.add + (f32.const 10) + (f32.const 10) + ) + ) + (drop + (f32.sub + (f32.const 10) + (f32.const 10) + ) + ) + (drop + (f32.mul + (f32.const 10) + (f32.const 10) + ) + ) + (drop + (f32.div + (f32.const 10) + (f32.const 10) + ) + ) + (drop + (f32.min + (f32.const 10) + (f32.const 10) + ) + ) + (drop + (f32.max + (f32.const 10) + (f32.const 10) + ) + ) + (drop + (f32.abs + (f32.const 10) + ) + ) + (drop + (f32.neg + (f32.const 10) + ) + ) + (drop + (f32.copysign + (f32.const 10) + (f32.const 10) + ) + ) + (drop + (f32.ceil + (f32.const 10) + ) + ) + (drop + (f32.floor + (f32.const 10) + ) + ) + (drop + (f32.trunc + (f32.const 10) + ) + ) + (drop + (f32.nearest + (f32.const 10) + ) + ) + (drop + (f32.sqrt + (f32.const 10) + ) + ) + (drop + (f32.eq + (f32.const 10) + (f32.const 10) + ) + ) + (drop + (f32.ne + (f32.const 10) + (f32.const 10) + ) + ) + (drop + (f32.lt + (f32.const 10) + (f32.const 10) + ) + ) + (drop + (f32.le + (f32.const 10) + (f32.const 10) + ) + ) + (drop + (f32.gt + (f32.const 10) + (f32.const 10) + ) + ) + (drop + (f32.ge + (f32.const 10) + (f32.const 10) + ) + ) + (drop + (f64.add + (f64.const 10) + (f64.const 10) + ) + ) + (drop + (f64.sub + (f64.const 10) + (f64.const 10) + ) + ) + (drop + (f64.mul + (f64.const 10) + (f64.const 10) + ) + ) + (drop + (f64.div + (f64.const 10) + (f64.const 10) + ) + ) + (drop + (f64.min + (f64.const 10) + (f64.const 10) + ) + ) + (drop + (f64.max + (f64.const 10) + (f64.const 10) + ) + ) + (drop + (f64.abs + (f64.const 10) + ) + ) + (drop + (f64.neg + (f64.const 10) + ) + ) + (drop + (f64.copysign + (f64.const 10) + (f64.const 10) + ) + ) + (drop + (f64.ceil + (f64.const 10) + ) + ) + (drop + (f64.floor + (f64.const 10) + ) + ) + (drop + (f64.trunc + (f64.const 10) + ) + ) + (drop + (f64.nearest + (f64.const 10) + ) + ) + (drop + (f64.sqrt + (f64.const 10) + ) + ) + (drop + (f64.eq + (f64.const 10) + (f64.const 10) + ) + ) + (drop + (f64.ne + (f64.const 10) + (f64.const 10) + ) + ) + (drop + (f64.lt + (f64.const 10) + (f64.const 10) + ) + ) + (drop + (f64.le + (f64.const 10) + (f64.const 10) + ) + ) + (drop + (f64.gt + (f64.const 10) + (f64.const 10) + ) + ) + (drop + (f64.ge + (f64.const 10) + (f64.const 10) + ) + ) + (drop + (i32.trunc_f32_s + (f32.const 10) + ) + ) + (drop + (i32.trunc_f64_s + (f64.const 10) + ) + ) + (drop + (i32.trunc_f32_u + (f32.const 10) + ) + ) + (drop + (i32.trunc_f64_u + (f64.const 10) + ) + ) + (drop + (i32.trunc_sat_f32_s + (f32.const 10) + ) + ) + (drop + (i32.trunc_sat_f32_u + (f32.const 10) + ) + ) + (drop + (i32.trunc_sat_f64_s + (f64.const 10) + ) + ) + (drop + (i32.trunc_sat_f64_u + (f64.const 10) + ) + ) + (drop + (i32.wrap_i64 + (i64.const 100) + ) + ) + (drop + (i64.trunc_f32_s + (f32.const 10) + ) + ) + (drop + (i64.trunc_f64_s + (f64.const 10) + ) + ) + (drop + (i64.trunc_f32_u + (f32.const 10) + ) + ) + (drop + (i64.trunc_f64_u + (f64.const 10) + ) + ) + (drop + (i64.trunc_sat_f32_s + (f32.const 10) + ) + ) + (drop + (i64.trunc_sat_f32_u + (f32.const 10) + ) + ) + (drop + (i64.trunc_sat_f64_s + (f64.const 10) + ) + ) + (drop + (i64.trunc_sat_f64_u + (f64.const 10) + ) + ) + (drop + (i64.extend_i32_s + (i32.const 10) + ) + ) + (drop + (i64.extend_i32_u + (i32.const 10) + ) + ) + (drop + (f32.convert_i32_s + (i32.const 10) + ) + ) + (drop + (f32.convert_i32_u + (i32.const 10) + ) + ) + (drop + (f32.convert_i64_s + (i64.const 100) + ) + ) + (drop + (f32.convert_i64_u + (i64.const 100) + ) + ) + (drop + (f32.demote_f64 + (f64.const 10) + ) + ) + (drop + (f32.reinterpret_i32 + (i32.const 10) + ) + ) + (drop + (f64.convert_i32_s + (i32.const 10) + ) + ) + (drop + (f64.convert_i32_u + (i32.const 10) + ) + ) + (drop + (f64.convert_i64_s + (i64.const 100) + ) + ) + (drop + (f64.convert_i64_u + (i64.const 100) + ) + ) + (drop + (f64.promote_f32 + (f32.const 10) + ) + ) + (drop + (f64.reinterpret_i64 + (i64.const 100) + ) + ) + (drop + (i32.reinterpret_f32 + (f32.const 10) + ) + ) + (drop + (i64.reinterpret_f64 + (f64.const 10) + ) + ) + (i32.const 0) + ) + ) +) +;; CHECK-BIN-NODEBUG: (data $0 (i32.const 1026) "\14\00") + +;; CHECK-BIN-NODEBUG: (func $0 (type $0) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.add +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.sub +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.mul +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.div_s +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.div_u +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.rem_s +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.rem_u +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.and +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.or +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.xor +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.shl +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.shr_u +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.shr_s +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.eq +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.ne +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.lt_s +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.le_s +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.lt_u +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.le_u +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.gt_s +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.ge_s +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.gt_u +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.ge_u +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.clz +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.ctz +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.popcnt +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.add +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.sub +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.mul +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.div_s +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.div_u +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.rem_s +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.rem_u +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.and +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.or +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.xor +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.shl +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.shr_u +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.shr_s +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.eq +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.ne +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.lt_s +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.le_s +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.lt_u +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.le_u +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.gt_s +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.ge_s +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.gt_u +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.ge_u +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.clz +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.ctz +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.popcnt +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f32.add +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f32.sub +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f32.mul +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f32.div +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f32.min +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f32.max +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f32.abs +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f32.neg +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f32.copysign +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f32.ceil +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f32.floor +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f32.trunc +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f32.nearest +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f32.sqrt +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f32.eq +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f32.ne +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f32.lt +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f32.le +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f32.gt +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f32.ge +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f64.add +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f64.sub +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f64.mul +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f64.div +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f64.min +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f64.max +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f64.abs +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f64.neg +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f64.copysign +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f64.ceil +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f64.floor +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f64.trunc +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f64.nearest +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f64.sqrt +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f64.eq +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f64.ne +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f64.lt +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f64.le +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f64.gt +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f64.ge +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.trunc_f32_s +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.trunc_f64_s +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.trunc_f32_u +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.trunc_f64_u +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.trunc_sat_f32_s +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.trunc_sat_f32_u +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.trunc_sat_f64_s +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.trunc_sat_f64_u +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.wrap_i64 +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.trunc_f32_s +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.trunc_f64_s +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.trunc_f32_u +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.trunc_f64_u +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.trunc_sat_f32_s +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.trunc_sat_f32_u +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.trunc_sat_f64_s +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.trunc_sat_f64_u +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.extend_i32_s +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.extend_i32_u +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f32.convert_i32_s +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f32.convert_i32_u +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f32.convert_i64_s +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f32.convert_i64_u +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f32.demote_f64 +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f32.reinterpret_i32 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f64.convert_i32_s +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f64.convert_i32_u +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f64.convert_i64_s +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f64.convert_i64_u +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f64.promote_f32 +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f64.reinterpret_i64 +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 100) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.reinterpret_f32 +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.reinterpret_f64 +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: ) diff --git a/test/lit/basic/memory-import.wast b/test/lit/basic/memory-import.wast new file mode 100644 index 000000000..fb6a3d623 --- /dev/null +++ b/test/lit/basic/memory-import.wast @@ -0,0 +1,42 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wast -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast +;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +(module + ;; CHECK-TEXT: (type $0 (func (result i32))) + ;; CHECK-BIN: (type $0 (func (result i32))) + ;; CHECK-BIN-NODEBUG: (type $0 (func (result i32))) + (type $0 (func (result i32))) + ;; CHECK-TEXT: (import "env" "memory" (memory $0 1 1)) + ;; CHECK-BIN: (import "env" "memory" (memory $0 1 1)) + ;; CHECK-BIN-NODEBUG: (import "env" "memory" (memory $mimport$0 1 1)) + (import "env" "memory" (memory $0 1 1)) + + ;; CHECK-TEXT: (func $foo (type $0) (result i32) + ;; CHECK-TEXT-NEXT: (i32.load offset=13 + ;; CHECK-TEXT-NEXT: (i32.const 37) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $foo (type $0) (result i32) + ;; CHECK-BIN-NEXT: (i32.load offset=13 + ;; CHECK-BIN-NEXT: (i32.const 37) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $foo (type $0) (result i32) + (i32.load offset=13 + (i32.const 37) + ) + ) +) +;; CHECK-BIN-NODEBUG: (func $0 (type $0) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (i32.load offset=13 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 37) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) diff --git a/test/lit/basic/memory-import64.wast b/test/lit/basic/memory-import64.wast new file mode 100644 index 000000000..7794d6b5f --- /dev/null +++ b/test/lit/basic/memory-import64.wast @@ -0,0 +1,42 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wast -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast +;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +(module + ;; CHECK-TEXT: (type $0 (func (result i32))) + ;; CHECK-BIN: (type $0 (func (result i32))) + ;; CHECK-BIN-NODEBUG: (type $0 (func (result i32))) + (type $0 (func (result i32))) + ;; CHECK-TEXT: (import "env" "memory" (memory $0 i64 1 1)) + ;; CHECK-BIN: (import "env" "memory" (memory $0 i64 1 1)) + ;; CHECK-BIN-NODEBUG: (import "env" "memory" (memory $mimport$0 i64 1 1)) + (import "env" "memory" (memory $0 i64 1 1)) + + ;; CHECK-TEXT: (func $foo (type $0) (result i32) + ;; CHECK-TEXT-NEXT: (i32.load offset=13 + ;; CHECK-TEXT-NEXT: (i64.const 37) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $foo (type $0) (result i32) + ;; CHECK-BIN-NEXT: (i32.load offset=13 + ;; CHECK-BIN-NEXT: (i64.const 37) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $foo (type $0) (result i32) + (i32.load offset=13 + (i64.const 37) + ) + ) +) +;; CHECK-BIN-NODEBUG: (func $0 (type $0) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (i32.load offset=13 +;; CHECK-BIN-NODEBUG-NEXT: (i64.const 37) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) diff --git a/test/lit/basic/memory-shared.wast b/test/lit/basic/memory-shared.wast new file mode 100644 index 000000000..bc2f8bacc --- /dev/null +++ b/test/lit/basic/memory-shared.wast @@ -0,0 +1,17 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wast -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast +;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +(module + ;; CHECK-TEXT: (memory $0 (shared 23 256)) + ;; CHECK-BIN: (memory $0 (shared 23 256)) + ;; CHECK-BIN-NODEBUG: (memory $0 (shared 23 256)) + (memory $0 (shared 23 256)) +) diff --git a/test/lit/basic/min.wast b/test/lit/basic/min.wast new file mode 100644 index 000000000..74898f59f --- /dev/null +++ b/test/lit/basic/min.wast @@ -0,0 +1,234 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wast -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast +;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +(module + ;; CHECK-TEXT: (type $0 (func (param f32) (result f32))) + ;; CHECK-BIN: (type $0 (func (param f32) (result f32))) + ;; CHECK-BIN-NODEBUG: (type $0 (func (param f32) (result f32))) + (type $0 (func (param f32) (result f32))) + ;; CHECK-TEXT: (type $1 (func (param i32 i32) (result f32))) + ;; CHECK-BIN: (type $1 (func (param i32 i32) (result f32))) + ;; CHECK-BIN-NODEBUG: (type $1 (func (param i32 i32) (result f32))) + (type $1 (func (param i32 i32) (result f32))) + ;; CHECK-TEXT: (type $2 (func (param i32) (result i32))) + ;; CHECK-BIN: (type $2 (func (param i32) (result i32))) + ;; CHECK-BIN-NODEBUG: (type $2 (func (param i32) (result i32))) + (type $2 (func (param i32) (result i32))) + ;; CHECK-TEXT: (type $3 (func (param i32 i32 i32) (result i32))) + ;; CHECK-BIN: (type $3 (func (param i32 i32 i32) (result i32))) + ;; CHECK-BIN-NODEBUG: (type $3 (func (param i32 i32 i32) (result i32))) + (type $3 (func (param i32 i32 i32) (result i32))) + ;; CHECK-TEXT: (memory $0 256 256) + ;; CHECK-BIN: (memory $0 256 256) + ;; CHECK-BIN-NODEBUG: (memory $0 256 256) + (memory $0 256 256) + ;; CHECK-TEXT: (export "floats" (func $floats)) + ;; CHECK-BIN: (export "floats" (func $floats)) + ;; CHECK-BIN-NODEBUG: (export "floats" (func $0)) + (export "floats" (func $floats)) + + ;; CHECK-TEXT: (func $floats (type $0) (param $f f32) (result f32) + ;; CHECK-TEXT-NEXT: (local $t f32) + ;; CHECK-TEXT-NEXT: (f32.add + ;; CHECK-TEXT-NEXT: (local.get $t) + ;; CHECK-TEXT-NEXT: (local.get $f) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $floats (type $0) (param $f f32) (result f32) + ;; CHECK-BIN-NEXT: (local $t f32) + ;; CHECK-BIN-NEXT: (f32.add + ;; CHECK-BIN-NEXT: (local.get $t) + ;; CHECK-BIN-NEXT: (local.get $f) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $floats (type $0) (param $f f32) (result f32) + (local $t f32) + (f32.add + (local.get $t) + (local.get $f) + ) + ) + + ;; CHECK-TEXT: (func $neg (type $1) (param $k i32) (param $p i32) (result f32) + ;; CHECK-TEXT-NEXT: (local $n f32) + ;; CHECK-TEXT-NEXT: (local.tee $n + ;; CHECK-TEXT-NEXT: (f32.neg + ;; CHECK-TEXT-NEXT: (block $block0 (result f32) + ;; CHECK-TEXT-NEXT: (i32.store + ;; CHECK-TEXT-NEXT: (local.get $k) + ;; CHECK-TEXT-NEXT: (local.get $p) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (f32.load + ;; CHECK-TEXT-NEXT: (local.get $k) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $neg (type $1) (param $k i32) (param $p i32) (result f32) + ;; CHECK-BIN-NEXT: (local $n f32) + ;; CHECK-BIN-NEXT: (local.tee $n + ;; CHECK-BIN-NEXT: (f32.neg + ;; CHECK-BIN-NEXT: (block $label$1 (result f32) + ;; CHECK-BIN-NEXT: (i32.store + ;; CHECK-BIN-NEXT: (local.get $k) + ;; CHECK-BIN-NEXT: (local.get $p) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (f32.load + ;; CHECK-BIN-NEXT: (local.get $k) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $neg (type $1) (param $k i32) (param $p i32) (result f32) + (local $n f32) + (local.tee $n + (f32.neg + (block $block0 (result f32) + (i32.store + (local.get $k) + (local.get $p) + ) + (f32.load + (local.get $k) + ) + ) + ) + ) + ) + + ;; CHECK-TEXT: (func $littleswitch (type $2) (param $x i32) (result i32) + ;; CHECK-TEXT-NEXT: (block $topmost (result i32) + ;; CHECK-TEXT-NEXT: (block $switch-case$2 + ;; CHECK-TEXT-NEXT: (block $switch-case$1 + ;; CHECK-TEXT-NEXT: (br_table $switch-case$1 $switch-case$2 $switch-case$1 + ;; CHECK-TEXT-NEXT: (i32.sub + ;; CHECK-TEXT-NEXT: (local.get $x) + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (br $topmost + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (br $topmost + ;; CHECK-TEXT-NEXT: (i32.const 2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $littleswitch (type $2) (param $x i32) (result i32) + ;; CHECK-BIN-NEXT: (block $label$1 (result i32) + ;; CHECK-BIN-NEXT: (block $label$2 + ;; CHECK-BIN-NEXT: (block $label$3 + ;; CHECK-BIN-NEXT: (br_table $label$3 $label$2 $label$3 + ;; CHECK-BIN-NEXT: (i32.sub + ;; CHECK-BIN-NEXT: (local.get $x) + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (br $label$1 + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (br $label$1 + ;; CHECK-BIN-NEXT: (i32.const 2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $littleswitch (type $2) (param $x i32) (result i32) + (block $topmost (result i32) + (block $switch-case$2 + (block $switch-case$1 + (br_table $switch-case$1 $switch-case$2 $switch-case$1 + (i32.sub + (local.get $x) + (i32.const 1) + ) + ) + ) + (br $topmost + (i32.const 1) + ) + ) + (br $topmost + (i32.const 2) + ) + (i32.const 0) + ) + ) + + ;; CHECK-TEXT: (func $f1 (type $3) (param $i1 i32) (param $i2 i32) (param $i3 i32) (result i32) + ;; CHECK-TEXT-NEXT: (block $topmost (result i32) + ;; CHECK-TEXT-NEXT: (local.get $i3) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f1 (type $3) (param $i1 i32) (param $i2 i32) (param $i3 i32) (result i32) + ;; CHECK-BIN-NEXT: (local.get $i3) + ;; CHECK-BIN-NEXT: ) + (func $f1 (type $3) (param $i1 i32) (param $i2 i32) (param $i3 i32) (result i32) + (block $topmost (result i32) + (local.get $i3) + ) + ) +) +;; CHECK-BIN-NODEBUG: (func $0 (type $0) (param $0 f32) (result f32) +;; CHECK-BIN-NODEBUG-NEXT: (local $1 f32) +;; CHECK-BIN-NODEBUG-NEXT: (f32.add +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $1 (type $1) (param $0 i32) (param $1 i32) (result f32) +;; CHECK-BIN-NODEBUG-NEXT: (local $2 f32) +;; CHECK-BIN-NODEBUG-NEXT: (local.tee $2 +;; CHECK-BIN-NODEBUG-NEXT: (f32.neg +;; CHECK-BIN-NODEBUG-NEXT: (block $label$1 (result f32) +;; CHECK-BIN-NODEBUG-NEXT: (i32.store +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (f32.load +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $2 (type $2) (param $0 i32) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (block $label$1 (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (block $label$2 +;; CHECK-BIN-NODEBUG-NEXT: (block $label$3 +;; CHECK-BIN-NODEBUG-NEXT: (br_table $label$3 $label$2 $label$3 +;; CHECK-BIN-NODEBUG-NEXT: (i32.sub +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (br $label$1 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (br $label$1 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $3 (type $3) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) diff --git a/test/lit/basic/multi-memories-atomics64.wast b/test/lit/basic/multi-memories-atomics64.wast new file mode 100644 index 000000000..79afddb3b --- /dev/null +++ b/test/lit/basic/multi-memories-atomics64.wast @@ -0,0 +1,1421 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wast -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast +;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +(module + ;; CHECK-TEXT: (type $0 (func)) + ;; CHECK-BIN: (type $0 (func)) + ;; CHECK-BIN-NODEBUG: (type $0 (func)) + (type $0 (func)) + ;; CHECK-TEXT: (memory $appMemory (shared i64 23 256)) + ;; CHECK-BIN: (memory $appMemory (shared i64 23 256)) + (memory $appMemory (shared i64 23 256)) + ;; CHECK-TEXT: (memory $dataMemory (shared i64 23 256)) + ;; CHECK-BIN: (memory $dataMemory (shared i64 23 256)) + (memory $dataMemory (shared i64 23 256)) + ;; CHECK-TEXT: (memory $instrumentMemory (shared i64 23 256)) + ;; CHECK-BIN: (memory $instrumentMemory (shared i64 23 256)) + (memory $instrumentMemory (shared i64 23 256)) + + ;; CHECK-TEXT: (func $atomic-loadstore (type $0) + ;; CHECK-TEXT-NEXT: (local $0 i64) + ;; CHECK-TEXT-NEXT: (local $1 i64) + ;; CHECK-TEXT-NEXT: (local $2 i32) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.atomic.load8_u $appMemory offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.atomic.load8_u $appMemory offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.atomic.load16_u $dataMemory offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.atomic.load16_u $instrumentMemory offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.atomic.load $dataMemory offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.atomic.load $appMemory offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.atomic.load8_u $appMemory + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.atomic.load8_u $dataMemory + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.atomic.load16_u $appMemory + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.atomic.load16_u $appMemory + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.atomic.load32_u $instrumentMemory + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.atomic.load32_u $appMemory + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.atomic.load $appMemory + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.atomic.load $instrumentMemory + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i32.atomic.store $appMemory offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i32.atomic.store $appMemory offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i32.atomic.store8 $instrumentMemory offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i32.atomic.store8 $dataMemory offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i32.atomic.store16 $appMemory offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i32.atomic.store16 $dataMemory offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i64.atomic.store $appMemory offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i64.atomic.store $appMemory offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i64.atomic.store8 $dataMemory offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i64.atomic.store8 $instrumentMemory offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i64.atomic.store16 $appMemory offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i64.atomic.store16 $appMemory offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i64.atomic.store32 $instrumentMemory offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i64.atomic.store32 $dataMemory offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $atomic-loadstore (type $0) + ;; CHECK-BIN-NEXT: (local $0 i64) + ;; CHECK-BIN-NEXT: (local $1 i64) + ;; CHECK-BIN-NEXT: (local $2 i32) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.atomic.load8_u $appMemory offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.atomic.load8_u $appMemory offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.atomic.load16_u $dataMemory offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.atomic.load16_u $instrumentMemory offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.atomic.load $dataMemory offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.atomic.load $appMemory offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.atomic.load8_u $appMemory + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.atomic.load8_u $dataMemory + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.atomic.load16_u $appMemory + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.atomic.load16_u $appMemory + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.atomic.load32_u $instrumentMemory + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.atomic.load32_u $appMemory + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.atomic.load $appMemory + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.atomic.load $instrumentMemory + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i32.atomic.store $appMemory offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i32.atomic.store $appMemory offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i32.atomic.store8 $instrumentMemory offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i32.atomic.store8 $dataMemory offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i32.atomic.store16 $appMemory offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i32.atomic.store16 $dataMemory offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i64.atomic.store $appMemory offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i64.atomic.store $appMemory offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i64.atomic.store8 $dataMemory offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i64.atomic.store8 $instrumentMemory offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i64.atomic.store16 $appMemory offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i64.atomic.store16 $appMemory offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i64.atomic.store32 $instrumentMemory offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i64.atomic.store32 $dataMemory offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $atomic-loadstore + (local $0 i64) + (local $1 i64) + (local $2 i32) + (drop + (i32.atomic.load8_u $appMemory offset=4 + (local.get $0) + ) + ) + (drop + (i32.atomic.load8_u $appMemory offset=4 + (local.get $0) + ) + ) + (drop + (i32.atomic.load16_u $dataMemory offset=4 + (local.get $0) + ) + ) + (drop + (i32.atomic.load16_u $instrumentMemory offset=4 + (local.get $0) + ) + ) + (drop + (i32.atomic.load $dataMemory offset=4 + (local.get $0) + ) + ) + (drop + (i32.atomic.load $appMemory offset=4 + (local.get $0) + ) + ) + (drop + (i64.atomic.load8_u $appMemory + (local.get $0) + ) + ) + (drop + (i64.atomic.load8_u $dataMemory + (local.get $0) + ) + ) + (drop + (i64.atomic.load16_u $appMemory + (local.get $0) + ) + ) + (drop + (i64.atomic.load16_u $appMemory + (local.get $0) + ) + ) + (drop + (i64.atomic.load32_u $instrumentMemory + (local.get $0) + ) + ) + (drop + (i64.atomic.load32_u $appMemory + (local.get $0) + ) + ) + (drop + (i64.atomic.load $appMemory + (local.get $0) + ) + ) + (drop + (i64.atomic.load $instrumentMemory + (local.get $0) + ) + ) + (i32.atomic.store $appMemory offset=4 + (local.get $0) + (local.get $2) + ) + (i32.atomic.store $appMemory offset=4 + (local.get $0) + (local.get $2) + ) + (i32.atomic.store8 $instrumentMemory offset=4 + (local.get $0) + (local.get $2) + ) + (i32.atomic.store8 $dataMemory offset=4 + (local.get $0) + (local.get $2) + ) + (i32.atomic.store16 $appMemory offset=4 + (local.get $0) + (local.get $2) + ) + (i32.atomic.store16 $dataMemory offset=4 + (local.get $0) + (local.get $2) + ) + (i64.atomic.store $appMemory offset=4 + (local.get $0) + (local.get $1) + ) + (i64.atomic.store $appMemory offset=4 + (local.get $0) + (local.get $1) + ) + (i64.atomic.store8 $dataMemory offset=4 + (local.get $0) + (local.get $1) + ) + (i64.atomic.store8 $instrumentMemory offset=4 + (local.get $0) + (local.get $1) + ) + (i64.atomic.store16 $appMemory offset=4 + (local.get $0) + (local.get $1) + ) + (i64.atomic.store16 $appMemory offset=4 + (local.get $0) + (local.get $1) + ) + (i64.atomic.store32 $instrumentMemory offset=4 + (local.get $0) + (local.get $1) + ) + (i64.atomic.store32 $dataMemory offset=4 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $atomic-rmw (type $0) + ;; CHECK-TEXT-NEXT: (local $0 i64) + ;; CHECK-TEXT-NEXT: (local $1 i64) + ;; CHECK-TEXT-NEXT: (local $2 i32) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.atomic.rmw.add $dataMemory offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.atomic.rmw.add $instrumentMemory offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.atomic.rmw8.add_u $appMemory offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.atomic.rmw8.add_u $appMemory offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.atomic.rmw16.and_u $dataMemory + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.atomic.rmw16.and_u $instrumentMemory + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.atomic.rmw32.or_u $appMemory + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.atomic.rmw32.or_u $appMemory + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.atomic.rmw8.xchg_u $appMemory + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.atomic.rmw8.xchg_u $dataMemory + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $atomic-rmw (type $0) + ;; CHECK-BIN-NEXT: (local $0 i64) + ;; CHECK-BIN-NEXT: (local $1 i64) + ;; CHECK-BIN-NEXT: (local $2 i32) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.atomic.rmw.add $dataMemory offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.atomic.rmw.add $instrumentMemory offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.atomic.rmw8.add_u $appMemory offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.atomic.rmw8.add_u $appMemory offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.atomic.rmw16.and_u $dataMemory + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.atomic.rmw16.and_u $instrumentMemory + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.atomic.rmw32.or_u $appMemory + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.atomic.rmw32.or_u $appMemory + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.atomic.rmw8.xchg_u $appMemory + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.atomic.rmw8.xchg_u $dataMemory + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $atomic-rmw + (local $0 i64) + (local $1 i64) + (local $2 i32) + (drop + (i32.atomic.rmw.add $dataMemory offset=4 + (local.get $0) + (local.get $2) + ) + ) + (drop + (i32.atomic.rmw.add $instrumentMemory offset=4 + (local.get $0) + (local.get $2) + ) + ) + (drop + (i32.atomic.rmw8.add_u $appMemory offset=4 + (local.get $0) + (local.get $2) + ) + ) + (drop + (i32.atomic.rmw8.add_u $appMemory offset=4 + (local.get $0) + (local.get $2) + ) + ) + (drop + (i32.atomic.rmw16.and_u $dataMemory + (local.get $0) + (local.get $2) + ) + ) + (drop + (i32.atomic.rmw16.and_u $instrumentMemory + (local.get $0) + (local.get $2) + ) + ) + (drop + (i64.atomic.rmw32.or_u $appMemory + (local.get $0) + (local.get $1) + ) + ) + (drop + (i64.atomic.rmw32.or_u $appMemory + (local.get $0) + (local.get $1) + ) + ) + (drop + (i32.atomic.rmw8.xchg_u $appMemory + (local.get $0) + (local.get $2) + ) + ) + (drop + (i32.atomic.rmw8.xchg_u $dataMemory + (local.get $0) + (local.get $2) + ) + ) + ) + + ;; CHECK-TEXT: (func $atomic-cmpxchg (type $0) + ;; CHECK-TEXT-NEXT: (local $0 i64) + ;; CHECK-TEXT-NEXT: (local $1 i64) + ;; CHECK-TEXT-NEXT: (local $2 i32) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.atomic.rmw.cmpxchg $appMemory offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.atomic.rmw.cmpxchg $instrumentMemory offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.atomic.rmw8.cmpxchg_u $appMemory + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.atomic.rmw8.cmpxchg_u $appMemory + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.atomic.rmw.cmpxchg $appMemory offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.atomic.rmw.cmpxchg $dataMemory offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.atomic.rmw32.cmpxchg_u $instrumentMemory + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.atomic.rmw32.cmpxchg_u $dataMemory + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $atomic-cmpxchg (type $0) + ;; CHECK-BIN-NEXT: (local $0 i64) + ;; CHECK-BIN-NEXT: (local $1 i64) + ;; CHECK-BIN-NEXT: (local $2 i32) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.atomic.rmw.cmpxchg $appMemory offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.atomic.rmw.cmpxchg $instrumentMemory offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.atomic.rmw8.cmpxchg_u $appMemory + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.atomic.rmw8.cmpxchg_u $appMemory + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.atomic.rmw.cmpxchg $appMemory offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.atomic.rmw.cmpxchg $dataMemory offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.atomic.rmw32.cmpxchg_u $instrumentMemory + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.atomic.rmw32.cmpxchg_u $dataMemory + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $atomic-cmpxchg + (local $0 i64) + (local $1 i64) + (local $2 i32) + (drop + (i32.atomic.rmw.cmpxchg $appMemory offset=4 + (local.get $0) + (local.get $2) + (local.get $2) + ) + ) + (drop + (i32.atomic.rmw.cmpxchg $instrumentMemory offset=4 + (local.get $0) + (local.get $2) + (local.get $2) + ) + ) + (drop + (i32.atomic.rmw8.cmpxchg_u $appMemory + (local.get $0) + (local.get $2) + (local.get $2) + ) + ) + (drop + (i32.atomic.rmw8.cmpxchg_u $appMemory + (local.get $0) + (local.get $2) + (local.get $2) + ) + ) + (drop + (i64.atomic.rmw.cmpxchg $appMemory offset=4 + (local.get $0) + (local.get $1) + (local.get $1) + ) + ) + (drop + (i64.atomic.rmw.cmpxchg $dataMemory offset=4 + (local.get $0) + (local.get $1) + (local.get $1) + ) + ) + (drop + (i64.atomic.rmw32.cmpxchg_u $instrumentMemory + (local.get $0) + (local.get $1) + (local.get $1) + ) + ) + (drop + (i64.atomic.rmw32.cmpxchg_u $dataMemory + (local.get $0) + (local.get $1) + (local.get $1) + ) + ) + ) + + ;; CHECK-TEXT: (func $atomic-wait-notify (type $0) + ;; CHECK-TEXT-NEXT: (local $0 i64) + ;; CHECK-TEXT-NEXT: (local $1 i64) + ;; CHECK-TEXT-NEXT: (local $2 i32) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (memory.atomic.wait32 $dataMemory + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (memory.atomic.wait32 $instrumentMemory + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (memory.atomic.wait32 $appMemory offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (memory.atomic.wait32 $instrumentMemory offset=4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (memory.atomic.notify $dataMemory + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (memory.atomic.notify $dataMemory + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (memory.atomic.notify $appMemory offset=24 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (memory.atomic.notify $dataMemory offset=24 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (memory.atomic.wait64 $instrumentMemory + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (memory.atomic.wait64 $instrumentMemory + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (memory.atomic.wait64 $appMemory offset=16 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (memory.atomic.wait64 $appMemory offset=16 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $atomic-wait-notify (type $0) + ;; CHECK-BIN-NEXT: (local $0 i64) + ;; CHECK-BIN-NEXT: (local $1 i64) + ;; CHECK-BIN-NEXT: (local $2 i32) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (memory.atomic.wait32 $dataMemory + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (memory.atomic.wait32 $instrumentMemory + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (memory.atomic.wait32 $appMemory offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (memory.atomic.wait32 $instrumentMemory offset=4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (memory.atomic.notify $dataMemory + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (memory.atomic.notify $dataMemory + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (memory.atomic.notify $appMemory offset=24 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (memory.atomic.notify $dataMemory offset=24 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (memory.atomic.wait64 $instrumentMemory + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (memory.atomic.wait64 $instrumentMemory + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (memory.atomic.wait64 $appMemory offset=16 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (memory.atomic.wait64 $appMemory offset=16 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $atomic-wait-notify + (local $0 i64) + (local $1 i64) + (local $2 i32) + (drop + (memory.atomic.wait32 $dataMemory + (local.get $0) + (local.get $2) + (local.get $1) + ) + ) + (drop + (memory.atomic.wait32 $instrumentMemory + (local.get $0) + (local.get $2) + (local.get $1) + ) + ) + (drop + (memory.atomic.wait32 $appMemory offset=4 + (local.get $0) + (local.get $2) + (local.get $1) + ) + ) + (drop + (memory.atomic.wait32 $instrumentMemory offset=4 + (local.get $0) + (local.get $2) + (local.get $1) + ) + ) + (drop + (memory.atomic.notify $dataMemory + (local.get $0) + (local.get $2) + ) + ) + (drop + (memory.atomic.notify $dataMemory + (local.get $0) + (local.get $2) + ) + ) + (drop + (memory.atomic.notify $appMemory offset=24 + (local.get $0) + (local.get $2) + ) + ) + (drop + (memory.atomic.notify $dataMemory offset=24 + (local.get $0) + (local.get $2) + ) + ) + (drop + (memory.atomic.wait64 $instrumentMemory + (local.get $0) + (local.get $1) + (local.get $1) + ) + ) + (drop + (memory.atomic.wait64 $instrumentMemory + (local.get $0) + (local.get $1) + (local.get $1) + ) + ) + (drop + (memory.atomic.wait64 $appMemory offset=16 + (local.get $0) + (local.get $1) + (local.get $1) + ) + ) + (drop + (memory.atomic.wait64 $appMemory offset=16 + (local.get $0) + (local.get $1) + (local.get $1) + ) + ) + ) + + ;; CHECK-TEXT: (func $atomic-fence (type $0) + ;; CHECK-TEXT-NEXT: (atomic.fence) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $atomic-fence (type $0) + ;; CHECK-BIN-NEXT: (atomic.fence) + ;; CHECK-BIN-NEXT: ) + (func $atomic-fence + (atomic.fence) + ) +) +;; CHECK-BIN-NODEBUG: (memory $0 (shared i64 23 256)) + +;; CHECK-BIN-NODEBUG: (memory $1 (shared i64 23 256)) + +;; CHECK-BIN-NODEBUG: (memory $2 (shared i64 23 256)) + +;; CHECK-BIN-NODEBUG: (func $0 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (local $0 i64) +;; CHECK-BIN-NODEBUG-NEXT: (local $1 i64) +;; CHECK-BIN-NODEBUG-NEXT: (local $2 i32) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.load8_u $0 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.load8_u $0 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.load16_u $1 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.load16_u $2 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.load $1 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.load $0 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.load8_u $0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.load8_u $1 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.load16_u $0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.load16_u $0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.load32_u $2 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.load32_u $0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.load $0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.load $2 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.store $0 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.store $0 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.store8 $2 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.store8 $1 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.store16 $0 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.store16 $1 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.store $0 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.store $0 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.store8 $1 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.store8 $2 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.store16 $0 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.store16 $0 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.store32 $2 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.store32 $1 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $1 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (local $0 i64) +;; CHECK-BIN-NODEBUG-NEXT: (local $1 i64) +;; CHECK-BIN-NODEBUG-NEXT: (local $2 i32) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.rmw.add $1 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.rmw.add $2 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.rmw8.add_u $0 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.rmw8.add_u $0 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.rmw16.and_u $1 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.rmw16.and_u $2 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.rmw32.or_u $0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.rmw32.or_u $0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.rmw8.xchg_u $0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.rmw8.xchg_u $1 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $2 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (local $0 i64) +;; CHECK-BIN-NODEBUG-NEXT: (local $1 i64) +;; CHECK-BIN-NODEBUG-NEXT: (local $2 i32) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.rmw.cmpxchg $0 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.rmw.cmpxchg $2 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.rmw8.cmpxchg_u $0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.atomic.rmw8.cmpxchg_u $0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.rmw.cmpxchg $0 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.rmw.cmpxchg $1 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.rmw32.cmpxchg_u $2 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.atomic.rmw32.cmpxchg_u $1 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $3 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (local $0 i64) +;; CHECK-BIN-NODEBUG-NEXT: (local $1 i64) +;; CHECK-BIN-NODEBUG-NEXT: (local $2 i32) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (memory.atomic.wait32 $1 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (memory.atomic.wait32 $2 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (memory.atomic.wait32 $0 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (memory.atomic.wait32 $2 offset=4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (memory.atomic.notify $1 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (memory.atomic.notify $1 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (memory.atomic.notify $0 offset=24 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (memory.atomic.notify $1 offset=24 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (memory.atomic.wait64 $2 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (memory.atomic.wait64 $2 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (memory.atomic.wait64 $0 offset=16 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (memory.atomic.wait64 $0 offset=16 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $4 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (atomic.fence) +;; CHECK-BIN-NODEBUG-NEXT: ) diff --git a/test/lit/basic/multi-memories-basics.wast b/test/lit/basic/multi-memories-basics.wast new file mode 100644 index 000000000..c9e4d6c7e --- /dev/null +++ b/test/lit/basic/multi-memories-basics.wast @@ -0,0 +1,490 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wast -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast +;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +(module + ;; CHECK-TEXT: (type $none_=>_none (func)) + ;; CHECK-BIN: (type $none_=>_none (func)) + (type $none_=>_none (func)) + ;; CHECK-TEXT: (type $none_=>_i32 (func (result i32))) + ;; CHECK-BIN: (type $none_=>_i32 (func (result i32))) + (type $none_=>_i32 (func (result i32))) + ;; CHECK-TEXT: (import "env" "memory" (memory $importedMemory 1 1)) + ;; CHECK-BIN: (import "env" "memory" (memory $importedMemory 1 1)) + ;; CHECK-BIN-NODEBUG: (type $0 (func)) + + ;; CHECK-BIN-NODEBUG: (type $1 (func (result i32))) + + ;; CHECK-BIN-NODEBUG: (import "env" "memory" (memory $mimport$0 1 1)) + (import "env" "memory" (memory $importedMemory 1 1)) + ;; CHECK-TEXT: (memory $memory1 1 500) + ;; CHECK-BIN: (memory $memory1 1 500) + (memory $memory1 1 500) + ;; CHECK-TEXT: (memory $memory2 1 800) + ;; CHECK-BIN: (memory $memory2 1 800) + (memory $memory2 1 800) + ;; CHECK-TEXT: (memory $memory3 1 400) + ;; CHECK-BIN: (memory $memory3 1 400) + (memory $memory3 1 400) + (data (i32.const 0) "abcd") + + ;; CHECK-TEXT: (data $0 (i32.const 0) "abcd") + + ;; CHECK-TEXT: (func $memory.fill (type $none_=>_none) + ;; CHECK-TEXT-NEXT: (memory.fill $memory2 + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: (i32.const 2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (data $0 (i32.const 0) "abcd") + + ;; CHECK-BIN: (func $memory.fill (type $none_=>_none) + ;; CHECK-BIN-NEXT: (memory.fill $memory2 + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: (i32.const 2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $memory.fill + (memory.fill $memory2 + (i32.const 0) + (i32.const 1) + (i32.const 2) + ) + ) + + ;; CHECK-TEXT: (func $memory.copy (type $none_=>_none) + ;; CHECK-TEXT-NEXT: (memory.copy $memory2 $memory3 + ;; CHECK-TEXT-NEXT: (i32.const 512) + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: (i32.const 12) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $memory.copy (type $none_=>_none) + ;; CHECK-BIN-NEXT: (memory.copy $memory2 $memory3 + ;; CHECK-BIN-NEXT: (i32.const 512) + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: (i32.const 12) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $memory.copy + (memory.copy $memory2 $memory3 + (i32.const 512) + (i32.const 0) + (i32.const 12) + ) + ) + + ;; CHECK-TEXT: (func $memory.init (type $none_=>_none) + ;; CHECK-TEXT-NEXT: (memory.init $memory1 $0 + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: (i32.const 45) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $memory.init (type $none_=>_none) + ;; CHECK-BIN-NEXT: (memory.init $memory1 $0 + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: (i32.const 45) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $memory.init + (memory.init $memory1 0 + (i32.const 0) + (i32.const 0) + (i32.const 45) + ) + ) + + ;; CHECK-TEXT: (func $memory.grow (type $none_=>_i32) (result i32) + ;; CHECK-TEXT-NEXT: (memory.grow $memory3 + ;; CHECK-TEXT-NEXT: (i32.const 10) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $memory.grow (type $none_=>_i32) (result i32) + ;; CHECK-BIN-NEXT: (memory.grow $memory3 + ;; CHECK-BIN-NEXT: (i32.const 10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $memory.grow (result i32) + (memory.grow $memory3 + (i32.const 10) + ) + ) + + ;; CHECK-TEXT: (func $memory.size (type $none_=>_i32) (result i32) + ;; CHECK-TEXT-NEXT: (memory.size $memory3) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $memory.size (type $none_=>_i32) (result i32) + ;; CHECK-BIN-NEXT: (memory.size $memory3) + ;; CHECK-BIN-NEXT: ) + (func $memory.size (result i32) + (memory.size $memory3) + ) + + ;; CHECK-TEXT: (func $loads (type $none_=>_none) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.load $memory1 + ;; CHECK-TEXT-NEXT: (i32.const 12) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.load $memory3 + ;; CHECK-TEXT-NEXT: (i32.const 12) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.load16_s $memory2 + ;; CHECK-TEXT-NEXT: (i32.const 12) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.load16_s $memory2 + ;; CHECK-TEXT-NEXT: (i32.const 12) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.load8_s $memory3 + ;; CHECK-TEXT-NEXT: (i32.const 12) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.load8_s $memory3 + ;; CHECK-TEXT-NEXT: (i32.const 12) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.load16_u $memory1 + ;; CHECK-TEXT-NEXT: (i32.const 12) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.load16_u $memory1 + ;; CHECK-TEXT-NEXT: (i32.const 12) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.load8_u $memory2 + ;; CHECK-TEXT-NEXT: (i32.const 12) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.load8_u $memory2 + ;; CHECK-TEXT-NEXT: (i32.const 12) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $loads (type $none_=>_none) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.load $memory1 + ;; CHECK-BIN-NEXT: (i32.const 12) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.load $memory3 + ;; CHECK-BIN-NEXT: (i32.const 12) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.load16_s $memory2 + ;; CHECK-BIN-NEXT: (i32.const 12) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.load16_s $memory2 + ;; CHECK-BIN-NEXT: (i32.const 12) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.load8_s $memory3 + ;; CHECK-BIN-NEXT: (i32.const 12) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.load8_s $memory3 + ;; CHECK-BIN-NEXT: (i32.const 12) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.load16_u $memory1 + ;; CHECK-BIN-NEXT: (i32.const 12) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.load16_u $memory1 + ;; CHECK-BIN-NEXT: (i32.const 12) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.load8_u $memory2 + ;; CHECK-BIN-NEXT: (i32.const 12) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.load8_u $memory2 + ;; CHECK-BIN-NEXT: (i32.const 12) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $loads + (drop + (i32.load $memory1 + (i32.const 12) + ) + ) + (drop + (i32.load $memory3 + (i32.const 12) + ) + ) + (drop + (i32.load16_s $memory2 + (i32.const 12) + ) + ) + (drop + (i32.load16_s $memory2 + (i32.const 12) + ) + ) + (drop + (i32.load8_s $memory3 + (i32.const 12) + ) + ) + (drop + (i32.load8_s $memory3 + (i32.const 12) + ) + ) + (drop + (i32.load16_u $memory1 + (i32.const 12) + ) + ) + (drop + (i32.load16_u $memory1 + (i32.const 12) + ) + ) + (drop + (i32.load8_u $memory2 + (i32.const 12) + ) + ) + (drop + (i32.load8_u $memory2 + (i32.const 12) + ) + ) + ) + + ;; CHECK-TEXT: (func $stores (type $none_=>_none) + ;; CHECK-TEXT-NEXT: (i32.store $memory1 + ;; CHECK-TEXT-NEXT: (i32.const 12) + ;; CHECK-TEXT-NEXT: (i32.const 115) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i32.store $memory1 + ;; CHECK-TEXT-NEXT: (i32.const 12) + ;; CHECK-TEXT-NEXT: (i32.const 115) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i32.store16 $memory2 + ;; CHECK-TEXT-NEXT: (i32.const 20) + ;; CHECK-TEXT-NEXT: (i32.const 31353) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i32.store16 $importedMemory + ;; CHECK-TEXT-NEXT: (i32.const 20) + ;; CHECK-TEXT-NEXT: (i32.const 31353) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i32.store8 $memory3 + ;; CHECK-TEXT-NEXT: (i32.const 23) + ;; CHECK-TEXT-NEXT: (i32.const 120) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i32.store8 $memory3 + ;; CHECK-TEXT-NEXT: (i32.const 23) + ;; CHECK-TEXT-NEXT: (i32.const 120) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $stores (type $none_=>_none) + ;; CHECK-BIN-NEXT: (i32.store $memory1 + ;; CHECK-BIN-NEXT: (i32.const 12) + ;; CHECK-BIN-NEXT: (i32.const 115) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i32.store $memory1 + ;; CHECK-BIN-NEXT: (i32.const 12) + ;; CHECK-BIN-NEXT: (i32.const 115) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i32.store16 $memory2 + ;; CHECK-BIN-NEXT: (i32.const 20) + ;; CHECK-BIN-NEXT: (i32.const 31353) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i32.store16 $importedMemory + ;; CHECK-BIN-NEXT: (i32.const 20) + ;; CHECK-BIN-NEXT: (i32.const 31353) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i32.store8 $memory3 + ;; CHECK-BIN-NEXT: (i32.const 23) + ;; CHECK-BIN-NEXT: (i32.const 120) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i32.store8 $memory3 + ;; CHECK-BIN-NEXT: (i32.const 23) + ;; CHECK-BIN-NEXT: (i32.const 120) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $stores + (i32.store $memory1 + (i32.const 12) + (i32.const 115) + ) + (i32.store $memory1 + (i32.const 12) + (i32.const 115) + ) + (i32.store16 $memory2 + (i32.const 20) + (i32.const 31353) + ) + (i32.store16 $importedMemory + (i32.const 20) + (i32.const 31353) + ) + (i32.store8 $memory3 + (i32.const 23) + (i32.const 120) + ) + (i32.store8 $memory3 + (i32.const 23) + (i32.const 120) + ) + ) +) +;; CHECK-BIN-NODEBUG: (memory $0 1 500) + +;; CHECK-BIN-NODEBUG: (memory $1 1 800) + +;; CHECK-BIN-NODEBUG: (memory $2 1 400) + +;; CHECK-BIN-NODEBUG: (data $0 (i32.const 0) "abcd") + +;; CHECK-BIN-NODEBUG: (func $0 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (memory.fill $1 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $1 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (memory.copy $1 $2 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 512) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 12) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $2 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (memory.init $0 $0 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 45) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $3 (type $1) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (memory.grow $2 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $4 (type $1) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (memory.size $2) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $5 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.load $0 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 12) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.load $2 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 12) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.load16_s $1 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 12) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.load16_s $1 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 12) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.load8_s $2 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 12) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.load8_s $2 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 12) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.load16_u $0 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 12) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.load16_u $0 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 12) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.load8_u $1 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 12) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.load8_u $1 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 12) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $6 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (i32.store $0 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 12) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 115) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i32.store $0 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 12) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 115) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i32.store16 $1 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 20) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 31353) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i32.store16 $mimport$0 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 20) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 31353) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i32.store8 $2 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 23) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 120) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i32.store8 $2 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 23) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 120) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) diff --git a/test/lit/basic/multi-memories-simd.wast b/test/lit/basic/multi-memories-simd.wast new file mode 100644 index 000000000..edc2bb874 --- /dev/null +++ b/test/lit/basic/multi-memories-simd.wast @@ -0,0 +1,1399 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wast -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast +;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +(module + ;; CHECK-TEXT: (type $i32_=>_v128 (func (param i32) (result v128))) + ;; CHECK-BIN: (type $i32_=>_v128 (func (param i32) (result v128))) + (type $i32_=>_v128 (func (param i32) (result v128))) + ;; CHECK-TEXT: (type $i32_v128_=>_none (func (param i32 v128))) + ;; CHECK-BIN: (type $i32_v128_=>_none (func (param i32 v128))) + (type $i32_v128_=>_none (func (param i32 v128))) + ;; CHECK-TEXT: (type $i32_v128_=>_v128 (func (param i32 v128) (result v128))) + ;; CHECK-BIN: (type $i32_v128_=>_v128 (func (param i32 v128) (result v128))) + (type $i32_v128_=>_v128 (func (param i32 v128) (result v128))) + ;; CHECK-TEXT: (memory $memorya 1 1) + ;; CHECK-BIN: (memory $memorya 1 1) + (memory $memorya 1 1) + ;; CHECK-TEXT: (memory $memoryb 1 1) + ;; CHECK-BIN: (memory $memoryb 1 1) + (memory $memoryb 1 1) + ;; CHECK-TEXT: (memory $memoryc 1 1) + ;; CHECK-BIN: (memory $memoryc 1 1) + (memory $memoryc 1 1) + ;; CHECK-TEXT: (memory $memoryd 1 1) + ;; CHECK-BIN: (memory $memoryd 1 1) + (memory $memoryd 1 1) + + ;; CHECK-TEXT: (func $v128.load (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load $memorya + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (v128.load $memorya + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load (param $0 i32) (result v128) + (v128.load $memorya + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load2 (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load $memoryb + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load2 (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (v128.load $memoryb + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load2 (param $0 i32) (result v128) + (v128.load $memoryb + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load8x8_s (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load8x8_s $memoryc + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load8x8_s (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (v128.load8x8_s $memoryc + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load8x8_s (param $0 i32) (result v128) + (v128.load8x8_s $memoryc + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load8x8_s2 (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load8x8_s $memoryb + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load8x8_s2 (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (v128.load8x8_s $memoryb + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load8x8_s2 (param $0 i32) (result v128) + (v128.load8x8_s $memoryb + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load8x8_u (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load8x8_u $memoryd + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load8x8_u (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (v128.load8x8_u $memoryd + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load8x8_u (param $0 i32) (result v128) + (v128.load8x8_u $memoryd + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load8x8_u2 (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load8x8_u $memoryd + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load8x8_u2 (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (v128.load8x8_u $memoryd + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load8x8_u2 (param $0 i32) (result v128) + (v128.load8x8_u $memoryd + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load16x4_s (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load16x4_s $memorya + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load16x4_s (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (v128.load16x4_s $memorya + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load16x4_s (param $0 i32) (result v128) + (v128.load16x4_s $memorya + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load16x4_s2 (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load16x4_s $memoryb + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load16x4_s2 (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (v128.load16x4_s $memoryb + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load16x4_s2 (param $0 i32) (result v128) + (v128.load16x4_s $memoryb + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load16x4_u (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load16x4_u $memorya + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load16x4_u (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (v128.load16x4_u $memorya + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load16x4_u (param $0 i32) (result v128) + (v128.load16x4_u $memorya + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load16x4_u2 (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load16x4_u $memorya + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load16x4_u2 (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (v128.load16x4_u $memorya + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load16x4_u2 (param $0 i32) (result v128) + (v128.load16x4_u $memorya + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load32x2_s (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load32x2_s $memoryc + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load32x2_s (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (v128.load32x2_s $memoryc + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load32x2_s (param $0 i32) (result v128) + (v128.load32x2_s $memoryc + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load32x2_s2 (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load32x2_s $memoryb + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load32x2_s2 (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (v128.load32x2_s $memoryb + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load32x2_s2 (param $0 i32) (result v128) + (v128.load32x2_s $memoryb + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load32x2_u (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load32x2_u $memoryb + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load32x2_u (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (v128.load32x2_u $memoryb + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load32x2_u (param $0 i32) (result v128) + (v128.load32x2_u $memoryb + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load32x2_u2 (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load32x2_u $memoryc + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load32x2_u2 (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (v128.load32x2_u $memoryc + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load32x2_u2 (param $0 i32) (result v128) + (v128.load32x2_u $memoryc + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load8_splat (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load8_splat $memoryb + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load8_splat (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (v128.load8_splat $memoryb + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load8_splat (param $0 i32) (result v128) + (v128.load8_splat $memoryb + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load8_splat2 (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load8_splat $memoryb + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load8_splat2 (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (v128.load8_splat $memoryb + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load8_splat2 (param $0 i32) (result v128) + (v128.load8_splat $memoryb + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load16_splat (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load16_splat $memorya + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load16_splat (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (v128.load16_splat $memorya + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load16_splat (param $0 i32) (result v128) + (v128.load16_splat $memorya + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load16_splat2 (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load16_splat $memorya + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load16_splat2 (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (v128.load16_splat $memorya + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load16_splat2 (param $0 i32) (result v128) + (v128.load16_splat $memorya + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load32_splat (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load32_splat $memoryb + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load32_splat (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (v128.load32_splat $memoryb + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load32_splat (param $0 i32) (result v128) + (v128.load32_splat $memoryb + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load32_splat2 (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load32_splat $memoryd + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load32_splat2 (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (v128.load32_splat $memoryd + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load32_splat2 (param $0 i32) (result v128) + (v128.load32_splat $memoryd + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load64_splat (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load64_splat $memoryb + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load64_splat (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (v128.load64_splat $memoryb + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load64_splat (param $0 i32) (result v128) + (v128.load64_splat $memoryb + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load64_splat2 (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load64_splat $memorya + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load64_splat2 (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (v128.load64_splat $memorya + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load64_splat2 (param $0 i32) (result v128) + (v128.load64_splat $memorya + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.store (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) + ;; CHECK-TEXT-NEXT: (v128.store $memorya + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.store (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) + ;; CHECK-BIN-NEXT: (v128.store $memorya + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.store (param $0 i32) (param $1 v128) + (v128.store $memorya + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.store2 (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) + ;; CHECK-TEXT-NEXT: (v128.store $memoryb + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.store2 (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) + ;; CHECK-BIN-NEXT: (v128.store $memoryb + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.store2 (param $0 i32) (param $1 v128) + (v128.store $memoryb + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.load8_lane (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load8_lane $memorya 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load8_lane (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (v128.load8_lane $memorya 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load8_lane (param $0 i32) (param $1 v128) (result v128) + (v128.load8_lane $memorya 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.load8_lane2 (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load8_lane $memoryb 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load8_lane2 (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (v128.load8_lane $memoryb 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load8_lane2 (param $0 i32) (param $1 v128) (result v128) + (v128.load8_lane $memoryb 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.load16_lane (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load16_lane $memoryb 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load16_lane (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (v128.load16_lane $memoryb 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load16_lane (param $0 i32) (param $1 v128) (result v128) + (v128.load16_lane $memoryb 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.load16_lane2 (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load16_lane $memoryd 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load16_lane2 (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (v128.load16_lane $memoryd 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load16_lane2 (param $0 i32) (param $1 v128) (result v128) + (v128.load16_lane $memoryd 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.load32_lane (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load32_lane $memorya 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load32_lane (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (v128.load32_lane $memorya 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load32_lane (param $0 i32) (param $1 v128) (result v128) + (v128.load32_lane $memorya 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.load32_lane2 (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load32_lane $memoryb 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load32_lane2 (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (v128.load32_lane $memoryb 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load32_lane2 (param $0 i32) (param $1 v128) (result v128) + (v128.load32_lane $memoryb 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.load64_lane (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load64_lane $memoryd 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load64_lane (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (v128.load64_lane $memoryd 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load64_lane (param $0 i32) (param $1 v128) (result v128) + (v128.load64_lane $memoryd 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.load64_lane2 (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load64_lane $memoryb 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load64_lane2 (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (v128.load64_lane $memoryb 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load64_lane2 (param $0 i32) (param $1 v128) (result v128) + (v128.load64_lane $memoryb 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.load64_lane_align (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load64_lane $memorya align=1 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load64_lane_align (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (v128.load64_lane $memorya align=1 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load64_lane_align (param $0 i32) (param $1 v128) (result v128) + (v128.load64_lane $memorya align=1 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.load64_lane_align2 (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load64_lane $memoryb align=1 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load64_lane_align2 (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (v128.load64_lane $memoryb align=1 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load64_lane_align2 (param $0 i32) (param $1 v128) (result v128) + (v128.load64_lane $memoryb align=1 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.load64_lane_offset (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load64_lane $memoryc offset=32 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load64_lane_offset (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (v128.load64_lane $memoryc offset=32 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load64_lane_offset (param $0 i32) (param $1 v128) (result v128) + (v128.load64_lane $memoryc offset=32 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.load64_lane_offset2 (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load64_lane $memoryb offset=32 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load64_lane_offset2 (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (v128.load64_lane $memoryb offset=32 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load64_lane_offset2 (param $0 i32) (param $1 v128) (result v128) + (v128.load64_lane $memoryb offset=32 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.load64_lane_align_offset (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load64_lane $memorya offset=32 align=1 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load64_lane_align_offset (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (v128.load64_lane $memorya offset=32 align=1 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load64_lane_align_offset (param $0 i32) (param $1 v128) (result v128) + (v128.load64_lane $memorya offset=32 align=1 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.load64_lane_align_offset2 (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load64_lane $memoryd offset=32 align=1 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load64_lane_align_offset2 (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (v128.load64_lane $memoryd offset=32 align=1 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load64_lane_align_offset2 (param $0 i32) (param $1 v128) (result v128) + (v128.load64_lane $memoryd offset=32 align=1 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.store8_lane (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) + ;; CHECK-TEXT-NEXT: (v128.store8_lane $memorya 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.store8_lane (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) + ;; CHECK-BIN-NEXT: (v128.store8_lane $memorya 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.store8_lane (param $0 i32) (param $1 v128) + (v128.store8_lane $memorya 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.store8_lane2 (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) + ;; CHECK-TEXT-NEXT: (v128.store8_lane $memoryd 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.store8_lane2 (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) + ;; CHECK-BIN-NEXT: (v128.store8_lane $memoryd 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.store8_lane2 (param $0 i32) (param $1 v128) + (v128.store8_lane $memoryd 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.store16_lane (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) + ;; CHECK-TEXT-NEXT: (v128.store16_lane $memorya 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.store16_lane (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) + ;; CHECK-BIN-NEXT: (v128.store16_lane $memorya 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.store16_lane (param $0 i32) (param $1 v128) + (v128.store16_lane $memorya 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.store16_lane2 (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) + ;; CHECK-TEXT-NEXT: (v128.store16_lane $memoryb 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.store16_lane2 (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) + ;; CHECK-BIN-NEXT: (v128.store16_lane $memoryb 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.store16_lane2 (param $0 i32) (param $1 v128) + (v128.store16_lane $memoryb 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.store32_lane (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) + ;; CHECK-TEXT-NEXT: (v128.store32_lane $memoryb 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.store32_lane (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) + ;; CHECK-BIN-NEXT: (v128.store32_lane $memoryb 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.store32_lane (param $0 i32) (param $1 v128) + (v128.store32_lane $memoryb 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.store32_lane2 (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) + ;; CHECK-TEXT-NEXT: (v128.store32_lane $memoryc 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.store32_lane2 (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) + ;; CHECK-BIN-NEXT: (v128.store32_lane $memoryc 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.store32_lane2 (param $0 i32) (param $1 v128) + (v128.store32_lane $memoryc 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.store64_lane (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) + ;; CHECK-TEXT-NEXT: (v128.store64_lane $memoryc 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.store64_lane (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) + ;; CHECK-BIN-NEXT: (v128.store64_lane $memoryc 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.store64_lane (param $0 i32) (param $1 v128) + (v128.store64_lane $memoryc 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.store64_lane2 (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) + ;; CHECK-TEXT-NEXT: (v128.store64_lane $memoryb 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.store64_lane2 (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) + ;; CHECK-BIN-NEXT: (v128.store64_lane $memoryb 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.store64_lane2 (param $0 i32) (param $1 v128) + (v128.store64_lane $memoryb 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.store64_lane_align (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) + ;; CHECK-TEXT-NEXT: (v128.store64_lane $memoryb align=1 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.store64_lane_align (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) + ;; CHECK-BIN-NEXT: (v128.store64_lane $memoryb align=1 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.store64_lane_align (param $0 i32) (param $1 v128) + (v128.store64_lane $memoryb align=1 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.store64_lane_align2 (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) + ;; CHECK-TEXT-NEXT: (v128.store64_lane $memorya align=1 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.store64_lane_align2 (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) + ;; CHECK-BIN-NEXT: (v128.store64_lane $memorya align=1 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.store64_lane_align2 (param $0 i32) (param $1 v128) + (v128.store64_lane $memorya align=1 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.store64_lane_offset (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) + ;; CHECK-TEXT-NEXT: (v128.store64_lane $memoryd offset=32 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.store64_lane_offset (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) + ;; CHECK-BIN-NEXT: (v128.store64_lane $memoryd offset=32 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.store64_lane_offset (param $0 i32) (param $1 v128) + (v128.store64_lane $memoryd offset=32 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.store64_lane_offset2 (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) + ;; CHECK-TEXT-NEXT: (v128.store64_lane $memorya offset=32 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.store64_lane_offset2 (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) + ;; CHECK-BIN-NEXT: (v128.store64_lane $memorya offset=32 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.store64_lane_offset2 (param $0 i32) (param $1 v128) + (v128.store64_lane $memorya offset=32 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.store64_lane_align_offset (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) + ;; CHECK-TEXT-NEXT: (v128.store64_lane $memoryb offset=32 align=1 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.store64_lane_align_offset (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) + ;; CHECK-BIN-NEXT: (v128.store64_lane $memoryb offset=32 align=1 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.store64_lane_align_offset (param $0 i32) (param $1 v128) + (v128.store64_lane $memoryb offset=32 align=1 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.store64_lane_align_offset2 (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) + ;; CHECK-TEXT-NEXT: (v128.store64_lane $memoryd offset=32 align=1 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.store64_lane_align_offset2 (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) + ;; CHECK-BIN-NEXT: (v128.store64_lane $memoryd offset=32 align=1 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.store64_lane_align_offset2 (param $0 i32) (param $1 v128) + (v128.store64_lane $memoryd offset=32 align=1 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.load32_zero (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load32_zero $memorya + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load32_zero (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (v128.load32_zero $memorya + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load32_zero (param $0 i32) (result v128) + (v128.load32_zero $memorya + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load32_zero2 (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load32_zero $memoryb + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load32_zero2 (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (v128.load32_zero $memoryb + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load32_zero2 (param $0 i32) (result v128) + (v128.load32_zero $memoryb + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load64_zero (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load64_zero $memoryb + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load64_zero (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (v128.load64_zero $memoryb + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load64_zero (param $0 i32) (result v128) + (v128.load64_zero $memoryb + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load64_zero2 (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load64_zero $memoryc + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load64_zero2 (type $i32_=>_v128) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (v128.load64_zero $memoryc + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load64_zero2 (param $0 i32) (result v128) + (v128.load64_zero $memoryc + (local.get $0) + ) + ) +) +;; CHECK-BIN-NODEBUG: (type $0 (func (param i32) (result v128))) + +;; CHECK-BIN-NODEBUG: (type $1 (func (param i32 v128))) + +;; CHECK-BIN-NODEBUG: (type $2 (func (param i32 v128) (result v128))) + +;; CHECK-BIN-NODEBUG: (memory $0 1 1) + +;; CHECK-BIN-NODEBUG: (memory $1 1 1) + +;; CHECK-BIN-NODEBUG: (memory $2 1 1) + +;; CHECK-BIN-NODEBUG: (memory $3 1 1) + +;; CHECK-BIN-NODEBUG: (func $0 (type $0) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load $0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $1 (type $0) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load $1 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $2 (type $0) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load8x8_s $2 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $3 (type $0) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load8x8_s $1 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $4 (type $0) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load8x8_u $3 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $5 (type $0) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load8x8_u $3 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $6 (type $0) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load16x4_s $0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $7 (type $0) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load16x4_s $1 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $8 (type $0) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load16x4_u $0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $9 (type $0) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load16x4_u $0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $10 (type $0) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load32x2_s $2 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $11 (type $0) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load32x2_s $1 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $12 (type $0) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load32x2_u $1 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $13 (type $0) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load32x2_u $2 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $14 (type $0) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load8_splat $1 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $15 (type $0) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load8_splat $1 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $16 (type $0) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load16_splat $0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $17 (type $0) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load16_splat $0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $18 (type $0) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load32_splat $1 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $19 (type $0) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load32_splat $3 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $20 (type $0) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load64_splat $1 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $21 (type $0) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load64_splat $0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $22 (type $1) (param $0 i32) (param $1 v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.store $0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $23 (type $1) (param $0 i32) (param $1 v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.store $1 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $24 (type $2) (param $0 i32) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load8_lane $0 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $25 (type $2) (param $0 i32) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load8_lane $1 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $26 (type $2) (param $0 i32) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load16_lane $1 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $27 (type $2) (param $0 i32) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load16_lane $3 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $28 (type $2) (param $0 i32) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load32_lane $0 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $29 (type $2) (param $0 i32) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load32_lane $1 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $30 (type $2) (param $0 i32) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load64_lane $3 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $31 (type $2) (param $0 i32) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load64_lane $1 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $32 (type $2) (param $0 i32) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load64_lane $0 align=1 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $33 (type $2) (param $0 i32) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load64_lane $1 align=1 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $34 (type $2) (param $0 i32) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load64_lane $2 offset=32 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $35 (type $2) (param $0 i32) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load64_lane $1 offset=32 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $36 (type $2) (param $0 i32) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load64_lane $0 offset=32 align=1 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $37 (type $2) (param $0 i32) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load64_lane $3 offset=32 align=1 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $38 (type $1) (param $0 i32) (param $1 v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.store8_lane $0 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $39 (type $1) (param $0 i32) (param $1 v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.store8_lane $3 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $40 (type $1) (param $0 i32) (param $1 v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.store16_lane $0 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $41 (type $1) (param $0 i32) (param $1 v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.store16_lane $1 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $42 (type $1) (param $0 i32) (param $1 v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.store32_lane $1 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $43 (type $1) (param $0 i32) (param $1 v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.store32_lane $2 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $44 (type $1) (param $0 i32) (param $1 v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.store64_lane $2 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $45 (type $1) (param $0 i32) (param $1 v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.store64_lane $1 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $46 (type $1) (param $0 i32) (param $1 v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.store64_lane $1 align=1 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $47 (type $1) (param $0 i32) (param $1 v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.store64_lane $0 align=1 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $48 (type $1) (param $0 i32) (param $1 v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.store64_lane $3 offset=32 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $49 (type $1) (param $0 i32) (param $1 v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.store64_lane $0 offset=32 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $50 (type $1) (param $0 i32) (param $1 v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.store64_lane $1 offset=32 align=1 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $51 (type $1) (param $0 i32) (param $1 v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.store64_lane $3 offset=32 align=1 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $52 (type $0) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load32_zero $0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $53 (type $0) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load32_zero $1 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $54 (type $0) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load64_zero $1 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $55 (type $0) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load64_zero $2 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) diff --git a/test/lit/basic/multi-table.wast b/test/lit/basic/multi-table.wast new file mode 100644 index 000000000..d5c7b10aa --- /dev/null +++ b/test/lit/basic/multi-table.wast @@ -0,0 +1,163 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wast -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast +;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +(module + ;; CHECK-TEXT: (type $none_=>_none (func)) + ;; CHECK-BIN: (type $none_=>_none (func)) + (type $none_=>_none (func)) + (type $A (struct)) + ;; CHECK-TEXT: (import "a" "b" (table $t1 1 10 funcref)) + + ;; CHECK-TEXT: (global $g1 (ref null $none_=>_none) (ref.func $f)) + ;; CHECK-BIN: (import "a" "b" (table $t1 1 10 funcref)) + + ;; CHECK-BIN: (global $g1 (ref null $none_=>_none) (ref.func $f)) + (global $g1 (ref null $none_=>_none) (ref.func $f)) + ;; CHECK-TEXT: (global $g2 i32 (i32.const 0)) + ;; CHECK-BIN: (global $g2 i32 (i32.const 0)) + (global $g2 i32 (i32.const 0)) + + ;; CHECK-BIN-NODEBUG: (type $0 (func)) + + ;; CHECK-BIN-NODEBUG: (import "a" "b" (table $timport$0 1 10 funcref)) + (import "a" "b" (table $t1 1 10 funcref)) + ;; CHECK-TEXT: (table $t2 3 3 funcref) + ;; CHECK-BIN: (table $t2 3 3 funcref) + (table $t2 3 3 funcref) + ;; CHECK-TEXT: (table $t3 4 4 funcref) + ;; CHECK-BIN: (table $t3 4 4 funcref) + (table $t3 4 4 funcref) + ;; CHECK-TEXT: (table $textern 0 externref) + ;; CHECK-BIN: (table $textern 0 externref) + (table $textern 0 externref) + + ;; A table with a typed function references specialized type. + ;; CHECK-TEXT: (table $tspecial 5 5 (ref null $none_=>_none)) + ;; CHECK-BIN: (table $tspecial 5 5 (ref null $none_=>_none)) + (table $tspecial 5 5 (ref null $none_=>_none)) + + ;; add to $t1 + (elem (i32.const 0) $f) + + ;; add to $t2 + (elem (table $t2) (i32.const 0) func $f) + ;; CHECK-TEXT: (elem $0 (table $t1) (i32.const 0) func $f) + + ;; CHECK-TEXT: (elem $1 (table $t2) (i32.const 0) func $f) + + ;; CHECK-TEXT: (elem $activeNonZeroOffset (table $t2) (i32.const 1) func $f $g) + ;; CHECK-BIN: (elem $0 (table $t1) (i32.const 0) func $f) + + ;; CHECK-BIN: (elem $1 (table $t2) (i32.const 0) func $f) + + ;; CHECK-BIN: (elem $activeNonZeroOffset (table $t2) (i32.const 1) func $f $g) + (elem $activeNonZeroOffset (table $t2) (offset (i32.const 1)) func $f $g) + + ;; CHECK-TEXT: (elem $e3-1 (table $t3) (global.get $g2) funcref (ref.func $f) (ref.null nofunc)) + ;; CHECK-BIN: (elem $e3-1 (table $t3) (global.get $g2) funcref (ref.func $f) (ref.null nofunc)) + (elem $e3-1 (table $t3) (global.get $g2) funcref (ref.func $f) (ref.null func)) + ;; CHECK-TEXT: (elem $e3-2 (table $t3) (i32.const 2) (ref null $none_=>_none) (ref.func $f) (ref.func $g)) + ;; CHECK-BIN: (elem $e3-2 (table $t3) (i32.const 2) (ref null $none_=>_none) (ref.func $f) (ref.func $g)) + (elem $e3-2 (table $t3) (offset (i32.const 2)) (ref null $none_=>_none) (item ref.func $f) (item (ref.func $g))) + + ;; CHECK-TEXT: (elem $passive-1 func $f $g) + ;; CHECK-BIN: (elem $passive-1 func $f $g) + (elem $passive-1 func $f $g) + ;; CHECK-TEXT: (elem $passive-2 funcref (ref.func $f) (ref.func $g) (ref.null nofunc)) + ;; CHECK-BIN: (elem $passive-2 funcref (ref.func $f) (ref.func $g) (ref.null nofunc)) + (elem $passive-2 funcref (item ref.func $f) (item (ref.func $g)) (ref.null func)) + ;; CHECK-TEXT: (elem $passive-3 (ref null $none_=>_none) (ref.func $f) (ref.func $g) (ref.null nofunc) (global.get $g1)) + ;; CHECK-BIN: (elem $passive-3 (ref null $none_=>_none) (ref.func $f) (ref.func $g) (ref.null nofunc) (global.get $g1)) + (elem $passive-3 (ref null $none_=>_none) (item ref.func $f) (item (ref.func $g)) (ref.null $none_=>_none) (global.get $g1)) + ;; CHECK-TEXT: (elem $empty func) + ;; CHECK-BIN: (elem $empty func) + (elem $empty func) + (elem $declarative declare func $h) + + ;; This elem will be emitted as usesExpressions because of the type of the + ;; table. + ;; CHECK-TEXT: (elem $especial (table $tspecial) (i32.const 0) (ref null $none_=>_none) (ref.func $f) (ref.func $h)) + ;; CHECK-BIN: (elem $especial (table $tspecial) (i32.const 0) (ref null $none_=>_none) (ref.func $f) (ref.func $h)) + (elem $especial (table $tspecial) (i32.const 0) (ref null $none_=>_none) $f $h) + + ;; CHECK-TEXT: (func $f (type $none_=>_none) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (ref.func $h) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f (type $none_=>_none) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (ref.func $h) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f (drop (ref.func $h))) + + ;; CHECK-TEXT: (func $g (type $none_=>_none) + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $g (type $none_=>_none) + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: ) + (func $g) + + ;; CHECK-TEXT: (func $h (type $none_=>_none) + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $h (type $none_=>_none) + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: ) + (func $h) +) +;; CHECK-BIN-NODEBUG: (global $global$0 (ref null $0) (ref.func $0)) + +;; CHECK-BIN-NODEBUG: (global $global$1 i32 (i32.const 0)) + +;; CHECK-BIN-NODEBUG: (table $0 3 3 funcref) + +;; CHECK-BIN-NODEBUG: (table $1 4 4 funcref) + +;; CHECK-BIN-NODEBUG: (table $2 0 externref) + +;; CHECK-BIN-NODEBUG: (table $3 5 5 (ref null $0)) + +;; CHECK-BIN-NODEBUG: (elem $0 (table $timport$0) (i32.const 0) func $0) + +;; CHECK-BIN-NODEBUG: (elem $1 (table $0) (i32.const 0) func $0) + +;; CHECK-BIN-NODEBUG: (elem $2 (table $0) (i32.const 1) func $0 $1) + +;; CHECK-BIN-NODEBUG: (elem $3 (table $1) (global.get $global$1) funcref (ref.func $0) (ref.null nofunc)) + +;; CHECK-BIN-NODEBUG: (elem $4 (table $1) (i32.const 2) (ref null $0) (ref.func $0) (ref.func $1)) + +;; CHECK-BIN-NODEBUG: (elem $5 func $0 $1) + +;; CHECK-BIN-NODEBUG: (elem $6 funcref (ref.func $0) (ref.func $1) (ref.null nofunc)) + +;; CHECK-BIN-NODEBUG: (elem $7 (ref null $0) (ref.func $0) (ref.func $1) (ref.null nofunc) (global.get $global$0)) + +;; CHECK-BIN-NODEBUG: (elem $8 func) + +;; CHECK-BIN-NODEBUG: (elem $9 (table $3) (i32.const 0) (ref null $0) (ref.func $0) (ref.func $2)) + +;; CHECK-BIN-NODEBUG: (func $0 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (ref.func $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $1 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $2 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: ) diff --git a/test/lit/basic/mutable-global.wast b/test/lit/basic/mutable-global.wast new file mode 100644 index 000000000..154a40a19 --- /dev/null +++ b/test/lit/basic/mutable-global.wast @@ -0,0 +1,54 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wast -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast +;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +(module + ;; CHECK-TEXT: (type $0 (func)) + ;; CHECK-BIN: (type $0 (func)) + ;; CHECK-BIN-NODEBUG: (type $0 (func)) + (type $0 (func)) + ;; CHECK-TEXT: (import "env" "global-mut" (global $global-mut (mut i32))) + ;; CHECK-BIN: (import "env" "global-mut" (global $global-mut (mut i32))) + ;; CHECK-BIN-NODEBUG: (import "env" "global-mut" (global $gimport$0 (mut i32))) + (import "env" "global-mut" (global $global-mut (mut i32))) + + ;; CHECK-TEXT: (func $foo (type $0) + ;; CHECK-TEXT-NEXT: (global.set $global-mut + ;; CHECK-TEXT-NEXT: (i32.add + ;; CHECK-TEXT-NEXT: (global.get $global-mut) + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $foo (type $0) + ;; CHECK-BIN-NEXT: (global.set $global-mut + ;; CHECK-BIN-NEXT: (i32.add + ;; CHECK-BIN-NEXT: (global.get $global-mut) + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $foo (type $0) + (global.set $global-mut + (i32.add + (global.get $global-mut) + (i32.const 1) + ) + ) + ) +) +;; CHECK-BIN-NODEBUG: (func $0 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (global.set $gimport$0 +;; CHECK-BIN-NODEBUG-NEXT: (i32.add +;; CHECK-BIN-NODEBUG-NEXT: (global.get $gimport$0) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) diff --git a/test/lit/basic/newsyntax.wast b/test/lit/basic/newsyntax.wast new file mode 100644 index 000000000..0811ec07e --- /dev/null +++ b/test/lit/basic/newsyntax.wast @@ -0,0 +1,80 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wast -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast +;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +(module + ;; CHECK-TEXT: (type $0 (func)) + + ;; CHECK-TEXT: (type $1 (func (param i32 f64) (result i32))) + + ;; CHECK-TEXT: (import "env" "table" (table $timport$0 9 9 funcref)) + ;; CHECK-BIN: (type $0 (func)) + + ;; CHECK-BIN: (type $1 (func (param i32 f64) (result i32))) + + ;; CHECK-BIN: (import "env" "table" (table $timport$0 9 9 funcref)) + ;; CHECK-BIN-NODEBUG: (type $0 (func)) + + ;; CHECK-BIN-NODEBUG: (type $1 (func (param i32 f64) (result i32))) + + ;; CHECK-BIN-NODEBUG: (import "env" "table" (table $timport$0 9 9 funcref)) + (import "env" "table" (table 9 9 funcref)) + + (func "call_indirect" + (drop + (call_indirect (param i32) (param f64) (result i32) (i32.const 10) (f64.const 20) (i32.const 30)) + ) + (call_indirect (i32.const 1)) + ) +) +;; CHECK-TEXT: (export "call_indirect" (func $0)) + +;; CHECK-TEXT: (func $0 (type $0) +;; CHECK-TEXT-NEXT: (drop +;; CHECK-TEXT-NEXT: (call_indirect $timport$0 (type $1) +;; CHECK-TEXT-NEXT: (i32.const 10) +;; CHECK-TEXT-NEXT: (f64.const 20) +;; CHECK-TEXT-NEXT: (i32.const 30) +;; CHECK-TEXT-NEXT: ) +;; CHECK-TEXT-NEXT: ) +;; CHECK-TEXT-NEXT: (call_indirect $timport$0 (type $0) +;; CHECK-TEXT-NEXT: (i32.const 1) +;; CHECK-TEXT-NEXT: ) +;; CHECK-TEXT-NEXT: ) + +;; CHECK-BIN: (export "call_indirect" (func $0)) + +;; CHECK-BIN: (func $0 (type $0) +;; CHECK-BIN-NEXT: (drop +;; CHECK-BIN-NEXT: (call_indirect $timport$0 (type $1) +;; CHECK-BIN-NEXT: (i32.const 10) +;; CHECK-BIN-NEXT: (f64.const 20) +;; CHECK-BIN-NEXT: (i32.const 30) +;; CHECK-BIN-NEXT: ) +;; CHECK-BIN-NEXT: ) +;; CHECK-BIN-NEXT: (call_indirect $timport$0 (type $0) +;; CHECK-BIN-NEXT: (i32.const 1) +;; CHECK-BIN-NEXT: ) +;; CHECK-BIN-NEXT: ) + +;; CHECK-BIN-NODEBUG: (export "call_indirect" (func $0)) + +;; CHECK-BIN-NODEBUG: (func $0 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (call_indirect $timport$0 (type $1) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 10) +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 20) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 30) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (call_indirect $timport$0 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) diff --git a/test/lit/basic/nonspec-bulk-memory.wast b/test/lit/basic/nonspec-bulk-memory.wast new file mode 100644 index 000000000..980598f5d --- /dev/null +++ b/test/lit/basic/nonspec-bulk-memory.wast @@ -0,0 +1,137 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wast -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast +;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +(module + (memory 1024 1024 + (segment 0 "hello, world") + ) + + ;; CHECK-TEXT: (type $0 (func)) + + ;; CHECK-TEXT: (memory $0 1024 1024) + + ;; CHECK-TEXT: (data $0 (i32.const 0) "hello, world") + + ;; CHECK-TEXT: (func $memory.init (type $0) + ;; CHECK-TEXT-NEXT: (memory.init $0 + ;; CHECK-TEXT-NEXT: (i32.const 512) + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: (i32.const 12) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (type $0 (func)) + + ;; CHECK-BIN: (memory $0 1024 1024) + + ;; CHECK-BIN: (data $0 (i32.const 0) "hello, world") + + ;; CHECK-BIN: (func $memory.init (type $0) + ;; CHECK-BIN-NEXT: (memory.init $0 + ;; CHECK-BIN-NEXT: (i32.const 512) + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: (i32.const 12) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $memory.init + (memory.init 0 + (i32.const 512) + (i32.const 0) + (i32.const 12) + ) + ) + + ;; CHECK-TEXT: (func $data.drop (type $0) + ;; CHECK-TEXT-NEXT: (data.drop $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $data.drop (type $0) + ;; CHECK-BIN-NEXT: (data.drop $0) + ;; CHECK-BIN-NEXT: ) + (func $data.drop + (data.drop 0) + ) + + ;; CHECK-TEXT: (func $memory.copy (type $0) + ;; CHECK-TEXT-NEXT: (memory.copy + ;; CHECK-TEXT-NEXT: (i32.const 512) + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: (i32.const 12) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $memory.copy (type $0) + ;; CHECK-BIN-NEXT: (memory.copy + ;; CHECK-BIN-NEXT: (i32.const 512) + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: (i32.const 12) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $memory.copy + (memory.copy + (i32.const 512) + (i32.const 0) + (i32.const 12) + ) + ) + + ;; CHECK-TEXT: (func $memory.fill (type $0) + ;; CHECK-TEXT-NEXT: (memory.fill + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: (i32.const 42) + ;; CHECK-TEXT-NEXT: (i32.const 1024) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $memory.fill (type $0) + ;; CHECK-BIN-NEXT: (memory.fill + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: (i32.const 42) + ;; CHECK-BIN-NEXT: (i32.const 1024) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $memory.fill + (memory.fill + (i32.const 0) + (i32.const 42) + (i32.const 1024) + ) + ) +) +;; CHECK-BIN-NODEBUG: (type $0 (func)) + +;; CHECK-BIN-NODEBUG: (memory $0 1024 1024) + +;; CHECK-BIN-NODEBUG: (data $0 (i32.const 0) "hello, world") + +;; CHECK-BIN-NODEBUG: (func $0 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (memory.init $0 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 512) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 12) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $1 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (data.drop $0) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $2 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (memory.copy +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 512) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 12) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $3 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (memory.fill +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 42) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1024) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) diff --git a/test/lit/basic/polymorphic_stack.wast b/test/lit/basic/polymorphic_stack.wast new file mode 100644 index 000000000..f91847817 --- /dev/null +++ b/test/lit/basic/polymorphic_stack.wast @@ -0,0 +1,449 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wast -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast +;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +(module + ;; CHECK-TEXT: (type $0 (func (result i32))) + + ;; CHECK-TEXT: (type $FUNCSIG$ii (func (param i32) (result i32))) + ;; CHECK-BIN: (type $0 (func (result i32))) + + ;; CHECK-BIN: (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$ii (func (param i32) (result i32))) + ;; CHECK-TEXT: (type $2 (func)) + + ;; CHECK-TEXT: (type $3 (func (param i32))) + + ;; CHECK-TEXT: (import "env" "table" (table $timport$0 9 9 funcref)) + ;; CHECK-BIN: (type $2 (func)) + + ;; CHECK-BIN: (type $3 (func (param i32))) + + ;; CHECK-BIN: (import "env" "table" (table $timport$0 9 9 funcref)) + ;; CHECK-BIN-NODEBUG: (type $0 (func (result i32))) + + ;; CHECK-BIN-NODEBUG: (type $1 (func (param i32) (result i32))) + + ;; CHECK-BIN-NODEBUG: (type $2 (func)) + + ;; CHECK-BIN-NODEBUG: (type $3 (func (param i32))) + + ;; CHECK-BIN-NODEBUG: (import "env" "table" (table $timport$0 9 9 funcref)) + (import "env" "table" (table 9 9 funcref)) + + ;; CHECK-TEXT: (func $break-and-binary (type $0) (result i32) + ;; CHECK-TEXT-NEXT: (block $x (result i32) + ;; CHECK-TEXT-NEXT: (f32.add + ;; CHECK-TEXT-NEXT: (br_if $x + ;; CHECK-TEXT-NEXT: (i32.trunc_f64_u + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i32.trunc_f64_u + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (f32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $break-and-binary (type $0) (result i32) + ;; CHECK-BIN-NEXT: (block $label$1 (result i32) + ;; CHECK-BIN-NEXT: (unreachable) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $break-and-binary (result i32) + (block $x (result i32) + (f32.add + (br_if $x + (i32.trunc_f64_u + (unreachable) + ) + (i32.trunc_f64_u + (unreachable) + ) + ) + (f32.const 1) + ) + ) + ) + + ;; CHECK-TEXT: (func $call-and-unary (type $FUNCSIG$ii) (param $0 i32) (result i32) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.eqz + ;; CHECK-TEXT-NEXT: (call $call-and-unary + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.eqz + ;; CHECK-TEXT-NEXT: (i32.eqz + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.eqz + ;; CHECK-TEXT-NEXT: (call_indirect $timport$0 (type $FUNCSIG$ii) + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $call-and-unary (type $FUNCSIG$ii) (param $0 i32) (result i32) + ;; CHECK-BIN-NEXT: (unreachable) + ;; CHECK-BIN-NEXT: ) + (func $call-and-unary (param i32) (result i32) + (drop + (i64.eqz + (call $call-and-unary + (unreachable) + ) + ) + ) + (drop + (i64.eqz + (i32.eqz + (unreachable) + ) + ) + ) + (drop + (i64.eqz + (call_indirect (type $FUNCSIG$ii) + (unreachable) + (unreachable) + ) + ) + ) + ) + + ;; CHECK-TEXT: (func $tee (type $3) (param $x i32) + ;; CHECK-TEXT-NEXT: (local $y f32) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.eqz + ;; CHECK-TEXT-NEXT: (local.tee $x + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (local.tee $y + ;; CHECK-TEXT-NEXT: (i64.eqz + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $tee (type $3) (param $x i32) + ;; CHECK-BIN-NEXT: (local $y f32) + ;; CHECK-BIN-NEXT: (unreachable) + ;; CHECK-BIN-NEXT: ) + (func $tee (param $x i32) + (local $y f32) + (drop + (i64.eqz + (local.tee $x + (unreachable) + ) + ) + ) + (drop + (local.tee $y + (i64.eqz + (unreachable) + ) + ) + ) + ) + + ;; CHECK-TEXT: (func $tee2 (type $2) + ;; CHECK-TEXT-NEXT: (local $0 f32) + ;; CHECK-TEXT-NEXT: (if + ;; CHECK-TEXT-NEXT: (i32.const 259) + ;; CHECK-TEXT-NEXT: (local.tee $0 + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $tee2 (type $2) + ;; CHECK-BIN-NEXT: (local $0 f32) + ;; CHECK-BIN-NEXT: (if + ;; CHECK-BIN-NEXT: (i32.const 259) + ;; CHECK-BIN-NEXT: (unreachable) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $tee2 + (local $0 f32) + (if + (i32.const 259) + (local.set $0 + (unreachable) + ) + ) + ) + + ;; CHECK-TEXT: (func $select (type $2) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.eqz + ;; CHECK-TEXT-NEXT: (select + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: (i32.const 2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $select (type $2) + ;; CHECK-BIN-NEXT: (unreachable) + ;; CHECK-BIN-NEXT: ) + (func $select + (drop + (i64.eqz + (select + (unreachable) + (i32.const 1) + (i32.const 2) + ) + ) + ) + ) + + ;; CHECK-TEXT: (func $untaken-break-should-have-value (type $0) (result i32) + ;; CHECK-TEXT-NEXT: (block $x (result i32) + ;; CHECK-TEXT-NEXT: (block + ;; CHECK-TEXT-NEXT: (br_if $x + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $untaken-break-should-have-value (type $0) (result i32) + ;; CHECK-BIN-NEXT: (block $label$1 (result i32) + ;; CHECK-BIN-NEXT: (block $label$2 + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (unreachable) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (unreachable) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $untaken-break-should-have-value (result i32) + (block $x (result i32) + (block + (br_if $x + (i32.const 0) + (unreachable) + ) + ) + ) + ) + + ;; CHECK-TEXT: (func $unreachable-in-block-but-code-before (type $FUNCSIG$ii) (param $0 i32) (result i32) + ;; CHECK-TEXT-NEXT: (if + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (return + ;; CHECK-TEXT-NEXT: (i32.const 127) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (block $label$0 (result i32) + ;; CHECK-TEXT-NEXT: (br_if $label$0 + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: (return + ;; CHECK-TEXT-NEXT: (i32.const -32) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $unreachable-in-block-but-code-before (type $FUNCSIG$ii) (param $0 i32) (result i32) + ;; CHECK-BIN-NEXT: (if + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (return + ;; CHECK-BIN-NEXT: (i32.const 127) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (block $label$2 (result i32) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (return + ;; CHECK-BIN-NEXT: (i32.const -32) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $unreachable-in-block-but-code-before (param $0 i32) (result i32) + (if + (local.get $0) + (return + (i32.const 127) + ) + ) + (block $label$0 (result i32) + (br_if $label$0 + (i32.const 0) + (return + (i32.const -32) + ) + ) + ) + ) + + ;; CHECK-TEXT: (func $br_table_unreachable_to_also_unreachable (type $0) (result i32) + ;; CHECK-TEXT-NEXT: (block $a (result i32) + ;; CHECK-TEXT-NEXT: (block $b (result i32) + ;; CHECK-TEXT-NEXT: (br_table $a $b + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $br_table_unreachable_to_also_unreachable (type $0) (result i32) + ;; CHECK-BIN-NEXT: (block $label$1 (result i32) + ;; CHECK-BIN-NEXT: (block $label$2 (result i32) + ;; CHECK-BIN-NEXT: (unreachable) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $br_table_unreachable_to_also_unreachable (result i32) + (block $a (result i32) + (block $b (result i32) + (br_table $a $b ;; seems to send a value, but is not taken + (unreachable) + (unreachable) + ) + ) + ) + ) + + ;; CHECK-TEXT: (func $untaken-br_if (type $0) (result i32) + ;; CHECK-TEXT-NEXT: (block $label$8 (result i32) + ;; CHECK-TEXT-NEXT: (block $label$9 + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (if + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: (br_if $label$8 + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $untaken-br_if (type $0) (result i32) + ;; CHECK-BIN-NEXT: (block $label$1 (result i32) + ;; CHECK-BIN-NEXT: (block $label$2 + ;; CHECK-BIN-NEXT: (if + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: (unreachable) + ;; CHECK-BIN-NEXT: (unreachable) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (unreachable) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $untaken-br_if (result i32) + (block $label$8 (result i32) + (block $label$9 + (drop + (if + (i32.const 0) + (br_if $label$8 + (unreachable) + (i32.const 0) + ) + (unreachable) + ) + ) + ) + ) + ) +) +;; CHECK-BIN-NODEBUG: (func $0 (type $0) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (block $label$1 (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (unreachable) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $1 (type $1) (param $0 i32) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (unreachable) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $2 (type $3) (param $0 i32) +;; CHECK-BIN-NODEBUG-NEXT: (local $1 f32) +;; CHECK-BIN-NODEBUG-NEXT: (unreachable) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $3 (type $2) +;; CHECK-BIN-NODEBUG-NEXT: (local $0 f32) +;; CHECK-BIN-NODEBUG-NEXT: (if +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 259) +;; CHECK-BIN-NODEBUG-NEXT: (unreachable) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $4 (type $2) +;; CHECK-BIN-NODEBUG-NEXT: (unreachable) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $5 (type $0) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (block $label$1 (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (block $label$2 +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (unreachable) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (unreachable) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $6 (type $1) (param $0 i32) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (if +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (return +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 127) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (block $label$2 (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (return +;; CHECK-BIN-NODEBUG-NEXT: (i32.const -32) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $7 (type $0) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (block $label$1 (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (block $label$2 (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (unreachable) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $8 (type $0) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (block $label$1 (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (block $label$2 +;; CHECK-BIN-NODEBUG-NEXT: (if +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: (unreachable) +;; CHECK-BIN-NODEBUG-NEXT: (unreachable) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (unreachable) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) diff --git a/test/lit/basic/reference-types.wast b/test/lit/basic/reference-types.wast new file mode 100644 index 000000000..9a3a5c663 --- /dev/null +++ b/test/lit/basic/reference-types.wast @@ -0,0 +1,2470 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wast -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast +;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +(module + ;; CHECK-TEXT: (type $0 (func (result anyref))) + + ;; CHECK-TEXT: (type $sig_anyref (func (param anyref))) + + ;; CHECK-TEXT: (type $sig_funcref (func (param funcref))) + + ;; CHECK-TEXT: (type $3 (func (result funcref))) + + ;; CHECK-TEXT: (type $sig_eqref (func (param eqref))) + ;; CHECK-BIN: (type $0 (func (result anyref))) + + ;; CHECK-BIN: (type $sig_anyref (func (param anyref))) + + ;; CHECK-BIN: (type $sig_funcref (func (param funcref))) + + ;; CHECK-BIN: (type $3 (func (result funcref))) + + ;; CHECK-BIN: (type $sig_eqref (func (param eqref))) + (type $sig_eqref (func (param eqref))) + (type $sig_funcref (func (param funcref))) + (type $sig_anyref (func (param anyref))) + + ;; CHECK-TEXT: (type $5 (func)) + + ;; CHECK-TEXT: (type $6 (func (result eqref))) + + ;; CHECK-TEXT: (type $7 (func (param i32))) + + ;; CHECK-TEXT: (type $8 (func (param eqref) (result funcref))) + + ;; CHECK-TEXT: (import "env" "import_global" (global $import_global eqref)) + + ;; CHECK-TEXT: (import "env" "import_func" (func $import_func (type $8) (param eqref) (result funcref))) + + ;; CHECK-TEXT: (global $global_eqref (mut eqref) (ref.null none)) + + ;; CHECK-TEXT: (global $global_funcref (mut funcref) (ref.null nofunc)) + + ;; CHECK-TEXT: (global $global_funcref_func (mut funcref) (ref.func $foo)) + + ;; CHECK-TEXT: (global $global_anyref (mut anyref) (ref.null none)) + + ;; CHECK-TEXT: (global $global_anyref2 (mut anyref) (ref.null none)) + + ;; CHECK-TEXT: (table $0 3 3 funcref) + + ;; CHECK-TEXT: (elem $0 (i32.const 0) $take_eqref $take_funcref $take_anyref) + + ;; CHECK-TEXT: (elem declare func $foo $ref-taken-but-not-in-table) + + ;; CHECK-TEXT: (tag $e-i32 (param i32)) + + ;; CHECK-TEXT: (export "export_func" (func $import_func)) + + ;; CHECK-TEXT: (export "export_global" (global $import_global)) + + ;; CHECK-TEXT: (func $take_eqref (type $sig_eqref) (param $0 eqref) + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (type $5 (func)) + + ;; CHECK-BIN: (type $6 (func (result eqref))) + + ;; CHECK-BIN: (type $7 (func (param i32))) + + ;; CHECK-BIN: (type $8 (func (param eqref) (result funcref))) + + ;; CHECK-BIN: (import "env" "import_global" (global $import_global eqref)) + + ;; CHECK-BIN: (import "env" "import_func" (func $import_func (type $8) (param eqref) (result funcref))) + + ;; CHECK-BIN: (global $global_eqref (mut eqref) (ref.null none)) + + ;; CHECK-BIN: (global $global_funcref (mut funcref) (ref.null nofunc)) + + ;; CHECK-BIN: (global $global_funcref_func (mut funcref) (ref.func $foo)) + + ;; CHECK-BIN: (global $global_anyref (mut anyref) (ref.null none)) + + ;; CHECK-BIN: (global $global_anyref2 (mut anyref) (ref.null none)) + + ;; CHECK-BIN: (table $0 3 3 funcref) + + ;; CHECK-BIN: (elem $0 (i32.const 0) $take_eqref $take_funcref $take_anyref) + + ;; CHECK-BIN: (elem declare func $foo $ref-taken-but-not-in-table) + + ;; CHECK-BIN: (tag $e-i32 (param i32)) + + ;; CHECK-BIN: (export "export_func" (func $import_func)) + + ;; CHECK-BIN: (export "export_global" (global $import_global)) + + ;; CHECK-BIN: (func $take_eqref (type $sig_eqref) (param $0 eqref) + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: ) + (func $take_eqref (param eqref)) + + ;; CHECK-TEXT: (func $take_funcref (type $sig_funcref) (param $0 funcref) + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $take_funcref (type $sig_funcref) (param $0 funcref) + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: ) + (func $take_funcref (param funcref)) + + ;; CHECK-TEXT: (func $take_anyref (type $sig_anyref) (param $0 anyref) + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $take_anyref (type $sig_anyref) (param $0 anyref) + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: ) + (func $take_anyref (param anyref)) + + ;; CHECK-TEXT: (func $foo (type $5) + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $foo (type $5) + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: ) + (func $foo) + + (table funcref (elem $take_eqref $take_funcref $take_anyref)) + ;; CHECK-BIN-NODEBUG: (type $0 (func (result anyref))) + + ;; CHECK-BIN-NODEBUG: (type $1 (func (param anyref))) + + ;; CHECK-BIN-NODEBUG: (type $2 (func (param funcref))) + + ;; CHECK-BIN-NODEBUG: (type $3 (func (result funcref))) + + ;; CHECK-BIN-NODEBUG: (type $4 (func (param eqref))) + + ;; CHECK-BIN-NODEBUG: (type $5 (func)) + + ;; CHECK-BIN-NODEBUG: (type $6 (func (result eqref))) + + ;; CHECK-BIN-NODEBUG: (type $7 (func (param i32))) + + ;; CHECK-BIN-NODEBUG: (type $8 (func (param eqref) (result funcref))) + + ;; CHECK-BIN-NODEBUG: (import "env" "import_global" (global $gimport$0 eqref)) + + ;; CHECK-BIN-NODEBUG: (import "env" "import_func" (func $fimport$0 (type $8) (param eqref) (result funcref))) + + ;; CHECK-BIN-NODEBUG: (global $global$0 (mut eqref) (ref.null none)) + + ;; CHECK-BIN-NODEBUG: (global $global$1 (mut funcref) (ref.null nofunc)) + + ;; CHECK-BIN-NODEBUG: (global $global$2 (mut funcref) (ref.func $3)) + + ;; CHECK-BIN-NODEBUG: (global $global$3 (mut anyref) (ref.null none)) + + ;; CHECK-BIN-NODEBUG: (global $global$4 (mut anyref) (ref.null none)) + + ;; CHECK-BIN-NODEBUG: (table $0 3 3 funcref) + + ;; CHECK-BIN-NODEBUG: (elem $0 (i32.const 0) $0 $1 $2) + + ;; CHECK-BIN-NODEBUG: (elem declare func $23 $3) + (elem declare func $ref-taken-but-not-in-table) + + (import "env" "import_func" (func $import_func (param eqref) (result funcref))) + (import "env" "import_global" (global $import_global eqref)) + ;; CHECK-BIN-NODEBUG: (tag $tag$0 (param i32)) + + ;; CHECK-BIN-NODEBUG: (export "export_func" (func $fimport$0)) + (export "export_func" (func $import_func (param eqref) (result funcref))) + ;; CHECK-BIN-NODEBUG: (export "export_global" (global $gimport$0)) + (export "export_global" (global $import_global)) + + ;; Test global initializer expressions + (global $global_eqref (mut eqref) (ref.null eq)) + (global $global_funcref (mut funcref) (ref.null func)) + (global $global_funcref_func (mut funcref) (ref.func $foo)) + (global $global_anyref (mut anyref) (ref.null any)) + + ;; Test subtype relationship in global initializer expressions + (global $global_anyref2 (mut anyref) (ref.null eq)) + + (tag $e-i32 (param i32)) + + ;; CHECK-TEXT: (func $test (type $5) + ;; CHECK-TEXT-NEXT: (local $local_eqref eqref) + ;; CHECK-TEXT-NEXT: (local $local_funcref funcref) + ;; CHECK-TEXT-NEXT: (local $local_anyref anyref) + ;; CHECK-TEXT-NEXT: (local.set $local_eqref + ;; CHECK-TEXT-NEXT: (local.get $local_eqref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (local.set $local_eqref + ;; CHECK-TEXT-NEXT: (global.get $global_eqref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (local.set $local_eqref + ;; CHECK-TEXT-NEXT: (ref.null none) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (local.set $local_funcref + ;; CHECK-TEXT-NEXT: (local.get $local_funcref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (local.set $local_funcref + ;; CHECK-TEXT-NEXT: (global.get $global_funcref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (local.set $local_funcref + ;; CHECK-TEXT-NEXT: (ref.null nofunc) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (local.set $local_funcref + ;; CHECK-TEXT-NEXT: (ref.func $foo) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (local.set $local_anyref + ;; CHECK-TEXT-NEXT: (local.get $local_anyref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (local.set $local_anyref + ;; CHECK-TEXT-NEXT: (global.get $global_anyref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (local.set $local_anyref + ;; CHECK-TEXT-NEXT: (ref.null none) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (local.set $local_anyref + ;; CHECK-TEXT-NEXT: (local.get $local_eqref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (local.set $local_anyref + ;; CHECK-TEXT-NEXT: (global.get $global_eqref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (local.set $local_anyref + ;; CHECK-TEXT-NEXT: (ref.null none) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (global.set $global_eqref + ;; CHECK-TEXT-NEXT: (global.get $global_eqref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (global.set $global_eqref + ;; CHECK-TEXT-NEXT: (local.get $local_eqref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (global.set $global_eqref + ;; CHECK-TEXT-NEXT: (ref.null none) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (global.set $global_funcref + ;; CHECK-TEXT-NEXT: (global.get $global_funcref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (global.set $global_funcref + ;; CHECK-TEXT-NEXT: (local.get $local_funcref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (global.set $global_funcref + ;; CHECK-TEXT-NEXT: (ref.null nofunc) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (global.set $global_funcref + ;; CHECK-TEXT-NEXT: (ref.func $foo) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (global.set $global_anyref + ;; CHECK-TEXT-NEXT: (global.get $global_anyref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (global.set $global_anyref + ;; CHECK-TEXT-NEXT: (local.get $local_anyref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (global.set $global_anyref + ;; CHECK-TEXT-NEXT: (ref.null none) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (global.set $global_anyref + ;; CHECK-TEXT-NEXT: (global.get $global_eqref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (global.set $global_anyref + ;; CHECK-TEXT-NEXT: (local.get $local_eqref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (global.set $global_anyref + ;; CHECK-TEXT-NEXT: (ref.null none) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (call $take_eqref + ;; CHECK-TEXT-NEXT: (local.get $local_eqref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (call $take_eqref + ;; CHECK-TEXT-NEXT: (global.get $global_eqref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (call $take_eqref + ;; CHECK-TEXT-NEXT: (ref.null none) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (call $take_funcref + ;; CHECK-TEXT-NEXT: (local.get $local_funcref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (call $take_funcref + ;; CHECK-TEXT-NEXT: (global.get $global_funcref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (call $take_funcref + ;; CHECK-TEXT-NEXT: (ref.null nofunc) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (call $take_funcref + ;; CHECK-TEXT-NEXT: (ref.func $foo) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (call $take_anyref + ;; CHECK-TEXT-NEXT: (local.get $local_anyref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (call $take_anyref + ;; CHECK-TEXT-NEXT: (global.get $global_anyref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (call $take_anyref + ;; CHECK-TEXT-NEXT: (ref.null none) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (call $take_anyref + ;; CHECK-TEXT-NEXT: (local.get $local_eqref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (call $take_anyref + ;; CHECK-TEXT-NEXT: (global.get $global_eqref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (call $take_anyref + ;; CHECK-TEXT-NEXT: (ref.null none) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (call_indirect $0 (type $sig_eqref) + ;; CHECK-TEXT-NEXT: (local.get $local_eqref) + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (call_indirect $0 (type $sig_eqref) + ;; CHECK-TEXT-NEXT: (global.get $global_eqref) + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (call_indirect $0 (type $sig_eqref) + ;; CHECK-TEXT-NEXT: (ref.null none) + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (call_indirect $0 (type $sig_funcref) + ;; CHECK-TEXT-NEXT: (local.get $local_funcref) + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (call_indirect $0 (type $sig_funcref) + ;; CHECK-TEXT-NEXT: (global.get $global_funcref) + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (call_indirect $0 (type $sig_funcref) + ;; CHECK-TEXT-NEXT: (ref.null nofunc) + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (call_indirect $0 (type $sig_funcref) + ;; CHECK-TEXT-NEXT: (ref.func $foo) + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (call_indirect $0 (type $sig_anyref) + ;; CHECK-TEXT-NEXT: (local.get $local_anyref) + ;; CHECK-TEXT-NEXT: (i32.const 3) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (call_indirect $0 (type $sig_anyref) + ;; CHECK-TEXT-NEXT: (global.get $global_anyref) + ;; CHECK-TEXT-NEXT: (i32.const 3) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (call_indirect $0 (type $sig_anyref) + ;; CHECK-TEXT-NEXT: (ref.null none) + ;; CHECK-TEXT-NEXT: (i32.const 3) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (call_indirect $0 (type $sig_anyref) + ;; CHECK-TEXT-NEXT: (local.get $local_eqref) + ;; CHECK-TEXT-NEXT: (i32.const 3) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (call_indirect $0 (type $sig_anyref) + ;; CHECK-TEXT-NEXT: (global.get $global_eqref) + ;; CHECK-TEXT-NEXT: (i32.const 3) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (call_indirect $0 (type $sig_anyref) + ;; CHECK-TEXT-NEXT: (ref.null none) + ;; CHECK-TEXT-NEXT: (i32.const 3) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (block $block (result eqref) + ;; CHECK-TEXT-NEXT: (br_if $block + ;; CHECK-TEXT-NEXT: (local.get $local_eqref) + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (block $block0 (result eqref) + ;; CHECK-TEXT-NEXT: (br_if $block0 + ;; CHECK-TEXT-NEXT: (global.get $global_eqref) + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (block $block1 (result eqref) + ;; CHECK-TEXT-NEXT: (br_if $block1 + ;; CHECK-TEXT-NEXT: (ref.null none) + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (block $block2 (result funcref) + ;; CHECK-TEXT-NEXT: (br_if $block2 + ;; CHECK-TEXT-NEXT: (local.get $local_funcref) + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (block $block3 (result funcref) + ;; CHECK-TEXT-NEXT: (br_if $block3 + ;; CHECK-TEXT-NEXT: (global.get $global_funcref) + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (block $block4 (result funcref) + ;; CHECK-TEXT-NEXT: (br_if $block4 + ;; CHECK-TEXT-NEXT: (ref.null nofunc) + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (block $block5 (result funcref) + ;; CHECK-TEXT-NEXT: (br_if $block5 + ;; CHECK-TEXT-NEXT: (ref.func $foo) + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (block $block6 (result anyref) + ;; CHECK-TEXT-NEXT: (br_if $block6 + ;; CHECK-TEXT-NEXT: (local.get $local_anyref) + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (block $block7 (result anyref) + ;; CHECK-TEXT-NEXT: (br_if $block7 + ;; CHECK-TEXT-NEXT: (global.get $global_anyref) + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (block $block8 (result anyref) + ;; CHECK-TEXT-NEXT: (br_if $block8 + ;; CHECK-TEXT-NEXT: (ref.null none) + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (block $block9 (result anyref) + ;; CHECK-TEXT-NEXT: (br_if $block9 + ;; CHECK-TEXT-NEXT: (local.get $local_eqref) + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (block $block10 (result anyref) + ;; CHECK-TEXT-NEXT: (br_if $block10 + ;; CHECK-TEXT-NEXT: (ref.null none) + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (loop $loop-in (result eqref) + ;; CHECK-TEXT-NEXT: (local.get $local_eqref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (loop $loop-in11 (result eqref) + ;; CHECK-TEXT-NEXT: (global.get $global_eqref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (loop $loop-in12 (result eqref) + ;; CHECK-TEXT-NEXT: (ref.null none) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (loop $loop-in13 (result funcref) + ;; CHECK-TEXT-NEXT: (local.get $local_funcref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (loop $loop-in14 (result funcref) + ;; CHECK-TEXT-NEXT: (global.get $global_funcref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (loop $loop-in15 (result funcref) + ;; CHECK-TEXT-NEXT: (ref.null nofunc) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (loop $loop-in16 (result funcref) + ;; CHECK-TEXT-NEXT: (ref.func $foo) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (loop $loop-in17 (result anyref) + ;; CHECK-TEXT-NEXT: (local.get $local_anyref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (loop $loop-in18 (result anyref) + ;; CHECK-TEXT-NEXT: (global.get $global_anyref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (loop $loop-in19 (result anyref) + ;; CHECK-TEXT-NEXT: (ref.null none) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (loop $loop-in20 (result anyref) + ;; CHECK-TEXT-NEXT: (local.get $local_eqref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (loop $loop-in21 (result anyref) + ;; CHECK-TEXT-NEXT: (global.get $global_eqref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (loop $loop-in22 (result anyref) + ;; CHECK-TEXT-NEXT: (ref.null none) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (if (result eqref) + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: (local.get $local_eqref) + ;; CHECK-TEXT-NEXT: (ref.null none) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (if (result funcref) + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: (local.get $local_funcref) + ;; CHECK-TEXT-NEXT: (ref.null nofunc) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (if (result anyref) + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: (local.get $local_anyref) + ;; CHECK-TEXT-NEXT: (ref.null none) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (if (result anyref) + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: (local.get $local_eqref) + ;; CHECK-TEXT-NEXT: (local.get $local_eqref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (if (result anyref) + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: (ref.null none) + ;; CHECK-TEXT-NEXT: (ref.null none) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (if (result anyref) + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: (ref.i31 + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (ref.null none) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (try $try (result eqref) + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (local.get $local_eqref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch $e-i32 + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (pop i32) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (ref.null none) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (try $try28 (result funcref) + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (ref.func $foo) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch $e-i32 + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (pop i32) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (ref.null nofunc) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (try $try29 (result anyref) + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (local.get $local_eqref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch $e-i32 + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (pop i32) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (ref.null none) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (try $try30 (result anyref) + ;; CHECK-TEXT-NEXT: (do + ;; CHECK-TEXT-NEXT: (ref.null none) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (catch $e-i32 + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (pop i32) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (local.get $local_eqref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (select (result eqref) + ;; CHECK-TEXT-NEXT: (local.get $local_eqref) + ;; CHECK-TEXT-NEXT: (ref.null none) + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (select (result funcref) + ;; CHECK-TEXT-NEXT: (local.get $local_funcref) + ;; CHECK-TEXT-NEXT: (ref.null nofunc) + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (select + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: (i32.const 2) + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (select (result anyref) + ;; CHECK-TEXT-NEXT: (local.get $local_eqref) + ;; CHECK-TEXT-NEXT: (ref.i31 + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (ref.is_null + ;; CHECK-TEXT-NEXT: (local.get $local_eqref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (ref.is_null + ;; CHECK-TEXT-NEXT: (global.get $global_eqref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (ref.is_null + ;; CHECK-TEXT-NEXT: (ref.null none) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (ref.is_null + ;; CHECK-TEXT-NEXT: (local.get $local_funcref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (ref.is_null + ;; CHECK-TEXT-NEXT: (global.get $global_funcref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (ref.is_null + ;; CHECK-TEXT-NEXT: (ref.null nofunc) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (ref.is_null + ;; CHECK-TEXT-NEXT: (ref.func $foo) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (ref.is_null + ;; CHECK-TEXT-NEXT: (local.get $local_anyref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (ref.is_null + ;; CHECK-TEXT-NEXT: (global.get $global_anyref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (ref.is_null + ;; CHECK-TEXT-NEXT: (ref.null none) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $test (type $5) + ;; CHECK-BIN-NEXT: (local $local_eqref eqref) + ;; CHECK-BIN-NEXT: (local $local_funcref funcref) + ;; CHECK-BIN-NEXT: (local $local_anyref anyref) + ;; CHECK-BIN-NEXT: (local.set $local_eqref + ;; CHECK-BIN-NEXT: (local.get $local_eqref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (local.set $local_eqref + ;; CHECK-BIN-NEXT: (global.get $global_eqref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (local.set $local_eqref + ;; CHECK-BIN-NEXT: (ref.null none) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (local.set $local_funcref + ;; CHECK-BIN-NEXT: (local.get $local_funcref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (local.set $local_funcref + ;; CHECK-BIN-NEXT: (global.get $global_funcref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (local.set $local_funcref + ;; CHECK-BIN-NEXT: (ref.null nofunc) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (local.set $local_funcref + ;; CHECK-BIN-NEXT: (ref.func $foo) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (local.set $local_anyref + ;; CHECK-BIN-NEXT: (local.get $local_anyref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (local.set $local_anyref + ;; CHECK-BIN-NEXT: (global.get $global_anyref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (local.set $local_anyref + ;; CHECK-BIN-NEXT: (ref.null none) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (local.set $local_anyref + ;; CHECK-BIN-NEXT: (local.get $local_eqref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (local.set $local_anyref + ;; CHECK-BIN-NEXT: (global.get $global_eqref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (local.set $local_anyref + ;; CHECK-BIN-NEXT: (ref.null none) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (global.set $global_eqref + ;; CHECK-BIN-NEXT: (global.get $global_eqref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (global.set $global_eqref + ;; CHECK-BIN-NEXT: (local.get $local_eqref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (global.set $global_eqref + ;; CHECK-BIN-NEXT: (ref.null none) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (global.set $global_funcref + ;; CHECK-BIN-NEXT: (global.get $global_funcref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (global.set $global_funcref + ;; CHECK-BIN-NEXT: (local.get $local_funcref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (global.set $global_funcref + ;; CHECK-BIN-NEXT: (ref.null nofunc) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (global.set $global_funcref + ;; CHECK-BIN-NEXT: (ref.func $foo) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (global.set $global_anyref + ;; CHECK-BIN-NEXT: (global.get $global_anyref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (global.set $global_anyref + ;; CHECK-BIN-NEXT: (local.get $local_anyref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (global.set $global_anyref + ;; CHECK-BIN-NEXT: (ref.null none) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (global.set $global_anyref + ;; CHECK-BIN-NEXT: (global.get $global_eqref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (global.set $global_anyref + ;; CHECK-BIN-NEXT: (local.get $local_eqref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (global.set $global_anyref + ;; CHECK-BIN-NEXT: (ref.null none) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (call $take_eqref + ;; CHECK-BIN-NEXT: (local.get $local_eqref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (call $take_eqref + ;; CHECK-BIN-NEXT: (global.get $global_eqref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (call $take_eqref + ;; CHECK-BIN-NEXT: (ref.null none) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (call $take_funcref + ;; CHECK-BIN-NEXT: (local.get $local_funcref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (call $take_funcref + ;; CHECK-BIN-NEXT: (global.get $global_funcref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (call $take_funcref + ;; CHECK-BIN-NEXT: (ref.null nofunc) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (call $take_funcref + ;; CHECK-BIN-NEXT: (ref.func $foo) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (call $take_anyref + ;; CHECK-BIN-NEXT: (local.get $local_anyref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (call $take_anyref + ;; CHECK-BIN-NEXT: (global.get $global_anyref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (call $take_anyref + ;; CHECK-BIN-NEXT: (ref.null none) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (call $take_anyref + ;; CHECK-BIN-NEXT: (local.get $local_eqref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (call $take_anyref + ;; CHECK-BIN-NEXT: (global.get $global_eqref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (call $take_anyref + ;; CHECK-BIN-NEXT: (ref.null none) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (call_indirect $0 (type $sig_eqref) + ;; CHECK-BIN-NEXT: (local.get $local_eqref) + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (call_indirect $0 (type $sig_eqref) + ;; CHECK-BIN-NEXT: (global.get $global_eqref) + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (call_indirect $0 (type $sig_eqref) + ;; CHECK-BIN-NEXT: (ref.null none) + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (call_indirect $0 (type $sig_funcref) + ;; CHECK-BIN-NEXT: (local.get $local_funcref) + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (call_indirect $0 (type $sig_funcref) + ;; CHECK-BIN-NEXT: (global.get $global_funcref) + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (call_indirect $0 (type $sig_funcref) + ;; CHECK-BIN-NEXT: (ref.null nofunc) + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (call_indirect $0 (type $sig_funcref) + ;; CHECK-BIN-NEXT: (ref.func $foo) + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (call_indirect $0 (type $sig_anyref) + ;; CHECK-BIN-NEXT: (local.get $local_anyref) + ;; CHECK-BIN-NEXT: (i32.const 3) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (call_indirect $0 (type $sig_anyref) + ;; CHECK-BIN-NEXT: (global.get $global_anyref) + ;; CHECK-BIN-NEXT: (i32.const 3) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (call_indirect $0 (type $sig_anyref) + ;; CHECK-BIN-NEXT: (ref.null none) + ;; CHECK-BIN-NEXT: (i32.const 3) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (call_indirect $0 (type $sig_anyref) + ;; CHECK-BIN-NEXT: (local.get $local_eqref) + ;; CHECK-BIN-NEXT: (i32.const 3) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (call_indirect $0 (type $sig_anyref) + ;; CHECK-BIN-NEXT: (global.get $global_eqref) + ;; CHECK-BIN-NEXT: (i32.const 3) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (call_indirect $0 (type $sig_anyref) + ;; CHECK-BIN-NEXT: (ref.null none) + ;; CHECK-BIN-NEXT: (i32.const 3) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (block $label$1 (result eqref) + ;; CHECK-BIN-NEXT: (br_if $label$1 + ;; CHECK-BIN-NEXT: (local.get $local_eqref) + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (block $label$2 (result eqref) + ;; CHECK-BIN-NEXT: (br_if $label$2 + ;; CHECK-BIN-NEXT: (global.get $global_eqref) + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (block $label$3 (result eqref) + ;; CHECK-BIN-NEXT: (br_if $label$3 + ;; CHECK-BIN-NEXT: (ref.null none) + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (block $label$4 (result funcref) + ;; CHECK-BIN-NEXT: (br_if $label$4 + ;; CHECK-BIN-NEXT: (local.get $local_funcref) + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (block $label$5 (result funcref) + ;; CHECK-BIN-NEXT: (br_if $label$5 + ;; CHECK-BIN-NEXT: (global.get $global_funcref) + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (block $label$6 (result funcref) + ;; CHECK-BIN-NEXT: (br_if $label$6 + ;; CHECK-BIN-NEXT: (ref.null nofunc) + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (block $label$7 (result funcref) + ;; CHECK-BIN-NEXT: (br_if $label$7 + ;; CHECK-BIN-NEXT: (ref.func $foo) + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (block $label$8 (result anyref) + ;; CHECK-BIN-NEXT: (br_if $label$8 + ;; CHECK-BIN-NEXT: (local.get $local_anyref) + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (block $label$9 (result anyref) + ;; CHECK-BIN-NEXT: (br_if $label$9 + ;; CHECK-BIN-NEXT: (global.get $global_anyref) + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (block $label$10 (result anyref) + ;; CHECK-BIN-NEXT: (br_if $label$10 + ;; CHECK-BIN-NEXT: (ref.null none) + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (block $label$11 (result anyref) + ;; CHECK-BIN-NEXT: (br_if $label$11 + ;; CHECK-BIN-NEXT: (local.get $local_eqref) + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (block $label$12 (result anyref) + ;; CHECK-BIN-NEXT: (br_if $label$12 + ;; CHECK-BIN-NEXT: (ref.null none) + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (loop $label$13 (result eqref) + ;; CHECK-BIN-NEXT: (local.get $local_eqref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (loop $label$14 (result eqref) + ;; CHECK-BIN-NEXT: (global.get $global_eqref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (loop $label$15 (result eqref) + ;; CHECK-BIN-NEXT: (ref.null none) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (loop $label$16 (result funcref) + ;; CHECK-BIN-NEXT: (local.get $local_funcref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (loop $label$17 (result funcref) + ;; CHECK-BIN-NEXT: (global.get $global_funcref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (loop $label$18 (result funcref) + ;; CHECK-BIN-NEXT: (ref.null nofunc) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (loop $label$19 (result funcref) + ;; CHECK-BIN-NEXT: (ref.func $foo) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (loop $label$20 (result anyref) + ;; CHECK-BIN-NEXT: (local.get $local_anyref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (loop $label$21 (result anyref) + ;; CHECK-BIN-NEXT: (global.get $global_anyref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (loop $label$22 (result anyref) + ;; CHECK-BIN-NEXT: (ref.null none) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (loop $label$23 (result anyref) + ;; CHECK-BIN-NEXT: (local.get $local_eqref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (loop $label$24 (result anyref) + ;; CHECK-BIN-NEXT: (global.get $global_eqref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (loop $label$25 (result anyref) + ;; CHECK-BIN-NEXT: (ref.null none) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (if (result eqref) + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: (local.get $local_eqref) + ;; CHECK-BIN-NEXT: (ref.null none) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (if (result funcref) + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: (local.get $local_funcref) + ;; CHECK-BIN-NEXT: (ref.null nofunc) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (if (result anyref) + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: (local.get $local_anyref) + ;; CHECK-BIN-NEXT: (ref.null none) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (if (result anyref) + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: (local.get $local_eqref) + ;; CHECK-BIN-NEXT: (local.get $local_eqref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (if (result anyref) + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: (ref.null none) + ;; CHECK-BIN-NEXT: (ref.null none) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (if (result anyref) + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: (ref.i31 + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (ref.null none) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (try $label$40 (result eqref) + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (local.get $local_eqref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch $e-i32 + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (pop i32) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (ref.null none) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (try $label$43 (result funcref) + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (ref.func $foo) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch $e-i32 + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (pop i32) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (ref.null nofunc) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (try $label$46 (result anyref) + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (local.get $local_eqref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch $e-i32 + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (pop i32) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (ref.null none) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (try $label$49 (result anyref) + ;; CHECK-BIN-NEXT: (do + ;; CHECK-BIN-NEXT: (ref.null none) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (catch $e-i32 + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (pop i32) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (local.get $local_eqref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (select (result eqref) + ;; CHECK-BIN-NEXT: (local.get $local_eqref) + ;; CHECK-BIN-NEXT: (ref.null none) + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (select (result funcref) + ;; CHECK-BIN-NEXT: (local.get $local_funcref) + ;; CHECK-BIN-NEXT: (ref.null nofunc) + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (select + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: (i32.const 2) + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (select (result anyref) + ;; CHECK-BIN-NEXT: (local.get $local_eqref) + ;; CHECK-BIN-NEXT: (ref.i31 + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (ref.is_null + ;; CHECK-BIN-NEXT: (local.get $local_eqref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (ref.is_null + ;; CHECK-BIN-NEXT: (global.get $global_eqref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (ref.is_null + ;; CHECK-BIN-NEXT: (ref.null none) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (ref.is_null + ;; CHECK-BIN-NEXT: (local.get $local_funcref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (ref.is_null + ;; CHECK-BIN-NEXT: (global.get $global_funcref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (ref.is_null + ;; CHECK-BIN-NEXT: (ref.null nofunc) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (ref.is_null + ;; CHECK-BIN-NEXT: (ref.func $foo) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (ref.is_null + ;; CHECK-BIN-NEXT: (local.get $local_anyref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (ref.is_null + ;; CHECK-BIN-NEXT: (global.get $global_anyref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (ref.is_null + ;; CHECK-BIN-NEXT: (ref.null none) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $test + (local $local_eqref eqref) + (local $local_funcref funcref) + (local $local_anyref anyref) + + ;; Test types for local.get/set + (local.set $local_eqref (local.get $local_eqref)) + (local.set $local_eqref (global.get $global_eqref)) + (local.set $local_eqref (ref.null eq)) + (local.set $local_funcref (local.get $local_funcref)) + (local.set $local_funcref (global.get $global_funcref)) + (local.set $local_funcref (ref.null func)) + (local.set $local_funcref (ref.func $foo)) + (local.set $local_anyref (local.get $local_anyref)) + (local.set $local_anyref (global.get $global_anyref)) + (local.set $local_anyref (ref.null any)) + + ;; Test subtype relationship for local.set + (local.set $local_anyref (local.get $local_eqref)) + (local.set $local_anyref (global.get $global_eqref)) + (local.set $local_anyref (ref.null eq)) + + ;; Test types for global.get/set + (global.set $global_eqref (global.get $global_eqref)) + (global.set $global_eqref (local.get $local_eqref)) + (global.set $global_eqref (ref.null eq)) + (global.set $global_funcref (global.get $global_funcref)) + (global.set $global_funcref (local.get $local_funcref)) + (global.set $global_funcref (ref.null func)) + (global.set $global_funcref (ref.func $foo)) + (global.set $global_anyref (global.get $global_anyref)) + (global.set $global_anyref (local.get $local_anyref)) + (global.set $global_anyref (ref.null any)) + + ;; Test subtype relationship for global.set + (global.set $global_anyref (global.get $global_eqref)) + (global.set $global_anyref (local.get $local_eqref)) + (global.set $global_anyref (ref.null eq)) + + ;; Test function call params + (call $take_eqref (local.get $local_eqref)) + (call $take_eqref (global.get $global_eqref)) + (call $take_eqref (ref.null eq)) + (call $take_funcref (local.get $local_funcref)) + (call $take_funcref (global.get $global_funcref)) + (call $take_funcref (ref.null func)) + (call $take_funcref (ref.func $foo)) + (call $take_anyref (local.get $local_anyref)) + (call $take_anyref (global.get $global_anyref)) + (call $take_anyref (ref.null any)) + + ;; Test subtype relationship for function call params + (call $take_anyref (local.get $local_eqref)) + (call $take_anyref (global.get $global_eqref)) + (call $take_anyref (ref.null eq)) + + ;; Test call_indirect params + (call_indirect (type $sig_eqref) (local.get $local_eqref) (i32.const 0)) + (call_indirect (type $sig_eqref) (global.get $global_eqref) (i32.const 0)) + (call_indirect (type $sig_eqref) (ref.null eq) (i32.const 0)) + (call_indirect (type $sig_funcref) (local.get $local_funcref) (i32.const 1)) + (call_indirect (type $sig_funcref) (global.get $global_funcref) (i32.const 1)) + (call_indirect (type $sig_funcref) (ref.null func) (i32.const 1)) + (call_indirect (type $sig_funcref) (ref.func $foo) (i32.const 1)) + (call_indirect (type $sig_anyref) (local.get $local_anyref) (i32.const 3)) + (call_indirect (type $sig_anyref) (global.get $global_anyref) (i32.const 3)) + (call_indirect (type $sig_anyref) (ref.null any) (i32.const 3)) + + ;; Test subtype relationship for call_indirect params + (call_indirect (type $sig_anyref) (local.get $local_eqref) (i32.const 3)) + (call_indirect (type $sig_anyref) (global.get $global_eqref) (i32.const 3)) + (call_indirect (type $sig_anyref) (ref.null eq) (i32.const 3)) + + ;; Test block return type + (drop + (block (result eqref) + (br_if 0 (local.get $local_eqref) (i32.const 1)) + ) + ) + (drop + (block (result eqref) + (br_if 0 (global.get $global_eqref) (i32.const 1)) + ) + ) + (drop + (block (result eqref) + (br_if 0 (ref.null eq) (i32.const 1)) + ) + ) + (drop + (block (result funcref) + (br_if 0 (local.get $local_funcref) (i32.const 1)) + ) + ) + (drop + (block (result funcref) + (br_if 0 (global.get $global_funcref) (i32.const 1)) + ) + ) + (drop + (block (result funcref) + (br_if 0 (ref.null func) (i32.const 1)) + ) + ) + (drop + (block (result funcref) + (br_if 0 (ref.func $foo) (i32.const 1)) + ) + ) + (drop + (block (result anyref) + (br_if 0 (local.get $local_anyref) (i32.const 1)) + ) + ) + (drop + (block (result anyref) + (br_if 0 (global.get $global_anyref) (i32.const 1)) + ) + ) + (drop + (block (result anyref) + (br_if 0 (ref.null any) (i32.const 1)) + ) + ) + + ;; Test subtype relationship for block return type + (drop + (block (result anyref) + (br_if 0 (local.get $local_eqref) (i32.const 1)) + ) + ) + (drop + (block (result anyref) + (br_if 0 (ref.null eq) (i32.const 1)) + ) + ) + + ;; Test loop return type + (drop + (loop (result eqref) + (local.get $local_eqref) + ) + ) + (drop + (loop (result eqref) + (global.get $global_eqref) + ) + ) + (drop + (loop (result eqref) + (ref.null eq) + ) + ) + (drop + (loop (result funcref) + (local.get $local_funcref) + ) + ) + (drop + (loop (result funcref) + (global.get $global_funcref) + ) + ) + (drop + (loop (result funcref) + (ref.null func) + ) + ) + (drop + (loop (result funcref) + (ref.func $foo) + ) + ) + (drop + (loop (result anyref) + (local.get $local_anyref) + ) + ) + (drop + (loop (result anyref) + (global.get $global_anyref) + ) + ) + (drop + (loop (result anyref) + (ref.null any) + ) + ) + + ;; Test subtype relationship for loop return type + (drop + (loop (result anyref) + (local.get $local_eqref) + ) + ) + (drop + (loop (result anyref) + (global.get $global_eqref) + ) + ) + (drop + (loop (result anyref) + (ref.null eq) + ) + ) + + ;; Test if return type + (drop + (if (result eqref) + (i32.const 1) + (local.get $local_eqref) + (ref.null eq) + ) + ) + (drop + (if (result funcref) + (i32.const 1) + (local.get $local_funcref) + (ref.null func) + ) + ) + (drop + (if (result anyref) + (i32.const 1) + (local.get $local_anyref) + (ref.null any) + ) + ) + + ;; Test subtype relationship for if return type + (drop + (if (result anyref) + (i32.const 1) + (local.get $local_eqref) + (local.get $local_eqref) + ) + ) + (drop + (if (result anyref) + (i32.const 1) + (ref.null eq) + (ref.null i31) + ) + ) + (drop + (if (result anyref) + (i32.const 1) + (ref.i31 + (i32.const 0) + ) + (ref.null eq) + ) + ) + + ;; Test try return type + (drop + (try (result eqref) + (do + (local.get $local_eqref) + ) + (catch $e-i32 + (drop (pop i32)) + (ref.null eq) + ) + ) + ) + (drop + (try (result funcref) + (do + (ref.func $foo) + ) + (catch $e-i32 + (drop (pop i32)) + (ref.null func) + ) + ) + ) + + ;; Test subtype relationship for try return type + (drop + (try (result anyref) + (do + (local.get $local_eqref) + ) + (catch $e-i32 + (drop (pop i32)) + (ref.null any) + ) + ) + ) + (drop + (try (result anyref) + (do + (ref.null eq) + ) + (catch $e-i32 + (drop (pop i32)) + (local.get $local_eqref) + ) + ) + ) + + ;; Test typed select + (drop + (select (result eqref) + (local.get $local_eqref) + (ref.null eq) + (i32.const 1) + ) + ) + (drop + (select (result funcref) + (local.get $local_funcref) + (ref.null func) + (i32.const 1) + ) + ) + (drop + (select (result i32) + (i32.const 0) + (i32.const 2) + (i32.const 1) + ) + ) + + ;; Test subtype relationship for typed select + (drop + (select (result anyref) + (local.get $local_eqref) + (ref.i31 + (i32.const 0) + ) + (i32.const 1) + ) + ) + + ;; ref.is_null takes any reference types + (drop (ref.is_null (local.get $local_eqref))) + (drop (ref.is_null (global.get $global_eqref))) + (drop (ref.is_null (ref.null eq))) + (drop (ref.is_null (local.get $local_funcref))) + (drop (ref.is_null (global.get $global_funcref))) + (drop (ref.is_null (ref.null func))) + (drop (ref.is_null (ref.func $foo))) + (drop (ref.is_null (local.get $local_anyref))) + (drop (ref.is_null (global.get $global_anyref))) + (drop (ref.is_null (ref.null any))) + ) + + ;; Test function return type + + ;; CHECK-TEXT: (func $return_eqref_local (type $6) (result eqref) + ;; CHECK-TEXT-NEXT: (local $local_eqref eqref) + ;; CHECK-TEXT-NEXT: (local.get $local_eqref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $return_eqref_local (type $6) (result eqref) + ;; CHECK-BIN-NEXT: (local $local_eqref eqref) + ;; CHECK-BIN-NEXT: (local.get $local_eqref) + ;; CHECK-BIN-NEXT: ) + (func $return_eqref_local (result eqref) + (local $local_eqref eqref) + (local.get $local_eqref) + ) + + ;; CHECK-TEXT: (func $return_eqref_global (type $6) (result eqref) + ;; CHECK-TEXT-NEXT: (global.get $global_eqref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $return_eqref_global (type $6) (result eqref) + ;; CHECK-BIN-NEXT: (global.get $global_eqref) + ;; CHECK-BIN-NEXT: ) + (func $return_eqref_global (result eqref) + (global.get $global_eqref) + ) + + ;; CHECK-TEXT: (func $return_eqref_null (type $6) (result eqref) + ;; CHECK-TEXT-NEXT: (ref.null none) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $return_eqref_null (type $6) (result eqref) + ;; CHECK-BIN-NEXT: (ref.null none) + ;; CHECK-BIN-NEXT: ) + (func $return_eqref_null (result eqref) + (ref.null eq) + ) + + ;; CHECK-TEXT: (func $return_funcref_local (type $3) (result funcref) + ;; CHECK-TEXT-NEXT: (local $local_funcref funcref) + ;; CHECK-TEXT-NEXT: (local.get $local_funcref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $return_funcref_local (type $3) (result funcref) + ;; CHECK-BIN-NEXT: (local $local_funcref funcref) + ;; CHECK-BIN-NEXT: (local.get $local_funcref) + ;; CHECK-BIN-NEXT: ) + (func $return_funcref_local (result funcref) + (local $local_funcref funcref) + (local.get $local_funcref) + ) + + ;; CHECK-TEXT: (func $return_funcref_global (type $3) (result funcref) + ;; CHECK-TEXT-NEXT: (global.get $global_funcref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $return_funcref_global (type $3) (result funcref) + ;; CHECK-BIN-NEXT: (global.get $global_funcref) + ;; CHECK-BIN-NEXT: ) + (func $return_funcref_global (result funcref) + (global.get $global_funcref) + ) + + ;; CHECK-TEXT: (func $return_funcref_null (type $3) (result funcref) + ;; CHECK-TEXT-NEXT: (ref.null nofunc) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $return_funcref_null (type $3) (result funcref) + ;; CHECK-BIN-NEXT: (ref.null nofunc) + ;; CHECK-BIN-NEXT: ) + (func $return_funcref_null (result funcref) + (ref.null func) + ) + + ;; CHECK-TEXT: (func $return_funcref_func (type $3) (result funcref) + ;; CHECK-TEXT-NEXT: (ref.func $foo) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $return_funcref_func (type $3) (result funcref) + ;; CHECK-BIN-NEXT: (ref.func $foo) + ;; CHECK-BIN-NEXT: ) + (func $return_funcref_func (result funcref) + (ref.func $foo) + ) + + ;; CHECK-TEXT: (func $return_anyref_local (type $0) (result anyref) + ;; CHECK-TEXT-NEXT: (local $local_anyref anyref) + ;; CHECK-TEXT-NEXT: (local.get $local_anyref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $return_anyref_local (type $0) (result anyref) + ;; CHECK-BIN-NEXT: (local $local_anyref anyref) + ;; CHECK-BIN-NEXT: (local.get $local_anyref) + ;; CHECK-BIN-NEXT: ) + (func $return_anyref_local (result anyref) + (local $local_anyref anyref) + (local.get $local_anyref) + ) + + ;; CHECK-TEXT: (func $return_anyref_global (type $0) (result anyref) + ;; CHECK-TEXT-NEXT: (global.get $global_anyref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $return_anyref_global (type $0) (result anyref) + ;; CHECK-BIN-NEXT: (global.get $global_anyref) + ;; CHECK-BIN-NEXT: ) + (func $return_anyref_global (result anyref) + (global.get $global_anyref) + ) + + ;; CHECK-TEXT: (func $return_anyref_null (type $0) (result anyref) + ;; CHECK-TEXT-NEXT: (ref.null none) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $return_anyref_null (type $0) (result anyref) + ;; CHECK-BIN-NEXT: (ref.null none) + ;; CHECK-BIN-NEXT: ) + (func $return_anyref_null (result anyref) + (ref.null any) + ) + + ;; Test subtype relationship in function return type + + ;; CHECK-TEXT: (func $return_anyref2 (type $0) (result anyref) + ;; CHECK-TEXT-NEXT: (local $local_eqref eqref) + ;; CHECK-TEXT-NEXT: (local.get $local_eqref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $return_anyref2 (type $0) (result anyref) + ;; CHECK-BIN-NEXT: (local $local_eqref eqref) + ;; CHECK-BIN-NEXT: (local.get $local_eqref) + ;; CHECK-BIN-NEXT: ) + (func $return_anyref2 (result anyref) + (local $local_eqref eqref) + (local.get $local_eqref) + ) + + ;; CHECK-TEXT: (func $return_anyref3 (type $0) (result anyref) + ;; CHECK-TEXT-NEXT: (global.get $global_eqref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $return_anyref3 (type $0) (result anyref) + ;; CHECK-BIN-NEXT: (global.get $global_eqref) + ;; CHECK-BIN-NEXT: ) + (func $return_anyref3 (result anyref) + (global.get $global_eqref) + ) + + ;; CHECK-TEXT: (func $return_anyref4 (type $0) (result anyref) + ;; CHECK-TEXT-NEXT: (ref.null none) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $return_anyref4 (type $0) (result anyref) + ;; CHECK-BIN-NEXT: (ref.null none) + ;; CHECK-BIN-NEXT: ) + (func $return_anyref4 (result anyref) + (ref.null eq) + ) + + ;; Test returns + + ;; CHECK-TEXT: (func $returns_eqref (type $6) (result eqref) + ;; CHECK-TEXT-NEXT: (local $local_eqref eqref) + ;; CHECK-TEXT-NEXT: (return + ;; CHECK-TEXT-NEXT: (local.get $local_eqref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (return + ;; CHECK-TEXT-NEXT: (global.get $global_eqref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (return + ;; CHECK-TEXT-NEXT: (ref.null none) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $returns_eqref (type $6) (result eqref) + ;; CHECK-BIN-NEXT: (local $local_eqref eqref) + ;; CHECK-BIN-NEXT: (return + ;; CHECK-BIN-NEXT: (local.get $local_eqref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $returns_eqref (result eqref) + (local $local_eqref eqref) + (return (local.get $local_eqref)) + (return (global.get $global_eqref)) + (return (ref.null eq)) + ) + + ;; CHECK-TEXT: (func $returns_funcref (type $3) (result funcref) + ;; CHECK-TEXT-NEXT: (local $local_funcref funcref) + ;; CHECK-TEXT-NEXT: (return + ;; CHECK-TEXT-NEXT: (local.get $local_funcref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (return + ;; CHECK-TEXT-NEXT: (global.get $global_funcref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (return + ;; CHECK-TEXT-NEXT: (ref.func $foo) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (return + ;; CHECK-TEXT-NEXT: (ref.null nofunc) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $returns_funcref (type $3) (result funcref) + ;; CHECK-BIN-NEXT: (local $local_funcref funcref) + ;; CHECK-BIN-NEXT: (return + ;; CHECK-BIN-NEXT: (local.get $local_funcref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $returns_funcref (result funcref) + (local $local_funcref funcref) + (return (local.get $local_funcref)) + (return (global.get $global_funcref)) + (return (ref.func $foo)) + (return (ref.null func)) + ) + + ;; CHECK-TEXT: (func $returns_anyref (type $0) (result anyref) + ;; CHECK-TEXT-NEXT: (local $local_anyref anyref) + ;; CHECK-TEXT-NEXT: (return + ;; CHECK-TEXT-NEXT: (local.get $local_anyref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (return + ;; CHECK-TEXT-NEXT: (global.get $global_anyref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (return + ;; CHECK-TEXT-NEXT: (ref.null none) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $returns_anyref (type $0) (result anyref) + ;; CHECK-BIN-NEXT: (local $local_anyref anyref) + ;; CHECK-BIN-NEXT: (return + ;; CHECK-BIN-NEXT: (local.get $local_anyref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $returns_anyref (result anyref) + (local $local_anyref anyref) + (return (local.get $local_anyref)) + (return (global.get $global_anyref)) + (return (ref.null any)) + ) + + ;; Test subtype relationship in returns + + ;; CHECK-TEXT: (func $returns_anyref2 (type $0) (result anyref) + ;; CHECK-TEXT-NEXT: (local $local_eqref eqref) + ;; CHECK-TEXT-NEXT: (local $local_funcref funcref) + ;; CHECK-TEXT-NEXT: (return + ;; CHECK-TEXT-NEXT: (local.get $local_eqref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (return + ;; CHECK-TEXT-NEXT: (global.get $global_eqref) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (return + ;; CHECK-TEXT-NEXT: (ref.null none) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $returns_anyref2 (type $0) (result anyref) + ;; CHECK-BIN-NEXT: (local $local_eqref eqref) + ;; CHECK-BIN-NEXT: (local $local_funcref funcref) + ;; CHECK-BIN-NEXT: (return + ;; CHECK-BIN-NEXT: (local.get $local_eqref) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $returns_anyref2 (result anyref) + (local $local_eqref eqref) + (local $local_funcref funcref) + (return (local.get $local_eqref)) + (return (global.get $global_eqref)) + (return (ref.null eq)) + ) + + ;; CHECK-TEXT: (func $ref-user (type $5) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (ref.func $ref-taken-but-not-in-table) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $ref-user (type $5) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (ref.func $ref-taken-but-not-in-table) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $ref-user + (drop + ;; an "elem declare func" must be emitted for this ref.func which is not + ;; in the table + (ref.func $ref-taken-but-not-in-table) + ) + ) + + ;; CHECK-TEXT: (func $ref-taken-but-not-in-table (type $5) + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $ref-taken-but-not-in-table (type $5) + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: ) + (func $ref-taken-but-not-in-table) +) +;; CHECK-BIN-NODEBUG: (func $0 (type $4) (param $0 eqref) +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $1 (type $2) (param $0 funcref) +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $2 (type $1) (param $0 anyref) +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $3 (type $5) +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $4 (type $5) +;; CHECK-BIN-NODEBUG-NEXT: (local $0 eqref) +;; CHECK-BIN-NODEBUG-NEXT: (local $1 funcref) +;; CHECK-BIN-NODEBUG-NEXT: (local $2 anyref) +;; CHECK-BIN-NODEBUG-NEXT: (local.set $0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (local.set $0 +;; CHECK-BIN-NODEBUG-NEXT: (global.get $global$0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (local.set $0 +;; CHECK-BIN-NODEBUG-NEXT: (ref.null none) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (local.set $1 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (local.set $1 +;; CHECK-BIN-NODEBUG-NEXT: (global.get $global$1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (local.set $1 +;; CHECK-BIN-NODEBUG-NEXT: (ref.null nofunc) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (local.set $1 +;; CHECK-BIN-NODEBUG-NEXT: (ref.func $3) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (local.set $2 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (local.set $2 +;; CHECK-BIN-NODEBUG-NEXT: (global.get $global$3) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (local.set $2 +;; CHECK-BIN-NODEBUG-NEXT: (ref.null none) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (local.set $2 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (local.set $2 +;; CHECK-BIN-NODEBUG-NEXT: (global.get $global$0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (local.set $2 +;; CHECK-BIN-NODEBUG-NEXT: (ref.null none) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (global.set $global$0 +;; CHECK-BIN-NODEBUG-NEXT: (global.get $global$0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (global.set $global$0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (global.set $global$0 +;; CHECK-BIN-NODEBUG-NEXT: (ref.null none) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (global.set $global$1 +;; CHECK-BIN-NODEBUG-NEXT: (global.get $global$1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (global.set $global$1 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (global.set $global$1 +;; CHECK-BIN-NODEBUG-NEXT: (ref.null nofunc) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (global.set $global$1 +;; CHECK-BIN-NODEBUG-NEXT: (ref.func $3) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (global.set $global$3 +;; CHECK-BIN-NODEBUG-NEXT: (global.get $global$3) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (global.set $global$3 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (global.set $global$3 +;; CHECK-BIN-NODEBUG-NEXT: (ref.null none) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (global.set $global$3 +;; CHECK-BIN-NODEBUG-NEXT: (global.get $global$0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (global.set $global$3 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (global.set $global$3 +;; CHECK-BIN-NODEBUG-NEXT: (ref.null none) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (call $0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (call $0 +;; CHECK-BIN-NODEBUG-NEXT: (global.get $global$0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (call $0 +;; CHECK-BIN-NODEBUG-NEXT: (ref.null none) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (call $1 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (call $1 +;; CHECK-BIN-NODEBUG-NEXT: (global.get $global$1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (call $1 +;; CHECK-BIN-NODEBUG-NEXT: (ref.null nofunc) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (call $1 +;; CHECK-BIN-NODEBUG-NEXT: (ref.func $3) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (call $2 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (call $2 +;; CHECK-BIN-NODEBUG-NEXT: (global.get $global$3) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (call $2 +;; CHECK-BIN-NODEBUG-NEXT: (ref.null none) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (call $2 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (call $2 +;; CHECK-BIN-NODEBUG-NEXT: (global.get $global$0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (call $2 +;; CHECK-BIN-NODEBUG-NEXT: (ref.null none) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (call_indirect $0 (type $4) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (call_indirect $0 (type $4) +;; CHECK-BIN-NODEBUG-NEXT: (global.get $global$0) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (call_indirect $0 (type $4) +;; CHECK-BIN-NODEBUG-NEXT: (ref.null none) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (call_indirect $0 (type $2) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (call_indirect $0 (type $2) +;; CHECK-BIN-NODEBUG-NEXT: (global.get $global$1) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (call_indirect $0 (type $2) +;; CHECK-BIN-NODEBUG-NEXT: (ref.null nofunc) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (call_indirect $0 (type $2) +;; CHECK-BIN-NODEBUG-NEXT: (ref.func $3) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (call_indirect $0 (type $1) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 3) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (call_indirect $0 (type $1) +;; CHECK-BIN-NODEBUG-NEXT: (global.get $global$3) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 3) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (call_indirect $0 (type $1) +;; CHECK-BIN-NODEBUG-NEXT: (ref.null none) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 3) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (call_indirect $0 (type $1) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 3) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (call_indirect $0 (type $1) +;; CHECK-BIN-NODEBUG-NEXT: (global.get $global$0) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 3) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (call_indirect $0 (type $1) +;; CHECK-BIN-NODEBUG-NEXT: (ref.null none) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 3) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (block $label$1 (result eqref) +;; CHECK-BIN-NODEBUG-NEXT: (br_if $label$1 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (block $label$2 (result eqref) +;; CHECK-BIN-NODEBUG-NEXT: (br_if $label$2 +;; CHECK-BIN-NODEBUG-NEXT: (global.get $global$0) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (block $label$3 (result eqref) +;; CHECK-BIN-NODEBUG-NEXT: (br_if $label$3 +;; CHECK-BIN-NODEBUG-NEXT: (ref.null none) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (block $label$4 (result funcref) +;; CHECK-BIN-NODEBUG-NEXT: (br_if $label$4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (block $label$5 (result funcref) +;; CHECK-BIN-NODEBUG-NEXT: (br_if $label$5 +;; CHECK-BIN-NODEBUG-NEXT: (global.get $global$1) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (block $label$6 (result funcref) +;; CHECK-BIN-NODEBUG-NEXT: (br_if $label$6 +;; CHECK-BIN-NODEBUG-NEXT: (ref.null nofunc) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (block $label$7 (result funcref) +;; CHECK-BIN-NODEBUG-NEXT: (br_if $label$7 +;; CHECK-BIN-NODEBUG-NEXT: (ref.func $3) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (block $label$8 (result anyref) +;; CHECK-BIN-NODEBUG-NEXT: (br_if $label$8 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (block $label$9 (result anyref) +;; CHECK-BIN-NODEBUG-NEXT: (br_if $label$9 +;; CHECK-BIN-NODEBUG-NEXT: (global.get $global$3) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (block $label$10 (result anyref) +;; CHECK-BIN-NODEBUG-NEXT: (br_if $label$10 +;; CHECK-BIN-NODEBUG-NEXT: (ref.null none) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (block $label$11 (result anyref) +;; CHECK-BIN-NODEBUG-NEXT: (br_if $label$11 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (block $label$12 (result anyref) +;; CHECK-BIN-NODEBUG-NEXT: (br_if $label$12 +;; CHECK-BIN-NODEBUG-NEXT: (ref.null none) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (loop $label$13 (result eqref) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (loop $label$14 (result eqref) +;; CHECK-BIN-NODEBUG-NEXT: (global.get $global$0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (loop $label$15 (result eqref) +;; CHECK-BIN-NODEBUG-NEXT: (ref.null none) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (loop $label$16 (result funcref) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (loop $label$17 (result funcref) +;; CHECK-BIN-NODEBUG-NEXT: (global.get $global$1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (loop $label$18 (result funcref) +;; CHECK-BIN-NODEBUG-NEXT: (ref.null nofunc) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (loop $label$19 (result funcref) +;; CHECK-BIN-NODEBUG-NEXT: (ref.func $3) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (loop $label$20 (result anyref) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (loop $label$21 (result anyref) +;; CHECK-BIN-NODEBUG-NEXT: (global.get $global$3) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (loop $label$22 (result anyref) +;; CHECK-BIN-NODEBUG-NEXT: (ref.null none) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (loop $label$23 (result anyref) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (loop $label$24 (result anyref) +;; CHECK-BIN-NODEBUG-NEXT: (global.get $global$0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (loop $label$25 (result anyref) +;; CHECK-BIN-NODEBUG-NEXT: (ref.null none) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (if (result eqref) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (ref.null none) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (if (result funcref) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: (ref.null nofunc) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (if (result anyref) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: (ref.null none) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (if (result anyref) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (if (result anyref) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: (ref.null none) +;; CHECK-BIN-NODEBUG-NEXT: (ref.null none) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (if (result anyref) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: (ref.i31 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (ref.null none) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (try $label$40 (result eqref) +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch $tag$0 +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (pop i32) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (ref.null none) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (try $label$43 (result funcref) +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (ref.func $3) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch $tag$0 +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (pop i32) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (ref.null nofunc) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (try $label$46 (result anyref) +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch $tag$0 +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (pop i32) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (ref.null none) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (try $label$49 (result anyref) +;; CHECK-BIN-NODEBUG-NEXT: (do +;; CHECK-BIN-NODEBUG-NEXT: (ref.null none) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (catch $tag$0 +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (pop i32) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (select (result eqref) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (ref.null none) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (select (result funcref) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: (ref.null nofunc) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (select +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 2) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (select (result anyref) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (ref.i31 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (ref.is_null +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (ref.is_null +;; CHECK-BIN-NODEBUG-NEXT: (global.get $global$0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (ref.is_null +;; CHECK-BIN-NODEBUG-NEXT: (ref.null none) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (ref.is_null +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (ref.is_null +;; CHECK-BIN-NODEBUG-NEXT: (global.get $global$1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (ref.is_null +;; CHECK-BIN-NODEBUG-NEXT: (ref.null nofunc) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (ref.is_null +;; CHECK-BIN-NODEBUG-NEXT: (ref.func $3) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (ref.is_null +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (ref.is_null +;; CHECK-BIN-NODEBUG-NEXT: (global.get $global$3) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (ref.is_null +;; CHECK-BIN-NODEBUG-NEXT: (ref.null none) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $5 (type $6) (result eqref) +;; CHECK-BIN-NODEBUG-NEXT: (local $0 eqref) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $6 (type $6) (result eqref) +;; CHECK-BIN-NODEBUG-NEXT: (global.get $global$0) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $7 (type $6) (result eqref) +;; CHECK-BIN-NODEBUG-NEXT: (ref.null none) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $8 (type $3) (result funcref) +;; CHECK-BIN-NODEBUG-NEXT: (local $0 funcref) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $9 (type $3) (result funcref) +;; CHECK-BIN-NODEBUG-NEXT: (global.get $global$1) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $10 (type $3) (result funcref) +;; CHECK-BIN-NODEBUG-NEXT: (ref.null nofunc) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $11 (type $3) (result funcref) +;; CHECK-BIN-NODEBUG-NEXT: (ref.func $3) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $12 (type $0) (result anyref) +;; CHECK-BIN-NODEBUG-NEXT: (local $0 anyref) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $13 (type $0) (result anyref) +;; CHECK-BIN-NODEBUG-NEXT: (global.get $global$3) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $14 (type $0) (result anyref) +;; CHECK-BIN-NODEBUG-NEXT: (ref.null none) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $15 (type $0) (result anyref) +;; CHECK-BIN-NODEBUG-NEXT: (local $0 eqref) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $16 (type $0) (result anyref) +;; CHECK-BIN-NODEBUG-NEXT: (global.get $global$0) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $17 (type $0) (result anyref) +;; CHECK-BIN-NODEBUG-NEXT: (ref.null none) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $18 (type $6) (result eqref) +;; CHECK-BIN-NODEBUG-NEXT: (local $0 eqref) +;; CHECK-BIN-NODEBUG-NEXT: (return +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $19 (type $3) (result funcref) +;; CHECK-BIN-NODEBUG-NEXT: (local $0 funcref) +;; CHECK-BIN-NODEBUG-NEXT: (return +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $20 (type $0) (result anyref) +;; CHECK-BIN-NODEBUG-NEXT: (local $0 anyref) +;; CHECK-BIN-NODEBUG-NEXT: (return +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $21 (type $0) (result anyref) +;; CHECK-BIN-NODEBUG-NEXT: (local $0 eqref) +;; CHECK-BIN-NODEBUG-NEXT: (local $1 funcref) +;; CHECK-BIN-NODEBUG-NEXT: (return +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $22 (type $5) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (ref.func $23) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $23 (type $5) +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: ) diff --git a/test/lit/basic/reg_switch.wast b/test/lit/basic/reg_switch.wast new file mode 100644 index 000000000..5f9dd5d7f --- /dev/null +++ b/test/lit/basic/reg_switch.wast @@ -0,0 +1,62 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wast -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast +;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +(module + ;; CHECK-TEXT: (type $0 (func)) + ;; CHECK-BIN: (type $0 (func)) + ;; CHECK-BIN-NODEBUG: (type $0 (func)) + (type $0 (func)) + ;; CHECK-TEXT: (memory $0 0) + ;; CHECK-BIN: (memory $0 0) + ;; CHECK-BIN-NODEBUG: (memory $0 0) + (memory $0 0) + + ;; CHECK-TEXT: (func $0 (type $0) + ;; CHECK-TEXT-NEXT: (if + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: (block $A + ;; CHECK-TEXT-NEXT: (br_table $A + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $0 (type $0) + ;; CHECK-BIN-NEXT: (if + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: (block $label$2 + ;; CHECK-BIN-NEXT: (br_table $label$2 + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NODEBUG: (func $0 (type $0) + ;; CHECK-BIN-NODEBUG-NEXT: (if + ;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) + ;; CHECK-BIN-NODEBUG-NEXT: (block $label$2 + ;; CHECK-BIN-NODEBUG-NEXT: (br_table $label$2 + ;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) + ;; CHECK-BIN-NODEBUG-NEXT: ) + ;; CHECK-BIN-NODEBUG-NEXT: ) + ;; CHECK-BIN-NODEBUG-NEXT: ) + ;; CHECK-BIN-NODEBUG-NEXT: ) + (func $0 (type $0) + (if + (i32.const 0) + (block $A + (br_table $A + (i32.const 0) + ) + ) + ) + ) +) diff --git a/test/lit/basic/segment-overlap.wast b/test/lit/basic/segment-overlap.wast new file mode 100644 index 000000000..a4d7e11cc --- /dev/null +++ b/test/lit/basic/segment-overlap.wast @@ -0,0 +1,30 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wast -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast +;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +(module + ;; CHECK-TEXT: (memory $0 10) + ;; CHECK-BIN: (memory $0 10) + ;; CHECK-BIN-NODEBUG: (memory $0 10) + (memory $0 10) + (data (i32.const 100) "\ff\ff\ff\ff\ff\ff\ff\ff") ;; overlaps with the next + (data (i32.const 104) "\00\00\00\00") +) +;; CHECK-TEXT: (data $0 (i32.const 100) "\ff\ff\ff\ff\ff\ff\ff\ff") + +;; CHECK-TEXT: (data $1 (i32.const 104) "\00\00\00\00") + +;; CHECK-BIN: (data $0 (i32.const 100) "\ff\ff\ff\ff\ff\ff\ff\ff") + +;; CHECK-BIN: (data $1 (i32.const 104) "\00\00\00\00") + +;; CHECK-BIN-NODEBUG: (data $0 (i32.const 100) "\ff\ff\ff\ff\ff\ff\ff\ff") + +;; CHECK-BIN-NODEBUG: (data $1 (i32.const 104) "\00\00\00\00") diff --git a/test/lit/basic/signext.wast b/test/lit/basic/signext.wast new file mode 100644 index 000000000..495ef958a --- /dev/null +++ b/test/lit/basic/signext.wast @@ -0,0 +1,114 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wast -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast +;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +(module + ;; CHECK-TEXT: (type $0 (func)) + ;; CHECK-BIN: (type $0 (func)) + ;; CHECK-BIN-NODEBUG: (type $0 (func)) + (type $0 (func)) + + ;; CHECK-TEXT: (func $signext (type $0) + ;; CHECK-TEXT-NEXT: (local $0 i32) + ;; CHECK-TEXT-NEXT: (local $1 i64) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.extend8_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.extend16_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.extend8_s + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.extend16_s + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i64.extend32_s + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $signext (type $0) + ;; CHECK-BIN-NEXT: (local $0 i32) + ;; CHECK-BIN-NEXT: (local $1 i64) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.extend8_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.extend16_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.extend8_s + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.extend16_s + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i64.extend32_s + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $signext (type $0) + (local $0 i32) + (local $1 i64) + (drop (i32.extend8_s (local.get $0))) + (drop (i32.extend16_s (local.get $0))) + (drop (i64.extend8_s (local.get $1))) + (drop (i64.extend16_s (local.get $1))) + (drop (i64.extend32_s (local.get $1))) + ) +) +;; CHECK-BIN-NODEBUG: (func $0 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (local $0 i32) +;; CHECK-BIN-NODEBUG-NEXT: (local $1 i64) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.extend8_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.extend16_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.extend8_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.extend16_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i64.extend32_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) diff --git a/test/lit/basic/simd.wast b/test/lit/basic/simd.wast new file mode 100644 index 000000000..483caefca --- /dev/null +++ b/test/lit/basic/simd.wast @@ -0,0 +1,6087 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wast -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast +;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +(module + (memory 1 1) + + ;; CHECK-TEXT: (type $0 (func (param v128 v128) (result v128))) + + ;; CHECK-TEXT: (type $1 (func (param v128) (result v128))) + + ;; CHECK-TEXT: (type $2 (func (param i32) (result v128))) + + ;; CHECK-TEXT: (type $3 (func (param v128 i32) (result v128))) + + ;; CHECK-TEXT: (type $4 (func (param v128) (result i32))) + + ;; CHECK-TEXT: (type $5 (func (param i32 v128))) + + ;; CHECK-TEXT: (type $6 (func (param i32 v128) (result v128))) + + ;; CHECK-TEXT: (type $7 (func (result v128))) + + ;; CHECK-TEXT: (type $8 (func (param f32) (result v128))) + + ;; CHECK-TEXT: (type $9 (func (param f64) (result v128))) + + ;; CHECK-TEXT: (type $10 (func (param v128) (result i64))) + + ;; CHECK-TEXT: (type $11 (func (param v128 i64) (result v128))) + + ;; CHECK-TEXT: (type $12 (func (param v128) (result f32))) + + ;; CHECK-TEXT: (type $13 (func (param v128 f32) (result v128))) + + ;; CHECK-TEXT: (type $14 (func (param v128) (result f64))) + + ;; CHECK-TEXT: (type $15 (func (param v128 f64) (result v128))) + + ;; CHECK-TEXT: (type $16 (func (param v128 v128 v128) (result v128))) + + ;; CHECK-TEXT: (memory $0 1 1) + + ;; CHECK-TEXT: (func $v128.load (type $2) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (type $0 (func (param v128 v128) (result v128))) + + ;; CHECK-BIN: (type $1 (func (param v128) (result v128))) + + ;; CHECK-BIN: (type $2 (func (param i32) (result v128))) + + ;; CHECK-BIN: (type $3 (func (param v128 i32) (result v128))) + + ;; CHECK-BIN: (type $4 (func (param v128) (result i32))) + + ;; CHECK-BIN: (type $5 (func (param i32 v128))) + + ;; CHECK-BIN: (type $6 (func (param i32 v128) (result v128))) + + ;; CHECK-BIN: (type $7 (func (result v128))) + + ;; CHECK-BIN: (type $8 (func (param f32) (result v128))) + + ;; CHECK-BIN: (type $9 (func (param f64) (result v128))) + + ;; CHECK-BIN: (type $10 (func (param v128) (result i64))) + + ;; CHECK-BIN: (type $11 (func (param v128 i64) (result v128))) + + ;; CHECK-BIN: (type $12 (func (param v128) (result f32))) + + ;; CHECK-BIN: (type $13 (func (param v128 f32) (result v128))) + + ;; CHECK-BIN: (type $14 (func (param v128) (result f64))) + + ;; CHECK-BIN: (type $15 (func (param v128 f64) (result v128))) + + ;; CHECK-BIN: (type $16 (func (param v128 v128 v128) (result v128))) + + ;; CHECK-BIN: (memory $0 1 1) + + ;; CHECK-BIN: (func $v128.load (type $2) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (v128.load + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load (param $0 i32) (result v128) + (v128.load offset=0 align=16 + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load8x8_s (type $2) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load8x8_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load8x8_s (type $2) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (v128.load8x8_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load8x8_s (param $0 i32) (result v128) + (v128.load8x8_s + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load8x8_u (type $2) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load8x8_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load8x8_u (type $2) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (v128.load8x8_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load8x8_u (param $0 i32) (result v128) + (v128.load8x8_u + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load16x4_s (type $2) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load16x4_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load16x4_s (type $2) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (v128.load16x4_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load16x4_s (param $0 i32) (result v128) + (v128.load16x4_s + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load16x4_u (type $2) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load16x4_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load16x4_u (type $2) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (v128.load16x4_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load16x4_u (param $0 i32) (result v128) + (v128.load16x4_u + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load32x2_s (type $2) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load32x2_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load32x2_s (type $2) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (v128.load32x2_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load32x2_s (param $0 i32) (result v128) + (v128.load32x2_s + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load32x2_u (type $2) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load32x2_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load32x2_u (type $2) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (v128.load32x2_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load32x2_u (param $0 i32) (result v128) + (v128.load32x2_u + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load8_splat (type $2) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load8_splat + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load8_splat (type $2) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (v128.load8_splat + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load8_splat (param $0 i32) (result v128) + (v128.load8_splat + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load16_splat (type $2) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load16_splat + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load16_splat (type $2) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (v128.load16_splat + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load16_splat (param $0 i32) (result v128) + (v128.load16_splat + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load32_splat (type $2) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load32_splat + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load32_splat (type $2) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (v128.load32_splat + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load32_splat (param $0 i32) (result v128) + (v128.load32_splat + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load64_splat (type $2) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load64_splat + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load64_splat (type $2) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (v128.load64_splat + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load64_splat (param $0 i32) (result v128) + (v128.load64_splat + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.store (type $5) (param $0 i32) (param $1 v128) + ;; CHECK-TEXT-NEXT: (v128.store + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.store (type $5) (param $0 i32) (param $1 v128) + ;; CHECK-BIN-NEXT: (v128.store + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.store (param $0 i32) (param $1 v128) + (v128.store offset=0 align=16 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.const.i8x16 (type $7) (result v128) + ;; CHECK-TEXT-NEXT: (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.const.i8x16 (type $7) (result v128) + ;; CHECK-BIN-NEXT: (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ;; CHECK-BIN-NEXT: ) + (func $v128.const.i8x16 (result v128) + (v128.const i8x16 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16) + ) + + ;; CHECK-TEXT: (func $v128.const.i16x8 (type $7) (result v128) + ;; CHECK-TEXT-NEXT: (v128.const i32x4 0x00020001 0x00040003 0x00060005 0x00080007) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.const.i16x8 (type $7) (result v128) + ;; CHECK-BIN-NEXT: (v128.const i32x4 0x00020001 0x00040003 0x00060005 0x00080007) + ;; CHECK-BIN-NEXT: ) + (func $v128.const.i16x8 (result v128) + (v128.const i16x8 1 2 3 4 5 6 7 8) + ) + + ;; CHECK-TEXT: (func $v128.const.i32x4 (type $7) (result v128) + ;; CHECK-TEXT-NEXT: (v128.const i32x4 0x00000001 0x00000002 0x00000003 0x00000004) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.const.i32x4 (type $7) (result v128) + ;; CHECK-BIN-NEXT: (v128.const i32x4 0x00000001 0x00000002 0x00000003 0x00000004) + ;; CHECK-BIN-NEXT: ) + (func $v128.const.i32x4 (result v128) + (v128.const i32x4 1 2 3 4) + ) + + ;; CHECK-TEXT: (func $v128.const.i64x2 (type $7) (result v128) + ;; CHECK-TEXT-NEXT: (v128.const i32x4 0x00000001 0x00000000 0x00000002 0x00000000) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.const.i64x2 (type $7) (result v128) + ;; CHECK-BIN-NEXT: (v128.const i32x4 0x00000001 0x00000000 0x00000002 0x00000000) + ;; CHECK-BIN-NEXT: ) + (func $v128.const.i64x2 (result v128) + (v128.const i64x2 1 2) + ) + + ;; CHECK-TEXT: (func $v128.const.f32x4 (type $7) (result v128) + ;; CHECK-TEXT-NEXT: (v128.const i32x4 0x3f800000 0x40000000 0x40400000 0x40800000) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.const.f32x4 (type $7) (result v128) + ;; CHECK-BIN-NEXT: (v128.const i32x4 0x3f800000 0x40000000 0x40400000 0x40800000) + ;; CHECK-BIN-NEXT: ) + (func $v128.const.f32x4 (result v128) + (v128.const f32x4 1.0 2 3 4) + ) + + ;; CHECK-TEXT: (func $v128.const.f64x2 (type $7) (result v128) + ;; CHECK-TEXT-NEXT: (v128.const i32x4 0x00000000 0x3ff00000 0x00000000 0x40000000) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.const.f64x2 (type $7) (result v128) + ;; CHECK-BIN-NEXT: (v128.const i32x4 0x00000000 0x3ff00000 0x00000000 0x40000000) + ;; CHECK-BIN-NEXT: ) + (func $v128.const.f64x2 (result v128) + (v128.const f64x2 1.0 2) + ) + + ;; CHECK-TEXT: (func $i8x16.shuffle (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i8x16.shuffle 0 17 2 19 4 21 6 23 8 25 10 27 12 29 14 31 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i8x16.shuffle (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i8x16.shuffle 0 17 2 19 4 21 6 23 8 25 10 27 12 29 14 31 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i8x16.shuffle (param $0 v128) (param $1 v128) (result v128) + (i8x16.shuffle 0 17 2 19 4 21 6 23 8 25 10 27 12 29 14 31 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i8x16.swizzle (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i8x16.swizzle + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i8x16.swizzle (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i8x16.swizzle + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i8x16.swizzle (param $0 v128) (param $1 v128) (result v128) + (i8x16.swizzle + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i8x16.splat (type $2) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (i8x16.splat + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i8x16.splat (type $2) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (i8x16.splat + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i8x16.splat (param $0 i32) (result v128) + (i8x16.splat + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.splat (type $2) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.splat + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.splat (type $2) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.splat + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.splat (param $0 i32) (result v128) + (i16x8.splat + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $f32x4.splat (type $8) (param $0 f32) (result v128) + ;; CHECK-TEXT-NEXT: (f32x4.splat + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f32x4.splat (type $8) (param $0 f32) (result v128) + ;; CHECK-BIN-NEXT: (f32x4.splat + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f32x4.splat (param $0 f32) (result v128) + (f32x4.splat + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $f64x2.splat (type $9) (param $0 f64) (result v128) + ;; CHECK-TEXT-NEXT: (f64x2.splat + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f64x2.splat (type $9) (param $0 f64) (result v128) + ;; CHECK-BIN-NEXT: (f64x2.splat + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f64x2.splat (param $0 f64) (result v128) + (f64x2.splat + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i8x16.extract_lane_s (type $4) (param $0 v128) (result i32) + ;; CHECK-TEXT-NEXT: (i8x16.extract_lane_s 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i8x16.extract_lane_s (type $4) (param $0 v128) (result i32) + ;; CHECK-BIN-NEXT: (i8x16.extract_lane_s 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i8x16.extract_lane_s (param $0 v128) (result i32) + (i8x16.extract_lane_s 0 + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i8x16.extract_lane_u (type $4) (param $0 v128) (result i32) + ;; CHECK-TEXT-NEXT: (i8x16.extract_lane_u 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i8x16.extract_lane_u (type $4) (param $0 v128) (result i32) + ;; CHECK-BIN-NEXT: (i8x16.extract_lane_u 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i8x16.extract_lane_u (param $0 v128) (result i32) + (i8x16.extract_lane_u 0 + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i8x16.replace_lane (type $3) (param $0 v128) (param $1 i32) (result v128) + ;; CHECK-TEXT-NEXT: (i8x16.replace_lane 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i8x16.replace_lane (type $3) (param $0 v128) (param $1 i32) (result v128) + ;; CHECK-BIN-NEXT: (i8x16.replace_lane 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i8x16.replace_lane (param $0 v128) (param $1 i32) (result v128) + (i8x16.replace_lane 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.extract_lane_s (type $4) (param $0 v128) (result i32) + ;; CHECK-TEXT-NEXT: (i16x8.extract_lane_s 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.extract_lane_s (type $4) (param $0 v128) (result i32) + ;; CHECK-BIN-NEXT: (i16x8.extract_lane_s 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.extract_lane_s (param $0 v128) (result i32) + (i16x8.extract_lane_s 0 + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.extract_lane_u (type $4) (param $0 v128) (result i32) + ;; CHECK-TEXT-NEXT: (i16x8.extract_lane_u 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.extract_lane_u (type $4) (param $0 v128) (result i32) + ;; CHECK-BIN-NEXT: (i16x8.extract_lane_u 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.extract_lane_u (param $0 v128) (result i32) + (i16x8.extract_lane_u 0 + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.replace_lane (type $3) (param $0 v128) (param $1 i32) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.replace_lane 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.replace_lane (type $3) (param $0 v128) (param $1 i32) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.replace_lane 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.replace_lane (param $0 v128) (param $1 i32) (result v128) + (i16x8.replace_lane 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.extract_lane (type $4) (param $0 v128) (result i32) + ;; CHECK-TEXT-NEXT: (i32x4.extract_lane 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.extract_lane (type $4) (param $0 v128) (result i32) + ;; CHECK-BIN-NEXT: (i32x4.extract_lane 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.extract_lane (param $0 v128) (result i32) + (i32x4.extract_lane 0 + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.replace_lane (type $3) (param $0 v128) (param $1 i32) (result v128) + ;; CHECK-TEXT-NEXT: (i32x4.replace_lane 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.replace_lane (type $3) (param $0 v128) (param $1 i32) (result v128) + ;; CHECK-BIN-NEXT: (i32x4.replace_lane 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.replace_lane (param $0 v128) (param $1 i32) (result v128) + (i32x4.replace_lane 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i64x2.extract_lane (type $10) (param $0 v128) (result i64) + ;; CHECK-TEXT-NEXT: (i64x2.extract_lane 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i64x2.extract_lane (type $10) (param $0 v128) (result i64) + ;; CHECK-BIN-NEXT: (i64x2.extract_lane 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i64x2.extract_lane (param $0 v128) (result i64) + (i64x2.extract_lane 0 + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i64x2.replace_lane (type $11) (param $0 v128) (param $1 i64) (result v128) + ;; CHECK-TEXT-NEXT: (i64x2.replace_lane 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i64x2.replace_lane (type $11) (param $0 v128) (param $1 i64) (result v128) + ;; CHECK-BIN-NEXT: (i64x2.replace_lane 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i64x2.replace_lane (param $0 v128) (param $1 i64) (result v128) + (i64x2.replace_lane 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $f32x4.extract_lane (type $12) (param $0 v128) (result f32) + ;; CHECK-TEXT-NEXT: (f32x4.extract_lane 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f32x4.extract_lane (type $12) (param $0 v128) (result f32) + ;; CHECK-BIN-NEXT: (f32x4.extract_lane 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f32x4.extract_lane (param $0 v128) (result f32) + (f32x4.extract_lane 0 + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $f32x4.replace_lane (type $13) (param $0 v128) (param $1 f32) (result v128) + ;; CHECK-TEXT-NEXT: (f32x4.replace_lane 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f32x4.replace_lane (type $13) (param $0 v128) (param $1 f32) (result v128) + ;; CHECK-BIN-NEXT: (f32x4.replace_lane 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f32x4.replace_lane (param $0 v128) (param $1 f32) (result v128) + (f32x4.replace_lane 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $f64x2.extract_lane (type $14) (param $0 v128) (result f64) + ;; CHECK-TEXT-NEXT: (f64x2.extract_lane 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f64x2.extract_lane (type $14) (param $0 v128) (result f64) + ;; CHECK-BIN-NEXT: (f64x2.extract_lane 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f64x2.extract_lane (param $0 v128) (result f64) + (f64x2.extract_lane 0 + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $f64x2.replace_lane (type $15) (param $0 v128) (param $1 f64) (result v128) + ;; CHECK-TEXT-NEXT: (f64x2.replace_lane 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f64x2.replace_lane (type $15) (param $0 v128) (param $1 f64) (result v128) + ;; CHECK-BIN-NEXT: (f64x2.replace_lane 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f64x2.replace_lane (param $0 v128) (param $1 f64) (result v128) + (f64x2.replace_lane 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i8x16.eq (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i8x16.eq + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i8x16.eq (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i8x16.eq + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i8x16.eq (param $0 v128) (param $1 v128) (result v128) + (i8x16.eq + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i8x16.ne (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i8x16.ne + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i8x16.ne (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i8x16.ne + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i8x16.ne (param $0 v128) (param $1 v128) (result v128) + (i8x16.ne + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i8x16.lt_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i8x16.lt_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i8x16.lt_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i8x16.lt_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i8x16.lt_s (param $0 v128) (param $1 v128) (result v128) + (i8x16.lt_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i8x16.lt_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i8x16.lt_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i8x16.lt_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i8x16.lt_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i8x16.lt_u (param $0 v128) (param $1 v128) (result v128) + (i8x16.lt_u + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i8x16.gt_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i8x16.gt_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i8x16.gt_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i8x16.gt_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i8x16.gt_s (param $0 v128) (param $1 v128) (result v128) + (i8x16.gt_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i8x16.gt_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i8x16.gt_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i8x16.gt_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i8x16.gt_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i8x16.gt_u (param $0 v128) (param $1 v128) (result v128) + (i8x16.gt_u + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i8x16.le_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i8x16.le_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i8x16.le_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i8x16.le_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i8x16.le_s (param $0 v128) (param $1 v128) (result v128) + (i8x16.le_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i8x16.le_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i8x16.le_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i8x16.le_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i8x16.le_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i8x16.le_u (param $0 v128) (param $1 v128) (result v128) + (i8x16.le_u + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i8x16.ge_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i8x16.ge_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i8x16.ge_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i8x16.ge_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i8x16.ge_s (param $0 v128) (param $1 v128) (result v128) + (i8x16.ge_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i8x16.ge_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i8x16.ge_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i8x16.ge_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i8x16.ge_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i8x16.ge_u (param $0 v128) (param $1 v128) (result v128) + (i8x16.ge_u + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.eq (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.eq + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.eq (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.eq + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.eq (param $0 v128) (param $1 v128) (result v128) + (i16x8.eq + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.ne (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.ne + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.ne (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.ne + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.ne (param $0 v128) (param $1 v128) (result v128) + (i16x8.ne + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.lt_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.lt_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.lt_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.lt_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.lt_s (param $0 v128) (param $1 v128) (result v128) + (i16x8.lt_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.lt_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.lt_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.lt_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.lt_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.lt_u (param $0 v128) (param $1 v128) (result v128) + (i16x8.lt_u + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.gt_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.gt_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.gt_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.gt_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.gt_s (param $0 v128) (param $1 v128) (result v128) + (i16x8.gt_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.gt_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.gt_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.gt_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.gt_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.gt_u (param $0 v128) (param $1 v128) (result v128) + (i16x8.gt_u + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.le_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.le_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.le_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.le_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.le_s (param $0 v128) (param $1 v128) (result v128) + (i16x8.le_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.le_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.le_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.le_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.le_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.le_u (param $0 v128) (param $1 v128) (result v128) + (i16x8.le_u + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.ge_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.ge_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.ge_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.ge_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.ge_s (param $0 v128) (param $1 v128) (result v128) + (i16x8.ge_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.ge_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.ge_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.ge_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.ge_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.ge_u (param $0 v128) (param $1 v128) (result v128) + (i16x8.ge_u + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.eq (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i32x4.eq + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.eq (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i32x4.eq + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.eq (param $0 v128) (param $1 v128) (result v128) + (i32x4.eq + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.ne (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i32x4.ne + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.ne (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i32x4.ne + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.ne (param $0 v128) (param $1 v128) (result v128) + (i32x4.ne + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.lt_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i32x4.lt_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.lt_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i32x4.lt_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.lt_s (param $0 v128) (param $1 v128) (result v128) + (i32x4.lt_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.lt_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i32x4.lt_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.lt_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i32x4.lt_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.lt_u (param $0 v128) (param $1 v128) (result v128) + (i32x4.lt_u + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.gt_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i32x4.gt_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.gt_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i32x4.gt_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.gt_s (param $0 v128) (param $1 v128) (result v128) + (i32x4.gt_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.gt_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i32x4.gt_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.gt_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i32x4.gt_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.gt_u (param $0 v128) (param $1 v128) (result v128) + (i32x4.gt_u + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.le_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i32x4.le_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.le_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i32x4.le_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.le_s (param $0 v128) (param $1 v128) (result v128) + (i32x4.le_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.le_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i32x4.le_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.le_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i32x4.le_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.le_u (param $0 v128) (param $1 v128) (result v128) + (i32x4.le_u + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.ge_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i32x4.ge_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.ge_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i32x4.ge_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.ge_s (param $0 v128) (param $1 v128) (result v128) + (i32x4.ge_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.ge_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i32x4.ge_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.ge_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i32x4.ge_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.ge_u (param $0 v128) (param $1 v128) (result v128) + (i32x4.ge_u + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $f32x4.eq (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f32x4.eq + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f32x4.eq (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (f32x4.eq + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f32x4.eq (param $0 v128) (param $1 v128) (result v128) + (f32x4.eq + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $f32x4.ne (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f32x4.ne + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f32x4.ne (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (f32x4.ne + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f32x4.ne (param $0 v128) (param $1 v128) (result v128) + (f32x4.ne + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $f32x4.lt (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f32x4.lt + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f32x4.lt (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (f32x4.lt + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f32x4.lt (param $0 v128) (param $1 v128) (result v128) + (f32x4.lt + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $f32x4.gt (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f32x4.gt + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f32x4.gt (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (f32x4.gt + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f32x4.gt (param $0 v128) (param $1 v128) (result v128) + (f32x4.gt + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $f32x4.le (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f32x4.le + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f32x4.le (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (f32x4.le + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f32x4.le (param $0 v128) (param $1 v128) (result v128) + (f32x4.le + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $f32x4.ge (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f32x4.ge + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f32x4.ge (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (f32x4.ge + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f32x4.ge (param $0 v128) (param $1 v128) (result v128) + (f32x4.ge + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $f64x2.eq (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f64x2.eq + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f64x2.eq (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (f64x2.eq + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f64x2.eq (param $0 v128) (param $1 v128) (result v128) + (f64x2.eq + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $f64x2.ne (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f64x2.ne + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f64x2.ne (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (f64x2.ne + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f64x2.ne (param $0 v128) (param $1 v128) (result v128) + (f64x2.ne + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $f64x2.lt (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f64x2.lt + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f64x2.lt (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (f64x2.lt + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f64x2.lt (param $0 v128) (param $1 v128) (result v128) + (f64x2.lt + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $f64x2.gt (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f64x2.gt + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f64x2.gt (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (f64x2.gt + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f64x2.gt (param $0 v128) (param $1 v128) (result v128) + (f64x2.gt + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $f64x2.le (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f64x2.le + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f64x2.le (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (f64x2.le + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f64x2.le (param $0 v128) (param $1 v128) (result v128) + (f64x2.le + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $f64x2.ge (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f64x2.ge + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f64x2.ge (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (f64x2.ge + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f64x2.ge (param $0 v128) (param $1 v128) (result v128) + (f64x2.ge + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.not (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (v128.not + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.not (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (v128.not + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.not (param $0 v128) (result v128) + (v128.not + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.and (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (v128.and + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.and (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (v128.and + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.and (param $0 v128) (param $1 v128) (result v128) + (v128.and + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.andnot (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (v128.andnot + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.andnot (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (v128.andnot + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.andnot (param $0 v128) (param $1 v128) (result v128) + (v128.andnot + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.or (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (v128.or + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.or (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (v128.or + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.or (param $0 v128) (param $1 v128) (result v128) + (v128.or + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.xor (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (v128.xor + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.xor (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (v128.xor + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.xor (param $0 v128) (param $1 v128) (result v128) + (v128.xor + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.bitselect (type $16) (param $0 v128) (param $1 v128) (param $2 v128) (result v128) + ;; CHECK-TEXT-NEXT: (v128.bitselect + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: (local.get $2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.bitselect (type $16) (param $0 v128) (param $1 v128) (param $2 v128) (result v128) + ;; CHECK-BIN-NEXT: (v128.bitselect + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: (local.get $2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.bitselect (param $0 v128) (param $1 v128) (param $2 v128) (result v128) + (v128.bitselect + (local.get $0) + (local.get $1) + (local.get $2) + ) + ) + + ;; CHECK-TEXT: (func $v128.any_true (type $4) (param $0 v128) (result i32) + ;; CHECK-TEXT-NEXT: (v128.any_true + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.any_true (type $4) (param $0 v128) (result i32) + ;; CHECK-BIN-NEXT: (v128.any_true + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.any_true (param $0 v128) (result i32) + (v128.any_true + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load8_lane (type $6) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load8_lane 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load8_lane (type $6) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (v128.load8_lane 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load8_lane (param $0 i32) (param $1 v128) (result v128) + (v128.load8_lane 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.load16_lane (type $6) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load16_lane 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load16_lane (type $6) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (v128.load16_lane 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load16_lane (param $0 i32) (param $1 v128) (result v128) + (v128.load16_lane 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.load32_lane (type $6) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load32_lane 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load32_lane (type $6) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (v128.load32_lane 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load32_lane (param $0 i32) (param $1 v128) (result v128) + (v128.load32_lane 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.load64_lane (type $6) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load64_lane 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load64_lane (type $6) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (v128.load64_lane 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load64_lane (param $0 i32) (param $1 v128) (result v128) + (v128.load64_lane 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.load64_lane_align (type $6) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load64_lane align=1 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load64_lane_align (type $6) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (v128.load64_lane align=1 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load64_lane_align (param $0 i32) (param $1 v128) (result v128) + (v128.load64_lane align=1 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.load64_lane_offset (type $6) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load64_lane offset=32 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load64_lane_offset (type $6) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (v128.load64_lane offset=32 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load64_lane_offset (param $0 i32) (param $1 v128) (result v128) + (v128.load64_lane offset=32 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.load64_lane_align_offset (type $6) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load64_lane offset=32 align=1 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load64_lane_align_offset (type $6) (param $0 i32) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (v128.load64_lane offset=32 align=1 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load64_lane_align_offset (param $0 i32) (param $1 v128) (result v128) + (v128.load64_lane align=1 offset=32 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.store8_lane (type $5) (param $0 i32) (param $1 v128) + ;; CHECK-TEXT-NEXT: (v128.store8_lane 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.store8_lane (type $5) (param $0 i32) (param $1 v128) + ;; CHECK-BIN-NEXT: (v128.store8_lane 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.store8_lane (param $0 i32) (param $1 v128) + (v128.store8_lane 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.store16_lane (type $5) (param $0 i32) (param $1 v128) + ;; CHECK-TEXT-NEXT: (v128.store16_lane 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.store16_lane (type $5) (param $0 i32) (param $1 v128) + ;; CHECK-BIN-NEXT: (v128.store16_lane 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.store16_lane (param $0 i32) (param $1 v128) + (v128.store16_lane 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.store32_lane (type $5) (param $0 i32) (param $1 v128) + ;; CHECK-TEXT-NEXT: (v128.store32_lane 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.store32_lane (type $5) (param $0 i32) (param $1 v128) + ;; CHECK-BIN-NEXT: (v128.store32_lane 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.store32_lane (param $0 i32) (param $1 v128) + (v128.store32_lane 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.store64_lane (type $5) (param $0 i32) (param $1 v128) + ;; CHECK-TEXT-NEXT: (v128.store64_lane 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.store64_lane (type $5) (param $0 i32) (param $1 v128) + ;; CHECK-BIN-NEXT: (v128.store64_lane 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.store64_lane (param $0 i32) (param $1 v128) + (v128.store64_lane 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.store64_lane_align (type $5) (param $0 i32) (param $1 v128) + ;; CHECK-TEXT-NEXT: (v128.store64_lane align=1 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.store64_lane_align (type $5) (param $0 i32) (param $1 v128) + ;; CHECK-BIN-NEXT: (v128.store64_lane align=1 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.store64_lane_align (param $0 i32) (param $1 v128) + (v128.store64_lane align=1 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.store64_lane_offset (type $5) (param $0 i32) (param $1 v128) + ;; CHECK-TEXT-NEXT: (v128.store64_lane offset=32 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.store64_lane_offset (type $5) (param $0 i32) (param $1 v128) + ;; CHECK-BIN-NEXT: (v128.store64_lane offset=32 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.store64_lane_offset (param $0 i32) (param $1 v128) + (v128.store64_lane offset=32 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.store64_lane_align_offset (type $5) (param $0 i32) (param $1 v128) + ;; CHECK-TEXT-NEXT: (v128.store64_lane offset=32 align=1 0 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.store64_lane_align_offset (type $5) (param $0 i32) (param $1 v128) + ;; CHECK-BIN-NEXT: (v128.store64_lane offset=32 align=1 0 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.store64_lane_align_offset (param $0 i32) (param $1 v128) + (v128.store64_lane align=1 offset=32 0 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.load32_zero (type $2) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load32_zero + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load32_zero (type $2) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (v128.load32_zero + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load32_zero (param $0 i32) (result v128) + (v128.load32_zero + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load64_zero (type $2) (param $0 i32) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load64_zero + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load64_zero (type $2) (param $0 i32) (result v128) + ;; CHECK-BIN-NEXT: (v128.load64_zero + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load64_zero (param $0 i32) (result v128) + (v128.load64_zero + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $f32x4.demote_f64x2_zero (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f32x4.demote_f64x2_zero + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f32x4.demote_f64x2_zero (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (f32x4.demote_f64x2_zero + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f32x4.demote_f64x2_zero (param $0 v128) (result v128) + (f32x4.demote_f64x2_zero + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $f64x2.promote_low_f32x4 (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f64x2.promote_low_f32x4 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f64x2.promote_low_f32x4 (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (f64x2.promote_low_f32x4 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f64x2.promote_low_f32x4 (param $0 v128) (result v128) + (f64x2.promote_low_f32x4 + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i8x16.abs (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i8x16.abs + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i8x16.abs (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (i8x16.abs + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i8x16.abs (param $0 v128) (result v128) + (i8x16.abs + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i8x16.neg (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i8x16.neg + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i8x16.neg (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (i8x16.neg + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i8x16.neg (param $0 v128) (result v128) + (i8x16.neg + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i8x16.popcnt (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i8x16.popcnt + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i8x16.popcnt (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (i8x16.popcnt + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i8x16.popcnt (param $0 v128) (result v128) + (i8x16.popcnt + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i8x16.all_true (type $4) (param $0 v128) (result i32) + ;; CHECK-TEXT-NEXT: (i8x16.all_true + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i8x16.all_true (type $4) (param $0 v128) (result i32) + ;; CHECK-BIN-NEXT: (i8x16.all_true + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i8x16.all_true (param $0 v128) (result i32) + (i8x16.all_true + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i8x16.bitmask (type $4) (param $0 v128) (result i32) + ;; CHECK-TEXT-NEXT: (i8x16.bitmask + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i8x16.bitmask (type $4) (param $0 v128) (result i32) + ;; CHECK-BIN-NEXT: (i8x16.bitmask + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i8x16.bitmask (param $0 v128) (result i32) + (i8x16.bitmask + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i8x16.narrow_i16x8_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i8x16.narrow_i16x8_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i8x16.narrow_i16x8_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i8x16.narrow_i16x8_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i8x16.narrow_i16x8_s (param $0 v128) (param $1 v128) (result v128) + (i8x16.narrow_i16x8_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i8x16.narrow_i16x8_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i8x16.narrow_i16x8_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i8x16.narrow_i16x8_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i8x16.narrow_i16x8_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i8x16.narrow_i16x8_u (param $0 v128) (param $1 v128) (result v128) + (i8x16.narrow_i16x8_u + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $f32x4.ceil (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f32x4.ceil + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f32x4.ceil (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (f32x4.ceil + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f32x4.ceil (param $0 v128) (result v128) + (f32x4.ceil + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $f32x4.floor (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f32x4.floor + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f32x4.floor (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (f32x4.floor + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f32x4.floor (param $0 v128) (result v128) + (f32x4.floor + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $f32x4.trunc (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f32x4.trunc + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f32x4.trunc (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (f32x4.trunc + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f32x4.trunc (param $0 v128) (result v128) + (f32x4.trunc + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $f32x4.nearest (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f32x4.nearest + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f32x4.nearest (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (f32x4.nearest + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f32x4.nearest (param $0 v128) (result v128) + (f32x4.nearest + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i8x16.shl (type $3) (param $0 v128) (param $1 i32) (result v128) + ;; CHECK-TEXT-NEXT: (i8x16.shl + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i8x16.shl (type $3) (param $0 v128) (param $1 i32) (result v128) + ;; CHECK-BIN-NEXT: (i8x16.shl + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i8x16.shl (param $0 v128) (param $1 i32) (result v128) + (i8x16.shl + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i8x16.shr_s (type $3) (param $0 v128) (param $1 i32) (result v128) + ;; CHECK-TEXT-NEXT: (i8x16.shr_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i8x16.shr_s (type $3) (param $0 v128) (param $1 i32) (result v128) + ;; CHECK-BIN-NEXT: (i8x16.shr_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i8x16.shr_s (param $0 v128) (param $1 i32) (result v128) + (i8x16.shr_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i8x16.shr_u (type $3) (param $0 v128) (param $1 i32) (result v128) + ;; CHECK-TEXT-NEXT: (i8x16.shr_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i8x16.shr_u (type $3) (param $0 v128) (param $1 i32) (result v128) + ;; CHECK-BIN-NEXT: (i8x16.shr_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i8x16.shr_u (param $0 v128) (param $1 i32) (result v128) + (i8x16.shr_u + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i8x16.add (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i8x16.add + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i8x16.add (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i8x16.add + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i8x16.add (param $0 v128) (param $1 v128) (result v128) + (i8x16.add + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i8x16.add_sat_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i8x16.add_sat_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i8x16.add_sat_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i8x16.add_sat_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i8x16.add_sat_s (param $0 v128) (param $1 v128) (result v128) + (i8x16.add_sat_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i8x16.add_sat_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i8x16.add_sat_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i8x16.add_sat_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i8x16.add_sat_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i8x16.add_sat_u (param $0 v128) (param $1 v128) (result v128) + (i8x16.add_sat_u + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i8x16.sub (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i8x16.sub + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i8x16.sub (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i8x16.sub + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i8x16.sub (param $0 v128) (param $1 v128) (result v128) + (i8x16.sub + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i8x16.sub_sat_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i8x16.sub_sat_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i8x16.sub_sat_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i8x16.sub_sat_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i8x16.sub_sat_s (param $0 v128) (param $1 v128) (result v128) + (i8x16.sub_sat_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i8x16.sub_sat_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i8x16.sub_sat_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i8x16.sub_sat_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i8x16.sub_sat_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i8x16.sub_sat_u (param $0 v128) (param $1 v128) (result v128) + (i8x16.sub_sat_u + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $f64x2.ceil (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f64x2.ceil + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f64x2.ceil (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (f64x2.ceil + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f64x2.ceil (param $0 v128) (result v128) + (f64x2.ceil + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $f64x2.floor (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f64x2.floor + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f64x2.floor (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (f64x2.floor + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f64x2.floor (param $0 v128) (result v128) + (f64x2.floor + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i8x16.min_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i8x16.min_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i8x16.min_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i8x16.min_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i8x16.min_s (param $0 v128) (param $1 v128) (result v128) + (i8x16.min_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i8x16.min_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i8x16.min_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i8x16.min_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i8x16.min_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i8x16.min_u (param $0 v128) (param $1 v128) (result v128) + (i8x16.min_u + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i8x16.max_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i8x16.max_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i8x16.max_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i8x16.max_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i8x16.max_s (param $0 v128) (param $1 v128) (result v128) + (i8x16.max_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i8x16.max_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i8x16.max_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i8x16.max_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i8x16.max_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i8x16.max_u (param $0 v128) (param $1 v128) (result v128) + (i8x16.max_u + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $f64x2.trunc (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f64x2.trunc + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f64x2.trunc (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (f64x2.trunc + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f64x2.trunc (param $0 v128) (result v128) + (f64x2.trunc + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i8x16.avgr_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i8x16.avgr_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i8x16.avgr_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i8x16.avgr_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i8x16.avgr_u (param $0 v128) (param $1 v128) (result v128) + (i8x16.avgr_u + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.extadd_pairwise_i8x16_s (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.extadd_pairwise_i8x16_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.extadd_pairwise_i8x16_s (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.extadd_pairwise_i8x16_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.extadd_pairwise_i8x16_s (param $0 v128) (result v128) + (i16x8.extadd_pairwise_i8x16_s + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.extadd_pairwise_i8x16_u (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.extadd_pairwise_i8x16_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.extadd_pairwise_i8x16_u (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.extadd_pairwise_i8x16_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.extadd_pairwise_i8x16_u (param $0 v128) (result v128) + (i16x8.extadd_pairwise_i8x16_u + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.extadd_pairwise_i16x8_s (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i32x4.extadd_pairwise_i16x8_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.extadd_pairwise_i16x8_s (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (i32x4.extadd_pairwise_i16x8_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.extadd_pairwise_i16x8_s (param $0 v128) (result v128) + (i32x4.extadd_pairwise_i16x8_s + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.extadd_pairwise_i16x8_u (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i32x4.extadd_pairwise_i16x8_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.extadd_pairwise_i16x8_u (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (i32x4.extadd_pairwise_i16x8_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.extadd_pairwise_i16x8_u (param $0 v128) (result v128) + (i32x4.extadd_pairwise_i16x8_u + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.abs (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.abs + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.abs (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.abs + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.abs (param $0 v128) (result v128) + (i16x8.abs + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.neg (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.neg + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.neg (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.neg + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.neg (param $0 v128) (result v128) + (i16x8.neg + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.q15mulr_sat_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.q15mulr_sat_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.q15mulr_sat_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.q15mulr_sat_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.q15mulr_sat_s (param $0 v128) (param $1 v128) (result v128) + (i16x8.q15mulr_sat_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.all_true (type $4) (param $0 v128) (result i32) + ;; CHECK-TEXT-NEXT: (i16x8.all_true + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.all_true (type $4) (param $0 v128) (result i32) + ;; CHECK-BIN-NEXT: (i16x8.all_true + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.all_true (param $0 v128) (result i32) + (i16x8.all_true + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.bitmask (type $4) (param $0 v128) (result i32) + ;; CHECK-TEXT-NEXT: (i16x8.bitmask + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.bitmask (type $4) (param $0 v128) (result i32) + ;; CHECK-BIN-NEXT: (i16x8.bitmask + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.bitmask (param $0 v128) (result i32) + (i16x8.bitmask + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.narrow_i32x4_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.narrow_i32x4_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.narrow_i32x4_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.narrow_i32x4_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.narrow_i32x4_s (param $0 v128) (param $1 v128) (result v128) + (i16x8.narrow_i32x4_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.narrow_i32x4_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.narrow_i32x4_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.narrow_i32x4_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.narrow_i32x4_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.narrow_i32x4_u (param $0 v128) (param $1 v128) (result v128) + (i16x8.narrow_i32x4_u + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.extend_low_i8x16_s (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.extend_low_i8x16_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.extend_low_i8x16_s (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.extend_low_i8x16_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.extend_low_i8x16_s (param $0 v128) (result v128) + (i16x8.extend_low_i8x16_s + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.extend_high_i8x16_s (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.extend_high_i8x16_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.extend_high_i8x16_s (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.extend_high_i8x16_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.extend_high_i8x16_s (param $0 v128) (result v128) + (i16x8.extend_high_i8x16_s + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.extend_low_i8x16_u (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.extend_low_i8x16_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.extend_low_i8x16_u (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.extend_low_i8x16_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.extend_low_i8x16_u (param $0 v128) (result v128) + (i16x8.extend_low_i8x16_u + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.extend_high_i8x16_u (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.extend_high_i8x16_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.extend_high_i8x16_u (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.extend_high_i8x16_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.extend_high_i8x16_u (param $0 v128) (result v128) + (i16x8.extend_high_i8x16_u + (local.get $0) + ) + ) + +;; CHECK-TEXT: (func $i16x8.shl (type $3) (param $0 v128) (param $1 i32) (result v128) +;; CHECK-TEXT-NEXT: (i16x8.shl +;; CHECK-TEXT-NEXT: (local.get $0) +;; CHECK-TEXT-NEXT: (local.get $1) +;; CHECK-TEXT-NEXT: ) +;; CHECK-TEXT-NEXT: ) +;; CHECK-BIN: (func $i16x8.shl (type $3) (param $0 v128) (param $1 i32) (result v128) +;; CHECK-BIN-NEXT: (i16x8.shl +;; CHECK-BIN-NEXT: (local.get $0) +;; CHECK-BIN-NEXT: (local.get $1) +;; CHECK-BIN-NEXT: ) +;; CHECK-BIN-NEXT: ) +(func $i16x8.shl (param $0 v128) (param $1 i32) (result v128) + (i16x8.shl + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.shr_s (type $3) (param $0 v128) (param $1 i32) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.shr_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.shr_s (type $3) (param $0 v128) (param $1 i32) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.shr_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.shr_s (param $0 v128) (param $1 i32) (result v128) + (i16x8.shr_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.shr_u (type $3) (param $0 v128) (param $1 i32) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.shr_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.shr_u (type $3) (param $0 v128) (param $1 i32) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.shr_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.shr_u (param $0 v128) (param $1 i32) (result v128) + (i16x8.shr_u + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.add (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.add + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.add (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.add + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.add (param $0 v128) (param $1 v128) (result v128) + (i16x8.add + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.add_sat_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.add_sat_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.add_sat_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.add_sat_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.add_sat_s (param $0 v128) (param $1 v128) (result v128) + (i16x8.add_sat_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.add_sat_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.add_sat_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.add_sat_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.add_sat_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.add_sat_u (param $0 v128) (param $1 v128) (result v128) + (i16x8.add_sat_u + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.sub (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.sub + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.sub (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.sub + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.sub (param $0 v128) (param $1 v128) (result v128) + (i16x8.sub + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.sub_sat_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.sub_sat_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.sub_sat_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.sub_sat_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.sub_sat_s (param $0 v128) (param $1 v128) (result v128) + (i16x8.sub_sat_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.sub_sat_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.sub_sat_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.sub_sat_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.sub_sat_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.sub_sat_u (param $0 v128) (param $1 v128) (result v128) + (i16x8.sub_sat_u + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $f64x2.nearest (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f64x2.nearest + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f64x2.nearest (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (f64x2.nearest + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f64x2.nearest (param $0 v128) (result v128) + (f64x2.nearest + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.mul (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.mul + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.mul (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.mul + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.mul (param $0 v128) (param $1 v128) (result v128) + (i16x8.mul + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.min_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.min_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.min_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.min_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.min_s (param $0 v128) (param $1 v128) (result v128) + (i16x8.min_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.min_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.min_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.min_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.min_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.min_u (param $0 v128) (param $1 v128) (result v128) + (i16x8.min_u + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.max_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.max_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.max_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.max_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.max_s (param $0 v128) (param $1 v128) (result v128) + (i16x8.max_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.max_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.max_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.max_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.max_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.max_u (param $0 v128) (param $1 v128) (result v128) + (i16x8.max_u + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.avgr_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.avgr_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.avgr_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.avgr_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.avgr_u (param $0 v128) (param $1 v128) (result v128) + (i16x8.avgr_u + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.extmul_low_i8x16_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.extmul_low_i8x16_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.extmul_low_i8x16_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.extmul_low_i8x16_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.extmul_low_i8x16_s (param $0 v128) (param $1 v128) (result v128) + (i16x8.extmul_low_i8x16_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.extmul_high_i8x16_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.extmul_high_i8x16_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.extmul_high_i8x16_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.extmul_high_i8x16_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.extmul_high_i8x16_s (param $0 v128) (param $1 v128) (result v128) + (i16x8.extmul_high_i8x16_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.extmul_low_i8x16_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.extmul_low_i8x16_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.extmul_low_i8x16_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.extmul_low_i8x16_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.extmul_low_i8x16_u (param $0 v128) (param $1 v128) (result v128) + (i16x8.extmul_low_i8x16_u + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i16x8.extmul_high_i8x16_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i16x8.extmul_high_i8x16_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i16x8.extmul_high_i8x16_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i16x8.extmul_high_i8x16_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i16x8.extmul_high_i8x16_u (param $0 v128) (param $1 v128) (result v128) + (i16x8.extmul_high_i8x16_u + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.abs (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i32x4.abs + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.abs (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (i32x4.abs + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.abs (param $0 v128) (result v128) + (i32x4.abs + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.neg (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i32x4.neg + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.neg (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (i32x4.neg + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.neg (param $0 v128) (result v128) + (i32x4.neg + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.all_true (type $4) (param $0 v128) (result i32) + ;; CHECK-TEXT-NEXT: (i32x4.all_true + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.all_true (type $4) (param $0 v128) (result i32) + ;; CHECK-BIN-NEXT: (i32x4.all_true + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.all_true (param $0 v128) (result i32) + (i32x4.all_true + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.bitmask (type $4) (param $0 v128) (result i32) + ;; CHECK-TEXT-NEXT: (i32x4.bitmask + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.bitmask (type $4) (param $0 v128) (result i32) + ;; CHECK-BIN-NEXT: (i32x4.bitmask + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.bitmask (param $0 v128) (result i32) + (i32x4.bitmask + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.extend_low_i16x8_s (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i32x4.extend_low_i16x8_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.extend_low_i16x8_s (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (i32x4.extend_low_i16x8_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.extend_low_i16x8_s (param $0 v128) (result v128) + (i32x4.extend_low_i16x8_s + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.extend_high_i16x8_s (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i32x4.extend_high_i16x8_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.extend_high_i16x8_s (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (i32x4.extend_high_i16x8_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.extend_high_i16x8_s (param $0 v128) (result v128) + (i32x4.extend_high_i16x8_s + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.extend_low_i16x8_u (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i32x4.extend_low_i16x8_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.extend_low_i16x8_u (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (i32x4.extend_low_i16x8_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.extend_low_i16x8_u (param $0 v128) (result v128) + (i32x4.extend_low_i16x8_u + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.extend_high_i16x8_u (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i32x4.extend_high_i16x8_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.extend_high_i16x8_u (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (i32x4.extend_high_i16x8_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.extend_high_i16x8_u (param $0 v128) (result v128) + (i32x4.extend_high_i16x8_u + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.shl (type $3) (param $0 v128) (param $1 i32) (result v128) + ;; CHECK-TEXT-NEXT: (i32x4.shl + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.shl (type $3) (param $0 v128) (param $1 i32) (result v128) + ;; CHECK-BIN-NEXT: (i32x4.shl + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.shl (param $0 v128) (param $1 i32) (result v128) + (i32x4.shl + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.shr_s (type $3) (param $0 v128) (param $1 i32) (result v128) + ;; CHECK-TEXT-NEXT: (i32x4.shr_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.shr_s (type $3) (param $0 v128) (param $1 i32) (result v128) + ;; CHECK-BIN-NEXT: (i32x4.shr_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.shr_s (param $0 v128) (param $1 i32) (result v128) + (i32x4.shr_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.shr_u (type $3) (param $0 v128) (param $1 i32) (result v128) + ;; CHECK-TEXT-NEXT: (i32x4.shr_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.shr_u (type $3) (param $0 v128) (param $1 i32) (result v128) + ;; CHECK-BIN-NEXT: (i32x4.shr_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.shr_u (param $0 v128) (param $1 i32) (result v128) + (i32x4.shr_u + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.add (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i32x4.add + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.add (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i32x4.add + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.add (param $0 v128) (param $1 v128) (result v128) + (i32x4.add + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.sub (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i32x4.sub + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.sub (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i32x4.sub + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.sub (param $0 v128) (param $1 v128) (result v128) + (i32x4.sub + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.mul (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i32x4.mul + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.mul (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i32x4.mul + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.mul (param $0 v128) (param $1 v128) (result v128) + (i32x4.mul + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.min_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i32x4.min_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.min_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i32x4.min_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.min_s (param $0 v128) (param $1 v128) (result v128) + (i32x4.min_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.min_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i32x4.min_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.min_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i32x4.min_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.min_u (param $0 v128) (param $1 v128) (result v128) + (i32x4.min_u + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.max_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i32x4.max_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.max_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i32x4.max_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.max_s (param $0 v128) (param $1 v128) (result v128) + (i32x4.max_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.max_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i32x4.max_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.max_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i32x4.max_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.max_u (param $0 v128) (param $1 v128) (result v128) + (i32x4.max_u + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.dot_i16x8_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i32x4.dot_i16x8_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.dot_i16x8_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i32x4.dot_i16x8_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.dot_i16x8_s (param $0 v128) (param $1 v128) (result v128) + (i32x4.dot_i16x8_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.extmul_low_i16x8_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i32x4.extmul_low_i16x8_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.extmul_low_i16x8_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i32x4.extmul_low_i16x8_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.extmul_low_i16x8_s (param $0 v128) (param $1 v128) (result v128) + (i32x4.extmul_low_i16x8_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.extmul_high_i16x8_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i32x4.extmul_high_i16x8_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.extmul_high_i16x8_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i32x4.extmul_high_i16x8_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.extmul_high_i16x8_s (param $0 v128) (param $1 v128) (result v128) + (i32x4.extmul_high_i16x8_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.extmul_low_i16x8_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i32x4.extmul_low_i16x8_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.extmul_low_i16x8_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i32x4.extmul_low_i16x8_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.extmul_low_i16x8_u (param $0 v128) (param $1 v128) (result v128) + (i32x4.extmul_low_i16x8_u + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.extmul_high_i16x8_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i32x4.extmul_high_i16x8_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.extmul_high_i16x8_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i32x4.extmul_high_i16x8_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.extmul_high_i16x8_u (param $0 v128) (param $1 v128) (result v128) + (i32x4.extmul_high_i16x8_u + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i64x2.abs (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i64x2.abs + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i64x2.abs (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (i64x2.abs + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i64x2.abs (param $0 v128) (result v128) + (i64x2.abs + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i64x2.neg (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i64x2.neg + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i64x2.neg (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (i64x2.neg + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i64x2.neg (param $0 v128) (result v128) + (i64x2.neg + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i64x2.all_true (type $4) (param $0 v128) (result i32) + ;; CHECK-TEXT-NEXT: (i64x2.all_true + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i64x2.all_true (type $4) (param $0 v128) (result i32) + ;; CHECK-BIN-NEXT: (i64x2.all_true + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i64x2.all_true (param $0 v128) (result i32) + (i64x2.all_true + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i64x2.bitmask (type $4) (param $0 v128) (result i32) + ;; CHECK-TEXT-NEXT: (i64x2.bitmask + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i64x2.bitmask (type $4) (param $0 v128) (result i32) + ;; CHECK-BIN-NEXT: (i64x2.bitmask + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i64x2.bitmask (param $0 v128) (result i32) + (i64x2.bitmask + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i64x2.extend_low_i32x4_s (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i64x2.extend_low_i32x4_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i64x2.extend_low_i32x4_s (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (i64x2.extend_low_i32x4_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i64x2.extend_low_i32x4_s (param $0 v128) (result v128) + (i64x2.extend_low_i32x4_s + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i64x2.extend_high_i32x4_s (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i64x2.extend_high_i32x4_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i64x2.extend_high_i32x4_s (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (i64x2.extend_high_i32x4_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i64x2.extend_high_i32x4_s (param $0 v128) (result v128) + (i64x2.extend_high_i32x4_s + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i64x2.extend_low_i32x4_u (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i64x2.extend_low_i32x4_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i64x2.extend_low_i32x4_u (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (i64x2.extend_low_i32x4_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i64x2.extend_low_i32x4_u (param $0 v128) (result v128) + (i64x2.extend_low_i32x4_u + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i64x2.extend_high_i32x4_u (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i64x2.extend_high_i32x4_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i64x2.extend_high_i32x4_u (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (i64x2.extend_high_i32x4_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i64x2.extend_high_i32x4_u (param $0 v128) (result v128) + (i64x2.extend_high_i32x4_u + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i64x2.shl (type $3) (param $0 v128) (param $1 i32) (result v128) + ;; CHECK-TEXT-NEXT: (i64x2.shl + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i64x2.shl (type $3) (param $0 v128) (param $1 i32) (result v128) + ;; CHECK-BIN-NEXT: (i64x2.shl + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i64x2.shl (param $0 v128) (param $1 i32) (result v128) + (i64x2.shl + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i64x2.shr_s (type $3) (param $0 v128) (param $1 i32) (result v128) + ;; CHECK-TEXT-NEXT: (i64x2.shr_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i64x2.shr_s (type $3) (param $0 v128) (param $1 i32) (result v128) + ;; CHECK-BIN-NEXT: (i64x2.shr_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i64x2.shr_s (param $0 v128) (param $1 i32) (result v128) + (i64x2.shr_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i64x2.shr_u (type $3) (param $0 v128) (param $1 i32) (result v128) + ;; CHECK-TEXT-NEXT: (i64x2.shr_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i64x2.shr_u (type $3) (param $0 v128) (param $1 i32) (result v128) + ;; CHECK-BIN-NEXT: (i64x2.shr_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i64x2.shr_u (param $0 v128) (param $1 i32) (result v128) + (i64x2.shr_u + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i64x2.add (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i64x2.add + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i64x2.add (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i64x2.add + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i64x2.add (param $0 v128) (param $1 v128) (result v128) + (i64x2.add + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i64x2.sub (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i64x2.sub + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i64x2.sub (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i64x2.sub + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i64x2.sub (param $0 v128) (param $1 v128) (result v128) + (i64x2.sub + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i64x2.mul (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i64x2.mul + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i64x2.mul (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i64x2.mul + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i64x2.mul (param $0 v128) (param $1 v128) (result v128) + (i64x2.mul + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i64x2.eq (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i64x2.eq + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i64x2.eq (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i64x2.eq + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i64x2.eq (param $0 v128) (param $1 v128) (result v128) + (i64x2.eq + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i64x2.ne (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i64x2.ne + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i64x2.ne (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i64x2.ne + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i64x2.ne (param $0 v128) (param $1 v128) (result v128) + (i64x2.ne + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i64x2.lt_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i64x2.lt_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i64x2.lt_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i64x2.lt_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i64x2.lt_s (param $0 v128) (param $1 v128) (result v128) + (i64x2.lt_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i64x2.gt_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i64x2.gt_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i64x2.gt_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i64x2.gt_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i64x2.gt_s (param $0 v128) (param $1 v128) (result v128) + (i64x2.gt_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i64x2.le_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i64x2.le_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i64x2.le_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i64x2.le_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i64x2.le_s (param $0 v128) (param $1 v128) (result v128) + (i64x2.le_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i64x2.ge_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i64x2.ge_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i64x2.ge_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i64x2.ge_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i64x2.ge_s (param $0 v128) (param $1 v128) (result v128) + (i64x2.ge_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i64x2.extmul_low_i32x4_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i64x2.extmul_low_i32x4_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i64x2.extmul_low_i32x4_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i64x2.extmul_low_i32x4_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i64x2.extmul_low_i32x4_s (param $0 v128) (param $1 v128) (result v128) + (i64x2.extmul_low_i32x4_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i64x2.extmul_high_i32x4_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i64x2.extmul_high_i32x4_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i64x2.extmul_high_i32x4_s (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i64x2.extmul_high_i32x4_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i64x2.extmul_high_i32x4_s (param $0 v128) (param $1 v128) (result v128) + (i64x2.extmul_high_i32x4_s + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i64x2.extmul_low_i32x4_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i64x2.extmul_low_i32x4_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i64x2.extmul_low_i32x4_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i64x2.extmul_low_i32x4_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i64x2.extmul_low_i32x4_u (param $0 v128) (param $1 v128) (result v128) + (i64x2.extmul_low_i32x4_u + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i64x2.extmul_high_i32x4_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i64x2.extmul_high_i32x4_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i64x2.extmul_high_i32x4_u (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (i64x2.extmul_high_i32x4_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i64x2.extmul_high_i32x4_u (param $0 v128) (param $1 v128) (result v128) + (i64x2.extmul_high_i32x4_u + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $f32x4.abs (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f32x4.abs + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f32x4.abs (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (f32x4.abs + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f32x4.abs (param $0 v128) (result v128) + (f32x4.abs + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $f32x4.neg (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f32x4.neg + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f32x4.neg (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (f32x4.neg + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f32x4.neg (param $0 v128) (result v128) + (f32x4.neg + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $f32x4.sqrt (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f32x4.sqrt + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f32x4.sqrt (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (f32x4.sqrt + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f32x4.sqrt (param $0 v128) (result v128) + (f32x4.sqrt + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $f32x4.add (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f32x4.add + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f32x4.add (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (f32x4.add + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f32x4.add (param $0 v128) (param $1 v128) (result v128) + (f32x4.add + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $f32x4.sub (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f32x4.sub + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f32x4.sub (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (f32x4.sub + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f32x4.sub (param $0 v128) (param $1 v128) (result v128) + (f32x4.sub + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $f32x4.mul (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f32x4.mul + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f32x4.mul (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (f32x4.mul + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f32x4.mul (param $0 v128) (param $1 v128) (result v128) + (f32x4.mul + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $f32x4.div (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f32x4.div + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f32x4.div (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (f32x4.div + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f32x4.div (param $0 v128) (param $1 v128) (result v128) + (f32x4.div + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $f32x4.min (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f32x4.min + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f32x4.min (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (f32x4.min + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f32x4.min (param $0 v128) (param $1 v128) (result v128) + (f32x4.min + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $f32x4.max (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f32x4.max + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f32x4.max (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (f32x4.max + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f32x4.max (param $0 v128) (param $1 v128) (result v128) + (f32x4.max + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $f32x4.pmin (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f32x4.pmin + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f32x4.pmin (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (f32x4.pmin + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f32x4.pmin (param $0 v128) (param $1 v128) (result v128) + (f32x4.pmin + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $f32x4.pmax (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f32x4.pmax + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f32x4.pmax (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (f32x4.pmax + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f32x4.pmax (param $0 v128) (param $1 v128) (result v128) + (f32x4.pmax + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $f64x2.abs (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f64x2.abs + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f64x2.abs (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (f64x2.abs + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f64x2.abs (param $0 v128) (result v128) + (f64x2.abs + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $f64x2.neg (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f64x2.neg + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f64x2.neg (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (f64x2.neg + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f64x2.neg (param $0 v128) (result v128) + (f64x2.neg + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $f64x2.sqrt (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f64x2.sqrt + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f64x2.sqrt (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (f64x2.sqrt + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f64x2.sqrt (param $0 v128) (result v128) + (f64x2.sqrt + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $f64x2.add (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f64x2.add + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f64x2.add (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (f64x2.add + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f64x2.add (param $0 v128) (param $1 v128) (result v128) + (f64x2.add + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $f64x2.sub (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f64x2.sub + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f64x2.sub (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (f64x2.sub + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f64x2.sub (param $0 v128) (param $1 v128) (result v128) + (f64x2.sub + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $f64x2.mul (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f64x2.mul + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f64x2.mul (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (f64x2.mul + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f64x2.mul (param $0 v128) (param $1 v128) (result v128) + (f64x2.mul + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $f64x2.div (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f64x2.div + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f64x2.div (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (f64x2.div + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f64x2.div (param $0 v128) (param $1 v128) (result v128) + (f64x2.div + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $f64x2.min (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f64x2.min + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f64x2.min (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (f64x2.min + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f64x2.min (param $0 v128) (param $1 v128) (result v128) + (f64x2.min + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $f64x2.max (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f64x2.max + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f64x2.max (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (f64x2.max + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f64x2.max (param $0 v128) (param $1 v128) (result v128) + (f64x2.max + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $f64x2.pmin (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f64x2.pmin + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f64x2.pmin (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (f64x2.pmin + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f64x2.pmin (param $0 v128) (param $1 v128) (result v128) + (f64x2.pmin + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $f64x2.pmax (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f64x2.pmax + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f64x2.pmax (type $0) (param $0 v128) (param $1 v128) (result v128) + ;; CHECK-BIN-NEXT: (f64x2.pmax + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f64x2.pmax (param $0 v128) (param $1 v128) (result v128) + (f64x2.pmax + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.trunc_sat_f32x4_s (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i32x4.trunc_sat_f32x4_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.trunc_sat_f32x4_s (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (i32x4.trunc_sat_f32x4_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.trunc_sat_f32x4_s (param $0 v128) (result v128) + (i32x4.trunc_sat_f32x4_s + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.trunc_sat_f32x4_u (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i32x4.trunc_sat_f32x4_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.trunc_sat_f32x4_u (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (i32x4.trunc_sat_f32x4_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.trunc_sat_f32x4_u (param $0 v128) (result v128) + (i32x4.trunc_sat_f32x4_u + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $f32x4.convert_i32x4_s (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f32x4.convert_i32x4_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f32x4.convert_i32x4_s (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (f32x4.convert_i32x4_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f32x4.convert_i32x4_s (param $0 v128) (result v128) + (f32x4.convert_i32x4_s + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $f32x4.convert_i32x4_u (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f32x4.convert_i32x4_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f32x4.convert_i32x4_u (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (f32x4.convert_i32x4_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f32x4.convert_i32x4_u (param $0 v128) (result v128) + (f32x4.convert_i32x4_u + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.trunc_sat_f64x2_s_zero (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i32x4.trunc_sat_f64x2_s_zero + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.trunc_sat_f64x2_s_zero (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (i32x4.trunc_sat_f64x2_s_zero + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.trunc_sat_f64x2_s_zero (param $0 v128) (result v128) + (i32x4.trunc_sat_f64x2_s_zero + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $i32x4.trunc_sat_f64x2_u_zero (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (i32x4.trunc_sat_f64x2_u_zero + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i32x4.trunc_sat_f64x2_u_zero (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (i32x4.trunc_sat_f64x2_u_zero + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i32x4.trunc_sat_f64x2_u_zero (param $0 v128) (result v128) + (i32x4.trunc_sat_f64x2_u_zero + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $f64x2.convert_low_i32x4_s (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f64x2.convert_low_i32x4_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f64x2.convert_low_i32x4_s (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (f64x2.convert_low_i32x4_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f64x2.convert_low_i32x4_s (param $0 v128) (result v128) + (f64x2.convert_low_i32x4_s + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $f64x2.convert_low_i32x4_u (type $1) (param $0 v128) (result v128) + ;; CHECK-TEXT-NEXT: (f64x2.convert_low_i32x4_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $f64x2.convert_low_i32x4_u (type $1) (param $0 v128) (result v128) + ;; CHECK-BIN-NEXT: (f64x2.convert_low_i32x4_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $f64x2.convert_low_i32x4_u (param $0 v128) (result v128) + (f64x2.convert_low_i32x4_u + (local.get $0) + ) + ) +) +;; CHECK-BIN-NODEBUG: (type $0 (func (param v128 v128) (result v128))) + +;; CHECK-BIN-NODEBUG: (type $1 (func (param v128) (result v128))) + +;; CHECK-BIN-NODEBUG: (type $2 (func (param i32) (result v128))) + +;; CHECK-BIN-NODEBUG: (type $3 (func (param v128 i32) (result v128))) + +;; CHECK-BIN-NODEBUG: (type $4 (func (param v128) (result i32))) + +;; CHECK-BIN-NODEBUG: (type $5 (func (param i32 v128))) + +;; CHECK-BIN-NODEBUG: (type $6 (func (param i32 v128) (result v128))) + +;; CHECK-BIN-NODEBUG: (type $7 (func (result v128))) + +;; CHECK-BIN-NODEBUG: (type $8 (func (param f32) (result v128))) + +;; CHECK-BIN-NODEBUG: (type $9 (func (param f64) (result v128))) + +;; CHECK-BIN-NODEBUG: (type $10 (func (param v128) (result i64))) + +;; CHECK-BIN-NODEBUG: (type $11 (func (param v128 i64) (result v128))) + +;; CHECK-BIN-NODEBUG: (type $12 (func (param v128) (result f32))) + +;; CHECK-BIN-NODEBUG: (type $13 (func (param v128 f32) (result v128))) + +;; CHECK-BIN-NODEBUG: (type $14 (func (param v128) (result f64))) + +;; CHECK-BIN-NODEBUG: (type $15 (func (param v128 f64) (result v128))) + +;; CHECK-BIN-NODEBUG: (type $16 (func (param v128 v128 v128) (result v128))) + +;; CHECK-BIN-NODEBUG: (memory $0 1 1) + +;; CHECK-BIN-NODEBUG: (func $0 (type $2) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $1 (type $2) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load8x8_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $2 (type $2) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load8x8_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $3 (type $2) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load16x4_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $4 (type $2) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load16x4_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $5 (type $2) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load32x2_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $6 (type $2) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load32x2_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $7 (type $2) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load8_splat +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $8 (type $2) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load16_splat +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $9 (type $2) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load32_splat +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $10 (type $2) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load64_splat +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $11 (type $5) (param $0 i32) (param $1 v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.store +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $12 (type $7) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $13 (type $7) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.const i32x4 0x00020001 0x00040003 0x00060005 0x00080007) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $14 (type $7) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.const i32x4 0x00000001 0x00000002 0x00000003 0x00000004) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $15 (type $7) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.const i32x4 0x00000001 0x00000000 0x00000002 0x00000000) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $16 (type $7) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.const i32x4 0x3f800000 0x40000000 0x40400000 0x40800000) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $17 (type $7) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.const i32x4 0x00000000 0x3ff00000 0x00000000 0x40000000) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $18 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i8x16.shuffle 0 17 2 19 4 21 6 23 8 25 10 27 12 29 14 31 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $19 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i8x16.swizzle +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $20 (type $2) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i8x16.splat +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $21 (type $2) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.splat +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $22 (type $8) (param $0 f32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f32x4.splat +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $23 (type $9) (param $0 f64) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f64x2.splat +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $24 (type $4) (param $0 v128) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (i8x16.extract_lane_s 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $25 (type $4) (param $0 v128) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (i8x16.extract_lane_u 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $26 (type $3) (param $0 v128) (param $1 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i8x16.replace_lane 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $27 (type $4) (param $0 v128) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.extract_lane_s 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $28 (type $4) (param $0 v128) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.extract_lane_u 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $29 (type $3) (param $0 v128) (param $1 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.replace_lane 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $30 (type $4) (param $0 v128) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.extract_lane 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $31 (type $3) (param $0 v128) (param $1 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.replace_lane 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $32 (type $10) (param $0 v128) (result i64) +;; CHECK-BIN-NODEBUG-NEXT: (i64x2.extract_lane 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $33 (type $11) (param $0 v128) (param $1 i64) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i64x2.replace_lane 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $34 (type $12) (param $0 v128) (result f32) +;; CHECK-BIN-NODEBUG-NEXT: (f32x4.extract_lane 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $35 (type $13) (param $0 v128) (param $1 f32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f32x4.replace_lane 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $36 (type $14) (param $0 v128) (result f64) +;; CHECK-BIN-NODEBUG-NEXT: (f64x2.extract_lane 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $37 (type $15) (param $0 v128) (param $1 f64) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f64x2.replace_lane 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $38 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i8x16.eq +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $39 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i8x16.ne +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $40 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i8x16.lt_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $41 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i8x16.lt_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $42 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i8x16.gt_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $43 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i8x16.gt_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $44 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i8x16.le_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $45 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i8x16.le_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $46 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i8x16.ge_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $47 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i8x16.ge_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $48 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.eq +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $49 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.ne +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $50 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.lt_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $51 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.lt_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $52 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.gt_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $53 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.gt_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $54 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.le_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $55 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.le_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $56 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.ge_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $57 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.ge_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $58 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.eq +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $59 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.ne +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $60 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.lt_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $61 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.lt_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $62 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.gt_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $63 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.gt_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $64 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.le_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $65 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.le_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $66 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.ge_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $67 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.ge_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $68 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f32x4.eq +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $69 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f32x4.ne +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $70 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f32x4.lt +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $71 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f32x4.gt +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $72 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f32x4.le +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $73 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f32x4.ge +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $74 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f64x2.eq +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $75 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f64x2.ne +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $76 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f64x2.lt +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $77 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f64x2.gt +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $78 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f64x2.le +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $79 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f64x2.ge +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $80 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.not +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $81 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.and +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $82 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.andnot +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $83 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.or +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $84 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.xor +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $85 (type $16) (param $0 v128) (param $1 v128) (param $2 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.bitselect +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $86 (type $4) (param $0 v128) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (v128.any_true +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $87 (type $6) (param $0 i32) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load8_lane 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $88 (type $6) (param $0 i32) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load16_lane 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $89 (type $6) (param $0 i32) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load32_lane 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $90 (type $6) (param $0 i32) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load64_lane 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $91 (type $6) (param $0 i32) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load64_lane align=1 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $92 (type $6) (param $0 i32) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load64_lane offset=32 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $93 (type $6) (param $0 i32) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load64_lane offset=32 align=1 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $94 (type $5) (param $0 i32) (param $1 v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.store8_lane 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $95 (type $5) (param $0 i32) (param $1 v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.store16_lane 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $96 (type $5) (param $0 i32) (param $1 v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.store32_lane 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $97 (type $5) (param $0 i32) (param $1 v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.store64_lane 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $98 (type $5) (param $0 i32) (param $1 v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.store64_lane align=1 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $99 (type $5) (param $0 i32) (param $1 v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.store64_lane offset=32 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $100 (type $5) (param $0 i32) (param $1 v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.store64_lane offset=32 align=1 0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $101 (type $2) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load32_zero +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $102 (type $2) (param $0 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load64_zero +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $103 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f32x4.demote_f64x2_zero +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $104 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f64x2.promote_low_f32x4 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $105 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i8x16.abs +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $106 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i8x16.neg +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $107 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i8x16.popcnt +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $108 (type $4) (param $0 v128) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (i8x16.all_true +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $109 (type $4) (param $0 v128) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (i8x16.bitmask +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $110 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i8x16.narrow_i16x8_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $111 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i8x16.narrow_i16x8_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $112 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f32x4.ceil +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $113 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f32x4.floor +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $114 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f32x4.trunc +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $115 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f32x4.nearest +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $116 (type $3) (param $0 v128) (param $1 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i8x16.shl +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $117 (type $3) (param $0 v128) (param $1 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i8x16.shr_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $118 (type $3) (param $0 v128) (param $1 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i8x16.shr_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $119 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i8x16.add +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $120 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i8x16.add_sat_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $121 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i8x16.add_sat_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $122 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i8x16.sub +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $123 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i8x16.sub_sat_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $124 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i8x16.sub_sat_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $125 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f64x2.ceil +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $126 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f64x2.floor +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $127 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i8x16.min_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $128 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i8x16.min_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $129 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i8x16.max_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $130 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i8x16.max_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $131 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f64x2.trunc +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $132 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i8x16.avgr_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $133 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.extadd_pairwise_i8x16_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $134 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.extadd_pairwise_i8x16_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $135 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.extadd_pairwise_i16x8_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $136 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.extadd_pairwise_i16x8_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $137 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.abs +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $138 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.neg +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $139 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.q15mulr_sat_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $140 (type $4) (param $0 v128) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.all_true +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $141 (type $4) (param $0 v128) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.bitmask +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $142 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.narrow_i32x4_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $143 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.narrow_i32x4_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $144 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.extend_low_i8x16_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $145 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.extend_high_i8x16_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $146 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.extend_low_i8x16_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $147 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.extend_high_i8x16_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $148 (type $3) (param $0 v128) (param $1 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.shl +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $149 (type $3) (param $0 v128) (param $1 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.shr_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $150 (type $3) (param $0 v128) (param $1 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.shr_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $151 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.add +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $152 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.add_sat_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $153 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.add_sat_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $154 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.sub +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $155 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.sub_sat_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $156 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.sub_sat_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $157 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f64x2.nearest +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $158 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.mul +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $159 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.min_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $160 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.min_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $161 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.max_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $162 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.max_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $163 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.avgr_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $164 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.extmul_low_i8x16_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $165 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.extmul_high_i8x16_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $166 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.extmul_low_i8x16_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $167 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i16x8.extmul_high_i8x16_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $168 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.abs +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $169 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.neg +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $170 (type $4) (param $0 v128) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.all_true +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $171 (type $4) (param $0 v128) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.bitmask +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $172 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.extend_low_i16x8_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $173 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.extend_high_i16x8_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $174 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.extend_low_i16x8_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $175 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.extend_high_i16x8_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $176 (type $3) (param $0 v128) (param $1 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.shl +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $177 (type $3) (param $0 v128) (param $1 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.shr_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $178 (type $3) (param $0 v128) (param $1 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.shr_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $179 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.add +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $180 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.sub +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $181 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.mul +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $182 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.min_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $183 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.min_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $184 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.max_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $185 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.max_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $186 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.dot_i16x8_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $187 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.extmul_low_i16x8_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $188 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.extmul_high_i16x8_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $189 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.extmul_low_i16x8_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $190 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.extmul_high_i16x8_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $191 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i64x2.abs +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $192 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i64x2.neg +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $193 (type $4) (param $0 v128) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (i64x2.all_true +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $194 (type $4) (param $0 v128) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (i64x2.bitmask +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $195 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i64x2.extend_low_i32x4_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $196 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i64x2.extend_high_i32x4_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $197 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i64x2.extend_low_i32x4_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $198 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i64x2.extend_high_i32x4_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $199 (type $3) (param $0 v128) (param $1 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i64x2.shl +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $200 (type $3) (param $0 v128) (param $1 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i64x2.shr_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $201 (type $3) (param $0 v128) (param $1 i32) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i64x2.shr_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $202 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i64x2.add +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $203 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i64x2.sub +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $204 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i64x2.mul +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $205 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i64x2.eq +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $206 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i64x2.ne +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $207 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i64x2.lt_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $208 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i64x2.gt_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $209 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i64x2.le_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $210 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i64x2.ge_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $211 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i64x2.extmul_low_i32x4_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $212 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i64x2.extmul_high_i32x4_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $213 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i64x2.extmul_low_i32x4_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $214 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i64x2.extmul_high_i32x4_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $215 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f32x4.abs +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $216 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f32x4.neg +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $217 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f32x4.sqrt +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $218 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f32x4.add +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $219 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f32x4.sub +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $220 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f32x4.mul +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $221 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f32x4.div +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $222 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f32x4.min +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $223 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f32x4.max +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $224 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f32x4.pmin +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $225 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f32x4.pmax +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $226 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f64x2.abs +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $227 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f64x2.neg +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $228 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f64x2.sqrt +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $229 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f64x2.add +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $230 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f64x2.sub +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $231 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f64x2.mul +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $232 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f64x2.div +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $233 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f64x2.min +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $234 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f64x2.max +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $235 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f64x2.pmin +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $236 (type $0) (param $0 v128) (param $1 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f64x2.pmax +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $237 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.trunc_sat_f32x4_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $238 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.trunc_sat_f32x4_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $239 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f32x4.convert_i32x4_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $240 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f32x4.convert_i32x4_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $241 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.trunc_sat_f64x2_s_zero +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $242 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (i32x4.trunc_sat_f64x2_u_zero +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $243 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f64x2.convert_low_i32x4_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $244 (type $1) (param $0 v128) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (f64x2.convert_low_i32x4_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) diff --git a/test/lit/basic/simd64.wast b/test/lit/basic/simd64.wast new file mode 100644 index 000000000..ed4350b63 --- /dev/null +++ b/test/lit/basic/simd64.wast @@ -0,0 +1,343 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wast -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast +;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +(module + (memory i64 1 1) + + ;; CHECK-TEXT: (type $0 (func (param i64) (result v128))) + + ;; CHECK-TEXT: (type $1 (func (param i64 v128))) + + ;; CHECK-TEXT: (memory $0 i64 1 1) + + ;; CHECK-TEXT: (func $v128.load (type $0) (param $0 i64) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (type $0 (func (param i64) (result v128))) + + ;; CHECK-BIN: (type $1 (func (param i64 v128))) + + ;; CHECK-BIN: (memory $0 i64 1 1) + + ;; CHECK-BIN: (func $v128.load (type $0) (param $0 i64) (result v128) + ;; CHECK-BIN-NEXT: (v128.load + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load (param $0 i64) (result v128) + (v128.load offset=0 align=16 + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.store (type $1) (param $0 i64) (param $1 v128) + ;; CHECK-TEXT-NEXT: (v128.store + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.store (type $1) (param $0 i64) (param $1 v128) + ;; CHECK-BIN-NEXT: (v128.store + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.store (param $0 i64) (param $1 v128) + (v128.store offset=0 align=16 + (local.get $0) + (local.get $1) + ) + ) + + ;; CHECK-TEXT: (func $v128.load8_splat (type $0) (param $0 i64) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load8_splat + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load8_splat (type $0) (param $0 i64) (result v128) + ;; CHECK-BIN-NEXT: (v128.load8_splat + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load8_splat (param $0 i64) (result v128) + (v128.load8_splat + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load16_splat (type $0) (param $0 i64) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load16_splat + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load16_splat (type $0) (param $0 i64) (result v128) + ;; CHECK-BIN-NEXT: (v128.load16_splat + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load16_splat (param $0 i64) (result v128) + (v128.load16_splat + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load32_splat (type $0) (param $0 i64) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load32_splat + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load32_splat (type $0) (param $0 i64) (result v128) + ;; CHECK-BIN-NEXT: (v128.load32_splat + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load32_splat (param $0 i64) (result v128) + (v128.load32_splat + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load64_splat (type $0) (param $0 i64) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load64_splat + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load64_splat (type $0) (param $0 i64) (result v128) + ;; CHECK-BIN-NEXT: (v128.load64_splat + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load64_splat (param $0 i64) (result v128) + (v128.load64_splat + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load8x8_u (type $0) (param $0 i64) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load8x8_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load8x8_u (type $0) (param $0 i64) (result v128) + ;; CHECK-BIN-NEXT: (v128.load8x8_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load8x8_u (param $0 i64) (result v128) + (v128.load8x8_u + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load8x8_s (type $0) (param $0 i64) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load8x8_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load8x8_s (type $0) (param $0 i64) (result v128) + ;; CHECK-BIN-NEXT: (v128.load8x8_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load8x8_s (param $0 i64) (result v128) + (v128.load8x8_s + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load16x4_s (type $0) (param $0 i64) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load16x4_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load16x4_s (type $0) (param $0 i64) (result v128) + ;; CHECK-BIN-NEXT: (v128.load16x4_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load16x4_s (param $0 i64) (result v128) + (v128.load16x4_s + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load16x4_u (type $0) (param $0 i64) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load16x4_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load16x4_u (type $0) (param $0 i64) (result v128) + ;; CHECK-BIN-NEXT: (v128.load16x4_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load16x4_u (param $0 i64) (result v128) + (v128.load16x4_u + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load32x2_s (type $0) (param $0 i64) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load32x2_s + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load32x2_s (type $0) (param $0 i64) (result v128) + ;; CHECK-BIN-NEXT: (v128.load32x2_s + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load32x2_s (param $0 i64) (result v128) + (v128.load32x2_s + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load32x2_u (type $0) (param $0 i64) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load32x2_u + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load32x2_u (type $0) (param $0 i64) (result v128) + ;; CHECK-BIN-NEXT: (v128.load32x2_u + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load32x2_u (param $0 i64) (result v128) + (v128.load32x2_u + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load32_zero (type $0) (param $0 i64) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load32_zero + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load32_zero (type $0) (param $0 i64) (result v128) + ;; CHECK-BIN-NEXT: (v128.load32_zero + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load32_zero (param $0 i64) (result v128) + (v128.load32_zero + (local.get $0) + ) + ) + + ;; CHECK-TEXT: (func $v128.load64_zero (type $0) (param $0 i64) (result v128) + ;; CHECK-TEXT-NEXT: (v128.load64_zero + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $v128.load64_zero (type $0) (param $0 i64) (result v128) + ;; CHECK-BIN-NEXT: (v128.load64_zero + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $v128.load64_zero (param $0 i64) (result v128) + (v128.load64_zero + (local.get $0) + ) + ) +) +;; CHECK-BIN-NODEBUG: (type $0 (func (param i64) (result v128))) + +;; CHECK-BIN-NODEBUG: (type $1 (func (param i64 v128))) + +;; CHECK-BIN-NODEBUG: (memory $0 i64 1 1) + +;; CHECK-BIN-NODEBUG: (func $0 (type $0) (param $0 i64) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $1 (type $1) (param $0 i64) (param $1 v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.store +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $2 (type $0) (param $0 i64) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load8_splat +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $3 (type $0) (param $0 i64) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load16_splat +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $4 (type $0) (param $0 i64) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load32_splat +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $5 (type $0) (param $0 i64) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load64_splat +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $6 (type $0) (param $0 i64) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load8x8_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $7 (type $0) (param $0 i64) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load8x8_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $8 (type $0) (param $0 i64) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load16x4_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $9 (type $0) (param $0 i64) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load16x4_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $10 (type $0) (param $0 i64) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load32x2_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $11 (type $0) (param $0 i64) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load32x2_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $12 (type $0) (param $0 i64) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load32_zero +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $13 (type $0) (param $0 i64) (result v128) +;; CHECK-BIN-NODEBUG-NEXT: (v128.load64_zero +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) diff --git a/test/lit/basic/subtypes.wast b/test/lit/basic/subtypes.wast new file mode 100644 index 000000000..d283ebefa --- /dev/null +++ b/test/lit/basic/subtypes.wast @@ -0,0 +1,219 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wast -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast +;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +;; Test that we can roundtrip struct and array types +(module + ;; Arrays + ;; CHECK-TEXT: (type $struct-rec-one (sub (struct (field (ref $struct-rec-one))))) + + ;; CHECK-TEXT: (type $struct-rec-two (sub $struct-rec-one (struct (field (ref $struct-rec-two)) (field (ref $struct-rec-two))))) + + ;; CHECK-TEXT: (type $vector-i32 (array i32)) + ;; CHECK-BIN: (type $struct-rec-one (sub (struct (field (ref $struct-rec-one))))) + + ;; CHECK-BIN: (type $struct-rec-two (sub $struct-rec-one (struct (field (ref $struct-rec-two)) (field (ref $struct-rec-two))))) + + ;; CHECK-BIN: (type $vector-i32 (array i32)) + (type $vector-i32 (array i32)) + + ;; CHECK-TEXT: (type $struct-any (sub (struct (field (ref any))))) + + ;; CHECK-TEXT: (type $struct-i31 (sub $struct-any (struct (field (ref i31))))) + + ;; CHECK-TEXT: (type $5 (func (param (ref $vector-i32) (ref null $vector-i32)))) + + ;; CHECK-TEXT: (type $vector-any (sub (array (ref any)))) + ;; CHECK-BIN: (type $struct-any (sub (struct (field (ref any))))) + + ;; CHECK-BIN: (type $struct-i31 (sub $struct-any (struct (field (ref i31))))) + + ;; CHECK-BIN: (type $5 (func (param (ref $vector-i32) (ref null $vector-i32)))) + + ;; CHECK-BIN: (type $vector-any (sub (array (ref any)))) + (type $vector-any (sub (array (ref any)))) + ;; CHECK-TEXT: (type $vector-i31 (sub $vector-any (array (ref i31)))) + ;; CHECK-BIN: (type $vector-i31 (sub $vector-any (array (ref i31)))) + (type $vector-i31 (sub $vector-any (array (ref i31)))) + + ;; Structs + (type $struct-any (sub (struct + (field (ref any)) + ))) + (type $struct-i31 (sub $struct-any (struct + (field (ref i31)) + ))) + ;; CHECK-TEXT: (type $8 (func (param (ref $vector-i31) (ref $vector-any)))) + + ;; CHECK-TEXT: (type $9 (func (param (ref $struct-i31) (ref $struct-any)))) + + ;; CHECK-TEXT: (type $struct-i31_any (sub $struct-i31 (struct (field (ref i31)) (field (ref any))))) + ;; CHECK-BIN: (type $8 (func (param (ref $vector-i31) (ref $vector-any)))) + + ;; CHECK-BIN: (type $9 (func (param (ref $struct-i31) (ref $struct-any)))) + + ;; CHECK-BIN: (type $struct-i31_any (sub $struct-i31 (struct (field (ref i31)) (field (ref any))))) + (type $struct-i31_any (sub $struct-i31(struct + (field (ref i31)) + (field (ref any)) + ))) + + ;; Recursive structs + (type $struct-rec-one (sub (struct + (field (ref $struct-rec-one)) + ))) + (type $struct-rec-two (sub $struct-rec-one (struct + (field (ref $struct-rec-two)) + (field (ref $struct-rec-two)) + ))) + + ;; CHECK-TEXT: (type $11 (func (param (ref $struct-i31) (ref $struct-i31_any)))) + + ;; CHECK-TEXT: (type $12 (func (param (ref $struct-rec-one) (ref $struct-rec-two)))) + + ;; CHECK-TEXT: (func $foo (type $5) (param $no-null (ref $vector-i32)) (param $yes-null (ref null $vector-i32)) + ;; CHECK-TEXT-NEXT: (local.set $yes-null + ;; CHECK-TEXT-NEXT: (local.get $no-null) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (type $11 (func (param (ref $struct-i31) (ref $struct-i31_any)))) + + ;; CHECK-BIN: (type $12 (func (param (ref $struct-rec-one) (ref $struct-rec-two)))) + + ;; CHECK-BIN: (func $foo (type $5) (param $no-null (ref $vector-i32)) (param $yes-null (ref null $vector-i32)) + ;; CHECK-BIN-NEXT: (local.set $yes-null + ;; CHECK-BIN-NEXT: (local.get $no-null) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $foo (param $no-null (ref $vector-i32)) + (param $yes-null (ref null $vector-i32)) + ;; ok to set a non-nullable reference to a nullable target + (local.set $yes-null (local.get $no-null)) + ) + + ;; CHECK-TEXT: (func $bar (type $8) (param $v-i31 (ref $vector-i31)) (param $v-any (ref $vector-any)) + ;; CHECK-TEXT-NEXT: (local.set $v-any + ;; CHECK-TEXT-NEXT: (local.get $v-i31) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $bar (type $8) (param $v-i31 (ref $vector-i31)) (param $v-any (ref $vector-any)) + ;; CHECK-BIN-NEXT: (local.set $v-any + ;; CHECK-BIN-NEXT: (local.get $v-i31) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $bar (param $v-i31 (ref $vector-i31)) + (param $v-any (ref $vector-any)) + ;; ok to set a vector of (immutable) i31s to a vector of anyies + (local.set $v-any (local.get $v-i31)) + ) + + ;; CHECK-TEXT: (func $baz (type $9) (param $s-i31 (ref $struct-i31)) (param $s-any (ref $struct-any)) + ;; CHECK-TEXT-NEXT: (local.set $s-any + ;; CHECK-TEXT-NEXT: (local.get $s-i31) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $baz (type $9) (param $s-i31 (ref $struct-i31)) (param $s-any (ref $struct-any)) + ;; CHECK-BIN-NEXT: (local.set $s-any + ;; CHECK-BIN-NEXT: (local.get $s-i31) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $baz (param $s-i31 (ref $struct-i31)) + (param $s-any (ref $struct-any)) + ;; ok to set a struct of an (immutable) i31 to a one of an any + (local.set $s-any (local.get $s-i31)) + ) + + ;; CHECK-TEXT: (func $boo (type $11) (param $s-i31 (ref $struct-i31)) (param $s-i31_any (ref $struct-i31_any)) + ;; CHECK-TEXT-NEXT: (local.set $s-i31 + ;; CHECK-TEXT-NEXT: (local.get $s-i31_any) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $boo (type $11) (param $s-i31 (ref $struct-i31)) (param $s-i31_any (ref $struct-i31_any)) + ;; CHECK-BIN-NEXT: (local.set $s-i31 + ;; CHECK-BIN-NEXT: (local.get $s-i31_any) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $boo (param $s-i31 (ref $struct-i31)) + (param $s-i31_any (ref $struct-i31_any)) + ;; also ok to have extra fields + (local.set $s-i31 (local.get $s-i31_any)) + ) + + ;; CHECK-TEXT: (func $coinductive (type $12) (param $rec-one (ref $struct-rec-one)) (param $rec-two (ref $struct-rec-two)) + ;; CHECK-TEXT-NEXT: (local.set $rec-one + ;; CHECK-TEXT-NEXT: (local.get $rec-two) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $coinductive (type $12) (param $rec-one (ref $struct-rec-one)) (param $rec-two (ref $struct-rec-two)) + ;; CHECK-BIN-NEXT: (local.set $rec-one + ;; CHECK-BIN-NEXT: (local.get $rec-two) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $coinductive (param $rec-one (ref $struct-rec-one)) + (param $rec-two (ref $struct-rec-two)) + ;; Do not infinitely recurse when determining this subtype relation! + (local.set $rec-one (local.get $rec-two)) + ) +) +;; CHECK-BIN-NODEBUG: (type $0 (sub (struct (field (ref $0))))) + +;; CHECK-BIN-NODEBUG: (type $1 (sub $0 (struct (field (ref $1)) (field (ref $1))))) + +;; CHECK-BIN-NODEBUG: (type $2 (array i32)) + +;; CHECK-BIN-NODEBUG: (type $3 (sub (struct (field (ref any))))) + +;; CHECK-BIN-NODEBUG: (type $4 (sub $3 (struct (field (ref i31))))) + +;; CHECK-BIN-NODEBUG: (type $5 (func (param (ref $2) (ref null $2)))) + +;; CHECK-BIN-NODEBUG: (type $6 (sub (array (ref any)))) + +;; CHECK-BIN-NODEBUG: (type $7 (sub $6 (array (ref i31)))) + +;; CHECK-BIN-NODEBUG: (type $8 (func (param (ref $7) (ref $6)))) + +;; CHECK-BIN-NODEBUG: (type $9 (func (param (ref $4) (ref $3)))) + +;; CHECK-BIN-NODEBUG: (type $10 (sub $4 (struct (field (ref i31)) (field (ref any))))) + +;; CHECK-BIN-NODEBUG: (type $11 (func (param (ref $4) (ref $10)))) + +;; CHECK-BIN-NODEBUG: (type $12 (func (param (ref $0) (ref $1)))) + +;; CHECK-BIN-NODEBUG: (func $0 (type $5) (param $0 (ref $2)) (param $1 (ref null $2)) +;; CHECK-BIN-NODEBUG-NEXT: (local.set $1 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $1 (type $8) (param $0 (ref $7)) (param $1 (ref $6)) +;; CHECK-BIN-NODEBUG-NEXT: (local.set $1 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $2 (type $9) (param $0 (ref $4)) (param $1 (ref $3)) +;; CHECK-BIN-NODEBUG-NEXT: (local.set $1 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $3 (type $11) (param $0 (ref $4)) (param $1 (ref $10)) +;; CHECK-BIN-NODEBUG-NEXT: (local.set $0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $4 (type $12) (param $0 (ref $0)) (param $1 (ref $1)) +;; CHECK-BIN-NODEBUG-NEXT: (local.set $0 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) diff --git a/test/lit/basic/table-import.wast b/test/lit/basic/table-import.wast new file mode 100644 index 000000000..347da5634 --- /dev/null +++ b/test/lit/basic/table-import.wast @@ -0,0 +1,45 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wast -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast +;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +(module + ;; CHECK-TEXT: (type $0 (func)) + ;; CHECK-BIN: (type $0 (func)) + ;; CHECK-BIN-NODEBUG: (type $0 (func)) + (type $0 (func)) + ;; CHECK-TEXT: (import "env" "table" (table $timport$0 1 1 funcref)) + ;; CHECK-BIN: (import "env" "table" (table $timport$0 1 1 funcref)) + ;; CHECK-BIN-NODEBUG: (import "env" "table" (table $timport$0 1 1 funcref)) + (import "env" "table" (table 1 1 funcref)) + (elem (i32.const 0) $foo) + ;; CHECK-TEXT: (memory $0 0) + ;; CHECK-BIN: (memory $0 0) + ;; CHECK-BIN-NODEBUG: (memory $0 0) + (memory $0 0) + + ;; CHECK-TEXT: (elem $0 (i32.const 0) $foo) + + ;; CHECK-TEXT: (func $foo (type $0) + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (elem $0 (i32.const 0) $foo) + + ;; CHECK-BIN: (func $foo (type $0) + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: ) + (func $foo (type $0) + (nop) + ) +) +;; CHECK-BIN-NODEBUG: (elem $0 (i32.const 0) $0) + +;; CHECK-BIN-NODEBUG: (func $0 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: ) diff --git a/test/lit/basic/tags.wast b/test/lit/basic/tags.wast new file mode 100644 index 000000000..e6c5d2ccc --- /dev/null +++ b/test/lit/basic/tags.wast @@ -0,0 +1,91 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wast -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast +;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +;; Test tags + +(module + (tag (param i32)) + ;; CHECK-TEXT: (type $0 (func (param i32 f32))) + + ;; CHECK-TEXT: (type $1 (func (param i32))) + + ;; CHECK-TEXT: (type $2 (func)) + + ;; CHECK-TEXT: (import "env" "im0" (tag $e-import (param i32))) + + ;; CHECK-TEXT: (import "env" "im1" (tag $eimport$1 (param i32 f32))) + + ;; CHECK-TEXT: (tag $2 (param i32)) + + ;; CHECK-TEXT: (tag $e (param i32 f32)) + ;; CHECK-BIN: (type $0 (func (param i32 f32))) + + ;; CHECK-BIN: (type $1 (func (param i32))) + + ;; CHECK-BIN: (type $2 (func)) + + ;; CHECK-BIN: (import "env" "im0" (tag $e-import (param i32))) + + ;; CHECK-BIN: (import "env" "im1" (tag $eimport$1 (param i32 f32))) + + ;; CHECK-BIN: (tag $tag$0 (param i32)) + + ;; CHECK-BIN: (tag $e (param i32 f32)) + (tag $e (param i32 f32)) + ;; CHECK-TEXT: (tag $empty) + ;; CHECK-BIN: (tag $empty) + (tag $empty) + + ;; CHECK-TEXT: (tag $e-params0 (param i32 f32)) + ;; CHECK-BIN: (tag $e-params0 (param i32 f32)) + (tag $e-params0 (param i32 f32)) + ;; CHECK-TEXT: (tag $e-params1 (param i32 f32)) + ;; CHECK-BIN: (tag $e-params1 (param i32 f32)) + (tag $e-params1 (param i32) (param f32)) + + ;; CHECK-TEXT: (tag $e-export (param i32)) + ;; CHECK-BIN: (tag $e-export (param i32)) + (tag $e-export (export "ex0") (param i32)) + (tag $e-import (import "env" "im0") (param i32)) + + ;; CHECK-BIN-NODEBUG: (type $0 (func (param i32 f32))) + + ;; CHECK-BIN-NODEBUG: (type $1 (func (param i32))) + + ;; CHECK-BIN-NODEBUG: (type $2 (func)) + + ;; CHECK-BIN-NODEBUG: (import "env" "im0" (tag $eimport$0 (param i32))) + (import "env" "im1" (tag (param i32 f32))) + ;; CHECK-TEXT: (export "ex0" (tag $e-export)) + + ;; CHECK-TEXT: (export "ex1" (tag $e)) + ;; CHECK-BIN: (export "ex0" (tag $e-export)) + + ;; CHECK-BIN: (export "ex1" (tag $e)) + ;; CHECK-BIN-NODEBUG: (import "env" "im1" (tag $eimport$1 (param i32 f32))) + + ;; CHECK-BIN-NODEBUG: (tag $tag$0 (param i32)) + + ;; CHECK-BIN-NODEBUG: (tag $tag$1 (param i32 f32)) + + ;; CHECK-BIN-NODEBUG: (tag $tag$2) + + ;; CHECK-BIN-NODEBUG: (tag $tag$3 (param i32 f32)) + + ;; CHECK-BIN-NODEBUG: (tag $tag$4 (param i32 f32)) + + ;; CHECK-BIN-NODEBUG: (tag $tag$5 (param i32)) + + ;; CHECK-BIN-NODEBUG: (export "ex0" (tag $tag$5)) + + ;; CHECK-BIN-NODEBUG: (export "ex1" (tag $tag$1)) + (export "ex1" (tag $e)) +) diff --git a/test/lit/basic/unit.wat b/test/lit/basic/unit.wat new file mode 100644 index 000000000..8392a2269 --- /dev/null +++ b/test/lit/basic/unit.wat @@ -0,0 +1,2293 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wat -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wat +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wat +;; RUN: cat %t.text.wat | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wat | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wat | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +(module + ;; CHECK-TEXT: (type $5 (func (result i32))) + + ;; CHECK-TEXT: (type $FUNCSIG$v (func)) + + ;; CHECK-TEXT: (type $FUNCSIG$vf (func (param f32))) + ;; CHECK-BIN: (type $5 (func (result i32))) + + ;; CHECK-BIN: (type $FUNCSIG$v (func)) + + ;; CHECK-BIN: (type $FUNCSIG$vf (func (param f32))) + (type $FUNCSIG$vf (func (param f32))) + (type $FUNCSIG$v (func)) + ;; CHECK-TEXT: (type $4 (func (result f64))) + + ;; CHECK-TEXT: (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) + + ;; CHECK-TEXT: (type $FUNCSIG$id (func (param f64) (result i32))) + ;; CHECK-BIN: (type $4 (func (result f64))) + + ;; CHECK-BIN: (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) + + ;; CHECK-BIN: (type $FUNCSIG$id (func (param f64) (result i32))) + (type $FUNCSIG$id (func (param f64) (result i32))) + (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) + ;; CHECK-BIN-NODEBUG: (type $0 (func (result i32))) + + ;; CHECK-BIN-NODEBUG: (type $1 (func)) + + ;; CHECK-BIN-NODEBUG: (type $2 (func (param f32))) + + ;; CHECK-BIN-NODEBUG: (type $3 (func (result f64))) + + ;; CHECK-BIN-NODEBUG: (type $4 (func (param f64 f64) (result f64))) + (type $4 (func (result f64))) + ;; CHECK-BIN-NODEBUG: (type $5 (func (param f64) (result i32))) + (type $5 (func (result i32))) + ;; CHECK-TEXT: (type $6 (func (param i32) (result i32))) + ;; CHECK-BIN: (type $6 (func (param i32) (result i32))) + ;; CHECK-BIN-NODEBUG: (type $6 (func (param i32) (result i32))) + (type $6 (func (param i32) (result i32))) + ;; CHECK-TEXT: (type $7 (func (param f64) (result f64))) + ;; CHECK-BIN: (type $7 (func (param f64) (result f64))) + ;; CHECK-BIN-NODEBUG: (type $7 (func (param f64) (result f64))) + (type $7 (func (param f64) (result f64))) + ;; CHECK-TEXT: (type $8 (func (result i64))) + ;; CHECK-BIN: (type $8 (func (result i64))) + ;; CHECK-BIN-NODEBUG: (type $8 (func (result i64))) + (type $8 (func (result i64))) + ;; CHECK-TEXT: (type $9 (func (param i32 i64))) + ;; CHECK-BIN: (type $9 (func (param i32 i64))) + ;; CHECK-BIN-NODEBUG: (type $9 (func (param i32 i64))) + (type $9 (func (param i32 i64))) + ;; CHECK-TEXT: (import "env" "_emscripten_asm_const_vi" (func $_emscripten_asm_const_vi (type $FUNCSIG$v))) + ;; CHECK-BIN: (import "env" "_emscripten_asm_const_vi" (func $_emscripten_asm_const_vi (type $FUNCSIG$v))) + ;; CHECK-BIN-NODEBUG: (import "env" "_emscripten_asm_const_vi" (func $fimport$0 (type $1))) + (import "env" "_emscripten_asm_const_vi" (func $_emscripten_asm_const_vi)) + ;; CHECK-TEXT: (import "asm2wasm" "f64-to-int" (func $f64-to-int (type $FUNCSIG$id) (param f64) (result i32))) + ;; CHECK-BIN: (import "asm2wasm" "f64-to-int" (func $f64-to-int (type $FUNCSIG$id) (param f64) (result i32))) + ;; CHECK-BIN-NODEBUG: (import "asm2wasm" "f64-to-int" (func $fimport$1 (type $5) (param f64) (result i32))) + (import "asm2wasm" "f64-to-int" (func $f64-to-int (param f64) (result i32))) + ;; CHECK-TEXT: (import "asm2wasm" "f64-rem" (func $f64-rem (type $FUNCSIG$ddd) (param f64 f64) (result f64))) + ;; CHECK-BIN: (import "asm2wasm" "f64-rem" (func $f64-rem (type $FUNCSIG$ddd) (param f64 f64) (result f64))) + ;; CHECK-BIN-NODEBUG: (import "asm2wasm" "f64-rem" (func $fimport$2 (type $4) (param f64 f64) (result f64))) + (import "asm2wasm" "f64-rem" (func $f64-rem (param f64 f64) (result f64))) + (table 10 funcref) + (elem (i32.const 0) $z $big_negative $z $z $w $w $importedDoubles $w $z $cneg) + ;; CHECK-TEXT: (memory $0 4096 4096) + ;; CHECK-BIN: (memory $0 4096 4096) + ;; CHECK-BIN-NODEBUG: (memory $0 4096 4096) + (memory $0 4096 4096) + (data (i32.const 1026) "\14\00") + ;; CHECK-TEXT: (data $0 (i32.const 1026) "\14\00") + + ;; CHECK-TEXT: (table $0 10 funcref) + + ;; CHECK-TEXT: (elem $0 (i32.const 0) $z $big_negative $z $z $w $w $importedDoubles $w $z $cneg) + + ;; CHECK-TEXT: (export "big_negative" (func $big_negative)) + ;; CHECK-BIN: (data $0 (i32.const 1026) "\14\00") + + ;; CHECK-BIN: (table $0 10 funcref) + + ;; CHECK-BIN: (elem $0 (i32.const 0) $z $big_negative $z $z $w $w $importedDoubles $w $z $cneg) + + ;; CHECK-BIN: (export "big_negative" (func $big_negative)) + ;; CHECK-BIN-NODEBUG: (data $0 (i32.const 1026) "\14\00") + + ;; CHECK-BIN-NODEBUG: (table $0 10 funcref) + + ;; CHECK-BIN-NODEBUG: (elem $0 (i32.const 0) $17 $0 $17 $17 $18 $18 $1 $18 $17 $15) + + ;; CHECK-BIN-NODEBUG: (export "big_negative" (func $0)) + (export "big_negative" (func $big_negative)) + ;; CHECK-TEXT: (func $big_negative (type $FUNCSIG$v) + ;; CHECK-TEXT-NEXT: (local $temp f64) + ;; CHECK-TEXT-NEXT: (block $block0 + ;; CHECK-TEXT-NEXT: (local.set $temp + ;; CHECK-TEXT-NEXT: (f64.const -2147483648) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (local.set $temp + ;; CHECK-TEXT-NEXT: (f64.const -2147483648) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (local.set $temp + ;; CHECK-TEXT-NEXT: (f64.const -21474836480) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (local.set $temp + ;; CHECK-TEXT-NEXT: (f64.const 0.039625) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (local.set $temp + ;; CHECK-TEXT-NEXT: (f64.const -0.039625) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $big_negative (type $FUNCSIG$v) + ;; CHECK-BIN-NEXT: (local $temp f64) + ;; CHECK-BIN-NEXT: (local.set $temp + ;; CHECK-BIN-NEXT: (f64.const -2147483648) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (local.set $temp + ;; CHECK-BIN-NEXT: (f64.const -2147483648) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (local.set $temp + ;; CHECK-BIN-NEXT: (f64.const -21474836480) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (local.set $temp + ;; CHECK-BIN-NEXT: (f64.const 0.039625) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (local.set $temp + ;; CHECK-BIN-NEXT: (f64.const -0.039625) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $big_negative (type $FUNCSIG$v) + (local $temp f64) + (block $block0 + (local.set $temp + (f64.const -2147483648) + ) + (local.set $temp + (f64.const -2147483648) + ) + (local.set $temp + (f64.const -21474836480) + ) + (local.set $temp + (f64.const 0.039625) + ) + (local.set $temp + (f64.const -0.039625) + ) + ) + ) + ;; CHECK-TEXT: (func $importedDoubles (type $4) (result f64) + ;; CHECK-TEXT-NEXT: (local $temp f64) + ;; CHECK-TEXT-NEXT: (block $topmost (result f64) + ;; CHECK-TEXT-NEXT: (local.set $temp + ;; CHECK-TEXT-NEXT: (f64.add + ;; CHECK-TEXT-NEXT: (f64.add + ;; CHECK-TEXT-NEXT: (f64.add + ;; CHECK-TEXT-NEXT: (f64.load + ;; CHECK-TEXT-NEXT: (i32.const 8) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (f64.load + ;; CHECK-TEXT-NEXT: (i32.const 16) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (f64.neg + ;; CHECK-TEXT-NEXT: (f64.load + ;; CHECK-TEXT-NEXT: (i32.const 16) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (f64.neg + ;; CHECK-TEXT-NEXT: (f64.load + ;; CHECK-TEXT-NEXT: (i32.const 8) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (if + ;; CHECK-TEXT-NEXT: (i32.gt_s + ;; CHECK-TEXT-NEXT: (i32.load + ;; CHECK-TEXT-NEXT: (i32.const 24) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (br $topmost + ;; CHECK-TEXT-NEXT: (f64.const -3.4) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (if + ;; CHECK-TEXT-NEXT: (f64.gt + ;; CHECK-TEXT-NEXT: (f64.load + ;; CHECK-TEXT-NEXT: (i32.const 32) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (f64.const 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (br $topmost + ;; CHECK-TEXT-NEXT: (f64.const 5.6) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (f64.const 1.2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $importedDoubles (type $4) (result f64) + ;; CHECK-BIN-NEXT: (local $temp f64) + ;; CHECK-BIN-NEXT: (block $label$1 (result f64) + ;; CHECK-BIN-NEXT: (local.set $temp + ;; CHECK-BIN-NEXT: (f64.add + ;; CHECK-BIN-NEXT: (f64.add + ;; CHECK-BIN-NEXT: (f64.add + ;; CHECK-BIN-NEXT: (f64.load + ;; CHECK-BIN-NEXT: (i32.const 8) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (f64.load + ;; CHECK-BIN-NEXT: (i32.const 16) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (f64.neg + ;; CHECK-BIN-NEXT: (f64.load + ;; CHECK-BIN-NEXT: (i32.const 16) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (f64.neg + ;; CHECK-BIN-NEXT: (f64.load + ;; CHECK-BIN-NEXT: (i32.const 8) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (if + ;; CHECK-BIN-NEXT: (i32.gt_s + ;; CHECK-BIN-NEXT: (i32.load + ;; CHECK-BIN-NEXT: (i32.const 24) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (br $label$1 + ;; CHECK-BIN-NEXT: (f64.const -3.4) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (if + ;; CHECK-BIN-NEXT: (f64.gt + ;; CHECK-BIN-NEXT: (f64.load + ;; CHECK-BIN-NEXT: (i32.const 32) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (f64.const 0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (br $label$1 + ;; CHECK-BIN-NEXT: (f64.const 5.6) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (f64.const 1.2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $importedDoubles (type $4) (result f64) + (local $temp f64) + (block $topmost (result f64) + (local.set $temp + (f64.add + (f64.add + (f64.add + (f64.load + (i32.const 8) + ) + (f64.load + (i32.const 16) + ) + ) + (f64.neg + (f64.load + (i32.const 16) + ) + ) + ) + (f64.neg + (f64.load + (i32.const 8) + ) + ) + ) + ) + (if + (i32.gt_s + (i32.load + (i32.const 24) + ) + (i32.const 0) + ) + (br $topmost + (f64.const -3.4) + ) + ) + (if + (f64.gt + (f64.load + (i32.const 32) + ) + (f64.const 0) + ) + (br $topmost + (f64.const 5.6) + ) + ) + (f64.const 1.2) + ) + ) + ;; CHECK-TEXT: (func $doubleCompares (type $FUNCSIG$ddd) (param $x f64) (param $y f64) (result f64) + ;; CHECK-TEXT-NEXT: (local $t f64) + ;; CHECK-TEXT-NEXT: (local $Int f64) + ;; CHECK-TEXT-NEXT: (local $Double i32) + ;; CHECK-TEXT-NEXT: (block $topmost (result f64) + ;; CHECK-TEXT-NEXT: (if + ;; CHECK-TEXT-NEXT: (f64.gt + ;; CHECK-TEXT-NEXT: (local.get $x) + ;; CHECK-TEXT-NEXT: (f64.const 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (br $topmost + ;; CHECK-TEXT-NEXT: (f64.const 1.2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (if + ;; CHECK-TEXT-NEXT: (f64.gt + ;; CHECK-TEXT-NEXT: (local.get $Int) + ;; CHECK-TEXT-NEXT: (f64.const 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (br $topmost + ;; CHECK-TEXT-NEXT: (f64.const -3.4) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (if + ;; CHECK-TEXT-NEXT: (i32.gt_s + ;; CHECK-TEXT-NEXT: (local.get $Double) + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (br $topmost + ;; CHECK-TEXT-NEXT: (f64.const 5.6) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (if + ;; CHECK-TEXT-NEXT: (f64.lt + ;; CHECK-TEXT-NEXT: (local.get $x) + ;; CHECK-TEXT-NEXT: (local.get $y) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (br $topmost + ;; CHECK-TEXT-NEXT: (local.get $x) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (local.get $y) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $doubleCompares (type $FUNCSIG$ddd) (param $x f64) (param $y f64) (result f64) + ;; CHECK-BIN-NEXT: (local $t f64) + ;; CHECK-BIN-NEXT: (local $Int f64) + ;; CHECK-BIN-NEXT: (local $Double i32) + ;; CHECK-BIN-NEXT: (block $label$1 (result f64) + ;; CHECK-BIN-NEXT: (if + ;; CHECK-BIN-NEXT: (f64.gt + ;; CHECK-BIN-NEXT: (local.get $x) + ;; CHECK-BIN-NEXT: (f64.const 0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (br $label$1 + ;; CHECK-BIN-NEXT: (f64.const 1.2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (if + ;; CHECK-BIN-NEXT: (f64.gt + ;; CHECK-BIN-NEXT: (local.get $Int) + ;; CHECK-BIN-NEXT: (f64.const 0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (br $label$1 + ;; CHECK-BIN-NEXT: (f64.const -3.4) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (if + ;; CHECK-BIN-NEXT: (i32.gt_s + ;; CHECK-BIN-NEXT: (local.get $Double) + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (br $label$1 + ;; CHECK-BIN-NEXT: (f64.const 5.6) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (if + ;; CHECK-BIN-NEXT: (f64.lt + ;; CHECK-BIN-NEXT: (local.get $x) + ;; CHECK-BIN-NEXT: (local.get $y) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (br $label$1 + ;; CHECK-BIN-NEXT: (local.get $x) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (local.get $y) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $doubleCompares (type $FUNCSIG$ddd) (param $x f64) (param $y f64) (result f64) + (local $t f64) + (local $Int f64) + (local $Double i32) + (block $topmost (result f64) + (if + (f64.gt + (local.get $x) + (f64.const 0) + ) + (br $topmost + (f64.const 1.2) + ) + ) + (if + (f64.gt + (local.get $Int) + (f64.const 0) + ) + (br $topmost + (f64.const -3.4) + ) + ) + (if + (i32.gt_s + (local.get $Double) + (i32.const 0) + ) + (br $topmost + (f64.const 5.6) + ) + ) + (if + (f64.lt + (local.get $x) + (local.get $y) + ) + (br $topmost + (local.get $x) + ) + ) + (local.get $y) + ) + ) + ;; CHECK-TEXT: (func $intOps (type $5) (result i32) + ;; CHECK-TEXT-NEXT: (local $x i32) + ;; CHECK-TEXT-NEXT: (i32.eq + ;; CHECK-TEXT-NEXT: (local.get $x) + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $intOps (type $5) (result i32) + ;; CHECK-BIN-NEXT: (local $x i32) + ;; CHECK-BIN-NEXT: (i32.eq + ;; CHECK-BIN-NEXT: (local.get $x) + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $intOps (type $5) (result i32) + (local $x i32) + (i32.eq + (local.get $x) + (i32.const 0) + ) + ) + ;; CHECK-TEXT: (func $hexLiterals (type $FUNCSIG$v) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.add + ;; CHECK-TEXT-NEXT: (i32.add + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: (i32.const 313249263) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i32.const -19088752) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $hexLiterals (type $FUNCSIG$v) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.add + ;; CHECK-BIN-NEXT: (i32.add + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: (i32.const 313249263) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i32.const -19088752) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $hexLiterals (type $FUNCSIG$v) + (drop + (i32.add + (i32.add + (i32.const 0) + (i32.const 313249263) + ) + (i32.const -19088752) + ) + ) + ) + ;; CHECK-TEXT: (func $conversions (type $FUNCSIG$v) + ;; CHECK-TEXT-NEXT: (local $i i32) + ;; CHECK-TEXT-NEXT: (local $d f64) + ;; CHECK-TEXT-NEXT: (block $block0 + ;; CHECK-TEXT-NEXT: (local.set $i + ;; CHECK-TEXT-NEXT: (call $f64-to-int + ;; CHECK-TEXT-NEXT: (local.get $d) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (local.set $d + ;; CHECK-TEXT-NEXT: (f64.convert_i32_s + ;; CHECK-TEXT-NEXT: (local.get $i) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (local.set $d + ;; CHECK-TEXT-NEXT: (f64.convert_i32_u + ;; CHECK-TEXT-NEXT: (i32.shr_u + ;; CHECK-TEXT-NEXT: (local.get $i) + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $conversions (type $FUNCSIG$v) + ;; CHECK-BIN-NEXT: (local $i i32) + ;; CHECK-BIN-NEXT: (local $d f64) + ;; CHECK-BIN-NEXT: (local.set $i + ;; CHECK-BIN-NEXT: (call $f64-to-int + ;; CHECK-BIN-NEXT: (local.get $d) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (local.set $d + ;; CHECK-BIN-NEXT: (f64.convert_i32_s + ;; CHECK-BIN-NEXT: (local.get $i) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (local.set $d + ;; CHECK-BIN-NEXT: (f64.convert_i32_u + ;; CHECK-BIN-NEXT: (i32.shr_u + ;; CHECK-BIN-NEXT: (local.get $i) + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $conversions (type $FUNCSIG$v) + (local $i i32) + (local $d f64) + (block $block0 + (local.set $i + (call $f64-to-int + (local.get $d) + ) + ) + (local.set $d + (f64.convert_i32_s + (local.get $i) + ) + ) + (local.set $d + (f64.convert_i32_u + (i32.shr_u + (local.get $i) + (i32.const 0) + ) + ) + ) + ) + ) + ;; CHECK-TEXT: (func $seq (type $FUNCSIG$v) + ;; CHECK-TEXT-NEXT: (local $J f64) + ;; CHECK-TEXT-NEXT: (local.set $J + ;; CHECK-TEXT-NEXT: (f64.sub + ;; CHECK-TEXT-NEXT: (block $block0 (result f64) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f64.const 0.1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (f64.const 5.1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (block $block1 (result f64) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f64.const 3.2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (f64.const 4.2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $seq (type $FUNCSIG$v) + ;; CHECK-BIN-NEXT: (local $J f64) + ;; CHECK-BIN-NEXT: (local.set $J + ;; CHECK-BIN-NEXT: (f64.sub + ;; CHECK-BIN-NEXT: (block $label$1 (result f64) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f64.const 0.1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (f64.const 5.1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (block $label$2 (result f64) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f64.const 3.2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (f64.const 4.2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $seq (type $FUNCSIG$v) + (local $J f64) + (local.set $J + (f64.sub + (block $block0 (result f64) + (drop + (f64.const 0.1) + ) + (f64.const 5.1) + ) + (block $block1 (result f64) + (drop + (f64.const 3.2) + ) + (f64.const 4.2) + ) + ) + ) + ) + ;; CHECK-TEXT: (func $switcher (type $6) (param $x i32) (result i32) + ;; CHECK-TEXT-NEXT: (block $topmost (result i32) + ;; CHECK-TEXT-NEXT: (block $switch$0 + ;; CHECK-TEXT-NEXT: (block $switch-default$3 + ;; CHECK-TEXT-NEXT: (block $switch-case$2 + ;; CHECK-TEXT-NEXT: (block $switch-case$1 + ;; CHECK-TEXT-NEXT: (br_table $switch-case$1 $switch-case$2 $switch-default$3 + ;; CHECK-TEXT-NEXT: (i32.sub + ;; CHECK-TEXT-NEXT: (local.get $x) + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (br $topmost + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (br $topmost + ;; CHECK-TEXT-NEXT: (i32.const 2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (block $switch$4 + ;; CHECK-TEXT-NEXT: (block $switch-default$7 + ;; CHECK-TEXT-NEXT: (block $switch-case$6 + ;; CHECK-TEXT-NEXT: (block $switch-case$5 + ;; CHECK-TEXT-NEXT: (br_table $switch-case$6 $switch-default$7 $switch-default$7 $switch-default$7 $switch-default$7 $switch-default$7 $switch-default$7 $switch-case$5 $switch-default$7 + ;; CHECK-TEXT-NEXT: (i32.sub + ;; CHECK-TEXT-NEXT: (local.get $x) + ;; CHECK-TEXT-NEXT: (i32.const 5) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (br $topmost + ;; CHECK-TEXT-NEXT: (i32.const 121) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (br $topmost + ;; CHECK-TEXT-NEXT: (i32.const 51) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (block $label$break$Lout + ;; CHECK-TEXT-NEXT: (block $switch-default$16 + ;; CHECK-TEXT-NEXT: (block $switch-case$15 + ;; CHECK-TEXT-NEXT: (block $switch-case$12 + ;; CHECK-TEXT-NEXT: (block $switch-case$9 + ;; CHECK-TEXT-NEXT: (block $switch-case$8 + ;; CHECK-TEXT-NEXT: (br_table $switch-case$15 $switch-default$16 $switch-default$16 $switch-case$12 $switch-default$16 $switch-default$16 $switch-default$16 $switch-default$16 $switch-case$9 $switch-default$16 $switch-case$8 $switch-default$16 + ;; CHECK-TEXT-NEXT: (i32.sub + ;; CHECK-TEXT-NEXT: (local.get $x) + ;; CHECK-TEXT-NEXT: (i32.const 2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (br $label$break$Lout) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (br $label$break$Lout) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (block $while-out$10 + ;; CHECK-TEXT-NEXT: (loop $while-in$11 + ;; CHECK-TEXT-NEXT: (block $block1 + ;; CHECK-TEXT-NEXT: (br $while-out$10) + ;; CHECK-TEXT-NEXT: (br $while-in$11) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (br $label$break$Lout) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (block $while-out$13 + ;; CHECK-TEXT-NEXT: (loop $while-in$14 + ;; CHECK-TEXT-NEXT: (block $block3 + ;; CHECK-TEXT-NEXT: (br $label$break$Lout) + ;; CHECK-TEXT-NEXT: (br $while-in$14) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (br $label$break$Lout) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $switcher (type $6) (param $x i32) (result i32) + ;; CHECK-BIN-NEXT: (block $label$1 (result i32) + ;; CHECK-BIN-NEXT: (block $label$2 + ;; CHECK-BIN-NEXT: (block $label$3 + ;; CHECK-BIN-NEXT: (block $label$4 + ;; CHECK-BIN-NEXT: (block $label$5 + ;; CHECK-BIN-NEXT: (br_table $label$5 $label$4 $label$3 + ;; CHECK-BIN-NEXT: (i32.sub + ;; CHECK-BIN-NEXT: (local.get $x) + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (br $label$1 + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (br $label$1 + ;; CHECK-BIN-NEXT: (i32.const 2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (block $label$6 + ;; CHECK-BIN-NEXT: (block $label$7 + ;; CHECK-BIN-NEXT: (block $label$8 + ;; CHECK-BIN-NEXT: (block $label$9 + ;; CHECK-BIN-NEXT: (br_table $label$8 $label$7 $label$7 $label$7 $label$7 $label$7 $label$7 $label$9 $label$7 + ;; CHECK-BIN-NEXT: (i32.sub + ;; CHECK-BIN-NEXT: (local.get $x) + ;; CHECK-BIN-NEXT: (i32.const 5) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (br $label$1 + ;; CHECK-BIN-NEXT: (i32.const 121) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (br $label$1 + ;; CHECK-BIN-NEXT: (i32.const 51) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (block $label$10 + ;; CHECK-BIN-NEXT: (block $label$11 + ;; CHECK-BIN-NEXT: (block $label$12 + ;; CHECK-BIN-NEXT: (block $label$13 + ;; CHECK-BIN-NEXT: (block $label$14 + ;; CHECK-BIN-NEXT: (block $label$15 + ;; CHECK-BIN-NEXT: (br_table $label$12 $label$11 $label$11 $label$13 $label$11 $label$11 $label$11 $label$11 $label$14 $label$11 $label$15 $label$11 + ;; CHECK-BIN-NEXT: (i32.sub + ;; CHECK-BIN-NEXT: (local.get $x) + ;; CHECK-BIN-NEXT: (i32.const 2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (br $label$10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (br $label$10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (block $label$16 + ;; CHECK-BIN-NEXT: (loop $label$17 + ;; CHECK-BIN-NEXT: (br $label$16) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (block $label$18 + ;; CHECK-BIN-NEXT: (loop $label$19 + ;; CHECK-BIN-NEXT: (br $label$10) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $switcher (type $6) (param $x i32) (result i32) + (block $topmost (result i32) + (block $switch$0 + (block $switch-default$3 + (block $switch-case$2 + (block $switch-case$1 + (br_table $switch-case$1 $switch-case$2 $switch-default$3 + (i32.sub + (local.get $x) + (i32.const 1) + ) + ) + ) + (br $topmost + (i32.const 1) + ) + ) + (br $topmost + (i32.const 2) + ) + ) + (nop) + ) + (block $switch$4 + (block $switch-default$7 + (block $switch-case$6 + (block $switch-case$5 + (br_table $switch-case$6 $switch-default$7 $switch-default$7 $switch-default$7 $switch-default$7 $switch-default$7 $switch-default$7 $switch-case$5 $switch-default$7 + (i32.sub + (local.get $x) + (i32.const 5) + ) + ) + ) + (br $topmost + (i32.const 121) + ) + ) + (br $topmost + (i32.const 51) + ) + ) + (nop) + ) + (block $label$break$Lout + (block $switch-default$16 + (block $switch-case$15 + (block $switch-case$12 + (block $switch-case$9 + (block $switch-case$8 + (br_table $switch-case$15 $switch-default$16 $switch-default$16 $switch-case$12 $switch-default$16 $switch-default$16 $switch-default$16 $switch-default$16 $switch-case$9 $switch-default$16 $switch-case$8 $switch-default$16 + (i32.sub + (local.get $x) + (i32.const 2) + ) + ) + ) + (br $label$break$Lout) + ) + (br $label$break$Lout) + ) + (block $while-out$10 + (loop $while-in$11 + (block $block1 + (br $while-out$10) + (br $while-in$11) + ) + ) + (br $label$break$Lout) + ) + ) + (block $while-out$13 + (loop $while-in$14 + (block $block3 + (br $label$break$Lout) + (br $while-in$14) + ) + ) + (br $label$break$Lout) + ) + ) + (nop) + ) + (i32.const 0) + ) + ) + ;; CHECK-TEXT: (func $blocker (type $FUNCSIG$v) + ;; CHECK-TEXT-NEXT: (block $label$break$L + ;; CHECK-TEXT-NEXT: (br $label$break$L) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $blocker (type $FUNCSIG$v) + ;; CHECK-BIN-NEXT: (block $label$1 + ;; CHECK-BIN-NEXT: (br $label$1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $blocker (type $FUNCSIG$v) + (block $label$break$L + (br $label$break$L) + ) + ) + ;; CHECK-TEXT: (func $frem (type $4) (result f64) + ;; CHECK-TEXT-NEXT: (call $f64-rem + ;; CHECK-TEXT-NEXT: (f64.const 5.5) + ;; CHECK-TEXT-NEXT: (f64.const 1.2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $frem (type $4) (result f64) + ;; CHECK-BIN-NEXT: (call $f64-rem + ;; CHECK-BIN-NEXT: (f64.const 5.5) + ;; CHECK-BIN-NEXT: (f64.const 1.2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $frem (type $4) (result f64) + (call $f64-rem + (f64.const 5.5) + (f64.const 1.2) + ) + ) + ;; CHECK-TEXT: (func $big_uint_div_u (type $5) (result i32) + ;; CHECK-TEXT-NEXT: (local $x i32) + ;; CHECK-TEXT-NEXT: (block $topmost (result i32) + ;; CHECK-TEXT-NEXT: (local.set $x + ;; CHECK-TEXT-NEXT: (i32.and + ;; CHECK-TEXT-NEXT: (i32.div_u + ;; CHECK-TEXT-NEXT: (i32.const -1) + ;; CHECK-TEXT-NEXT: (i32.const 2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i32.const -1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (local.get $x) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $big_uint_div_u (type $5) (result i32) + ;; CHECK-BIN-NEXT: (local $x i32) + ;; CHECK-BIN-NEXT: (local.set $x + ;; CHECK-BIN-NEXT: (i32.and + ;; CHECK-BIN-NEXT: (i32.div_u + ;; CHECK-BIN-NEXT: (i32.const -1) + ;; CHECK-BIN-NEXT: (i32.const 2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i32.const -1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (local.get $x) + ;; CHECK-BIN-NEXT: ) + (func $big_uint_div_u (type $5) (result i32) + (local $x i32) + (block $topmost (result i32) + (local.set $x + (i32.and + (i32.div_u + (i32.const -1) + (i32.const 2) + ) + (i32.const -1) + ) + ) + (local.get $x) + ) + ) + ;; CHECK-TEXT: (func $fr (type $FUNCSIG$vf) (param $x f32) + ;; CHECK-TEXT-NEXT: (local $y f32) + ;; CHECK-TEXT-NEXT: (local $z f64) + ;; CHECK-TEXT-NEXT: (block $block0 + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f32.demote_f64 + ;; CHECK-TEXT-NEXT: (local.get $z) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (local.get $y) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f32.const 5) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f32.const 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f32.const 5) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (f32.const 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $fr (type $FUNCSIG$vf) (param $x f32) + ;; CHECK-BIN-NEXT: (local $y f32) + ;; CHECK-BIN-NEXT: (local $z f64) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f32.demote_f64 + ;; CHECK-BIN-NEXT: (local.get $z) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (local.get $y) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f32.const 5) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f32.const 0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f32.const 5) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f32.const 0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $fr (type $FUNCSIG$vf) (param $x f32) + (local $y f32) + (local $z f64) + (block $block0 + (drop + (f32.demote_f64 + (local.get $z) + ) + ) + (drop + (local.get $y) + ) + (drop + (f32.const 5) + ) + (drop + (f32.const 0) + ) + (drop + (f32.const 5) + ) + (drop + (f32.const 0) + ) + ) + ) + ;; CHECK-TEXT: (func $negZero (type $4) (result f64) + ;; CHECK-TEXT-NEXT: (f64.const -0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $negZero (type $4) (result f64) + ;; CHECK-BIN-NEXT: (f64.const -0) + ;; CHECK-BIN-NEXT: ) + (func $negZero (type $4) (result f64) + (f64.const -0) + ) + ;; CHECK-TEXT: (func $abs (type $FUNCSIG$v) + ;; CHECK-TEXT-NEXT: (local $x i32) + ;; CHECK-TEXT-NEXT: (local $y f64) + ;; CHECK-TEXT-NEXT: (local $z f32) + ;; CHECK-TEXT-NEXT: (local $asm2wasm_i32_temp i32) + ;; CHECK-TEXT-NEXT: (block $block0 + ;; CHECK-TEXT-NEXT: (local.set $x + ;; CHECK-TEXT-NEXT: (block $block1 (result i32) + ;; CHECK-TEXT-NEXT: (local.set $asm2wasm_i32_temp + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (select + ;; CHECK-TEXT-NEXT: (i32.sub + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: (local.get $asm2wasm_i32_temp) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (local.get $asm2wasm_i32_temp) + ;; CHECK-TEXT-NEXT: (i32.lt_s + ;; CHECK-TEXT-NEXT: (local.get $asm2wasm_i32_temp) + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (local.set $y + ;; CHECK-TEXT-NEXT: (f64.abs + ;; CHECK-TEXT-NEXT: (f64.const 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (local.set $z + ;; CHECK-TEXT-NEXT: (f32.abs + ;; CHECK-TEXT-NEXT: (f32.const 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $abs (type $FUNCSIG$v) + ;; CHECK-BIN-NEXT: (local $x i32) + ;; CHECK-BIN-NEXT: (local $asm2wasm_i32_temp i32) + ;; CHECK-BIN-NEXT: (local $y f64) + ;; CHECK-BIN-NEXT: (local $z f32) + ;; CHECK-BIN-NEXT: (local.set $x + ;; CHECK-BIN-NEXT: (block $label$1 (result i32) + ;; CHECK-BIN-NEXT: (local.set $asm2wasm_i32_temp + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (select + ;; CHECK-BIN-NEXT: (i32.sub + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: (local.get $asm2wasm_i32_temp) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (local.get $asm2wasm_i32_temp) + ;; CHECK-BIN-NEXT: (i32.lt_s + ;; CHECK-BIN-NEXT: (local.get $asm2wasm_i32_temp) + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (local.set $y + ;; CHECK-BIN-NEXT: (f64.abs + ;; CHECK-BIN-NEXT: (f64.const 0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (local.set $z + ;; CHECK-BIN-NEXT: (f32.abs + ;; CHECK-BIN-NEXT: (f32.const 0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $abs (type $FUNCSIG$v) + (local $x i32) + (local $y f64) + (local $z f32) + (local $asm2wasm_i32_temp i32) + (block $block0 + (local.set $x + (block $block1 (result i32) + (local.set $asm2wasm_i32_temp + (i32.const 0) + ) + (select + (i32.sub + (i32.const 0) + (local.get $asm2wasm_i32_temp) + ) + (local.get $asm2wasm_i32_temp) + (i32.lt_s + (local.get $asm2wasm_i32_temp) + (i32.const 0) + ) + ) + ) + ) + (local.set $y + (f64.abs + (f64.const 0) + ) + ) + (local.set $z + (f32.abs + (f32.const 0) + ) + ) + ) + ) + ;; CHECK-TEXT: (func $neg (type $FUNCSIG$v) + ;; CHECK-TEXT-NEXT: (local $x f32) + ;; CHECK-TEXT-NEXT: (block $block0 + ;; CHECK-TEXT-NEXT: (local.set $x + ;; CHECK-TEXT-NEXT: (f32.neg + ;; CHECK-TEXT-NEXT: (local.get $x) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (call_indirect $0 (type $FUNCSIG$vf) + ;; CHECK-TEXT-NEXT: (local.get $x) + ;; CHECK-TEXT-NEXT: (i32.add + ;; CHECK-TEXT-NEXT: (i32.and + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: (i32.const 7) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i32.const 8) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $neg (type $FUNCSIG$v) + ;; CHECK-BIN-NEXT: (local $x f32) + ;; CHECK-BIN-NEXT: (local.set $x + ;; CHECK-BIN-NEXT: (f32.neg + ;; CHECK-BIN-NEXT: (local.get $x) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (call_indirect $0 (type $FUNCSIG$vf) + ;; CHECK-BIN-NEXT: (local.get $x) + ;; CHECK-BIN-NEXT: (i32.add + ;; CHECK-BIN-NEXT: (i32.and + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: (i32.const 7) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i32.const 8) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $neg (type $FUNCSIG$v) + (local $x f32) + (block $block0 + (local.set $x + (f32.neg + (local.get $x) + ) + ) + (call_indirect (type $FUNCSIG$vf) + (local.get $x) + (i32.add + (i32.and + (i32.const 1) + (i32.const 7) + ) + (i32.const 8) + ) + ) + ) + ) + ;; CHECK-TEXT: (func $cneg (type $FUNCSIG$vf) (param $x f32) + ;; CHECK-TEXT-NEXT: (call_indirect $0 (type $FUNCSIG$vf) + ;; CHECK-TEXT-NEXT: (local.get $x) + ;; CHECK-TEXT-NEXT: (i32.add + ;; CHECK-TEXT-NEXT: (i32.and + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: (i32.const 7) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i32.const 8) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $cneg (type $FUNCSIG$vf) (param $x f32) + ;; CHECK-BIN-NEXT: (call_indirect $0 (type $FUNCSIG$vf) + ;; CHECK-BIN-NEXT: (local.get $x) + ;; CHECK-BIN-NEXT: (i32.add + ;; CHECK-BIN-NEXT: (i32.and + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: (i32.const 7) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i32.const 8) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $cneg (type $FUNCSIG$vf) (param $x f32) + (call_indirect (type $FUNCSIG$vf) + (local.get $x) + (i32.add + (i32.and + (i32.const 1) + (i32.const 7) + ) + (i32.const 8) + ) + ) + ) + ;; CHECK-TEXT: (func $___syscall_ret (type $FUNCSIG$v) + ;; CHECK-TEXT-NEXT: (local $$0 i32) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.gt_u + ;; CHECK-TEXT-NEXT: (i32.shr_u + ;; CHECK-TEXT-NEXT: (local.get $$0) + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i32.const -4096) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $___syscall_ret (type $FUNCSIG$v) + ;; CHECK-BIN-NEXT: (local $$0 i32) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.gt_u + ;; CHECK-BIN-NEXT: (i32.shr_u + ;; CHECK-BIN-NEXT: (local.get $$0) + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i32.const -4096) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $___syscall_ret (type $FUNCSIG$v) + (local $$0 i32) + (drop + (i32.gt_u + (i32.shr_u + (local.get $$0) + (i32.const 0) + ) + (i32.const -4096) + ) + ) + ) + ;; CHECK-TEXT: (func $z (type $FUNCSIG$v) + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $z (type $FUNCSIG$v) + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: ) + (func $z (type $FUNCSIG$v) + (nop) + ) + ;; CHECK-TEXT: (func $w (type $FUNCSIG$v) + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $w (type $FUNCSIG$v) + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: ) + (func $w (type $FUNCSIG$v) + (nop) + ) + ;; CHECK-TEXT: (func $block_and_after (type $5) (result i32) + ;; CHECK-TEXT-NEXT: (block $waka + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (br $waka) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i32.const 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $block_and_after (type $5) (result i32) + ;; CHECK-BIN-NEXT: (block $label$1 + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (br $label$1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i32.const 0) + ;; CHECK-BIN-NEXT: ) + (func $block_and_after (type $5) (result i32) + (block $waka + (drop + (i32.const 1) + ) + (br $waka) + ) + (i32.const 0) + ) + ;; CHECK-TEXT: (func $loop-roundtrip (type $7) (param $0 f64) (result f64) + ;; CHECK-TEXT-NEXT: (loop $loop-in1 (result f64) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $loop-roundtrip (type $7) (param $0 f64) (result f64) + ;; CHECK-BIN-NEXT: (loop $label$1 (result f64) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $loop-roundtrip (type $7) (param $0 f64) (result f64) + (loop $loop-in1 (result f64) + (drop + (local.get $0) + ) + (local.get $0) + ) + ) + ;; CHECK-TEXT: (func $big-i64 (type $8) (result i64) + ;; CHECK-TEXT-NEXT: (i64.const -9218868437227405313) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $big-i64 (type $8) (result i64) + ;; CHECK-BIN-NEXT: (i64.const -9218868437227405313) + ;; CHECK-BIN-NEXT: ) + (func $big-i64 (type $8) (result i64) + (i64.const -9218868437227405313) + ) + ;; CHECK-TEXT: (func $i64-store32 (type $9) (param $0 i32) (param $1 i64) + ;; CHECK-TEXT-NEXT: (i64.store32 + ;; CHECK-TEXT-NEXT: (local.get $0) + ;; CHECK-TEXT-NEXT: (local.get $1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $i64-store32 (type $9) (param $0 i32) (param $1 i64) + ;; CHECK-BIN-NEXT: (i64.store32 + ;; CHECK-BIN-NEXT: (local.get $0) + ;; CHECK-BIN-NEXT: (local.get $1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $i64-store32 (type $9) (param $0 i32) (param $1 i64) + (i64.store32 + (local.get $0) + (local.get $1) + ) + ) + ;; CHECK-TEXT: (func $return-unreachable (type $5) (result i32) + ;; CHECK-TEXT-NEXT: (return + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $return-unreachable (type $5) (result i32) + ;; CHECK-BIN-NEXT: (return + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $return-unreachable (result i32) + (return (i32.const 1)) + ) + ;; CHECK-TEXT: (func $unreachable-block (type $5) (result i32) + ;; CHECK-TEXT-NEXT: (f64.abs + ;; CHECK-TEXT-NEXT: (block + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (return + ;; CHECK-TEXT-NEXT: (i32.const 2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $unreachable-block (type $5) (result i32) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (return + ;; CHECK-BIN-NEXT: (i32.const 2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $unreachable-block (result i32) + (f64.abs + (block ;; note no type - valid in binaryen IR, in wasm must be i32 + (drop (i32.const 1)) + (return (i32.const 2)) + ) + ) + ) + ;; CHECK-TEXT: (func $unreachable-block-toplevel (type $5) (result i32) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (return + ;; CHECK-TEXT-NEXT: (i32.const 2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $unreachable-block-toplevel (type $5) (result i32) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (return + ;; CHECK-BIN-NEXT: (i32.const 2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $unreachable-block-toplevel (result i32) + (block ;; note no type - valid in binaryen IR, in wasm must be i32 + (drop (i32.const 1)) + (return (i32.const 2)) + ) + ) + ;; CHECK-TEXT: (func $unreachable-block0 (type $5) (result i32) + ;; CHECK-TEXT-NEXT: (f64.abs + ;; CHECK-TEXT-NEXT: (block + ;; CHECK-TEXT-NEXT: (return + ;; CHECK-TEXT-NEXT: (i32.const 2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $unreachable-block0 (type $5) (result i32) + ;; CHECK-BIN-NEXT: (return + ;; CHECK-BIN-NEXT: (i32.const 2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $unreachable-block0 (result i32) + (f64.abs + (block ;; note no type - valid in binaryen IR, in wasm must be i32 + (return (i32.const 2)) + ) + ) + ) + ;; CHECK-TEXT: (func $unreachable-block0-toplevel (type $5) (result i32) + ;; CHECK-TEXT-NEXT: (return + ;; CHECK-TEXT-NEXT: (i32.const 2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $unreachable-block0-toplevel (type $5) (result i32) + ;; CHECK-BIN-NEXT: (return + ;; CHECK-BIN-NEXT: (i32.const 2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $unreachable-block0-toplevel (result i32) + (block ;; note no type - valid in binaryen IR, in wasm must be i32 + (return (i32.const 2)) + ) + ) + ;; CHECK-TEXT: (func $unreachable-block-with-br (type $5) (result i32) + ;; CHECK-TEXT-NEXT: (block $block + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (br $block) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $unreachable-block-with-br (type $5) (result i32) + ;; CHECK-BIN-NEXT: (block $label$1 + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (br $label$1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: ) + (func $unreachable-block-with-br (result i32) + (block $block ;; unreachable type due to last element having that type, but the block is exitable + (drop (i32.const 1)) + (br $block) + ) + (i32.const 1) + ) + ;; CHECK-TEXT: (func $unreachable-if (type $5) (result i32) + ;; CHECK-TEXT-NEXT: (f64.abs + ;; CHECK-TEXT-NEXT: (if + ;; CHECK-TEXT-NEXT: (i32.const 3) + ;; CHECK-TEXT-NEXT: (return + ;; CHECK-TEXT-NEXT: (i32.const 2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (return + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $unreachable-if (type $5) (result i32) + ;; CHECK-BIN-NEXT: (if + ;; CHECK-BIN-NEXT: (i32.const 3) + ;; CHECK-BIN-NEXT: (return + ;; CHECK-BIN-NEXT: (i32.const 2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (return + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $unreachable-if (result i32) + (f64.abs + (if ;; note no type - valid in binaryen IR, in wasm must be i32 + (i32.const 3) + (return (i32.const 2)) + (return (i32.const 1)) + ) + ) + ) + ;; CHECK-TEXT: (func $unreachable-if-toplevel (type $5) (result i32) + ;; CHECK-TEXT-NEXT: (if + ;; CHECK-TEXT-NEXT: (i32.const 3) + ;; CHECK-TEXT-NEXT: (return + ;; CHECK-TEXT-NEXT: (i32.const 2) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (return + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $unreachable-if-toplevel (type $5) (result i32) + ;; CHECK-BIN-NEXT: (if + ;; CHECK-BIN-NEXT: (i32.const 3) + ;; CHECK-BIN-NEXT: (return + ;; CHECK-BIN-NEXT: (i32.const 2) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (return + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $unreachable-if-toplevel (result i32) + (if ;; note no type - valid in binaryen IR, in wasm must be i32 + (i32.const 3) + (return (i32.const 2)) + (return (i32.const 1)) + ) + ) + ;; CHECK-TEXT: (func $unreachable-loop (type $5) (result i32) + ;; CHECK-TEXT-NEXT: (f64.abs + ;; CHECK-TEXT-NEXT: (loop $loop-in + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: (return + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $unreachable-loop (type $5) (result i32) + ;; CHECK-BIN-NEXT: (loop $label$1 + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: (return + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $unreachable-loop (result i32) + (f64.abs + (loop ;; note no type - valid in binaryen IR, in wasm must be i32 + (nop) + (return (i32.const 1)) + ) + ) + ) + ;; CHECK-TEXT: (func $unreachable-loop0 (type $5) (result i32) + ;; CHECK-TEXT-NEXT: (f64.abs + ;; CHECK-TEXT-NEXT: (loop $loop-in + ;; CHECK-TEXT-NEXT: (return + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $unreachable-loop0 (type $5) (result i32) + ;; CHECK-BIN-NEXT: (loop $label$1 + ;; CHECK-BIN-NEXT: (return + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $unreachable-loop0 (result i32) + (f64.abs + (loop ;; note no type - valid in binaryen IR, in wasm must be i32 + (return (i32.const 1)) + ) + ) + ) + ;; CHECK-TEXT: (func $unreachable-loop-toplevel (type $5) (result i32) + ;; CHECK-TEXT-NEXT: (loop $loop-in + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: (return + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $unreachable-loop-toplevel (type $5) (result i32) + ;; CHECK-BIN-NEXT: (loop $label$1 + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: (return + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $unreachable-loop-toplevel (result i32) + (loop ;; note no type - valid in binaryen IR, in wasm must be i32 + (nop) + (return (i32.const 1)) + ) + ) + ;; CHECK-TEXT: (func $unreachable-loop0-toplevel (type $5) (result i32) + ;; CHECK-TEXT-NEXT: (loop $loop-in + ;; CHECK-TEXT-NEXT: (return + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $unreachable-loop0-toplevel (type $5) (result i32) + ;; CHECK-BIN-NEXT: (loop $label$1 + ;; CHECK-BIN-NEXT: (return + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $unreachable-loop0-toplevel (result i32) + (loop ;; note no type - valid in binaryen IR, in wasm must be i32 + (return (i32.const 1)) + ) + ) + ;; CHECK-TEXT: (func $unreachable-ifs (type $FUNCSIG$v) + ;; CHECK-TEXT-NEXT: (if + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (if + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (if + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (if + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (if + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (if + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (if + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (if + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (if + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $unreachable-ifs (type $FUNCSIG$v) + ;; CHECK-BIN-NEXT: (unreachable) + ;; CHECK-BIN-NEXT: ) + (func $unreachable-ifs + (if (unreachable) (nop)) + (if (unreachable) (unreachable)) + (if (unreachable) (nop) (nop)) + (if (unreachable) (unreachable) (nop)) + (if (unreachable) (nop) (unreachable)) + (if (unreachable) (unreachable) (unreachable)) + ;; + (if (i32.const 1) (unreachable) (nop)) + (if (i32.const 1) (nop) (unreachable)) + (if (i32.const 1) (unreachable) (unreachable)) + ) + ;; CHECK-TEXT: (func $unreachable-if-arm (type $FUNCSIG$v) + ;; CHECK-TEXT-NEXT: (if + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: (block + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: (drop + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $unreachable-if-arm (type $FUNCSIG$v) + ;; CHECK-BIN-NEXT: (if + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: (unreachable) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $unreachable-if-arm + (if + (i32.const 1) + (block + (nop) + ) + (block + (unreachable) + (drop + (i32.const 1) + ) + ) + ) + ) +) +;; CHECK-BIN-NODEBUG: (func $0 (type $1) +;; CHECK-BIN-NODEBUG-NEXT: (local $0 f64) +;; CHECK-BIN-NODEBUG-NEXT: (local.set $0 +;; CHECK-BIN-NODEBUG-NEXT: (f64.const -2147483648) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (local.set $0 +;; CHECK-BIN-NODEBUG-NEXT: (f64.const -2147483648) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (local.set $0 +;; CHECK-BIN-NODEBUG-NEXT: (f64.const -21474836480) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (local.set $0 +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 0.039625) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (local.set $0 +;; CHECK-BIN-NODEBUG-NEXT: (f64.const -0.039625) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $1 (type $3) (result f64) +;; CHECK-BIN-NODEBUG-NEXT: (local $0 f64) +;; CHECK-BIN-NODEBUG-NEXT: (block $label$1 (result f64) +;; CHECK-BIN-NODEBUG-NEXT: (local.set $0 +;; CHECK-BIN-NODEBUG-NEXT: (f64.add +;; CHECK-BIN-NODEBUG-NEXT: (f64.add +;; CHECK-BIN-NODEBUG-NEXT: (f64.add +;; CHECK-BIN-NODEBUG-NEXT: (f64.load +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 8) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (f64.load +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 16) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (f64.neg +;; CHECK-BIN-NODEBUG-NEXT: (f64.load +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 16) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (f64.neg +;; CHECK-BIN-NODEBUG-NEXT: (f64.load +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 8) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (if +;; CHECK-BIN-NODEBUG-NEXT: (i32.gt_s +;; CHECK-BIN-NODEBUG-NEXT: (i32.load +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 24) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (br $label$1 +;; CHECK-BIN-NODEBUG-NEXT: (f64.const -3.4) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (if +;; CHECK-BIN-NODEBUG-NEXT: (f64.gt +;; CHECK-BIN-NODEBUG-NEXT: (f64.load +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 32) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (br $label$1 +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 5.6) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 1.2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $2 (type $4) (param $0 f64) (param $1 f64) (result f64) +;; CHECK-BIN-NODEBUG-NEXT: (local $2 f64) +;; CHECK-BIN-NODEBUG-NEXT: (local $3 f64) +;; CHECK-BIN-NODEBUG-NEXT: (local $4 i32) +;; CHECK-BIN-NODEBUG-NEXT: (block $label$1 (result f64) +;; CHECK-BIN-NODEBUG-NEXT: (if +;; CHECK-BIN-NODEBUG-NEXT: (f64.gt +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (br $label$1 +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 1.2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (if +;; CHECK-BIN-NODEBUG-NEXT: (f64.gt +;; CHECK-BIN-NODEBUG-NEXT: (local.get $3) +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (br $label$1 +;; CHECK-BIN-NODEBUG-NEXT: (f64.const -3.4) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (if +;; CHECK-BIN-NODEBUG-NEXT: (i32.gt_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $4) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (br $label$1 +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 5.6) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (if +;; CHECK-BIN-NODEBUG-NEXT: (f64.lt +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (br $label$1 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $3 (type $0) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (local $0 i32) +;; CHECK-BIN-NODEBUG-NEXT: (i32.eq +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $4 (type $1) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.add +;; CHECK-BIN-NODEBUG-NEXT: (i32.add +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 313249263) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const -19088752) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $5 (type $1) +;; CHECK-BIN-NODEBUG-NEXT: (local $0 i32) +;; CHECK-BIN-NODEBUG-NEXT: (local $1 f64) +;; CHECK-BIN-NODEBUG-NEXT: (local.set $0 +;; CHECK-BIN-NODEBUG-NEXT: (call $fimport$1 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (local.set $1 +;; CHECK-BIN-NODEBUG-NEXT: (f64.convert_i32_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (local.set $1 +;; CHECK-BIN-NODEBUG-NEXT: (f64.convert_i32_u +;; CHECK-BIN-NODEBUG-NEXT: (i32.shr_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $6 (type $1) +;; CHECK-BIN-NODEBUG-NEXT: (local $0 f64) +;; CHECK-BIN-NODEBUG-NEXT: (local.set $0 +;; CHECK-BIN-NODEBUG-NEXT: (f64.sub +;; CHECK-BIN-NODEBUG-NEXT: (block $label$1 (result f64) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 0.1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 5.1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (block $label$2 (result f64) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 3.2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 4.2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $7 (type $6) (param $0 i32) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (block $label$1 (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (block $label$2 +;; CHECK-BIN-NODEBUG-NEXT: (block $label$3 +;; CHECK-BIN-NODEBUG-NEXT: (block $label$4 +;; CHECK-BIN-NODEBUG-NEXT: (block $label$5 +;; CHECK-BIN-NODEBUG-NEXT: (br_table $label$5 $label$4 $label$3 +;; CHECK-BIN-NODEBUG-NEXT: (i32.sub +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (br $label$1 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (br $label$1 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (block $label$6 +;; CHECK-BIN-NODEBUG-NEXT: (block $label$7 +;; CHECK-BIN-NODEBUG-NEXT: (block $label$8 +;; CHECK-BIN-NODEBUG-NEXT: (block $label$9 +;; CHECK-BIN-NODEBUG-NEXT: (br_table $label$8 $label$7 $label$7 $label$7 $label$7 $label$7 $label$7 $label$9 $label$7 +;; CHECK-BIN-NODEBUG-NEXT: (i32.sub +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 5) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (br $label$1 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 121) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (br $label$1 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 51) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (block $label$10 +;; CHECK-BIN-NODEBUG-NEXT: (block $label$11 +;; CHECK-BIN-NODEBUG-NEXT: (block $label$12 +;; CHECK-BIN-NODEBUG-NEXT: (block $label$13 +;; CHECK-BIN-NODEBUG-NEXT: (block $label$14 +;; CHECK-BIN-NODEBUG-NEXT: (block $label$15 +;; CHECK-BIN-NODEBUG-NEXT: (br_table $label$12 $label$11 $label$11 $label$13 $label$11 $label$11 $label$11 $label$11 $label$14 $label$11 $label$15 $label$11 +;; CHECK-BIN-NODEBUG-NEXT: (i32.sub +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (br $label$10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (br $label$10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (block $label$16 +;; CHECK-BIN-NODEBUG-NEXT: (loop $label$17 +;; CHECK-BIN-NODEBUG-NEXT: (br $label$16) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (block $label$18 +;; CHECK-BIN-NODEBUG-NEXT: (loop $label$19 +;; CHECK-BIN-NODEBUG-NEXT: (br $label$10) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $8 (type $1) +;; CHECK-BIN-NODEBUG-NEXT: (block $label$1 +;; CHECK-BIN-NODEBUG-NEXT: (br $label$1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $9 (type $3) (result f64) +;; CHECK-BIN-NODEBUG-NEXT: (call $fimport$2 +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 5.5) +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 1.2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $10 (type $0) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (local $0 i32) +;; CHECK-BIN-NODEBUG-NEXT: (local.set $0 +;; CHECK-BIN-NODEBUG-NEXT: (i32.and +;; CHECK-BIN-NODEBUG-NEXT: (i32.div_u +;; CHECK-BIN-NODEBUG-NEXT: (i32.const -1) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const -1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $11 (type $2) (param $0 f32) +;; CHECK-BIN-NODEBUG-NEXT: (local $1 f32) +;; CHECK-BIN-NODEBUG-NEXT: (local $2 f64) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f32.demote_f64 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 5) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 5) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $12 (type $3) (result f64) +;; CHECK-BIN-NODEBUG-NEXT: (f64.const -0) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $13 (type $1) +;; CHECK-BIN-NODEBUG-NEXT: (local $0 i32) +;; CHECK-BIN-NODEBUG-NEXT: (local $1 i32) +;; CHECK-BIN-NODEBUG-NEXT: (local $2 f64) +;; CHECK-BIN-NODEBUG-NEXT: (local $3 f32) +;; CHECK-BIN-NODEBUG-NEXT: (local.set $0 +;; CHECK-BIN-NODEBUG-NEXT: (block $label$1 (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (local.set $1 +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (select +;; CHECK-BIN-NODEBUG-NEXT: (i32.sub +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: (i32.lt_s +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (local.set $2 +;; CHECK-BIN-NODEBUG-NEXT: (f64.abs +;; CHECK-BIN-NODEBUG-NEXT: (f64.const 0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (local.set $3 +;; CHECK-BIN-NODEBUG-NEXT: (f32.abs +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $14 (type $1) +;; CHECK-BIN-NODEBUG-NEXT: (local $0 f32) +;; CHECK-BIN-NODEBUG-NEXT: (local.set $0 +;; CHECK-BIN-NODEBUG-NEXT: (f32.neg +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (call_indirect $0 (type $2) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (i32.add +;; CHECK-BIN-NODEBUG-NEXT: (i32.and +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 7) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 8) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $15 (type $2) (param $0 f32) +;; CHECK-BIN-NODEBUG-NEXT: (call_indirect $0 (type $2) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (i32.add +;; CHECK-BIN-NODEBUG-NEXT: (i32.and +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 7) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 8) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $16 (type $1) +;; CHECK-BIN-NODEBUG-NEXT: (local $0 i32) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.gt_u +;; CHECK-BIN-NODEBUG-NEXT: (i32.shr_u +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const -4096) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $17 (type $1) +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $18 (type $1) +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $19 (type $0) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (block $label$1 +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (br $label$1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 0) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $20 (type $7) (param $0 f64) (result f64) +;; CHECK-BIN-NODEBUG-NEXT: (loop $label$1 (result f64) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $21 (type $8) (result i64) +;; CHECK-BIN-NODEBUG-NEXT: (i64.const -9218868437227405313) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $22 (type $9) (param $0 i32) (param $1 i64) +;; CHECK-BIN-NODEBUG-NEXT: (i64.store32 +;; CHECK-BIN-NODEBUG-NEXT: (local.get $0) +;; CHECK-BIN-NODEBUG-NEXT: (local.get $1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $23 (type $0) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (return +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $24 (type $0) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (return +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $25 (type $0) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (return +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $26 (type $0) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (return +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $27 (type $0) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (return +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $28 (type $0) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (block $label$1 +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (br $label$1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $29 (type $0) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (if +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 3) +;; CHECK-BIN-NODEBUG-NEXT: (return +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (return +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $30 (type $0) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (if +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 3) +;; CHECK-BIN-NODEBUG-NEXT: (return +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 2) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (return +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $31 (type $0) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (loop $label$1 +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: (return +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $32 (type $0) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (loop $label$1 +;; CHECK-BIN-NODEBUG-NEXT: (return +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $33 (type $0) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (loop $label$1 +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: (return +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $34 (type $0) (result i32) +;; CHECK-BIN-NODEBUG-NEXT: (loop $label$1 +;; CHECK-BIN-NODEBUG-NEXT: (return +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $35 (type $1) +;; CHECK-BIN-NODEBUG-NEXT: (unreachable) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $36 (type $1) +;; CHECK-BIN-NODEBUG-NEXT: (if +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: (unreachable) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) diff --git a/test/lit/basic/unreachable-code.wast b/test/lit/basic/unreachable-code.wast new file mode 100644 index 000000000..16ec691a5 --- /dev/null +++ b/test/lit/basic/unreachable-code.wast @@ -0,0 +1,355 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wast -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast +;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +(module + ;; CHECK-TEXT: (type $0 (func)) + + ;; CHECK-TEXT: (func $a (type $0) + ;; CHECK-TEXT-NEXT: (if + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (type $0 (func)) + + ;; CHECK-BIN: (func $a (type $0) + ;; CHECK-BIN-NEXT: (if + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: (unreachable) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $a + (if (i32.const 1) + (unreachable) + ) + ) + + ;; CHECK-TEXT: (func $b (type $0) + ;; CHECK-TEXT-NEXT: (if + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $b (type $0) + ;; CHECK-BIN-NEXT: (if + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: (unreachable) + ;; CHECK-BIN-NEXT: (unreachable) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $b + (if (i32.const 1) + (unreachable) + (unreachable) + ) + ) + + ;; CHECK-TEXT: (func $a-block (type $0) + ;; CHECK-TEXT-NEXT: (if + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $a-block (type $0) + ;; CHECK-BIN-NEXT: (if + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: (unreachable) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $a-block + (block + (if (i32.const 1) + (unreachable) + ) + ) + ) + + ;; CHECK-TEXT: (func $b-block (type $0) + ;; CHECK-TEXT-NEXT: (if + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $b-block (type $0) + ;; CHECK-BIN-NEXT: (if + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: (unreachable) + ;; CHECK-BIN-NEXT: (unreachable) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $b-block + (block + (if (i32.const 1) + (unreachable) + (unreachable) + ) + ) + ) + + ;; CHECK-TEXT: (func $a-prepost (type $0) + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: (if + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $a-prepost (type $0) + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: (if + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: (unreachable) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: ) + (func $a-prepost + (nop) + (if (i32.const 1) + (unreachable) + ) + (nop) + ) + + ;; CHECK-TEXT: (func $b-prepost (type $0) + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: (if + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $b-prepost (type $0) + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: (if + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: (unreachable) + ;; CHECK-BIN-NEXT: (unreachable) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $b-prepost + (nop) + (if (i32.const 1) + (unreachable) + (unreachable) + ) + (nop) + ) + + ;; CHECK-TEXT: (func $a-block-prepost (type $0) + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: (block + ;; CHECK-TEXT-NEXT: (if + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $a-block-prepost (type $0) + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: (if + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: (unreachable) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: ) + (func $a-block-prepost + (nop) + (block + (if (i32.const 1) + (unreachable) + ) + ) + (nop) + ) + + ;; CHECK-TEXT: (func $b-block-prepost (type $0) + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: (block + ;; CHECK-TEXT-NEXT: (if + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $b-block-prepost (type $0) + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: (if + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: (unreachable) + ;; CHECK-BIN-NEXT: (unreachable) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $b-block-prepost + (nop) + (block + (if (i32.const 1) + (unreachable) + (unreachable) + ) + ) + (nop) + ) + + ;; CHECK-TEXT: (func $recurse (type $0) + ;; CHECK-TEXT-NEXT: (block $a + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: (block $b + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: (br $b) + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $recurse (type $0) + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: (block $label$1 + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: (br $label$1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: ) + (func $recurse + (block $a + (nop) + (block $b + (nop) + (br $b) + (nop) + ) + (nop) + ) + ) + + ;; CHECK-TEXT: (func $recurse-b (type $0) + ;; CHECK-TEXT-NEXT: (block $a + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: (block $b + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: (br $a) + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (nop) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (func $recurse-b (type $0) + ;; CHECK-BIN-NEXT: (block $label$1 + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: (block $label$2 + ;; CHECK-BIN-NEXT: (nop) + ;; CHECK-BIN-NEXT: (br $label$1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $recurse-b + (block $a + (nop) + (block $b + (nop) + (br $a) + (nop) + ) + (nop) + ) + ) +) +;; CHECK-BIN-NODEBUG: (type $0 (func)) + +;; CHECK-BIN-NODEBUG: (func $0 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (if +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: (unreachable) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $1 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (if +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: (unreachable) +;; CHECK-BIN-NODEBUG-NEXT: (unreachable) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $2 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (if +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: (unreachable) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $3 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (if +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: (unreachable) +;; CHECK-BIN-NODEBUG-NEXT: (unreachable) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $4 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: (if +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: (unreachable) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $5 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: (if +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: (unreachable) +;; CHECK-BIN-NODEBUG-NEXT: (unreachable) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $6 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: (if +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: (unreachable) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $7 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: (if +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: (unreachable) +;; CHECK-BIN-NODEBUG-NEXT: (unreachable) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $8 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: (block $label$1 +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: (br $label$1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: ) + +;; CHECK-BIN-NODEBUG: (func $9 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (block $label$1 +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: (block $label$2 +;; CHECK-BIN-NODEBUG-NEXT: (nop) +;; CHECK-BIN-NODEBUG-NEXT: (br $label$1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) diff --git a/test/lit/basic/unreachable-instr-type.wast b/test/lit/basic/unreachable-instr-type.wast new file mode 100644 index 000000000..ff6df8bac --- /dev/null +++ b/test/lit/basic/unreachable-instr-type.wast @@ -0,0 +1,81 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wast -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast +;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +(module + (memory (shared 1 1)) + + ;; CHECK-TEXT: (type $0 (func)) + + ;; CHECK-TEXT: (memory $0 (shared 1 1)) + + ;; CHECK-TEXT: (func $test (type $0) + ;; CHECK-TEXT-NEXT: (i32.load + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (f32.store + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: (f32.const 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i32.atomic.rmw.add + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: (i64.const 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (i32.atomic.rmw.cmpxchg + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: (i64.const 0) + ;; CHECK-TEXT-NEXT: (i64.const 1) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: (memory.atomic.wait64 + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: (i64.const 0) + ;; CHECK-TEXT-NEXT: (i64.const 0) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (type $0 (func)) + + ;; CHECK-BIN: (memory $0 (shared 1 1)) + + ;; CHECK-BIN: (func $test (type $0) + ;; CHECK-BIN-NEXT: (unreachable) + ;; CHECK-BIN-NEXT: ) + (func $test + (f32.load (unreachable)) + + (f32.store + (unreachable) + (f32.const 0) + ) + + (i64.atomic.rmw.add + (unreachable) + (i64.const 0) + ) + + (i64.atomic.rmw.cmpxchg + (unreachable) + (i64.const 0) + (i64.const 1) + ) + + (memory.atomic.wait64 + (unreachable) + (i64.const 0) + (i64.const 0) + ) + ) +) +;; CHECK-BIN-NODEBUG: (type $0 (func)) + +;; CHECK-BIN-NODEBUG: (memory $0 (shared 1 1)) + +;; CHECK-BIN-NODEBUG: (func $0 (type $0) +;; CHECK-BIN-NODEBUG-NEXT: (unreachable) +;; CHECK-BIN-NODEBUG-NEXT: ) diff --git a/test/lit/basic/untaken-br_if.wast b/test/lit/basic/untaken-br_if.wast new file mode 100644 index 000000000..23063d796 --- /dev/null +++ b/test/lit/basic/untaken-br_if.wast @@ -0,0 +1,67 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. + +;; RUN: wasm-opt %s -all -o %t.text.wast -g -S +;; RUN: wasm-as %s -all -g -o %t.wasm +;; RUN: wasm-dis %t.wasm -all -o %t.bin.wast +;; RUN: wasm-as %s -all -o %t.nodebug.wasm +;; RUN: wasm-dis %t.nodebug.wasm -all -o %t.bin.nodebug.wast +;; RUN: cat %t.text.wast | filecheck %s --check-prefix=CHECK-TEXT +;; RUN: cat %t.bin.wast | filecheck %s --check-prefix=CHECK-BIN +;; RUN: cat %t.bin.nodebug.wast | filecheck %s --check-prefix=CHECK-BIN-NODEBUG + +(module + ;; CHECK-TEXT: (type $0 (func (result f32))) + + ;; CHECK-TEXT: (func $binaryify-untaken-br_if (type $0) (result f32) + ;; CHECK-TEXT-NEXT: (if (result f32) + ;; CHECK-TEXT-NEXT: (i32.const 1) + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: (block $label$1 (result f32) + ;; CHECK-TEXT-NEXT: (br_if $label$1 + ;; CHECK-TEXT-NEXT: (f32.const 1) + ;; CHECK-TEXT-NEXT: (unreachable) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-TEXT-NEXT: ) + ;; CHECK-BIN: (type $0 (func (result f32))) + + ;; CHECK-BIN: (func $binaryify-untaken-br_if (type $0) (result f32) + ;; CHECK-BIN-NEXT: (if (result f32) + ;; CHECK-BIN-NEXT: (i32.const 1) + ;; CHECK-BIN-NEXT: (unreachable) + ;; CHECK-BIN-NEXT: (block $label$3 (result f32) + ;; CHECK-BIN-NEXT: (drop + ;; CHECK-BIN-NEXT: (f32.const 1) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: (unreachable) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + ;; CHECK-BIN-NEXT: ) + (func $binaryify-untaken-br_if (result f32) + (if (result f32) + (i32.const 1) + (unreachable) + (block $label$1 (result f32) + (br_if $label$1 + (f32.const 1) + (unreachable) + ) + ) + ) + ) +) +;; CHECK-BIN-NODEBUG: (type $0 (func (result f32))) + +;; CHECK-BIN-NODEBUG: (func $0 (type $0) (result f32) +;; CHECK-BIN-NODEBUG-NEXT: (if (result f32) +;; CHECK-BIN-NODEBUG-NEXT: (i32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: (unreachable) +;; CHECK-BIN-NODEBUG-NEXT: (block $label$3 (result f32) +;; CHECK-BIN-NODEBUG-NEXT: (drop +;; CHECK-BIN-NODEBUG-NEXT: (f32.const 1) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: (unreachable) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) +;; CHECK-BIN-NODEBUG-NEXT: ) diff --git a/test/lit/multi-memories-atomics64.wast b/test/lit/multi-memories-atomics64.wast deleted file mode 100644 index 15941b12a..000000000 --- a/test/lit/multi-memories-atomics64.wast +++ /dev/null @@ -1,704 +0,0 @@ -;; NOTE: Assertions have been generated by update_lit_checks.py and should not be edited. -;; RUN: wasm-as %s -all -g -o %t.wasm -;; RUN: wasm-dis %t.wasm -o - | filecheck %s - -(module - ;; CHECK: (type $0 (func)) - (type $0 (func)) - ;; CHECK: (memory $appMemory (shared i64 23 256)) - (memory $appMemory (shared i64 23 256)) - ;; CHECK: (memory $dataMemory (shared i64 23 256)) - (memory $dataMemory (shared i64 23 256)) - ;; CHECK: (memory $instrumentMemory (shared i64 23 256)) - (memory $instrumentMemory (shared i64 23 256)) - ;; CHECK: (func $atomic-loadstore - ;; CHECK-NEXT: (local $0 i64) - ;; CHECK-NEXT: (local $1 i64) - ;; CHECK-NEXT: (local $2 i32) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i32.atomic.load8_u $appMemory offset=4 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i32.atomic.load8_u $appMemory offset=4 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i32.atomic.load16_u $dataMemory offset=4 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i32.atomic.load16_u $instrumentMemory offset=4 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i32.atomic.load $dataMemory offset=4 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i32.atomic.load $appMemory offset=4 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i64.atomic.load8_u $appMemory - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i64.atomic.load8_u $dataMemory - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i64.atomic.load16_u $appMemory - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i64.atomic.load16_u $appMemory - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i64.atomic.load32_u $instrumentMemory - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i64.atomic.load32_u $appMemory - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i64.atomic.load $appMemory - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i64.atomic.load $instrumentMemory - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (i32.atomic.store $appMemory offset=4 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $2) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (i32.atomic.store $appMemory offset=4 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $2) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (i32.atomic.store8 $instrumentMemory offset=4 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $2) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (i32.atomic.store8 $dataMemory offset=4 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $2) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (i32.atomic.store16 $appMemory offset=4 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $2) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (i32.atomic.store16 $dataMemory offset=4 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $2) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (i64.atomic.store $appMemory offset=4 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (i64.atomic.store $appMemory offset=4 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (i64.atomic.store8 $dataMemory offset=4 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (i64.atomic.store8 $instrumentMemory offset=4 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (i64.atomic.store16 $appMemory offset=4 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (i64.atomic.store16 $appMemory offset=4 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (i64.atomic.store32 $instrumentMemory offset=4 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (i64.atomic.store32 $dataMemory offset=4 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $atomic-loadstore (type $0) - (local $0 i64) - (local $1 i64) - (local $2 i32) - (drop - (i32.atomic.load8_u 0 offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load8_u $appMemory offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load16_u 1 offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load16_u $instrumentMemory offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load 1 offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load $appMemory offset=4 - (local.get $0) - ) - ) - (drop - (i64.atomic.load8_u - (local.get $0) - ) - ) - (drop - (i64.atomic.load8_u $dataMemory - (local.get $0) - ) - ) - (drop - (i64.atomic.load16_u - (local.get $0) - ) - ) - (drop - (i64.atomic.load16_u $appMemory - (local.get $0) - ) - ) - (drop - (i64.atomic.load32_u 2 - (local.get $0) - ) - ) - (drop - (i64.atomic.load32_u $appMemory - (local.get $0) - ) - ) - (drop - (i64.atomic.load - (local.get $0) - ) - ) - (drop - (i64.atomic.load $instrumentMemory - (local.get $0) - ) - ) - (i32.atomic.store 0 offset=4 align=4 - (local.get $0) - (local.get $2) - ) - (i32.atomic.store $appMemory offset=4 align=4 - (local.get $0) - (local.get $2) - ) - (i32.atomic.store8 2 offset=4 align=1 - (local.get $0) - (local.get $2) - ) - (i32.atomic.store8 $dataMemory offset=4 align=1 - (local.get $0) - (local.get $2) - ) - (i32.atomic.store16 0 offset=4 - (local.get $0) - (local.get $2) - ) - (i32.atomic.store16 $dataMemory offset=4 - (local.get $0) - (local.get $2) - ) - (i64.atomic.store offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store $appMemory offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store8 1 offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store8 $instrumentMemory offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store16 offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store16 $appMemory offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store32 2 offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store32 $dataMemory offset=4 - (local.get $0) - (local.get $1) - ) - ) - ;; CHECK: (func $atomic-rmw - ;; CHECK-NEXT: (local $0 i64) - ;; CHECK-NEXT: (local $1 i64) - ;; CHECK-NEXT: (local $2 i32) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i32.atomic.rmw.add $dataMemory offset=4 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $2) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i32.atomic.rmw.add $instrumentMemory offset=4 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $2) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i32.atomic.rmw8.add_u $appMemory offset=4 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $2) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i32.atomic.rmw8.add_u $appMemory offset=4 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $2) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i32.atomic.rmw16.and_u $dataMemory - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $2) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i32.atomic.rmw16.and_u $instrumentMemory - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $2) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i64.atomic.rmw32.or_u $appMemory - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i64.atomic.rmw32.or_u $appMemory - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i32.atomic.rmw8.xchg_u $appMemory - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $2) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i32.atomic.rmw8.xchg_u $dataMemory - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $2) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $atomic-rmw (type $0) - (local $0 i64) - (local $1 i64) - (local $2 i32) - (drop - (i32.atomic.rmw.add $dataMemory offset=4 - (local.get $0) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw.add 2 offset=4 - (local.get $0) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw8.add_u 0 offset=4 - (local.get $0) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw8.add_u $appMemory offset=4 - (local.get $0) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw16.and_u 1 align=2 - (local.get $0) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw16.and_u $instrumentMemory align=2 - (local.get $0) - (local.get $2) - ) - ) - (drop - (i64.atomic.rmw32.or_u 0 - (local.get $0) - (local.get $1) - ) - ) - (drop - (i64.atomic.rmw32.or_u $appMemory - (local.get $0) - (local.get $1) - ) - ) - (drop - (i32.atomic.rmw8.xchg_u 0 align=1 - (local.get $0) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw8.xchg_u $dataMemory align=1 - (local.get $0) - (local.get $2) - ) - ) - ) - ;; CHECK: (func $atomic-cmpxchg - ;; CHECK-NEXT: (local $0 i64) - ;; CHECK-NEXT: (local $1 i64) - ;; CHECK-NEXT: (local $2 i32) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i32.atomic.rmw.cmpxchg $appMemory offset=4 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $2) - ;; CHECK-NEXT: (local.get $2) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i32.atomic.rmw.cmpxchg $instrumentMemory offset=4 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $2) - ;; CHECK-NEXT: (local.get $2) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i32.atomic.rmw8.cmpxchg_u $appMemory - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $2) - ;; CHECK-NEXT: (local.get $2) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i32.atomic.rmw8.cmpxchg_u $appMemory - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $2) - ;; CHECK-NEXT: (local.get $2) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i64.atomic.rmw.cmpxchg $appMemory offset=4 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i64.atomic.rmw.cmpxchg $dataMemory offset=4 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i64.atomic.rmw32.cmpxchg_u $instrumentMemory - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i64.atomic.rmw32.cmpxchg_u $dataMemory - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $atomic-cmpxchg (type $0) - (local $0 i64) - (local $1 i64) - (local $2 i32) - (drop - (i32.atomic.rmw.cmpxchg 0 offset=4 - (local.get $0) - (local.get $2) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw.cmpxchg $instrumentMemory offset=4 - (local.get $0) - (local.get $2) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw8.cmpxchg_u - (local.get $0) - (local.get $2) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw8.cmpxchg_u $appMemory - (local.get $0) - (local.get $2) - (local.get $2) - ) - ) - (drop - (i64.atomic.rmw.cmpxchg offset=4 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (i64.atomic.rmw.cmpxchg $dataMemory offset=4 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (i64.atomic.rmw32.cmpxchg_u 2 align=4 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (i64.atomic.rmw32.cmpxchg_u $dataMemory align=4 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - ) - ;; CHECK: (func $atomic-wait-notify - ;; CHECK-NEXT: (local $0 i64) - ;; CHECK-NEXT: (local $1 i64) - ;; CHECK-NEXT: (local $2 i32) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (memory.atomic.wait32 $dataMemory - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $2) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (memory.atomic.wait32 $instrumentMemory - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $2) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (memory.atomic.wait32 $appMemory offset=4 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $2) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (memory.atomic.wait32 $instrumentMemory offset=4 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $2) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (memory.atomic.notify $dataMemory - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $2) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (memory.atomic.notify $dataMemory - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $2) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (memory.atomic.notify $appMemory offset=24 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $2) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (memory.atomic.notify $dataMemory offset=24 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $2) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (memory.atomic.wait64 $instrumentMemory - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (memory.atomic.wait64 $instrumentMemory - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (memory.atomic.wait64 $appMemory offset=16 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (memory.atomic.wait64 $appMemory offset=16 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $atomic-wait-notify (type $0) - (local $0 i64) - (local $1 i64) - (local $2 i32) - (drop - (memory.atomic.wait32 $dataMemory - (local.get $0) - (local.get $2) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait32 2 - (local.get $0) - (local.get $2) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait32 $appMemory offset=4 align=4 - (local.get $0) - (local.get $2) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait32 2 offset=4 align=4 - (local.get $0) - (local.get $2) - (local.get $1) - ) - ) - (drop - (memory.atomic.notify 1 - (local.get $0) - (local.get $2) - ) - ) - (drop - (memory.atomic.notify $dataMemory - (local.get $0) - (local.get $2) - ) - ) - (drop - (memory.atomic.notify $appMemory offset=24 align=4 - (local.get $0) - (local.get $2) - ) - ) - (drop - (memory.atomic.notify 1 offset=24 align=4 - (local.get $0) - (local.get $2) - ) - ) - (drop - (memory.atomic.wait64 $instrumentMemory - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait64 2 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait64 $appMemory align=8 offset=16 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait64 0 align=8 offset=16 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - ) - ;; CHECK: (func $atomic-fence - ;; CHECK-NEXT: (atomic.fence) - ;; CHECK-NEXT: ) - (func $atomic-fence (type $0) - (atomic.fence) - ) -) diff --git a/test/lit/multi-memories-basics.wast b/test/lit/multi-memories-basics.wast deleted file mode 100644 index b4d29f8b7..000000000 --- a/test/lit/multi-memories-basics.wast +++ /dev/null @@ -1,176 +0,0 @@ -;; NOTE: Assertions have been generated by update_lit_checks.py and should not be edited. -;; RUN: wasm-as %s -all -g -o %t.wasm -;; RUN: wasm-dis %t.wasm -o - | filecheck %s - -(module - ;; CHECK: (import "env" "memory" (memory $importedMemory 1 1)) - - ;; CHECK: (memory $memory1 1 500) - (memory $memory1 1 500) - ;; CHECK: (memory $memory2 1 800) - (memory $memory2 1 800) - ;; CHECK: (memory $memory3 1 400) - (memory $memory3 1 400) - ;; CHECK: (data $data1 (memory $memory1) (i32.const 0) "abcd") - (data $data1 (memory $memory1) (i32.const 0) "a" "" "bcd") - ;; CHECK: (data $data2 (memory $memory2) (i32.const 9) "w") - (data $data2 (memory $memory2) (i32.const 9) "w") - (import "env" "memory" (memory $importedMemory 1 1)) - ;; CHECK: (func $memory.fill - ;; CHECK-NEXT: (memory.fill $memory2 - ;; CHECK-NEXT: (i32.const 0) - ;; CHECK-NEXT: (i32.const 1) - ;; CHECK-NEXT: (i32.const 2) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $memory.fill - (memory.fill 1 - (i32.const 0) - (i32.const 1) - (i32.const 2) - ) - ) - ;; CHECK: (func $memory.copy - ;; CHECK-NEXT: (memory.copy $memory2 $memory3 - ;; CHECK-NEXT: (i32.const 512) - ;; CHECK-NEXT: (i32.const 0) - ;; CHECK-NEXT: (i32.const 12) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $memory.copy - (memory.copy 1 2 - (i32.const 512) - (i32.const 0) - (i32.const 12) - ) - ) - ;; CHECK: (func $memory.init - ;; CHECK-NEXT: (memory.init $memory1 $data1 - ;; CHECK-NEXT: (i32.const 0) - ;; CHECK-NEXT: (i32.const 0) - ;; CHECK-NEXT: (i32.const 45) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $memory.init - (memory.init 0 0 - (i32.const 0) - (i32.const 0) - (i32.const 45) - ) - ) - ;; CHECK: (func $memory.grow (result i32) - ;; CHECK-NEXT: (memory.grow $memory3 - ;; CHECK-NEXT: (i32.const 10) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $memory.grow (result i32) - (memory.grow 2 - (i32.const 10) - ) - ) - ;; CHECK: (func $memory.size (result i32) - ;; CHECK-NEXT: (memory.size $memory3) - ;; CHECK-NEXT: ) - (func $memory.size (result i32) - (memory.size 2) - ) - ;; CHECK: (func $loads - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i32.load $memory1 - ;; CHECK-NEXT: (i32.const 12) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i32.load $memory3 - ;; CHECK-NEXT: (i32.const 12) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i32.load16_s $memory2 - ;; CHECK-NEXT: (i32.const 12) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i32.load16_s $memory2 - ;; CHECK-NEXT: (i32.const 12) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i32.load8_s $memory3 - ;; CHECK-NEXT: (i32.const 12) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i32.load8_s $memory3 - ;; CHECK-NEXT: (i32.const 12) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i32.load16_u $memory1 - ;; CHECK-NEXT: (i32.const 12) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i32.load16_u $memory1 - ;; CHECK-NEXT: (i32.const 12) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i32.load8_u $memory2 - ;; CHECK-NEXT: (i32.const 12) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (i32.load8_u $memory2 - ;; CHECK-NEXT: (i32.const 12) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $loads - (drop (i32.load 0 (i32.const 12))) - (drop (i32.load $memory3 (i32.const 12))) - (drop (i32.load16_s 1 (i32.const 12))) - (drop (i32.load16_s $memory2 (i32.const 12))) - (drop (i32.load8_s 2 (i32.const 12))) - (drop (i32.load8_s $memory3 (i32.const 12))) - (drop (i32.load16_u 0 (i32.const 12))) - (drop (i32.load16_u $memory1 (i32.const 12))) - (drop (i32.load8_u 1 (i32.const 12))) - (drop (i32.load8_u $memory2 (i32.const 12))) - ) - ;; CHECK: (func $stores - ;; CHECK-NEXT: (i32.store $memory1 - ;; CHECK-NEXT: (i32.const 12) - ;; CHECK-NEXT: (i32.const 115) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (i32.store $memory1 - ;; CHECK-NEXT: (i32.const 12) - ;; CHECK-NEXT: (i32.const 115) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (i32.store16 $memory2 - ;; CHECK-NEXT: (i32.const 20) - ;; CHECK-NEXT: (i32.const 31353) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (i32.store16 $importedMemory - ;; CHECK-NEXT: (i32.const 20) - ;; CHECK-NEXT: (i32.const 31353) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (i32.store8 $memory3 - ;; CHECK-NEXT: (i32.const 23) - ;; CHECK-NEXT: (i32.const 120) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (i32.store8 $memory3 - ;; CHECK-NEXT: (i32.const 23) - ;; CHECK-NEXT: (i32.const 120) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $stores - (i32.store 0 (i32.const 12) (i32.const 115)) - (i32.store $memory1 (i32.const 12) (i32.const 115)) - (i32.store16 1 (i32.const 20) (i32.const 31353)) - (i32.store16 $importedMemory (i32.const 20) (i32.const 31353)) - (i32.store8 2 (i32.const 23) (i32.const 120)) - (i32.store8 $memory3 (i32.const 23) (i32.const 120)) - ) -) - diff --git a/test/lit/multi-memories-simd.wast b/test/lit/multi-memories-simd.wast deleted file mode 100644 index 184d98876..000000000 --- a/test/lit/multi-memories-simd.wast +++ /dev/null @@ -1,635 +0,0 @@ -;; NOTE: Assertions have been generated by update_lit_checks.py and should not be edited. -;; RUN: wasm-as %s -all -g -o %t.wasm -;; RUN: wasm-dis %t.wasm -o - | filecheck %s - -(module - ;; CHECK: (memory $memorya 1 1) - (memory $memorya 1 1) - ;; CHECK: (memory $memoryb 1 1) - (memory $memoryb 1 1) - ;; CHECK: (memory $memoryc 1 1) - (memory $memoryc 1 1) - ;; CHECK: (memory $memoryd 1 1) - (memory $memoryd 1 1) - ;; CHECK: (func $v128.load (param $0 i32) (result v128) - ;; CHECK-NEXT: (v128.load $memorya - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load (param $0 i32) (result v128) - (v128.load offset=0 align=16 - (local.get $0) - ) - ) - ;; CHECK: (func $v128.load2 (param $0 i32) (result v128) - ;; CHECK-NEXT: (v128.load $memoryb - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load2 (param $0 i32) (result v128) - (v128.load $memoryb offset=0 align=16 - (local.get $0) - ) - ) - ;; CHECK: (func $v128.load8x8_s (param $0 i32) (result v128) - ;; CHECK-NEXT: (v128.load8x8_s $memoryc - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load8x8_s (param $0 i32) (result v128) - (v128.load8x8_s 2 - (local.get $0) - ) - ) - ;; CHECK: (func $v128.load8x8_s2 (param $0 i32) (result v128) - ;; CHECK-NEXT: (v128.load8x8_s $memoryb - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load8x8_s2 (param $0 i32) (result v128) - (v128.load8x8_s 1 - (local.get $0) - ) - ) - ;; CHECK: (func $v128.load8x8_u (param $0 i32) (result v128) - ;; CHECK-NEXT: (v128.load8x8_u $memoryd - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load8x8_u (param $0 i32) (result v128) - (v128.load8x8_u 3 - (local.get $0) - ) - ) - ;; CHECK: (func $v128.load8x8_u2 (param $0 i32) (result v128) - ;; CHECK-NEXT: (v128.load8x8_u $memoryd - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load8x8_u2 (param $0 i32) (result v128) - (v128.load8x8_u $memoryd - (local.get $0) - ) - ) - ;; CHECK: (func $v128.load16x4_s (param $0 i32) (result v128) - ;; CHECK-NEXT: (v128.load16x4_s $memorya - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load16x4_s (param $0 i32) (result v128) - (v128.load16x4_s 0 - (local.get $0) - ) - ) - ;; CHECK: (func $v128.load16x4_s2 (param $0 i32) (result v128) - ;; CHECK-NEXT: (v128.load16x4_s $memoryb - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load16x4_s2 (param $0 i32) (result v128) - (v128.load16x4_s $memoryb - (local.get $0) - ) - ) - ;; CHECK: (func $v128.load16x4_u (param $0 i32) (result v128) - ;; CHECK-NEXT: (v128.load16x4_u $memorya - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load16x4_u (param $0 i32) (result v128) - (v128.load16x4_u 0 - (local.get $0) - ) - ) - ;; CHECK: (func $v128.load16x4_u2 (param $0 i32) (result v128) - ;; CHECK-NEXT: (v128.load16x4_u $memorya - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load16x4_u2 (param $0 i32) (result v128) - (v128.load16x4_u $memorya - (local.get $0) - ) - ) - ;; CHECK: (func $v128.load32x2_s (param $0 i32) (result v128) - ;; CHECK-NEXT: (v128.load32x2_s $memoryc - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load32x2_s (param $0 i32) (result v128) - (v128.load32x2_s 2 - (local.get $0) - ) - ) - ;; CHECK: (func $v128.load32x2_s2 (param $0 i32) (result v128) - ;; CHECK-NEXT: (v128.load32x2_s $memoryb - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load32x2_s2 (param $0 i32) (result v128) - (v128.load32x2_s $memoryb - (local.get $0) - ) - ) - ;; CHECK: (func $v128.load32x2_u (param $0 i32) (result v128) - ;; CHECK-NEXT: (v128.load32x2_u $memoryb - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load32x2_u (param $0 i32) (result v128) - (v128.load32x2_u 1 - (local.get $0) - ) - ) - ;; CHECK: (func $v128.load32x2_u2 (param $0 i32) (result v128) - ;; CHECK-NEXT: (v128.load32x2_u $memoryc - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load32x2_u2 (param $0 i32) (result v128) - (v128.load32x2_u $memoryc - (local.get $0) - ) - ) - ;; CHECK: (func $v128.load8_splat (param $0 i32) (result v128) - ;; CHECK-NEXT: (v128.load8_splat $memoryb - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load8_splat (param $0 i32) (result v128) - (v128.load8_splat 1 - (local.get $0) - ) - ) - ;; CHECK: (func $v128.load8_splat2 (param $0 i32) (result v128) - ;; CHECK-NEXT: (v128.load8_splat $memoryb - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load8_splat2 (param $0 i32) (result v128) - (v128.load8_splat $memoryb - (local.get $0) - ) - ) - ;; CHECK: (func $v128.load16_splat (param $0 i32) (result v128) - ;; CHECK-NEXT: (v128.load16_splat $memorya - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load16_splat (param $0 i32) (result v128) - (v128.load16_splat $memorya - (local.get $0) - ) - ) - ;; CHECK: (func $v128.load16_splat2 (param $0 i32) (result v128) - ;; CHECK-NEXT: (v128.load16_splat $memorya - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load16_splat2 (param $0 i32) (result v128) - (v128.load16_splat 0 - (local.get $0) - ) - ) - ;; CHECK: (func $v128.load32_splat (param $0 i32) (result v128) - ;; CHECK-NEXT: (v128.load32_splat $memoryb - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load32_splat (param $0 i32) (result v128) - (v128.load32_splat 1 - (local.get $0) - ) - ) - ;; CHECK: (func $v128.load32_splat2 (param $0 i32) (result v128) - ;; CHECK-NEXT: (v128.load32_splat $memoryd - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load32_splat2 (param $0 i32) (result v128) - (v128.load32_splat $memoryd - (local.get $0) - ) - ) - ;; CHECK: (func $v128.load64_splat (param $0 i32) (result v128) - ;; CHECK-NEXT: (v128.load64_splat $memoryb - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load64_splat (param $0 i32) (result v128) - (v128.load64_splat 1 - (local.get $0) - ) - ) - ;; CHECK: (func $v128.load64_splat2 (param $0 i32) (result v128) - ;; CHECK-NEXT: (v128.load64_splat $memorya - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load64_splat2 (param $0 i32) (result v128) - (v128.load64_splat $memorya - (local.get $0) - ) - ) - ;; CHECK: (func $v128.store (param $0 i32) (param $1 v128) - ;; CHECK-NEXT: (v128.store $memorya - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.store (param $0 i32) (param $1 v128) - (v128.store 0 offset=0 align=16 - (local.get $0) - (local.get $1) - ) - ) - ;; CHECK: (func $v128.store2 (param $0 i32) (param $1 v128) - ;; CHECK-NEXT: (v128.store $memoryb - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.store2 (param $0 i32) (param $1 v128) - (v128.store 1 offset=0 align=16 - (local.get $0) - (local.get $1) - ) - ) - ;; CHECK: (func $v128.load8_lane (param $0 i32) (param $1 v128) (result v128) - ;; CHECK-NEXT: (v128.load8_lane $memorya 0 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load8_lane (param $0 i32) (param $1 v128) (result v128) - (v128.load8_lane 0 0 - (local.get $0) - (local.get $1) - ) - ) - ;; CHECK: (func $v128.load8_lane2 (param $0 i32) (param $1 v128) (result v128) - ;; CHECK-NEXT: (v128.load8_lane $memoryb 0 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load8_lane2 (param $0 i32) (param $1 v128) (result v128) - (v128.load8_lane $memoryb 0 - (local.get $0) - (local.get $1) - ) - ) - ;; CHECK: (func $v128.load16_lane (param $0 i32) (param $1 v128) (result v128) - ;; CHECK-NEXT: (v128.load16_lane $memoryb 0 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load16_lane (param $0 i32) (param $1 v128) (result v128) - (v128.load16_lane 1 0 - (local.get $0) - (local.get $1) - ) - ) - ;; CHECK: (func $v128.load16_lane2 (param $0 i32) (param $1 v128) (result v128) - ;; CHECK-NEXT: (v128.load16_lane $memoryd 0 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load16_lane2 (param $0 i32) (param $1 v128) (result v128) - (v128.load16_lane $memoryd 0 - (local.get $0) - (local.get $1) - ) - ) - ;; CHECK: (func $v128.load32_lane (param $0 i32) (param $1 v128) (result v128) - ;; CHECK-NEXT: (v128.load32_lane $memorya 0 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load32_lane (param $0 i32) (param $1 v128) (result v128) - (v128.load32_lane $memorya 0 - (local.get $0) - (local.get $1) - ) - ) - ;; CHECK: (func $v128.load32_lane2 (param $0 i32) (param $1 v128) (result v128) - ;; CHECK-NEXT: (v128.load32_lane $memoryb 0 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load32_lane2 (param $0 i32) (param $1 v128) (result v128) - (v128.load32_lane 1 0 - (local.get $0) - (local.get $1) - ) - ) - ;; CHECK: (func $v128.load64_lane (param $0 i32) (param $1 v128) (result v128) - ;; CHECK-NEXT: (v128.load64_lane $memoryd 0 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load64_lane (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane $memoryd 0 - (local.get $0) - (local.get $1) - ) - ) - ;; CHECK: (func $v128.load64_lane2 (param $0 i32) (param $1 v128) (result v128) - ;; CHECK-NEXT: (v128.load64_lane $memoryb 0 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load64_lane2 (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane 1 0 - (local.get $0) - (local.get $1) - ) - ) - ;; CHECK: (func $v128.load64_lane_align (param $0 i32) (param $1 v128) (result v128) - ;; CHECK-NEXT: (v128.load64_lane $memorya align=1 0 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load64_lane_align (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane 0 align=1 0 - (local.get $0) - (local.get $1) - ) - ) - ;; CHECK: (func $v128.load64_lane_align2 (param $0 i32) (param $1 v128) (result v128) - ;; CHECK-NEXT: (v128.load64_lane $memoryb align=1 0 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load64_lane_align2 (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane $memoryb align=1 0 - (local.get $0) - (local.get $1) - ) - ) - ;; CHECK: (func $v128.load64_lane_offset (param $0 i32) (param $1 v128) (result v128) - ;; CHECK-NEXT: (v128.load64_lane $memoryc offset=32 0 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load64_lane_offset (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane 2 offset=32 0 - (local.get $0) - (local.get $1) - ) - ) - ;; CHECK: (func $v128.load64_lane_offset2 (param $0 i32) (param $1 v128) (result v128) - ;; CHECK-NEXT: (v128.load64_lane $memoryb offset=32 0 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load64_lane_offset2 (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane $memoryb offset=32 0 - (local.get $0) - (local.get $1) - ) - ) - ;; CHECK: (func $v128.load64_lane_align_offset (param $0 i32) (param $1 v128) (result v128) - ;; CHECK-NEXT: (v128.load64_lane $memorya offset=32 align=1 0 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load64_lane_align_offset (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane align=1 offset=32 0 - (local.get $0) - (local.get $1) - ) - ) - ;; CHECK: (func $v128.load64_lane_align_offset2 (param $0 i32) (param $1 v128) (result v128) - ;; CHECK-NEXT: (v128.load64_lane $memoryd offset=32 align=1 0 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load64_lane_align_offset2 (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane $memoryd align=1 offset=32 0 - (local.get $0) - (local.get $1) - ) - ) - ;; CHECK: (func $v128.store8_lane (param $0 i32) (param $1 v128) - ;; CHECK-NEXT: (v128.store8_lane $memorya 0 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.store8_lane (param $0 i32) (param $1 v128) - (v128.store8_lane 0 0 - (local.get $0) - (local.get $1) - ) - ) - ;; CHECK: (func $v128.store8_lane2 (param $0 i32) (param $1 v128) - ;; CHECK-NEXT: (v128.store8_lane $memoryd 0 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.store8_lane2 (param $0 i32) (param $1 v128) - (v128.store8_lane $memoryd 0 - (local.get $0) - (local.get $1) - ) - ) - ;; CHECK: (func $v128.store16_lane (param $0 i32) (param $1 v128) - ;; CHECK-NEXT: (v128.store16_lane $memorya 0 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.store16_lane (param $0 i32) (param $1 v128) - (v128.store16_lane $memorya 0 - (local.get $0) - (local.get $1) - ) - ) - ;; CHECK: (func $v128.store16_lane2 (param $0 i32) (param $1 v128) - ;; CHECK-NEXT: (v128.store16_lane $memoryb 0 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.store16_lane2 (param $0 i32) (param $1 v128) - (v128.store16_lane 1 0 - (local.get $0) - (local.get $1) - ) - ) - ;; CHECK: (func $v128.store32_lane (param $0 i32) (param $1 v128) - ;; CHECK-NEXT: (v128.store32_lane $memoryb 0 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.store32_lane (param $0 i32) (param $1 v128) - (v128.store32_lane $memoryb 0 - (local.get $0) - (local.get $1) - ) - ) - ;; CHECK: (func $v128.store32_lane2 (param $0 i32) (param $1 v128) - ;; CHECK-NEXT: (v128.store32_lane $memoryc 0 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.store32_lane2 (param $0 i32) (param $1 v128) - (v128.store32_lane 2 0 - (local.get $0) - (local.get $1) - ) - ) - ;; CHECK: (func $v128.store64_lane (param $0 i32) (param $1 v128) - ;; CHECK-NEXT: (v128.store64_lane $memoryc 0 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.store64_lane (param $0 i32) (param $1 v128) - (v128.store64_lane $memoryc 0 - (local.get $0) - (local.get $1) - ) - ) - ;; CHECK: (func $v128.store64_lane2 (param $0 i32) (param $1 v128) - ;; CHECK-NEXT: (v128.store64_lane $memoryb 0 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.store64_lane2 (param $0 i32) (param $1 v128) - (v128.store64_lane 1 0 - (local.get $0) - (local.get $1) - ) - ) - ;; CHECK: (func $v128.store64_lane_align (param $0 i32) (param $1 v128) - ;; CHECK-NEXT: (v128.store64_lane $memoryb align=1 0 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.store64_lane_align (param $0 i32) (param $1 v128) - (v128.store64_lane $memoryb align=1 0 - (local.get $0) - (local.get $1) - ) - ) - ;; CHECK: (func $v128.store64_lane_align2 (param $0 i32) (param $1 v128) - ;; CHECK-NEXT: (v128.store64_lane $memorya align=1 0 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.store64_lane_align2 (param $0 i32) (param $1 v128) - (v128.store64_lane 0 align=1 0 - (local.get $0) - (local.get $1) - ) - ) - ;; CHECK: (func $v128.store64_lane_offset (param $0 i32) (param $1 v128) - ;; CHECK-NEXT: (v128.store64_lane $memoryd offset=32 0 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.store64_lane_offset (param $0 i32) (param $1 v128) - (v128.store64_lane 3 offset=32 0 - (local.get $0) - (local.get $1) - ) - ) - ;; CHECK: (func $v128.store64_lane_offset2 (param $0 i32) (param $1 v128) - ;; CHECK-NEXT: (v128.store64_lane $memorya offset=32 0 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.store64_lane_offset2 (param $0 i32) (param $1 v128) - (v128.store64_lane $memorya offset=32 0 - (local.get $0) - (local.get $1) - ) - ) - ;; CHECK: (func $v128.store64_lane_align_offset (param $0 i32) (param $1 v128) - ;; CHECK-NEXT: (v128.store64_lane $memoryb offset=32 align=1 0 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.store64_lane_align_offset (param $0 i32) (param $1 v128) - (v128.store64_lane 1 align=1 offset=32 0 - (local.get $0) - (local.get $1) - ) - ) - ;; CHECK: (func $v128.store64_lane_align_offset2 (param $0 i32) (param $1 v128) - ;; CHECK-NEXT: (v128.store64_lane $memoryd offset=32 align=1 0 - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: (local.get $1) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.store64_lane_align_offset2 (param $0 i32) (param $1 v128) - (v128.store64_lane $memoryd align=1 offset=32 0 - (local.get $0) - (local.get $1) - ) - ) - ;; CHECK: (func $v128.load32_zero (param $0 i32) (result v128) - ;; CHECK-NEXT: (v128.load32_zero $memorya - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load32_zero (param $0 i32) (result v128) - (v128.load32_zero 0 - (local.get $0) - ) - ) - ;; CHECK: (func $v128.load32_zero2 (param $0 i32) (result v128) - ;; CHECK-NEXT: (v128.load32_zero $memoryb - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load32_zero2 (param $0 i32) (result v128) - (v128.load32_zero $memoryb - (local.get $0) - ) - ) - ;; CHECK: (func $v128.load64_zero (param $0 i32) (result v128) - ;; CHECK-NEXT: (v128.load64_zero $memoryb - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load64_zero (param $0 i32) (result v128) - (v128.load64_zero 1 - (local.get $0) - ) - ) - ;; CHECK: (func $v128.load64_zero2 (param $0 i32) (result v128) - ;; CHECK-NEXT: (v128.load64_zero $memoryc - ;; CHECK-NEXT: (local.get $0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $v128.load64_zero2 (param $0 i32) (result v128) - (v128.load64_zero $memoryc - (local.get $0) - ) - ) -) - diff --git a/test/memory-import.wast b/test/memory-import.wast deleted file mode 100644 index d7e6e3770..000000000 --- a/test/memory-import.wast +++ /dev/null @@ -1,9 +0,0 @@ -(module - (type $0 (func (result i32))) - (import "env" "memory" (memory $0 1 1)) - (func $foo (type $0) (result i32) - (i32.load offset=13 - (i32.const 37) - ) - ) -) diff --git a/test/memory-import.wast.from-wast b/test/memory-import.wast.from-wast deleted file mode 100644 index 70fc97057..000000000 --- a/test/memory-import.wast.from-wast +++ /dev/null @@ -1,9 +0,0 @@ -(module - (type $0 (func (result i32))) - (import "env" "memory" (memory $0 1 1)) - (func $foo (type $0) (result i32) - (i32.load offset=13 - (i32.const 37) - ) - ) -) diff --git a/test/memory-import.wast.fromBinary b/test/memory-import.wast.fromBinary deleted file mode 100644 index b83ca836a..000000000 --- a/test/memory-import.wast.fromBinary +++ /dev/null @@ -1,10 +0,0 @@ -(module - (type $0 (func (result i32))) - (import "env" "memory" (memory $0 1 1)) - (func $foo (type $0) (result i32) - (i32.load offset=13 - (i32.const 37) - ) - ) -) - diff --git a/test/memory-import.wast.fromBinary.noDebugInfo b/test/memory-import.wast.fromBinary.noDebugInfo deleted file mode 100644 index 26f8d46f4..000000000 --- a/test/memory-import.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,10 +0,0 @@ -(module - (type $0 (func (result i32))) - (import "env" "memory" (memory $mimport$0 1 1)) - (func $0 (type $0) (result i32) - (i32.load offset=13 - (i32.const 37) - ) - ) -) - diff --git a/test/memory-import64.wast b/test/memory-import64.wast deleted file mode 100644 index f84f394e7..000000000 --- a/test/memory-import64.wast +++ /dev/null @@ -1,9 +0,0 @@ -(module - (type $0 (func (result i32))) - (import "env" "memory" (memory $0 i64 1 1)) - (func $foo (type $0) (result i32) - (i32.load offset=13 - (i64.const 37) - ) - ) -) diff --git a/test/memory-import64.wast.from-wast b/test/memory-import64.wast.from-wast deleted file mode 100644 index cad69d49b..000000000 --- a/test/memory-import64.wast.from-wast +++ /dev/null @@ -1,9 +0,0 @@ -(module - (type $0 (func (result i32))) - (import "env" "memory" (memory $0 i64 1 1)) - (func $foo (type $0) (result i32) - (i32.load offset=13 - (i64.const 37) - ) - ) -) diff --git a/test/memory-import64.wast.fromBinary b/test/memory-import64.wast.fromBinary deleted file mode 100644 index dca6e27b6..000000000 --- a/test/memory-import64.wast.fromBinary +++ /dev/null @@ -1,10 +0,0 @@ -(module - (type $0 (func (result i32))) - (import "env" "memory" (memory $0 i64 1 1)) - (func $foo (type $0) (result i32) - (i32.load offset=13 - (i64.const 37) - ) - ) -) - diff --git a/test/memory-import64.wast.fromBinary.noDebugInfo b/test/memory-import64.wast.fromBinary.noDebugInfo deleted file mode 100644 index 1ceb12ec9..000000000 --- a/test/memory-import64.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,10 +0,0 @@ -(module - (type $0 (func (result i32))) - (import "env" "memory" (memory $mimport$0 i64 1 1)) - (func $0 (type $0) (result i32) - (i32.load offset=13 - (i64.const 37) - ) - ) -) - diff --git a/test/memory-shared.wast b/test/memory-shared.wast deleted file mode 100644 index ee02979b1..000000000 --- a/test/memory-shared.wast +++ /dev/null @@ -1,3 +0,0 @@ -(module - (memory $0 (shared 23 256)) -) diff --git a/test/memory-shared.wast.from-wast b/test/memory-shared.wast.from-wast deleted file mode 100644 index ee02979b1..000000000 --- a/test/memory-shared.wast.from-wast +++ /dev/null @@ -1,3 +0,0 @@ -(module - (memory $0 (shared 23 256)) -) diff --git a/test/memory-shared.wast.fromBinary b/test/memory-shared.wast.fromBinary deleted file mode 100644 index ea904d085..000000000 --- a/test/memory-shared.wast.fromBinary +++ /dev/null @@ -1,4 +0,0 @@ -(module - (memory $0 (shared 23 256)) -) - diff --git a/test/memory-shared.wast.fromBinary.noDebugInfo b/test/memory-shared.wast.fromBinary.noDebugInfo deleted file mode 100644 index ea904d085..000000000 --- a/test/memory-shared.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,4 +0,0 @@ -(module - (memory $0 (shared 23 256)) -) - diff --git a/test/min.wast b/test/min.wast deleted file mode 100644 index 4efd4608b..000000000 --- a/test/min.wast +++ /dev/null @@ -1,57 +0,0 @@ -(module - (type $0 (func (param f32) (result f32))) - (type $1 (func (param i32 i32) (result f32))) - (type $2 (func (param i32) (result i32))) - (type $3 (func (param i32 i32 i32) (result i32))) - (memory $0 256 256) - (export "floats" (func $floats)) - (func $floats (type $0) (param $f f32) (result f32) - (local $t f32) - (f32.add - (local.get $t) - (local.get $f) - ) - ) - (func $neg (type $1) (param $k i32) (param $p i32) (result f32) - (local $n f32) - (local.tee $n - (f32.neg - (block $block0 (result f32) - (i32.store - (local.get $k) - (local.get $p) - ) - (f32.load - (local.get $k) - ) - ) - ) - ) - ) - (func $littleswitch (type $2) (param $x i32) (result i32) - (block $topmost (result i32) - (block $switch-case$2 - (block $switch-case$1 - (br_table $switch-case$1 $switch-case$2 $switch-case$1 - (i32.sub - (local.get $x) - (i32.const 1) - ) - ) - ) - (br $topmost - (i32.const 1) - ) - ) - (br $topmost - (i32.const 2) - ) - (i32.const 0) - ) - ) - (func $f1 (type $3) (param $i1 i32) (param $i2 i32) (param $i3 i32) (result i32) - (block $topmost (result i32) - (local.get $i3) - ) - ) -) diff --git a/test/min.wast.from-wast b/test/min.wast.from-wast deleted file mode 100644 index d8de52edd..000000000 --- a/test/min.wast.from-wast +++ /dev/null @@ -1,57 +0,0 @@ -(module - (type $0 (func (param f32) (result f32))) - (type $1 (func (param i32 i32) (result f32))) - (type $2 (func (param i32) (result i32))) - (type $3 (func (param i32 i32 i32) (result i32))) - (memory $0 256 256) - (export "floats" (func $floats)) - (func $floats (type $0) (param $f f32) (result f32) - (local $t f32) - (f32.add - (local.get $t) - (local.get $f) - ) - ) - (func $neg (type $1) (param $k i32) (param $p i32) (result f32) - (local $n f32) - (local.tee $n - (f32.neg - (block $block0 (result f32) - (i32.store - (local.get $k) - (local.get $p) - ) - (f32.load - (local.get $k) - ) - ) - ) - ) - ) - (func $littleswitch (type $2) (param $x i32) (result i32) - (block $topmost (result i32) - (block $switch-case$2 - (block $switch-case$1 - (br_table $switch-case$1 $switch-case$2 $switch-case$1 - (i32.sub - (local.get $x) - (i32.const 1) - ) - ) - ) - (br $topmost - (i32.const 1) - ) - ) - (br $topmost - (i32.const 2) - ) - (i32.const 0) - ) - ) - (func $f1 (type $3) (param $i1 i32) (param $i2 i32) (param $i3 i32) (result i32) - (block $topmost (result i32) - (local.get $i3) - ) - ) -) diff --git a/test/min.wast.fromBinary b/test/min.wast.fromBinary deleted file mode 100644 index ca4d197f6..000000000 --- a/test/min.wast.fromBinary +++ /dev/null @@ -1,55 +0,0 @@ -(module - (type $0 (func (param f32) (result f32))) - (type $1 (func (param i32 i32) (result f32))) - (type $2 (func (param i32) (result i32))) - (type $3 (func (param i32 i32 i32) (result i32))) - (memory $0 256 256) - (export "floats" (func $floats)) - (func $floats (type $0) (param $f f32) (result f32) - (local $t f32) - (f32.add - (local.get $t) - (local.get $f) - ) - ) - (func $neg (type $1) (param $k i32) (param $p i32) (result f32) - (local $n f32) - (local.tee $n - (f32.neg - (block $label$1 (result f32) - (i32.store - (local.get $k) - (local.get $p) - ) - (f32.load - (local.get $k) - ) - ) - ) - ) - ) - (func $littleswitch (type $2) (param $x i32) (result i32) - (block $label$1 (result i32) - (block $label$2 - (block $label$3 - (br_table $label$3 $label$2 $label$3 - (i32.sub - (local.get $x) - (i32.const 1) - ) - ) - ) - (br $label$1 - (i32.const 1) - ) - ) - (br $label$1 - (i32.const 2) - ) - ) - ) - (func $f1 (type $3) (param $i1 i32) (param $i2 i32) (param $i3 i32) (result i32) - (local.get $i3) - ) -) - diff --git a/test/min.wast.fromBinary.noDebugInfo b/test/min.wast.fromBinary.noDebugInfo deleted file mode 100644 index 218526339..000000000 --- a/test/min.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,55 +0,0 @@ -(module - (type $0 (func (param f32) (result f32))) - (type $1 (func (param i32 i32) (result f32))) - (type $2 (func (param i32) (result i32))) - (type $3 (func (param i32 i32 i32) (result i32))) - (memory $0 256 256) - (export "floats" (func $0)) - (func $0 (type $0) (param $0 f32) (result f32) - (local $1 f32) - (f32.add - (local.get $1) - (local.get $0) - ) - ) - (func $1 (type $1) (param $0 i32) (param $1 i32) (result f32) - (local $2 f32) - (local.tee $2 - (f32.neg - (block $label$1 (result f32) - (i32.store - (local.get $0) - (local.get $1) - ) - (f32.load - (local.get $0) - ) - ) - ) - ) - ) - (func $2 (type $2) (param $0 i32) (result i32) - (block $label$1 (result i32) - (block $label$2 - (block $label$3 - (br_table $label$3 $label$2 $label$3 - (i32.sub - (local.get $0) - (i32.const 1) - ) - ) - ) - (br $label$1 - (i32.const 1) - ) - ) - (br $label$1 - (i32.const 2) - ) - ) - ) - (func $3 (type $3) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local.get $2) - ) -) - diff --git a/test/multi-memories-atomics64.wast b/test/multi-memories-atomics64.wast deleted file mode 100644 index 565a5e63a..000000000 --- a/test/multi-memories-atomics64.wast +++ /dev/null @@ -1,352 +0,0 @@ -(module - (type $0 (func)) - (memory $appMemory (shared i64 23 256)) - (memory $dataMemory (shared i64 23 256)) - (memory $instrumentMemory (shared i64 23 256)) - (func $atomic-loadstore - (local $0 i64) - (local $1 i64) - (local $2 i32) - (drop - (i32.atomic.load8_u $appMemory offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load8_u $appMemory offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load16_u $dataMemory offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load16_u $instrumentMemory offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load $dataMemory offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load $appMemory offset=4 - (local.get $0) - ) - ) - (drop - (i64.atomic.load8_u $appMemory - (local.get $0) - ) - ) - (drop - (i64.atomic.load8_u $dataMemory - (local.get $0) - ) - ) - (drop - (i64.atomic.load16_u $appMemory - (local.get $0) - ) - ) - (drop - (i64.atomic.load16_u $appMemory - (local.get $0) - ) - ) - (drop - (i64.atomic.load32_u $instrumentMemory - (local.get $0) - ) - ) - (drop - (i64.atomic.load32_u $appMemory - (local.get $0) - ) - ) - (drop - (i64.atomic.load $appMemory - (local.get $0) - ) - ) - (drop - (i64.atomic.load $instrumentMemory - (local.get $0) - ) - ) - (i32.atomic.store $appMemory offset=4 - (local.get $0) - (local.get $2) - ) - (i32.atomic.store $appMemory offset=4 - (local.get $0) - (local.get $2) - ) - (i32.atomic.store8 $instrumentMemory offset=4 - (local.get $0) - (local.get $2) - ) - (i32.atomic.store8 $dataMemory offset=4 - (local.get $0) - (local.get $2) - ) - (i32.atomic.store16 $appMemory offset=4 - (local.get $0) - (local.get $2) - ) - (i32.atomic.store16 $dataMemory offset=4 - (local.get $0) - (local.get $2) - ) - (i64.atomic.store $appMemory offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store $appMemory offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store8 $dataMemory offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store8 $instrumentMemory offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store16 $appMemory offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store16 $appMemory offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store32 $instrumentMemory offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store32 $dataMemory offset=4 - (local.get $0) - (local.get $1) - ) - ) - (func $atomic-rmw - (local $0 i64) - (local $1 i64) - (local $2 i32) - (drop - (i32.atomic.rmw.add $dataMemory offset=4 - (local.get $0) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw.add $instrumentMemory offset=4 - (local.get $0) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw8.add_u $appMemory offset=4 - (local.get $0) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw8.add_u $appMemory offset=4 - (local.get $0) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw16.and_u $dataMemory - (local.get $0) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw16.and_u $instrumentMemory - (local.get $0) - (local.get $2) - ) - ) - (drop - (i64.atomic.rmw32.or_u $appMemory - (local.get $0) - (local.get $1) - ) - ) - (drop - (i64.atomic.rmw32.or_u $appMemory - (local.get $0) - (local.get $1) - ) - ) - (drop - (i32.atomic.rmw8.xchg_u $appMemory - (local.get $0) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw8.xchg_u $dataMemory - (local.get $0) - (local.get $2) - ) - ) - ) - (func $atomic-cmpxchg - (local $0 i64) - (local $1 i64) - (local $2 i32) - (drop - (i32.atomic.rmw.cmpxchg $appMemory offset=4 - (local.get $0) - (local.get $2) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw.cmpxchg $instrumentMemory offset=4 - (local.get $0) - (local.get $2) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw8.cmpxchg_u $appMemory - (local.get $0) - (local.get $2) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw8.cmpxchg_u $appMemory - (local.get $0) - (local.get $2) - (local.get $2) - ) - ) - (drop - (i64.atomic.rmw.cmpxchg $appMemory offset=4 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (i64.atomic.rmw.cmpxchg $dataMemory offset=4 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (i64.atomic.rmw32.cmpxchg_u $instrumentMemory - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (i64.atomic.rmw32.cmpxchg_u $dataMemory - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - ) - (func $atomic-wait-notify - (local $0 i64) - (local $1 i64) - (local $2 i32) - (drop - (memory.atomic.wait32 $dataMemory - (local.get $0) - (local.get $2) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait32 $instrumentMemory - (local.get $0) - (local.get $2) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait32 $appMemory offset=4 - (local.get $0) - (local.get $2) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait32 $instrumentMemory offset=4 - (local.get $0) - (local.get $2) - (local.get $1) - ) - ) - (drop - (memory.atomic.notify $dataMemory - (local.get $0) - (local.get $2) - ) - ) - (drop - (memory.atomic.notify $dataMemory - (local.get $0) - (local.get $2) - ) - ) - (drop - (memory.atomic.notify $appMemory offset=24 - (local.get $0) - (local.get $2) - ) - ) - (drop - (memory.atomic.notify $dataMemory offset=24 - (local.get $0) - (local.get $2) - ) - ) - (drop - (memory.atomic.wait64 $instrumentMemory - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait64 $instrumentMemory - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait64 $appMemory offset=16 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait64 $appMemory offset=16 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - ) - (func $atomic-fence - (atomic.fence) - ) -) - diff --git a/test/multi-memories-atomics64.wast.from-wast b/test/multi-memories-atomics64.wast.from-wast deleted file mode 100644 index 433602f8e..000000000 --- a/test/multi-memories-atomics64.wast.from-wast +++ /dev/null @@ -1,351 +0,0 @@ -(module - (type $0 (func)) - (memory $appMemory (shared i64 23 256)) - (memory $dataMemory (shared i64 23 256)) - (memory $instrumentMemory (shared i64 23 256)) - (func $atomic-loadstore (type $0) - (local $0 i64) - (local $1 i64) - (local $2 i32) - (drop - (i32.atomic.load8_u $appMemory offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load8_u $appMemory offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load16_u $dataMemory offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load16_u $instrumentMemory offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load $dataMemory offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load $appMemory offset=4 - (local.get $0) - ) - ) - (drop - (i64.atomic.load8_u $appMemory - (local.get $0) - ) - ) - (drop - (i64.atomic.load8_u $dataMemory - (local.get $0) - ) - ) - (drop - (i64.atomic.load16_u $appMemory - (local.get $0) - ) - ) - (drop - (i64.atomic.load16_u $appMemory - (local.get $0) - ) - ) - (drop - (i64.atomic.load32_u $instrumentMemory - (local.get $0) - ) - ) - (drop - (i64.atomic.load32_u $appMemory - (local.get $0) - ) - ) - (drop - (i64.atomic.load $appMemory - (local.get $0) - ) - ) - (drop - (i64.atomic.load $instrumentMemory - (local.get $0) - ) - ) - (i32.atomic.store $appMemory offset=4 - (local.get $0) - (local.get $2) - ) - (i32.atomic.store $appMemory offset=4 - (local.get $0) - (local.get $2) - ) - (i32.atomic.store8 $instrumentMemory offset=4 - (local.get $0) - (local.get $2) - ) - (i32.atomic.store8 $dataMemory offset=4 - (local.get $0) - (local.get $2) - ) - (i32.atomic.store16 $appMemory offset=4 - (local.get $0) - (local.get $2) - ) - (i32.atomic.store16 $dataMemory offset=4 - (local.get $0) - (local.get $2) - ) - (i64.atomic.store $appMemory offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store $appMemory offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store8 $dataMemory offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store8 $instrumentMemory offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store16 $appMemory offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store16 $appMemory offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store32 $instrumentMemory offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store32 $dataMemory offset=4 - (local.get $0) - (local.get $1) - ) - ) - (func $atomic-rmw (type $0) - (local $0 i64) - (local $1 i64) - (local $2 i32) - (drop - (i32.atomic.rmw.add $dataMemory offset=4 - (local.get $0) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw.add $instrumentMemory offset=4 - (local.get $0) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw8.add_u $appMemory offset=4 - (local.get $0) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw8.add_u $appMemory offset=4 - (local.get $0) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw16.and_u $dataMemory - (local.get $0) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw16.and_u $instrumentMemory - (local.get $0) - (local.get $2) - ) - ) - (drop - (i64.atomic.rmw32.or_u $appMemory - (local.get $0) - (local.get $1) - ) - ) - (drop - (i64.atomic.rmw32.or_u $appMemory - (local.get $0) - (local.get $1) - ) - ) - (drop - (i32.atomic.rmw8.xchg_u $appMemory - (local.get $0) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw8.xchg_u $dataMemory - (local.get $0) - (local.get $2) - ) - ) - ) - (func $atomic-cmpxchg (type $0) - (local $0 i64) - (local $1 i64) - (local $2 i32) - (drop - (i32.atomic.rmw.cmpxchg $appMemory offset=4 - (local.get $0) - (local.get $2) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw.cmpxchg $instrumentMemory offset=4 - (local.get $0) - (local.get $2) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw8.cmpxchg_u $appMemory - (local.get $0) - (local.get $2) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw8.cmpxchg_u $appMemory - (local.get $0) - (local.get $2) - (local.get $2) - ) - ) - (drop - (i64.atomic.rmw.cmpxchg $appMemory offset=4 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (i64.atomic.rmw.cmpxchg $dataMemory offset=4 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (i64.atomic.rmw32.cmpxchg_u $instrumentMemory - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (i64.atomic.rmw32.cmpxchg_u $dataMemory - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - ) - (func $atomic-wait-notify (type $0) - (local $0 i64) - (local $1 i64) - (local $2 i32) - (drop - (memory.atomic.wait32 $dataMemory - (local.get $0) - (local.get $2) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait32 $instrumentMemory - (local.get $0) - (local.get $2) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait32 $appMemory offset=4 - (local.get $0) - (local.get $2) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait32 $instrumentMemory offset=4 - (local.get $0) - (local.get $2) - (local.get $1) - ) - ) - (drop - (memory.atomic.notify $dataMemory - (local.get $0) - (local.get $2) - ) - ) - (drop - (memory.atomic.notify $dataMemory - (local.get $0) - (local.get $2) - ) - ) - (drop - (memory.atomic.notify $appMemory offset=24 - (local.get $0) - (local.get $2) - ) - ) - (drop - (memory.atomic.notify $dataMemory offset=24 - (local.get $0) - (local.get $2) - ) - ) - (drop - (memory.atomic.wait64 $instrumentMemory - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait64 $instrumentMemory - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait64 $appMemory offset=16 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait64 $appMemory offset=16 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - ) - (func $atomic-fence (type $0) - (atomic.fence) - ) -) diff --git a/test/multi-memories-atomics64.wast.fromBinary b/test/multi-memories-atomics64.wast.fromBinary deleted file mode 100644 index 2fa4dfd32..000000000 --- a/test/multi-memories-atomics64.wast.fromBinary +++ /dev/null @@ -1,352 +0,0 @@ -(module - (type $0 (func)) - (memory $appMemory (shared i64 23 256)) - (memory $dataMemory (shared i64 23 256)) - (memory $instrumentMemory (shared i64 23 256)) - (func $atomic-loadstore (type $0) - (local $0 i64) - (local $1 i64) - (local $2 i32) - (drop - (i32.atomic.load8_u $appMemory offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load8_u $appMemory offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load16_u $dataMemory offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load16_u $instrumentMemory offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load $dataMemory offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load $appMemory offset=4 - (local.get $0) - ) - ) - (drop - (i64.atomic.load8_u $appMemory - (local.get $0) - ) - ) - (drop - (i64.atomic.load8_u $dataMemory - (local.get $0) - ) - ) - (drop - (i64.atomic.load16_u $appMemory - (local.get $0) - ) - ) - (drop - (i64.atomic.load16_u $appMemory - (local.get $0) - ) - ) - (drop - (i64.atomic.load32_u $instrumentMemory - (local.get $0) - ) - ) - (drop - (i64.atomic.load32_u $appMemory - (local.get $0) - ) - ) - (drop - (i64.atomic.load $appMemory - (local.get $0) - ) - ) - (drop - (i64.atomic.load $instrumentMemory - (local.get $0) - ) - ) - (i32.atomic.store $appMemory offset=4 - (local.get $0) - (local.get $2) - ) - (i32.atomic.store $appMemory offset=4 - (local.get $0) - (local.get $2) - ) - (i32.atomic.store8 $instrumentMemory offset=4 - (local.get $0) - (local.get $2) - ) - (i32.atomic.store8 $dataMemory offset=4 - (local.get $0) - (local.get $2) - ) - (i32.atomic.store16 $appMemory offset=4 - (local.get $0) - (local.get $2) - ) - (i32.atomic.store16 $dataMemory offset=4 - (local.get $0) - (local.get $2) - ) - (i64.atomic.store $appMemory offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store $appMemory offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store8 $dataMemory offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store8 $instrumentMemory offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store16 $appMemory offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store16 $appMemory offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store32 $instrumentMemory offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store32 $dataMemory offset=4 - (local.get $0) - (local.get $1) - ) - ) - (func $atomic-rmw (type $0) - (local $0 i64) - (local $1 i64) - (local $2 i32) - (drop - (i32.atomic.rmw.add $dataMemory offset=4 - (local.get $0) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw.add $instrumentMemory offset=4 - (local.get $0) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw8.add_u $appMemory offset=4 - (local.get $0) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw8.add_u $appMemory offset=4 - (local.get $0) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw16.and_u $dataMemory - (local.get $0) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw16.and_u $instrumentMemory - (local.get $0) - (local.get $2) - ) - ) - (drop - (i64.atomic.rmw32.or_u $appMemory - (local.get $0) - (local.get $1) - ) - ) - (drop - (i64.atomic.rmw32.or_u $appMemory - (local.get $0) - (local.get $1) - ) - ) - (drop - (i32.atomic.rmw8.xchg_u $appMemory - (local.get $0) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw8.xchg_u $dataMemory - (local.get $0) - (local.get $2) - ) - ) - ) - (func $atomic-cmpxchg (type $0) - (local $0 i64) - (local $1 i64) - (local $2 i32) - (drop - (i32.atomic.rmw.cmpxchg $appMemory offset=4 - (local.get $0) - (local.get $2) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw.cmpxchg $instrumentMemory offset=4 - (local.get $0) - (local.get $2) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw8.cmpxchg_u $appMemory - (local.get $0) - (local.get $2) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw8.cmpxchg_u $appMemory - (local.get $0) - (local.get $2) - (local.get $2) - ) - ) - (drop - (i64.atomic.rmw.cmpxchg $appMemory offset=4 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (i64.atomic.rmw.cmpxchg $dataMemory offset=4 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (i64.atomic.rmw32.cmpxchg_u $instrumentMemory - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (i64.atomic.rmw32.cmpxchg_u $dataMemory - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - ) - (func $atomic-wait-notify (type $0) - (local $0 i64) - (local $1 i64) - (local $2 i32) - (drop - (memory.atomic.wait32 $dataMemory - (local.get $0) - (local.get $2) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait32 $instrumentMemory - (local.get $0) - (local.get $2) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait32 $appMemory offset=4 - (local.get $0) - (local.get $2) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait32 $instrumentMemory offset=4 - (local.get $0) - (local.get $2) - (local.get $1) - ) - ) - (drop - (memory.atomic.notify $dataMemory - (local.get $0) - (local.get $2) - ) - ) - (drop - (memory.atomic.notify $dataMemory - (local.get $0) - (local.get $2) - ) - ) - (drop - (memory.atomic.notify $appMemory offset=24 - (local.get $0) - (local.get $2) - ) - ) - (drop - (memory.atomic.notify $dataMemory offset=24 - (local.get $0) - (local.get $2) - ) - ) - (drop - (memory.atomic.wait64 $instrumentMemory - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait64 $instrumentMemory - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait64 $appMemory offset=16 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait64 $appMemory offset=16 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - ) - (func $atomic-fence (type $0) - (atomic.fence) - ) -) - diff --git a/test/multi-memories-atomics64.wast.fromBinary.noDebugInfo b/test/multi-memories-atomics64.wast.fromBinary.noDebugInfo deleted file mode 100644 index 01ba922f7..000000000 --- a/test/multi-memories-atomics64.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,352 +0,0 @@ -(module - (type $0 (func)) - (memory $0 (shared i64 23 256)) - (memory $1 (shared i64 23 256)) - (memory $2 (shared i64 23 256)) - (func $0 (type $0) - (local $0 i64) - (local $1 i64) - (local $2 i32) - (drop - (i32.atomic.load8_u $0 offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load8_u $0 offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load16_u $1 offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load16_u $2 offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load $1 offset=4 - (local.get $0) - ) - ) - (drop - (i32.atomic.load $0 offset=4 - (local.get $0) - ) - ) - (drop - (i64.atomic.load8_u $0 - (local.get $0) - ) - ) - (drop - (i64.atomic.load8_u $1 - (local.get $0) - ) - ) - (drop - (i64.atomic.load16_u $0 - (local.get $0) - ) - ) - (drop - (i64.atomic.load16_u $0 - (local.get $0) - ) - ) - (drop - (i64.atomic.load32_u $2 - (local.get $0) - ) - ) - (drop - (i64.atomic.load32_u $0 - (local.get $0) - ) - ) - (drop - (i64.atomic.load $0 - (local.get $0) - ) - ) - (drop - (i64.atomic.load $2 - (local.get $0) - ) - ) - (i32.atomic.store $0 offset=4 - (local.get $0) - (local.get $2) - ) - (i32.atomic.store $0 offset=4 - (local.get $0) - (local.get $2) - ) - (i32.atomic.store8 $2 offset=4 - (local.get $0) - (local.get $2) - ) - (i32.atomic.store8 $1 offset=4 - (local.get $0) - (local.get $2) - ) - (i32.atomic.store16 $0 offset=4 - (local.get $0) - (local.get $2) - ) - (i32.atomic.store16 $1 offset=4 - (local.get $0) - (local.get $2) - ) - (i64.atomic.store $0 offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store $0 offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store8 $1 offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store8 $2 offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store16 $0 offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store16 $0 offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store32 $2 offset=4 - (local.get $0) - (local.get $1) - ) - (i64.atomic.store32 $1 offset=4 - (local.get $0) - (local.get $1) - ) - ) - (func $1 (type $0) - (local $0 i64) - (local $1 i64) - (local $2 i32) - (drop - (i32.atomic.rmw.add $1 offset=4 - (local.get $0) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw.add $2 offset=4 - (local.get $0) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw8.add_u $0 offset=4 - (local.get $0) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw8.add_u $0 offset=4 - (local.get $0) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw16.and_u $1 - (local.get $0) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw16.and_u $2 - (local.get $0) - (local.get $2) - ) - ) - (drop - (i64.atomic.rmw32.or_u $0 - (local.get $0) - (local.get $1) - ) - ) - (drop - (i64.atomic.rmw32.or_u $0 - (local.get $0) - (local.get $1) - ) - ) - (drop - (i32.atomic.rmw8.xchg_u $0 - (local.get $0) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw8.xchg_u $1 - (local.get $0) - (local.get $2) - ) - ) - ) - (func $2 (type $0) - (local $0 i64) - (local $1 i64) - (local $2 i32) - (drop - (i32.atomic.rmw.cmpxchg $0 offset=4 - (local.get $0) - (local.get $2) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw.cmpxchg $2 offset=4 - (local.get $0) - (local.get $2) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw8.cmpxchg_u $0 - (local.get $0) - (local.get $2) - (local.get $2) - ) - ) - (drop - (i32.atomic.rmw8.cmpxchg_u $0 - (local.get $0) - (local.get $2) - (local.get $2) - ) - ) - (drop - (i64.atomic.rmw.cmpxchg $0 offset=4 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (i64.atomic.rmw.cmpxchg $1 offset=4 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (i64.atomic.rmw32.cmpxchg_u $2 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (i64.atomic.rmw32.cmpxchg_u $1 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - ) - (func $3 (type $0) - (local $0 i64) - (local $1 i64) - (local $2 i32) - (drop - (memory.atomic.wait32 $1 - (local.get $0) - (local.get $2) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait32 $2 - (local.get $0) - (local.get $2) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait32 $0 offset=4 - (local.get $0) - (local.get $2) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait32 $2 offset=4 - (local.get $0) - (local.get $2) - (local.get $1) - ) - ) - (drop - (memory.atomic.notify $1 - (local.get $0) - (local.get $2) - ) - ) - (drop - (memory.atomic.notify $1 - (local.get $0) - (local.get $2) - ) - ) - (drop - (memory.atomic.notify $0 offset=24 - (local.get $0) - (local.get $2) - ) - ) - (drop - (memory.atomic.notify $1 offset=24 - (local.get $0) - (local.get $2) - ) - ) - (drop - (memory.atomic.wait64 $2 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait64 $2 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait64 $0 offset=16 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - (drop - (memory.atomic.wait64 $0 offset=16 - (local.get $0) - (local.get $1) - (local.get $1) - ) - ) - ) - (func $4 (type $0) - (atomic.fence) - ) -) - diff --git a/test/multi-memories-basics.wast b/test/multi-memories-basics.wast deleted file mode 100644 index 62b926531..000000000 --- a/test/multi-memories-basics.wast +++ /dev/null @@ -1,117 +0,0 @@ -(module - (type $none_=>_none (func)) - (type $none_=>_i32 (func (result i32))) - (import "env" "memory" (memory $importedMemory 1 1)) - (memory $memory1 1 500) - (memory $memory2 1 800) - (memory $memory3 1 400) - (data (i32.const 0) "abcd") - (func $memory.fill - (memory.fill $memory2 - (i32.const 0) - (i32.const 1) - (i32.const 2) - ) - ) - (func $memory.copy - (memory.copy $memory2 $memory3 - (i32.const 512) - (i32.const 0) - (i32.const 12) - ) - ) - (func $memory.init - (memory.init $memory1 0 - (i32.const 0) - (i32.const 0) - (i32.const 45) - ) - ) - (func $memory.grow (result i32) - (memory.grow $memory3 - (i32.const 10) - ) - ) - (func $memory.size (result i32) - (memory.size $memory3) - ) - (func $loads - (drop - (i32.load $memory1 - (i32.const 12) - ) - ) - (drop - (i32.load $memory3 - (i32.const 12) - ) - ) - (drop - (i32.load16_s $memory2 - (i32.const 12) - ) - ) - (drop - (i32.load16_s $memory2 - (i32.const 12) - ) - ) - (drop - (i32.load8_s $memory3 - (i32.const 12) - ) - ) - (drop - (i32.load8_s $memory3 - (i32.const 12) - ) - ) - (drop - (i32.load16_u $memory1 - (i32.const 12) - ) - ) - (drop - (i32.load16_u $memory1 - (i32.const 12) - ) - ) - (drop - (i32.load8_u $memory2 - (i32.const 12) - ) - ) - (drop - (i32.load8_u $memory2 - (i32.const 12) - ) - ) - ) - (func $stores - (i32.store $memory1 - (i32.const 12) - (i32.const 115) - ) - (i32.store $memory1 - (i32.const 12) - (i32.const 115) - ) - (i32.store16 $memory2 - (i32.const 20) - (i32.const 31353) - ) - (i32.store16 $importedMemory - (i32.const 20) - (i32.const 31353) - ) - (i32.store8 $memory3 - (i32.const 23) - (i32.const 120) - ) - (i32.store8 $memory3 - (i32.const 23) - (i32.const 120) - ) - ) -) - diff --git a/test/multi-memories-basics.wast.from-wast b/test/multi-memories-basics.wast.from-wast deleted file mode 100644 index 68a12858e..000000000 --- a/test/multi-memories-basics.wast.from-wast +++ /dev/null @@ -1,116 +0,0 @@ -(module - (type $none_=>_none (func)) - (type $none_=>_i32 (func (result i32))) - (import "env" "memory" (memory $importedMemory 1 1)) - (memory $memory1 1 500) - (memory $memory2 1 800) - (memory $memory3 1 400) - (data $0 (i32.const 0) "abcd") - (func $memory.fill (type $none_=>_none) - (memory.fill $memory2 - (i32.const 0) - (i32.const 1) - (i32.const 2) - ) - ) - (func $memory.copy (type $none_=>_none) - (memory.copy $memory2 $memory3 - (i32.const 512) - (i32.const 0) - (i32.const 12) - ) - ) - (func $memory.init (type $none_=>_none) - (memory.init $memory1 $0 - (i32.const 0) - (i32.const 0) - (i32.const 45) - ) - ) - (func $memory.grow (type $none_=>_i32) (result i32) - (memory.grow $memory3 - (i32.const 10) - ) - ) - (func $memory.size (type $none_=>_i32) (result i32) - (memory.size $memory3) - ) - (func $loads (type $none_=>_none) - (drop - (i32.load $memory1 - (i32.const 12) - ) - ) - (drop - (i32.load $memory3 - (i32.const 12) - ) - ) - (drop - (i32.load16_s $memory2 - (i32.const 12) - ) - ) - (drop - (i32.load16_s $memory2 - (i32.const 12) - ) - ) - (drop - (i32.load8_s $memory3 - (i32.const 12) - ) - ) - (drop - (i32.load8_s $memory3 - (i32.const 12) - ) - ) - (drop - (i32.load16_u $memory1 - (i32.const 12) - ) - ) - (drop - (i32.load16_u $memory1 - (i32.const 12) - ) - ) - (drop - (i32.load8_u $memory2 - (i32.const 12) - ) - ) - (drop - (i32.load8_u $memory2 - (i32.const 12) - ) - ) - ) - (func $stores (type $none_=>_none) - (i32.store $memory1 - (i32.const 12) - (i32.const 115) - ) - (i32.store $memory1 - (i32.const 12) - (i32.const 115) - ) - (i32.store16 $memory2 - (i32.const 20) - (i32.const 31353) - ) - (i32.store16 $importedMemory - (i32.const 20) - (i32.const 31353) - ) - (i32.store8 $memory3 - (i32.const 23) - (i32.const 120) - ) - (i32.store8 $memory3 - (i32.const 23) - (i32.const 120) - ) - ) -) diff --git a/test/multi-memories-basics.wast.fromBinary b/test/multi-memories-basics.wast.fromBinary deleted file mode 100644 index 7ce313b82..000000000 --- a/test/multi-memories-basics.wast.fromBinary +++ /dev/null @@ -1,117 +0,0 @@ -(module - (type $none_=>_none (func)) - (type $none_=>_i32 (func (result i32))) - (import "env" "memory" (memory $importedMemory 1 1)) - (memory $memory1 1 500) - (memory $memory2 1 800) - (memory $memory3 1 400) - (data $0 (i32.const 0) "abcd") - (func $memory.fill (type $none_=>_none) - (memory.fill $memory2 - (i32.const 0) - (i32.const 1) - (i32.const 2) - ) - ) - (func $memory.copy (type $none_=>_none) - (memory.copy $memory2 $memory3 - (i32.const 512) - (i32.const 0) - (i32.const 12) - ) - ) - (func $memory.init (type $none_=>_none) - (memory.init $memory1 $0 - (i32.const 0) - (i32.const 0) - (i32.const 45) - ) - ) - (func $memory.grow (type $none_=>_i32) (result i32) - (memory.grow $memory3 - (i32.const 10) - ) - ) - (func $memory.size (type $none_=>_i32) (result i32) - (memory.size $memory3) - ) - (func $loads (type $none_=>_none) - (drop - (i32.load $memory1 - (i32.const 12) - ) - ) - (drop - (i32.load $memory3 - (i32.const 12) - ) - ) - (drop - (i32.load16_s $memory2 - (i32.const 12) - ) - ) - (drop - (i32.load16_s $memory2 - (i32.const 12) - ) - ) - (drop - (i32.load8_s $memory3 - (i32.const 12) - ) - ) - (drop - (i32.load8_s $memory3 - (i32.const 12) - ) - ) - (drop - (i32.load16_u $memory1 - (i32.const 12) - ) - ) - (drop - (i32.load16_u $memory1 - (i32.const 12) - ) - ) - (drop - (i32.load8_u $memory2 - (i32.const 12) - ) - ) - (drop - (i32.load8_u $memory2 - (i32.const 12) - ) - ) - ) - (func $stores (type $none_=>_none) - (i32.store $memory1 - (i32.const 12) - (i32.const 115) - ) - (i32.store $memory1 - (i32.const 12) - (i32.const 115) - ) - (i32.store16 $memory2 - (i32.const 20) - (i32.const 31353) - ) - (i32.store16 $importedMemory - (i32.const 20) - (i32.const 31353) - ) - (i32.store8 $memory3 - (i32.const 23) - (i32.const 120) - ) - (i32.store8 $memory3 - (i32.const 23) - (i32.const 120) - ) - ) -) - diff --git a/test/multi-memories-basics.wast.fromBinary.noDebugInfo b/test/multi-memories-basics.wast.fromBinary.noDebugInfo deleted file mode 100644 index 7401787dc..000000000 --- a/test/multi-memories-basics.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,117 +0,0 @@ -(module - (type $0 (func)) - (type $1 (func (result i32))) - (import "env" "memory" (memory $mimport$0 1 1)) - (memory $0 1 500) - (memory $1 1 800) - (memory $2 1 400) - (data $0 (i32.const 0) "abcd") - (func $0 (type $0) - (memory.fill $1 - (i32.const 0) - (i32.const 1) - (i32.const 2) - ) - ) - (func $1 (type $0) - (memory.copy $1 $2 - (i32.const 512) - (i32.const 0) - (i32.const 12) - ) - ) - (func $2 (type $0) - (memory.init $0 $0 - (i32.const 0) - (i32.const 0) - (i32.const 45) - ) - ) - (func $3 (type $1) (result i32) - (memory.grow $2 - (i32.const 10) - ) - ) - (func $4 (type $1) (result i32) - (memory.size $2) - ) - (func $5 (type $0) - (drop - (i32.load $0 - (i32.const 12) - ) - ) - (drop - (i32.load $2 - (i32.const 12) - ) - ) - (drop - (i32.load16_s $1 - (i32.const 12) - ) - ) - (drop - (i32.load16_s $1 - (i32.const 12) - ) - ) - (drop - (i32.load8_s $2 - (i32.const 12) - ) - ) - (drop - (i32.load8_s $2 - (i32.const 12) - ) - ) - (drop - (i32.load16_u $0 - (i32.const 12) - ) - ) - (drop - (i32.load16_u $0 - (i32.const 12) - ) - ) - (drop - (i32.load8_u $1 - (i32.const 12) - ) - ) - (drop - (i32.load8_u $1 - (i32.const 12) - ) - ) - ) - (func $6 (type $0) - (i32.store $0 - (i32.const 12) - (i32.const 115) - ) - (i32.store $0 - (i32.const 12) - (i32.const 115) - ) - (i32.store16 $1 - (i32.const 20) - (i32.const 31353) - ) - (i32.store16 $mimport$0 - (i32.const 20) - (i32.const 31353) - ) - (i32.store8 $2 - (i32.const 23) - (i32.const 120) - ) - (i32.store8 $2 - (i32.const 23) - (i32.const 120) - ) - ) -) - diff --git a/test/multi-memories-simd.wast b/test/multi-memories-simd.wast deleted file mode 100644 index 48cde73c3..000000000 --- a/test/multi-memories-simd.wast +++ /dev/null @@ -1,320 +0,0 @@ -(module - (type $i32_=>_v128 (func (param i32) (result v128))) - (type $i32_v128_=>_none (func (param i32 v128))) - (type $i32_v128_=>_v128 (func (param i32 v128) (result v128))) - (memory $memorya 1 1) - (memory $memoryb 1 1) - (memory $memoryc 1 1) - (memory $memoryd 1 1) - (func $v128.load (param $0 i32) (result v128) - (v128.load $memorya - (local.get $0) - ) - ) - (func $v128.load2 (param $0 i32) (result v128) - (v128.load $memoryb - (local.get $0) - ) - ) - (func $v128.load8x8_s (param $0 i32) (result v128) - (v128.load8x8_s $memoryc - (local.get $0) - ) - ) - (func $v128.load8x8_s2 (param $0 i32) (result v128) - (v128.load8x8_s $memoryb - (local.get $0) - ) - ) - (func $v128.load8x8_u (param $0 i32) (result v128) - (v128.load8x8_u $memoryd - (local.get $0) - ) - ) - (func $v128.load8x8_u2 (param $0 i32) (result v128) - (v128.load8x8_u $memoryd - (local.get $0) - ) - ) - (func $v128.load16x4_s (param $0 i32) (result v128) - (v128.load16x4_s $memorya - (local.get $0) - ) - ) - (func $v128.load16x4_s2 (param $0 i32) (result v128) - (v128.load16x4_s $memoryb - (local.get $0) - ) - ) - (func $v128.load16x4_u (param $0 i32) (result v128) - (v128.load16x4_u $memorya - (local.get $0) - ) - ) - (func $v128.load16x4_u2 (param $0 i32) (result v128) - (v128.load16x4_u $memorya - (local.get $0) - ) - ) - (func $v128.load32x2_s (param $0 i32) (result v128) - (v128.load32x2_s $memoryc - (local.get $0) - ) - ) - (func $v128.load32x2_s2 (param $0 i32) (result v128) - (v128.load32x2_s $memoryb - (local.get $0) - ) - ) - (func $v128.load32x2_u (param $0 i32) (result v128) - (v128.load32x2_u $memoryb - (local.get $0) - ) - ) - (func $v128.load32x2_u2 (param $0 i32) (result v128) - (v128.load32x2_u $memoryc - (local.get $0) - ) - ) - (func $v128.load8_splat (param $0 i32) (result v128) - (v128.load8_splat $memoryb - (local.get $0) - ) - ) - (func $v128.load8_splat2 (param $0 i32) (result v128) - (v128.load8_splat $memoryb - (local.get $0) - ) - ) - (func $v128.load16_splat (param $0 i32) (result v128) - (v128.load16_splat $memorya - (local.get $0) - ) - ) - (func $v128.load16_splat2 (param $0 i32) (result v128) - (v128.load16_splat $memorya - (local.get $0) - ) - ) - (func $v128.load32_splat (param $0 i32) (result v128) - (v128.load32_splat $memoryb - (local.get $0) - ) - ) - (func $v128.load32_splat2 (param $0 i32) (result v128) - (v128.load32_splat $memoryd - (local.get $0) - ) - ) - (func $v128.load64_splat (param $0 i32) (result v128) - (v128.load64_splat $memoryb - (local.get $0) - ) - ) - (func $v128.load64_splat2 (param $0 i32) (result v128) - (v128.load64_splat $memorya - (local.get $0) - ) - ) - (func $v128.store (param $0 i32) (param $1 v128) - (v128.store $memorya - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store2 (param $0 i32) (param $1 v128) - (v128.store $memoryb - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load8_lane (param $0 i32) (param $1 v128) (result v128) - (v128.load8_lane $memorya 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load8_lane2 (param $0 i32) (param $1 v128) (result v128) - (v128.load8_lane $memoryb 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load16_lane (param $0 i32) (param $1 v128) (result v128) - (v128.load16_lane $memoryb 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load16_lane2 (param $0 i32) (param $1 v128) (result v128) - (v128.load16_lane $memoryd 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load32_lane (param $0 i32) (param $1 v128) (result v128) - (v128.load32_lane $memorya 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load32_lane2 (param $0 i32) (param $1 v128) (result v128) - (v128.load32_lane $memoryb 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load64_lane (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane $memoryd 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load64_lane2 (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane $memoryb 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load64_lane_align (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane $memorya align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load64_lane_align2 (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane $memoryb align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load64_lane_offset (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane $memoryc offset=32 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load64_lane_offset2 (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane $memoryb offset=32 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load64_lane_align_offset (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane $memorya offset=32 align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load64_lane_align_offset2 (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane $memoryd offset=32 align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store8_lane (param $0 i32) (param $1 v128) - (v128.store8_lane $memorya 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store8_lane2 (param $0 i32) (param $1 v128) - (v128.store8_lane $memoryd 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store16_lane (param $0 i32) (param $1 v128) - (v128.store16_lane $memorya 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store16_lane2 (param $0 i32) (param $1 v128) - (v128.store16_lane $memoryb 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store32_lane (param $0 i32) (param $1 v128) - (v128.store32_lane $memoryb 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store32_lane2 (param $0 i32) (param $1 v128) - (v128.store32_lane $memoryc 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store64_lane (param $0 i32) (param $1 v128) - (v128.store64_lane $memoryc 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store64_lane2 (param $0 i32) (param $1 v128) - (v128.store64_lane $memoryb 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store64_lane_align (param $0 i32) (param $1 v128) - (v128.store64_lane $memoryb align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store64_lane_align2 (param $0 i32) (param $1 v128) - (v128.store64_lane $memorya align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store64_lane_offset (param $0 i32) (param $1 v128) - (v128.store64_lane $memoryd offset=32 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store64_lane_offset2 (param $0 i32) (param $1 v128) - (v128.store64_lane $memorya offset=32 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store64_lane_align_offset (param $0 i32) (param $1 v128) - (v128.store64_lane $memoryb offset=32 align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store64_lane_align_offset2 (param $0 i32) (param $1 v128) - (v128.store64_lane $memoryd offset=32 align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load32_zero (param $0 i32) (result v128) - (v128.load32_zero $memorya - (local.get $0) - ) - ) - (func $v128.load32_zero2 (param $0 i32) (result v128) - (v128.load32_zero $memoryb - (local.get $0) - ) - ) - (func $v128.load64_zero (param $0 i32) (result v128) - (v128.load64_zero $memoryb - (local.get $0) - ) - ) - (func $v128.load64_zero2 (param $0 i32) (result v128) - (v128.load64_zero $memoryc - (local.get $0) - ) - ) -) - diff --git a/test/multi-memories-simd.wast.from-wast b/test/multi-memories-simd.wast.from-wast deleted file mode 100644 index e156e8e95..000000000 --- a/test/multi-memories-simd.wast.from-wast +++ /dev/null @@ -1,319 +0,0 @@ -(module - (type $i32_=>_v128 (func (param i32) (result v128))) - (type $i32_v128_=>_none (func (param i32 v128))) - (type $i32_v128_=>_v128 (func (param i32 v128) (result v128))) - (memory $memorya 1 1) - (memory $memoryb 1 1) - (memory $memoryc 1 1) - (memory $memoryd 1 1) - (func $v128.load (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load $memorya - (local.get $0) - ) - ) - (func $v128.load2 (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load $memoryb - (local.get $0) - ) - ) - (func $v128.load8x8_s (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load8x8_s $memoryc - (local.get $0) - ) - ) - (func $v128.load8x8_s2 (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load8x8_s $memoryb - (local.get $0) - ) - ) - (func $v128.load8x8_u (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load8x8_u $memoryd - (local.get $0) - ) - ) - (func $v128.load8x8_u2 (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load8x8_u $memoryd - (local.get $0) - ) - ) - (func $v128.load16x4_s (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load16x4_s $memorya - (local.get $0) - ) - ) - (func $v128.load16x4_s2 (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load16x4_s $memoryb - (local.get $0) - ) - ) - (func $v128.load16x4_u (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load16x4_u $memorya - (local.get $0) - ) - ) - (func $v128.load16x4_u2 (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load16x4_u $memorya - (local.get $0) - ) - ) - (func $v128.load32x2_s (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load32x2_s $memoryc - (local.get $0) - ) - ) - (func $v128.load32x2_s2 (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load32x2_s $memoryb - (local.get $0) - ) - ) - (func $v128.load32x2_u (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load32x2_u $memoryb - (local.get $0) - ) - ) - (func $v128.load32x2_u2 (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load32x2_u $memoryc - (local.get $0) - ) - ) - (func $v128.load8_splat (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load8_splat $memoryb - (local.get $0) - ) - ) - (func $v128.load8_splat2 (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load8_splat $memoryb - (local.get $0) - ) - ) - (func $v128.load16_splat (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load16_splat $memorya - (local.get $0) - ) - ) - (func $v128.load16_splat2 (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load16_splat $memorya - (local.get $0) - ) - ) - (func $v128.load32_splat (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load32_splat $memoryb - (local.get $0) - ) - ) - (func $v128.load32_splat2 (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load32_splat $memoryd - (local.get $0) - ) - ) - (func $v128.load64_splat (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load64_splat $memoryb - (local.get $0) - ) - ) - (func $v128.load64_splat2 (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load64_splat $memorya - (local.get $0) - ) - ) - (func $v128.store (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) - (v128.store $memorya - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store2 (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) - (v128.store $memoryb - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load8_lane (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) - (v128.load8_lane $memorya 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load8_lane2 (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) - (v128.load8_lane $memoryb 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load16_lane (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) - (v128.load16_lane $memoryb 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load16_lane2 (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) - (v128.load16_lane $memoryd 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load32_lane (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) - (v128.load32_lane $memorya 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load32_lane2 (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) - (v128.load32_lane $memoryb 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load64_lane (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane $memoryd 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load64_lane2 (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane $memoryb 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load64_lane_align (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane $memorya align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load64_lane_align2 (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane $memoryb align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load64_lane_offset (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane $memoryc offset=32 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load64_lane_offset2 (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane $memoryb offset=32 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load64_lane_align_offset (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane $memorya offset=32 align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load64_lane_align_offset2 (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane $memoryd offset=32 align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store8_lane (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) - (v128.store8_lane $memorya 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store8_lane2 (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) - (v128.store8_lane $memoryd 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store16_lane (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) - (v128.store16_lane $memorya 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store16_lane2 (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) - (v128.store16_lane $memoryb 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store32_lane (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) - (v128.store32_lane $memoryb 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store32_lane2 (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) - (v128.store32_lane $memoryc 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store64_lane (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) - (v128.store64_lane $memoryc 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store64_lane2 (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) - (v128.store64_lane $memoryb 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store64_lane_align (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) - (v128.store64_lane $memoryb align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store64_lane_align2 (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) - (v128.store64_lane $memorya align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store64_lane_offset (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) - (v128.store64_lane $memoryd offset=32 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store64_lane_offset2 (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) - (v128.store64_lane $memorya offset=32 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store64_lane_align_offset (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) - (v128.store64_lane $memoryb offset=32 align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store64_lane_align_offset2 (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) - (v128.store64_lane $memoryd offset=32 align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load32_zero (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load32_zero $memorya - (local.get $0) - ) - ) - (func $v128.load32_zero2 (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load32_zero $memoryb - (local.get $0) - ) - ) - (func $v128.load64_zero (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load64_zero $memoryb - (local.get $0) - ) - ) - (func $v128.load64_zero2 (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load64_zero $memoryc - (local.get $0) - ) - ) -) diff --git a/test/multi-memories-simd.wast.fromBinary b/test/multi-memories-simd.wast.fromBinary deleted file mode 100644 index 2d64362fd..000000000 --- a/test/multi-memories-simd.wast.fromBinary +++ /dev/null @@ -1,320 +0,0 @@ -(module - (type $i32_=>_v128 (func (param i32) (result v128))) - (type $i32_v128_=>_none (func (param i32 v128))) - (type $i32_v128_=>_v128 (func (param i32 v128) (result v128))) - (memory $memorya 1 1) - (memory $memoryb 1 1) - (memory $memoryc 1 1) - (memory $memoryd 1 1) - (func $v128.load (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load $memorya - (local.get $0) - ) - ) - (func $v128.load2 (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load $memoryb - (local.get $0) - ) - ) - (func $v128.load8x8_s (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load8x8_s $memoryc - (local.get $0) - ) - ) - (func $v128.load8x8_s2 (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load8x8_s $memoryb - (local.get $0) - ) - ) - (func $v128.load8x8_u (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load8x8_u $memoryd - (local.get $0) - ) - ) - (func $v128.load8x8_u2 (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load8x8_u $memoryd - (local.get $0) - ) - ) - (func $v128.load16x4_s (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load16x4_s $memorya - (local.get $0) - ) - ) - (func $v128.load16x4_s2 (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load16x4_s $memoryb - (local.get $0) - ) - ) - (func $v128.load16x4_u (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load16x4_u $memorya - (local.get $0) - ) - ) - (func $v128.load16x4_u2 (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load16x4_u $memorya - (local.get $0) - ) - ) - (func $v128.load32x2_s (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load32x2_s $memoryc - (local.get $0) - ) - ) - (func $v128.load32x2_s2 (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load32x2_s $memoryb - (local.get $0) - ) - ) - (func $v128.load32x2_u (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load32x2_u $memoryb - (local.get $0) - ) - ) - (func $v128.load32x2_u2 (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load32x2_u $memoryc - (local.get $0) - ) - ) - (func $v128.load8_splat (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load8_splat $memoryb - (local.get $0) - ) - ) - (func $v128.load8_splat2 (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load8_splat $memoryb - (local.get $0) - ) - ) - (func $v128.load16_splat (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load16_splat $memorya - (local.get $0) - ) - ) - (func $v128.load16_splat2 (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load16_splat $memorya - (local.get $0) - ) - ) - (func $v128.load32_splat (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load32_splat $memoryb - (local.get $0) - ) - ) - (func $v128.load32_splat2 (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load32_splat $memoryd - (local.get $0) - ) - ) - (func $v128.load64_splat (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load64_splat $memoryb - (local.get $0) - ) - ) - (func $v128.load64_splat2 (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load64_splat $memorya - (local.get $0) - ) - ) - (func $v128.store (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) - (v128.store $memorya - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store2 (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) - (v128.store $memoryb - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load8_lane (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) - (v128.load8_lane $memorya 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load8_lane2 (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) - (v128.load8_lane $memoryb 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load16_lane (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) - (v128.load16_lane $memoryb 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load16_lane2 (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) - (v128.load16_lane $memoryd 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load32_lane (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) - (v128.load32_lane $memorya 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load32_lane2 (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) - (v128.load32_lane $memoryb 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load64_lane (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane $memoryd 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load64_lane2 (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane $memoryb 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load64_lane_align (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane $memorya align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load64_lane_align2 (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane $memoryb align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load64_lane_offset (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane $memoryc offset=32 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load64_lane_offset2 (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane $memoryb offset=32 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load64_lane_align_offset (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane $memorya offset=32 align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load64_lane_align_offset2 (type $i32_v128_=>_v128) (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane $memoryd offset=32 align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store8_lane (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) - (v128.store8_lane $memorya 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store8_lane2 (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) - (v128.store8_lane $memoryd 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store16_lane (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) - (v128.store16_lane $memorya 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store16_lane2 (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) - (v128.store16_lane $memoryb 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store32_lane (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) - (v128.store32_lane $memoryb 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store32_lane2 (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) - (v128.store32_lane $memoryc 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store64_lane (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) - (v128.store64_lane $memoryc 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store64_lane2 (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) - (v128.store64_lane $memoryb 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store64_lane_align (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) - (v128.store64_lane $memoryb align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store64_lane_align2 (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) - (v128.store64_lane $memorya align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store64_lane_offset (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) - (v128.store64_lane $memoryd offset=32 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store64_lane_offset2 (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) - (v128.store64_lane $memorya offset=32 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store64_lane_align_offset (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) - (v128.store64_lane $memoryb offset=32 align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store64_lane_align_offset2 (type $i32_v128_=>_none) (param $0 i32) (param $1 v128) - (v128.store64_lane $memoryd offset=32 align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load32_zero (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load32_zero $memorya - (local.get $0) - ) - ) - (func $v128.load32_zero2 (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load32_zero $memoryb - (local.get $0) - ) - ) - (func $v128.load64_zero (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load64_zero $memoryb - (local.get $0) - ) - ) - (func $v128.load64_zero2 (type $i32_=>_v128) (param $0 i32) (result v128) - (v128.load64_zero $memoryc - (local.get $0) - ) - ) -) - diff --git a/test/multi-memories-simd.wast.fromBinary.noDebugInfo b/test/multi-memories-simd.wast.fromBinary.noDebugInfo deleted file mode 100644 index 3c2609d9a..000000000 --- a/test/multi-memories-simd.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,320 +0,0 @@ -(module - (type $0 (func (param i32) (result v128))) - (type $1 (func (param i32 v128))) - (type $2 (func (param i32 v128) (result v128))) - (memory $0 1 1) - (memory $1 1 1) - (memory $2 1 1) - (memory $3 1 1) - (func $0 (type $0) (param $0 i32) (result v128) - (v128.load $0 - (local.get $0) - ) - ) - (func $1 (type $0) (param $0 i32) (result v128) - (v128.load $1 - (local.get $0) - ) - ) - (func $2 (type $0) (param $0 i32) (result v128) - (v128.load8x8_s $2 - (local.get $0) - ) - ) - (func $3 (type $0) (param $0 i32) (result v128) - (v128.load8x8_s $1 - (local.get $0) - ) - ) - (func $4 (type $0) (param $0 i32) (result v128) - (v128.load8x8_u $3 - (local.get $0) - ) - ) - (func $5 (type $0) (param $0 i32) (result v128) - (v128.load8x8_u $3 - (local.get $0) - ) - ) - (func $6 (type $0) (param $0 i32) (result v128) - (v128.load16x4_s $0 - (local.get $0) - ) - ) - (func $7 (type $0) (param $0 i32) (result v128) - (v128.load16x4_s $1 - (local.get $0) - ) - ) - (func $8 (type $0) (param $0 i32) (result v128) - (v128.load16x4_u $0 - (local.get $0) - ) - ) - (func $9 (type $0) (param $0 i32) (result v128) - (v128.load16x4_u $0 - (local.get $0) - ) - ) - (func $10 (type $0) (param $0 i32) (result v128) - (v128.load32x2_s $2 - (local.get $0) - ) - ) - (func $11 (type $0) (param $0 i32) (result v128) - (v128.load32x2_s $1 - (local.get $0) - ) - ) - (func $12 (type $0) (param $0 i32) (result v128) - (v128.load32x2_u $1 - (local.get $0) - ) - ) - (func $13 (type $0) (param $0 i32) (result v128) - (v128.load32x2_u $2 - (local.get $0) - ) - ) - (func $14 (type $0) (param $0 i32) (result v128) - (v128.load8_splat $1 - (local.get $0) - ) - ) - (func $15 (type $0) (param $0 i32) (result v128) - (v128.load8_splat $1 - (local.get $0) - ) - ) - (func $16 (type $0) (param $0 i32) (result v128) - (v128.load16_splat $0 - (local.get $0) - ) - ) - (func $17 (type $0) (param $0 i32) (result v128) - (v128.load16_splat $0 - (local.get $0) - ) - ) - (func $18 (type $0) (param $0 i32) (result v128) - (v128.load32_splat $1 - (local.get $0) - ) - ) - (func $19 (type $0) (param $0 i32) (result v128) - (v128.load32_splat $3 - (local.get $0) - ) - ) - (func $20 (type $0) (param $0 i32) (result v128) - (v128.load64_splat $1 - (local.get $0) - ) - ) - (func $21 (type $0) (param $0 i32) (result v128) - (v128.load64_splat $0 - (local.get $0) - ) - ) - (func $22 (type $1) (param $0 i32) (param $1 v128) - (v128.store $0 - (local.get $0) - (local.get $1) - ) - ) - (func $23 (type $1) (param $0 i32) (param $1 v128) - (v128.store $1 - (local.get $0) - (local.get $1) - ) - ) - (func $24 (type $2) (param $0 i32) (param $1 v128) (result v128) - (v128.load8_lane $0 0 - (local.get $0) - (local.get $1) - ) - ) - (func $25 (type $2) (param $0 i32) (param $1 v128) (result v128) - (v128.load8_lane $1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $26 (type $2) (param $0 i32) (param $1 v128) (result v128) - (v128.load16_lane $1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $27 (type $2) (param $0 i32) (param $1 v128) (result v128) - (v128.load16_lane $3 0 - (local.get $0) - (local.get $1) - ) - ) - (func $28 (type $2) (param $0 i32) (param $1 v128) (result v128) - (v128.load32_lane $0 0 - (local.get $0) - (local.get $1) - ) - ) - (func $29 (type $2) (param $0 i32) (param $1 v128) (result v128) - (v128.load32_lane $1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $30 (type $2) (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane $3 0 - (local.get $0) - (local.get $1) - ) - ) - (func $31 (type $2) (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane $1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $32 (type $2) (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane $0 align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $33 (type $2) (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane $1 align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $34 (type $2) (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane $2 offset=32 0 - (local.get $0) - (local.get $1) - ) - ) - (func $35 (type $2) (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane $1 offset=32 0 - (local.get $0) - (local.get $1) - ) - ) - (func $36 (type $2) (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane $0 offset=32 align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $37 (type $2) (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane $3 offset=32 align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $38 (type $1) (param $0 i32) (param $1 v128) - (v128.store8_lane $0 0 - (local.get $0) - (local.get $1) - ) - ) - (func $39 (type $1) (param $0 i32) (param $1 v128) - (v128.store8_lane $3 0 - (local.get $0) - (local.get $1) - ) - ) - (func $40 (type $1) (param $0 i32) (param $1 v128) - (v128.store16_lane $0 0 - (local.get $0) - (local.get $1) - ) - ) - (func $41 (type $1) (param $0 i32) (param $1 v128) - (v128.store16_lane $1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $42 (type $1) (param $0 i32) (param $1 v128) - (v128.store32_lane $1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $43 (type $1) (param $0 i32) (param $1 v128) - (v128.store32_lane $2 0 - (local.get $0) - (local.get $1) - ) - ) - (func $44 (type $1) (param $0 i32) (param $1 v128) - (v128.store64_lane $2 0 - (local.get $0) - (local.get $1) - ) - ) - (func $45 (type $1) (param $0 i32) (param $1 v128) - (v128.store64_lane $1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $46 (type $1) (param $0 i32) (param $1 v128) - (v128.store64_lane $1 align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $47 (type $1) (param $0 i32) (param $1 v128) - (v128.store64_lane $0 align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $48 (type $1) (param $0 i32) (param $1 v128) - (v128.store64_lane $3 offset=32 0 - (local.get $0) - (local.get $1) - ) - ) - (func $49 (type $1) (param $0 i32) (param $1 v128) - (v128.store64_lane $0 offset=32 0 - (local.get $0) - (local.get $1) - ) - ) - (func $50 (type $1) (param $0 i32) (param $1 v128) - (v128.store64_lane $1 offset=32 align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $51 (type $1) (param $0 i32) (param $1 v128) - (v128.store64_lane $3 offset=32 align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $52 (type $0) (param $0 i32) (result v128) - (v128.load32_zero $0 - (local.get $0) - ) - ) - (func $53 (type $0) (param $0 i32) (result v128) - (v128.load32_zero $1 - (local.get $0) - ) - ) - (func $54 (type $0) (param $0 i32) (result v128) - (v128.load64_zero $1 - (local.get $0) - ) - ) - (func $55 (type $0) (param $0 i32) (result v128) - (v128.load64_zero $2 - (local.get $0) - ) - ) -) - diff --git a/test/multi-table.wast b/test/multi-table.wast deleted file mode 100644 index 6d4610aad..000000000 --- a/test/multi-table.wast +++ /dev/null @@ -1,38 +0,0 @@ -(module - (type $none_=>_none (func)) - (type $A (struct)) - (global $g1 (ref null $none_=>_none) (ref.func $f)) - (global $g2 i32 (i32.const 0)) - - (import "a" "b" (table $t1 1 10 funcref)) - (table $t2 3 3 funcref) - (table $t3 4 4 funcref) - (table $textern 0 externref) - - ;; A table with a typed function references specialized type. - (table $tspecial 5 5 (ref null $none_=>_none)) - - ;; add to $t1 - (elem (i32.const 0) $f) - - ;; add to $t2 - (elem (table $t2) (i32.const 0) func $f) - (elem $activeNonZeroOffset (table $t2) (offset (i32.const 1)) func $f $g) - - (elem $e3-1 (table $t3) (global.get $g2) funcref (ref.func $f) (ref.null func)) - (elem $e3-2 (table $t3) (offset (i32.const 2)) (ref null $none_=>_none) (item ref.func $f) (item (ref.func $g))) - - (elem $passive-1 func $f $g) - (elem $passive-2 funcref (item ref.func $f) (item (ref.func $g)) (ref.null func)) - (elem $passive-3 (ref null $none_=>_none) (item ref.func $f) (item (ref.func $g)) (ref.null $none_=>_none) (global.get $g1)) - (elem $empty func) - (elem $declarative declare func $h) - - ;; This elem will be emitted as usesExpressions because of the type of the - ;; table. - (elem $especial (table $tspecial) (i32.const 0) (ref null $none_=>_none) $f $h) - - (func $f (drop (ref.func $h))) - (func $g) - (func $h) -) diff --git a/test/multi-table.wast.from-wast b/test/multi-table.wast.from-wast deleted file mode 100644 index 426f474e5..000000000 --- a/test/multi-table.wast.from-wast +++ /dev/null @@ -1,31 +0,0 @@ -(module - (type $none_=>_none (func)) - (import "a" "b" (table $t1 1 10 funcref)) - (global $g1 (ref null $none_=>_none) (ref.func $f)) - (global $g2 i32 (i32.const 0)) - (table $t2 3 3 funcref) - (table $t3 4 4 funcref) - (table $textern 0 externref) - (table $tspecial 5 5 (ref null $none_=>_none)) - (elem $0 (table $t1) (i32.const 0) func $f) - (elem $1 (table $t2) (i32.const 0) func $f) - (elem $activeNonZeroOffset (table $t2) (i32.const 1) func $f $g) - (elem $e3-1 (table $t3) (global.get $g2) funcref (ref.func $f) (ref.null nofunc)) - (elem $e3-2 (table $t3) (i32.const 2) (ref null $none_=>_none) (ref.func $f) (ref.func $g)) - (elem $passive-1 func $f $g) - (elem $passive-2 funcref (ref.func $f) (ref.func $g) (ref.null nofunc)) - (elem $passive-3 (ref null $none_=>_none) (ref.func $f) (ref.func $g) (ref.null nofunc) (global.get $g1)) - (elem $empty func) - (elem $especial (table $tspecial) (i32.const 0) (ref null $none_=>_none) (ref.func $f) (ref.func $h)) - (func $f (type $none_=>_none) - (drop - (ref.func $h) - ) - ) - (func $g (type $none_=>_none) - (nop) - ) - (func $h (type $none_=>_none) - (nop) - ) -) diff --git a/test/multi-table.wast.fromBinary b/test/multi-table.wast.fromBinary deleted file mode 100644 index c27ec806f..000000000 --- a/test/multi-table.wast.fromBinary +++ /dev/null @@ -1,32 +0,0 @@ -(module - (type $none_=>_none (func)) - (import "a" "b" (table $t1 1 10 funcref)) - (global $g1 (ref null $none_=>_none) (ref.func $f)) - (global $g2 i32 (i32.const 0)) - (table $t2 3 3 funcref) - (table $t3 4 4 funcref) - (table $textern 0 externref) - (table $tspecial 5 5 (ref null $none_=>_none)) - (elem $0 (table $t1) (i32.const 0) func $f) - (elem $1 (table $t2) (i32.const 0) func $f) - (elem $activeNonZeroOffset (table $t2) (i32.const 1) func $f $g) - (elem $e3-1 (table $t3) (global.get $g2) funcref (ref.func $f) (ref.null nofunc)) - (elem $e3-2 (table $t3) (i32.const 2) (ref null $none_=>_none) (ref.func $f) (ref.func $g)) - (elem $passive-1 func $f $g) - (elem $passive-2 funcref (ref.func $f) (ref.func $g) (ref.null nofunc)) - (elem $passive-3 (ref null $none_=>_none) (ref.func $f) (ref.func $g) (ref.null nofunc) (global.get $g1)) - (elem $empty func) - (elem $especial (table $tspecial) (i32.const 0) (ref null $none_=>_none) (ref.func $f) (ref.func $h)) - (func $f (type $none_=>_none) - (drop - (ref.func $h) - ) - ) - (func $g (type $none_=>_none) - (nop) - ) - (func $h (type $none_=>_none) - (nop) - ) -) - diff --git a/test/multi-table.wast.fromBinary.noDebugInfo b/test/multi-table.wast.fromBinary.noDebugInfo deleted file mode 100644 index c2a5ef858..000000000 --- a/test/multi-table.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,32 +0,0 @@ -(module - (type $0 (func)) - (import "a" "b" (table $timport$0 1 10 funcref)) - (global $global$0 (ref null $0) (ref.func $0)) - (global $global$1 i32 (i32.const 0)) - (table $0 3 3 funcref) - (table $1 4 4 funcref) - (table $2 0 externref) - (table $3 5 5 (ref null $0)) - (elem $0 (table $timport$0) (i32.const 0) func $0) - (elem $1 (table $0) (i32.const 0) func $0) - (elem $2 (table $0) (i32.const 1) func $0 $1) - (elem $3 (table $1) (global.get $global$1) funcref (ref.func $0) (ref.null nofunc)) - (elem $4 (table $1) (i32.const 2) (ref null $0) (ref.func $0) (ref.func $1)) - (elem $5 func $0 $1) - (elem $6 funcref (ref.func $0) (ref.func $1) (ref.null nofunc)) - (elem $7 (ref null $0) (ref.func $0) (ref.func $1) (ref.null nofunc) (global.get $global$0)) - (elem $8 func) - (elem $9 (table $3) (i32.const 0) (ref null $0) (ref.func $0) (ref.func $2)) - (func $0 (type $0) - (drop - (ref.func $2) - ) - ) - (func $1 (type $0) - (nop) - ) - (func $2 (type $0) - (nop) - ) -) - diff --git a/test/mutable-global.wast b/test/mutable-global.wast deleted file mode 100644 index 1cb59de11..000000000 --- a/test/mutable-global.wast +++ /dev/null @@ -1,12 +0,0 @@ -(module - (type $0 (func)) - (import "env" "global-mut" (global $global-mut (mut i32))) - (func $foo (type $0) - (global.set $global-mut - (i32.add - (global.get $global-mut) - (i32.const 1) - ) - ) - ) -) diff --git a/test/mutable-global.wast.from-wast b/test/mutable-global.wast.from-wast deleted file mode 100644 index 1a8e121cd..000000000 --- a/test/mutable-global.wast.from-wast +++ /dev/null @@ -1,12 +0,0 @@ -(module - (type $0 (func)) - (import "env" "global-mut" (global $global-mut (mut i32))) - (func $foo (type $0) - (global.set $global-mut - (i32.add - (global.get $global-mut) - (i32.const 1) - ) - ) - ) -) diff --git a/test/mutable-global.wast.fromBinary b/test/mutable-global.wast.fromBinary deleted file mode 100644 index c115bbd4c..000000000 --- a/test/mutable-global.wast.fromBinary +++ /dev/null @@ -1,13 +0,0 @@ -(module - (type $0 (func)) - (import "env" "global-mut" (global $global-mut (mut i32))) - (func $foo (type $0) - (global.set $global-mut - (i32.add - (global.get $global-mut) - (i32.const 1) - ) - ) - ) -) - diff --git a/test/mutable-global.wast.fromBinary.noDebugInfo b/test/mutable-global.wast.fromBinary.noDebugInfo deleted file mode 100644 index 69db53f3f..000000000 --- a/test/mutable-global.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,13 +0,0 @@ -(module - (type $0 (func)) - (import "env" "global-mut" (global $gimport$0 (mut i32))) - (func $0 (type $0) - (global.set $gimport$0 - (i32.add - (global.get $gimport$0) - (i32.const 1) - ) - ) - ) -) - diff --git a/test/newsyntax.wast b/test/newsyntax.wast deleted file mode 100644 index 8fc1440a2..000000000 --- a/test/newsyntax.wast +++ /dev/null @@ -1,10 +0,0 @@ -(module - (import "env" "table" (table 9 9 funcref)) - (func "call_indirect" - (drop - (call_indirect (param i32) (param f64) (result i32) (i32.const 10) (f64.const 20) (i32.const 30)) - ) - (call_indirect (i32.const 1)) - ) -) - diff --git a/test/newsyntax.wast.from-wast b/test/newsyntax.wast.from-wast deleted file mode 100644 index 997180e4f..000000000 --- a/test/newsyntax.wast.from-wast +++ /dev/null @@ -1,18 +0,0 @@ -(module - (type $0 (func)) - (type $1 (func (param i32 f64) (result i32))) - (import "env" "table" (table $timport$0 9 9 funcref)) - (export "call_indirect" (func $0)) - (func $0 (type $0) - (drop - (call_indirect $timport$0 (type $1) - (i32.const 10) - (f64.const 20) - (i32.const 30) - ) - ) - (call_indirect $timport$0 (type $0) - (i32.const 1) - ) - ) -) diff --git a/test/newsyntax.wast.fromBinary b/test/newsyntax.wast.fromBinary deleted file mode 100644 index 8d14c6360..000000000 --- a/test/newsyntax.wast.fromBinary +++ /dev/null @@ -1,19 +0,0 @@ -(module - (type $0 (func)) - (type $1 (func (param i32 f64) (result i32))) - (import "env" "table" (table $timport$0 9 9 funcref)) - (export "call_indirect" (func $0)) - (func $0 (type $0) - (drop - (call_indirect $timport$0 (type $1) - (i32.const 10) - (f64.const 20) - (i32.const 30) - ) - ) - (call_indirect $timport$0 (type $0) - (i32.const 1) - ) - ) -) - diff --git a/test/newsyntax.wast.fromBinary.noDebugInfo b/test/newsyntax.wast.fromBinary.noDebugInfo deleted file mode 100644 index 8d14c6360..000000000 --- a/test/newsyntax.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,19 +0,0 @@ -(module - (type $0 (func)) - (type $1 (func (param i32 f64) (result i32))) - (import "env" "table" (table $timport$0 9 9 funcref)) - (export "call_indirect" (func $0)) - (func $0 (type $0) - (drop - (call_indirect $timport$0 (type $1) - (i32.const 10) - (f64.const 20) - (i32.const 30) - ) - ) - (call_indirect $timport$0 (type $0) - (i32.const 1) - ) - ) -) - diff --git a/test/nonspec-bulk-memory.wast b/test/nonspec-bulk-memory.wast deleted file mode 100644 index 91f8c23a2..000000000 --- a/test/nonspec-bulk-memory.wast +++ /dev/null @@ -1,29 +0,0 @@ -(module - (memory 1024 1024 - (segment 0 "hello, world") - ) - (func $memory.init - (memory.init 0 - (i32.const 512) - (i32.const 0) - (i32.const 12) - ) - ) - (func $data.drop - (data.drop 0) - ) - (func $memory.copy - (memory.copy - (i32.const 512) - (i32.const 0) - (i32.const 12) - ) - ) - (func $memory.fill - (memory.fill - (i32.const 0) - (i32.const 42) - (i32.const 1024) - ) - ) -) diff --git a/test/nonspec-bulk-memory.wast.from-wast b/test/nonspec-bulk-memory.wast.from-wast deleted file mode 100644 index 8c4b98b1d..000000000 --- a/test/nonspec-bulk-memory.wast.from-wast +++ /dev/null @@ -1,29 +0,0 @@ -(module - (type $0 (func)) - (memory $0 1024 1024) - (data $0 (i32.const 0) "hello, world") - (func $memory.init (type $0) - (memory.init $0 - (i32.const 512) - (i32.const 0) - (i32.const 12) - ) - ) - (func $data.drop (type $0) - (data.drop $0) - ) - (func $memory.copy (type $0) - (memory.copy - (i32.const 512) - (i32.const 0) - (i32.const 12) - ) - ) - (func $memory.fill (type $0) - (memory.fill - (i32.const 0) - (i32.const 42) - (i32.const 1024) - ) - ) -) diff --git a/test/nonspec-bulk-memory.wast.fromBinary b/test/nonspec-bulk-memory.wast.fromBinary deleted file mode 100644 index f2c4c0c5e..000000000 --- a/test/nonspec-bulk-memory.wast.fromBinary +++ /dev/null @@ -1,30 +0,0 @@ -(module - (type $0 (func)) - (memory $0 1024 1024) - (data $0 (i32.const 0) "hello, world") - (func $memory.init (type $0) - (memory.init $0 - (i32.const 512) - (i32.const 0) - (i32.const 12) - ) - ) - (func $data.drop (type $0) - (data.drop $0) - ) - (func $memory.copy (type $0) - (memory.copy - (i32.const 512) - (i32.const 0) - (i32.const 12) - ) - ) - (func $memory.fill (type $0) - (memory.fill - (i32.const 0) - (i32.const 42) - (i32.const 1024) - ) - ) -) - diff --git a/test/nonspec-bulk-memory.wast.fromBinary.noDebugInfo b/test/nonspec-bulk-memory.wast.fromBinary.noDebugInfo deleted file mode 100644 index 9f1d63f24..000000000 --- a/test/nonspec-bulk-memory.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,30 +0,0 @@ -(module - (type $0 (func)) - (memory $0 1024 1024) - (data $0 (i32.const 0) "hello, world") - (func $0 (type $0) - (memory.init $0 - (i32.const 512) - (i32.const 0) - (i32.const 12) - ) - ) - (func $1 (type $0) - (data.drop $0) - ) - (func $2 (type $0) - (memory.copy - (i32.const 512) - (i32.const 0) - (i32.const 12) - ) - ) - (func $3 (type $0) - (memory.fill - (i32.const 0) - (i32.const 42) - (i32.const 1024) - ) - ) -) - diff --git a/test/polymorphic_stack.wast b/test/polymorphic_stack.wast deleted file mode 100644 index c83265551..000000000 --- a/test/polymorphic_stack.wast +++ /dev/null @@ -1,133 +0,0 @@ -(module - (type $FUNCSIG$ii (func (param i32) (result i32))) - (import "env" "table" (table 9 9 funcref)) - (func $break-and-binary (result i32) - (block $x (result i32) - (f32.add - (br_if $x - (i32.trunc_f64_u - (unreachable) - ) - (i32.trunc_f64_u - (unreachable) - ) - ) - (f32.const 1) - ) - ) - ) - (func $call-and-unary (param i32) (result i32) - (drop - (i64.eqz - (call $call-and-unary - (unreachable) - ) - ) - ) - (drop - (i64.eqz - (i32.eqz - (unreachable) - ) - ) - ) - (drop - (i64.eqz - (call_indirect (type $FUNCSIG$ii) - (unreachable) - (unreachable) - ) - ) - ) - ) - (func $tee (param $x i32) - (local $y f32) - (drop - (i64.eqz - (local.tee $x - (unreachable) - ) - ) - ) - (drop - (local.tee $y - (i64.eqz - (unreachable) - ) - ) - ) - ) - (func $tee2 - (local $0 f32) - (if - (i32.const 259) - (local.set $0 - (unreachable) - ) - ) - ) - (func $select - (drop - (i64.eqz - (select - (unreachable) - (i32.const 1) - (i32.const 2) - ) - ) - ) - ) - (func $untaken-break-should-have-value (result i32) - (block $x (result i32) - (block - (br_if $x - (i32.const 0) - (unreachable) - ) - ) - ) - ) - (func $unreachable-in-block-but-code-before (param $0 i32) (result i32) - (if - (local.get $0) - (return - (i32.const 127) - ) - ) - (block $label$0 (result i32) - (br_if $label$0 - (i32.const 0) - (return - (i32.const -32) - ) - ) - ) - ) - (func $br_table_unreachable_to_also_unreachable (result i32) - (block $a (result i32) - (block $b (result i32) - (br_table $a $b ;; seems to send a value, but is not taken - (unreachable) - (unreachable) - ) - ) - ) - ) - (func $untaken-br_if (result i32) - (block $label$8 (result i32) - (block $label$9 - (drop - (if - (i32.const 0) - (br_if $label$8 - (unreachable) - (i32.const 0) - ) - (unreachable) - ) - ) - ) - ) - ) -) - diff --git a/test/polymorphic_stack.wast.from-wast b/test/polymorphic_stack.wast.from-wast deleted file mode 100644 index d0ac28345..000000000 --- a/test/polymorphic_stack.wast.from-wast +++ /dev/null @@ -1,135 +0,0 @@ -(module - (type $0 (func (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $2 (func)) - (type $3 (func (param i32))) - (import "env" "table" (table $timport$0 9 9 funcref)) - (func $break-and-binary (type $0) (result i32) - (block $x (result i32) - (f32.add - (br_if $x - (i32.trunc_f64_u - (unreachable) - ) - (i32.trunc_f64_u - (unreachable) - ) - ) - (f32.const 1) - ) - ) - ) - (func $call-and-unary (type $FUNCSIG$ii) (param $0 i32) (result i32) - (drop - (i64.eqz - (call $call-and-unary - (unreachable) - ) - ) - ) - (drop - (i64.eqz - (i32.eqz - (unreachable) - ) - ) - ) - (drop - (i64.eqz - (call_indirect $timport$0 (type $FUNCSIG$ii) - (unreachable) - (unreachable) - ) - ) - ) - ) - (func $tee (type $3) (param $x i32) - (local $y f32) - (drop - (i64.eqz - (local.tee $x - (unreachable) - ) - ) - ) - (drop - (local.tee $y - (i64.eqz - (unreachable) - ) - ) - ) - ) - (func $tee2 (type $2) - (local $0 f32) - (if - (i32.const 259) - (local.tee $0 - (unreachable) - ) - ) - ) - (func $select (type $2) - (drop - (i64.eqz - (select - (unreachable) - (i32.const 1) - (i32.const 2) - ) - ) - ) - ) - (func $untaken-break-should-have-value (type $0) (result i32) - (block $x (result i32) - (block - (br_if $x - (i32.const 0) - (unreachable) - ) - ) - ) - ) - (func $unreachable-in-block-but-code-before (type $FUNCSIG$ii) (param $0 i32) (result i32) - (if - (local.get $0) - (return - (i32.const 127) - ) - ) - (block $label$0 (result i32) - (br_if $label$0 - (i32.const 0) - (return - (i32.const -32) - ) - ) - ) - ) - (func $br_table_unreachable_to_also_unreachable (type $0) (result i32) - (block $a (result i32) - (block $b (result i32) - (br_table $a $b - (unreachable) - (unreachable) - ) - ) - ) - ) - (func $untaken-br_if (type $0) (result i32) - (block $label$8 (result i32) - (block $label$9 - (drop - (if - (i32.const 0) - (br_if $label$8 - (unreachable) - (i32.const 0) - ) - (unreachable) - ) - ) - ) - ) - ) -) diff --git a/test/polymorphic_stack.wast.fromBinary b/test/polymorphic_stack.wast.fromBinary deleted file mode 100644 index 652ecb7d9..000000000 --- a/test/polymorphic_stack.wast.fromBinary +++ /dev/null @@ -1,76 +0,0 @@ -(module - (type $0 (func (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $2 (func)) - (type $3 (func (param i32))) - (import "env" "table" (table $timport$0 9 9 funcref)) - (func $break-and-binary (type $0) (result i32) - (block $label$1 (result i32) - (unreachable) - ) - ) - (func $call-and-unary (type $FUNCSIG$ii) (param $0 i32) (result i32) - (unreachable) - ) - (func $tee (type $3) (param $x i32) - (local $y f32) - (unreachable) - ) - (func $tee2 (type $2) - (local $0 f32) - (if - (i32.const 259) - (unreachable) - ) - ) - (func $select (type $2) - (unreachable) - ) - (func $untaken-break-should-have-value (type $0) (result i32) - (block $label$1 (result i32) - (block $label$2 - (drop - (i32.const 0) - ) - (unreachable) - ) - (unreachable) - ) - ) - (func $unreachable-in-block-but-code-before (type $FUNCSIG$ii) (param $0 i32) (result i32) - (if - (local.get $0) - (return - (i32.const 127) - ) - ) - (block $label$2 (result i32) - (drop - (i32.const 0) - ) - (return - (i32.const -32) - ) - ) - ) - (func $br_table_unreachable_to_also_unreachable (type $0) (result i32) - (block $label$1 (result i32) - (block $label$2 (result i32) - (unreachable) - ) - ) - ) - (func $untaken-br_if (type $0) (result i32) - (block $label$1 (result i32) - (block $label$2 - (if - (i32.const 0) - (unreachable) - (unreachable) - ) - ) - (unreachable) - ) - ) -) - diff --git a/test/polymorphic_stack.wast.fromBinary.noDebugInfo b/test/polymorphic_stack.wast.fromBinary.noDebugInfo deleted file mode 100644 index 0069e4254..000000000 --- a/test/polymorphic_stack.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,76 +0,0 @@ -(module - (type $0 (func (result i32))) - (type $1 (func (param i32) (result i32))) - (type $2 (func)) - (type $3 (func (param i32))) - (import "env" "table" (table $timport$0 9 9 funcref)) - (func $0 (type $0) (result i32) - (block $label$1 (result i32) - (unreachable) - ) - ) - (func $1 (type $1) (param $0 i32) (result i32) - (unreachable) - ) - (func $2 (type $3) (param $0 i32) - (local $1 f32) - (unreachable) - ) - (func $3 (type $2) - (local $0 f32) - (if - (i32.const 259) - (unreachable) - ) - ) - (func $4 (type $2) - (unreachable) - ) - (func $5 (type $0) (result i32) - (block $label$1 (result i32) - (block $label$2 - (drop - (i32.const 0) - ) - (unreachable) - ) - (unreachable) - ) - ) - (func $6 (type $1) (param $0 i32) (result i32) - (if - (local.get $0) - (return - (i32.const 127) - ) - ) - (block $label$2 (result i32) - (drop - (i32.const 0) - ) - (return - (i32.const -32) - ) - ) - ) - (func $7 (type $0) (result i32) - (block $label$1 (result i32) - (block $label$2 (result i32) - (unreachable) - ) - ) - ) - (func $8 (type $0) (result i32) - (block $label$1 (result i32) - (block $label$2 - (if - (i32.const 0) - (unreachable) - (unreachable) - ) - ) - (unreachable) - ) - ) -) - diff --git a/test/reference-types.wast b/test/reference-types.wast deleted file mode 100644 index 8706ac0c1..000000000 --- a/test/reference-types.wast +++ /dev/null @@ -1,464 +0,0 @@ -(module - (type $sig_eqref (func (param eqref))) - (type $sig_funcref (func (param funcref))) - (type $sig_anyref (func (param anyref))) - - (func $take_eqref (param eqref)) - (func $take_funcref (param funcref)) - (func $take_anyref (param anyref)) - (func $foo) - - (table funcref (elem $take_eqref $take_funcref $take_anyref)) - (elem declare func $ref-taken-but-not-in-table) - - (import "env" "import_func" (func $import_func (param eqref) (result funcref))) - (import "env" "import_global" (global $import_global eqref)) - (export "export_func" (func $import_func (param eqref) (result funcref))) - (export "export_global" (global $import_global)) - - ;; Test global initializer expressions - (global $global_eqref (mut eqref) (ref.null eq)) - (global $global_funcref (mut funcref) (ref.null func)) - (global $global_funcref_func (mut funcref) (ref.func $foo)) - (global $global_anyref (mut anyref) (ref.null any)) - - ;; Test subtype relationship in global initializer expressions - (global $global_anyref2 (mut anyref) (ref.null eq)) - - (tag $e-i32 (param i32)) - - (func $test - (local $local_eqref eqref) - (local $local_funcref funcref) - (local $local_anyref anyref) - - ;; Test types for local.get/set - (local.set $local_eqref (local.get $local_eqref)) - (local.set $local_eqref (global.get $global_eqref)) - (local.set $local_eqref (ref.null eq)) - (local.set $local_funcref (local.get $local_funcref)) - (local.set $local_funcref (global.get $global_funcref)) - (local.set $local_funcref (ref.null func)) - (local.set $local_funcref (ref.func $foo)) - (local.set $local_anyref (local.get $local_anyref)) - (local.set $local_anyref (global.get $global_anyref)) - (local.set $local_anyref (ref.null any)) - - ;; Test subtype relationship for local.set - (local.set $local_anyref (local.get $local_eqref)) - (local.set $local_anyref (global.get $global_eqref)) - (local.set $local_anyref (ref.null eq)) - - ;; Test types for global.get/set - (global.set $global_eqref (global.get $global_eqref)) - (global.set $global_eqref (local.get $local_eqref)) - (global.set $global_eqref (ref.null eq)) - (global.set $global_funcref (global.get $global_funcref)) - (global.set $global_funcref (local.get $local_funcref)) - (global.set $global_funcref (ref.null func)) - (global.set $global_funcref (ref.func $foo)) - (global.set $global_anyref (global.get $global_anyref)) - (global.set $global_anyref (local.get $local_anyref)) - (global.set $global_anyref (ref.null any)) - - ;; Test subtype relationship for global.set - (global.set $global_anyref (global.get $global_eqref)) - (global.set $global_anyref (local.get $local_eqref)) - (global.set $global_anyref (ref.null eq)) - - ;; Test function call params - (call $take_eqref (local.get $local_eqref)) - (call $take_eqref (global.get $global_eqref)) - (call $take_eqref (ref.null eq)) - (call $take_funcref (local.get $local_funcref)) - (call $take_funcref (global.get $global_funcref)) - (call $take_funcref (ref.null func)) - (call $take_funcref (ref.func $foo)) - (call $take_anyref (local.get $local_anyref)) - (call $take_anyref (global.get $global_anyref)) - (call $take_anyref (ref.null any)) - - ;; Test subtype relationship for function call params - (call $take_anyref (local.get $local_eqref)) - (call $take_anyref (global.get $global_eqref)) - (call $take_anyref (ref.null eq)) - - ;; Test call_indirect params - (call_indirect (type $sig_eqref) (local.get $local_eqref) (i32.const 0)) - (call_indirect (type $sig_eqref) (global.get $global_eqref) (i32.const 0)) - (call_indirect (type $sig_eqref) (ref.null eq) (i32.const 0)) - (call_indirect (type $sig_funcref) (local.get $local_funcref) (i32.const 1)) - (call_indirect (type $sig_funcref) (global.get $global_funcref) (i32.const 1)) - (call_indirect (type $sig_funcref) (ref.null func) (i32.const 1)) - (call_indirect (type $sig_funcref) (ref.func $foo) (i32.const 1)) - (call_indirect (type $sig_anyref) (local.get $local_anyref) (i32.const 3)) - (call_indirect (type $sig_anyref) (global.get $global_anyref) (i32.const 3)) - (call_indirect (type $sig_anyref) (ref.null any) (i32.const 3)) - - ;; Test subtype relationship for call_indirect params - (call_indirect (type $sig_anyref) (local.get $local_eqref) (i32.const 3)) - (call_indirect (type $sig_anyref) (global.get $global_eqref) (i32.const 3)) - (call_indirect (type $sig_anyref) (ref.null eq) (i32.const 3)) - - ;; Test block return type - (drop - (block (result eqref) - (br_if 0 (local.get $local_eqref) (i32.const 1)) - ) - ) - (drop - (block (result eqref) - (br_if 0 (global.get $global_eqref) (i32.const 1)) - ) - ) - (drop - (block (result eqref) - (br_if 0 (ref.null eq) (i32.const 1)) - ) - ) - (drop - (block (result funcref) - (br_if 0 (local.get $local_funcref) (i32.const 1)) - ) - ) - (drop - (block (result funcref) - (br_if 0 (global.get $global_funcref) (i32.const 1)) - ) - ) - (drop - (block (result funcref) - (br_if 0 (ref.null func) (i32.const 1)) - ) - ) - (drop - (block (result funcref) - (br_if 0 (ref.func $foo) (i32.const 1)) - ) - ) - (drop - (block (result anyref) - (br_if 0 (local.get $local_anyref) (i32.const 1)) - ) - ) - (drop - (block (result anyref) - (br_if 0 (global.get $global_anyref) (i32.const 1)) - ) - ) - (drop - (block (result anyref) - (br_if 0 (ref.null any) (i32.const 1)) - ) - ) - - ;; Test subtype relationship for block return type - (drop - (block (result anyref) - (br_if 0 (local.get $local_eqref) (i32.const 1)) - ) - ) - (drop - (block (result anyref) - (br_if 0 (ref.null eq) (i32.const 1)) - ) - ) - - ;; Test loop return type - (drop - (loop (result eqref) - (local.get $local_eqref) - ) - ) - (drop - (loop (result eqref) - (global.get $global_eqref) - ) - ) - (drop - (loop (result eqref) - (ref.null eq) - ) - ) - (drop - (loop (result funcref) - (local.get $local_funcref) - ) - ) - (drop - (loop (result funcref) - (global.get $global_funcref) - ) - ) - (drop - (loop (result funcref) - (ref.null func) - ) - ) - (drop - (loop (result funcref) - (ref.func $foo) - ) - ) - (drop - (loop (result anyref) - (local.get $local_anyref) - ) - ) - (drop - (loop (result anyref) - (global.get $global_anyref) - ) - ) - (drop - (loop (result anyref) - (ref.null any) - ) - ) - - ;; Test subtype relationship for loop return type - (drop - (loop (result anyref) - (local.get $local_eqref) - ) - ) - (drop - (loop (result anyref) - (global.get $global_eqref) - ) - ) - (drop - (loop (result anyref) - (ref.null eq) - ) - ) - - ;; Test if return type - (drop - (if (result eqref) - (i32.const 1) - (local.get $local_eqref) - (ref.null eq) - ) - ) - (drop - (if (result funcref) - (i32.const 1) - (local.get $local_funcref) - (ref.null func) - ) - ) - (drop - (if (result anyref) - (i32.const 1) - (local.get $local_anyref) - (ref.null any) - ) - ) - - ;; Test subtype relationship for if return type - (drop - (if (result anyref) - (i32.const 1) - (local.get $local_eqref) - (local.get $local_eqref) - ) - ) - (drop - (if (result anyref) - (i32.const 1) - (ref.null eq) - (ref.null i31) - ) - ) - (drop - (if (result anyref) - (i32.const 1) - (ref.i31 - (i32.const 0) - ) - (ref.null eq) - ) - ) - - ;; Test try return type - (drop - (try (result eqref) - (do - (local.get $local_eqref) - ) - (catch $e-i32 - (drop (pop i32)) - (ref.null eq) - ) - ) - ) - (drop - (try (result funcref) - (do - (ref.func $foo) - ) - (catch $e-i32 - (drop (pop i32)) - (ref.null func) - ) - ) - ) - - ;; Test subtype relationship for try return type - (drop - (try (result anyref) - (do - (local.get $local_eqref) - ) - (catch $e-i32 - (drop (pop i32)) - (ref.null any) - ) - ) - ) - (drop - (try (result anyref) - (do - (ref.null eq) - ) - (catch $e-i32 - (drop (pop i32)) - (local.get $local_eqref) - ) - ) - ) - - ;; Test typed select - (drop - (select (result eqref) - (local.get $local_eqref) - (ref.null eq) - (i32.const 1) - ) - ) - (drop - (select (result funcref) - (local.get $local_funcref) - (ref.null func) - (i32.const 1) - ) - ) - (drop - (select (result i32) - (i32.const 0) - (i32.const 2) - (i32.const 1) - ) - ) - - ;; Test subtype relationship for typed select - (drop - (select (result anyref) - (local.get $local_eqref) - (ref.i31 - (i32.const 0) - ) - (i32.const 1) - ) - ) - - ;; ref.is_null takes any reference types - (drop (ref.is_null (local.get $local_eqref))) - (drop (ref.is_null (global.get $global_eqref))) - (drop (ref.is_null (ref.null eq))) - (drop (ref.is_null (local.get $local_funcref))) - (drop (ref.is_null (global.get $global_funcref))) - (drop (ref.is_null (ref.null func))) - (drop (ref.is_null (ref.func $foo))) - (drop (ref.is_null (local.get $local_anyref))) - (drop (ref.is_null (global.get $global_anyref))) - (drop (ref.is_null (ref.null any))) - ) - - ;; Test function return type - (func $return_eqref_local (result eqref) - (local $local_eqref eqref) - (local.get $local_eqref) - ) - (func $return_eqref_global (result eqref) - (global.get $global_eqref) - ) - (func $return_eqref_null (result eqref) - (ref.null eq) - ) - (func $return_funcref_local (result funcref) - (local $local_funcref funcref) - (local.get $local_funcref) - ) - (func $return_funcref_global (result funcref) - (global.get $global_funcref) - ) - (func $return_funcref_null (result funcref) - (ref.null func) - ) - (func $return_funcref_func (result funcref) - (ref.func $foo) - ) - (func $return_anyref_local (result anyref) - (local $local_anyref anyref) - (local.get $local_anyref) - ) - (func $return_anyref_global (result anyref) - (global.get $global_anyref) - ) - (func $return_anyref_null (result anyref) - (ref.null any) - ) - - ;; Test subtype relationship in function return type - (func $return_anyref2 (result anyref) - (local $local_eqref eqref) - (local.get $local_eqref) - ) - (func $return_anyref3 (result anyref) - (global.get $global_eqref) - ) - (func $return_anyref4 (result anyref) - (ref.null eq) - ) - - ;; Test returns - (func $returns_eqref (result eqref) - (local $local_eqref eqref) - (return (local.get $local_eqref)) - (return (global.get $global_eqref)) - (return (ref.null eq)) - ) - (func $returns_funcref (result funcref) - (local $local_funcref funcref) - (return (local.get $local_funcref)) - (return (global.get $global_funcref)) - (return (ref.func $foo)) - (return (ref.null func)) - ) - (func $returns_anyref (result anyref) - (local $local_anyref anyref) - (return (local.get $local_anyref)) - (return (global.get $global_anyref)) - (return (ref.null any)) - ) - - ;; Test subtype relationship in returns - (func $returns_anyref2 (result anyref) - (local $local_eqref eqref) - (local $local_funcref funcref) - (return (local.get $local_eqref)) - (return (global.get $global_eqref)) - (return (ref.null eq)) - ) - - (func $ref-user - (drop - ;; an "elem declare func" must be emitted for this ref.func which is not - ;; in the table - (ref.func $ref-taken-but-not-in-table) - ) - ) - (func $ref-taken-but-not-in-table) -) diff --git a/test/reference-types.wast.from-wast b/test/reference-types.wast.from-wast deleted file mode 100644 index 6a05ce40c..000000000 --- a/test/reference-types.wast.from-wast +++ /dev/null @@ -1,650 +0,0 @@ -(module - (type $0 (func (result anyref))) - (type $sig_anyref (func (param anyref))) - (type $sig_funcref (func (param funcref))) - (type $3 (func (result funcref))) - (type $sig_eqref (func (param eqref))) - (type $5 (func)) - (type $6 (func (result eqref))) - (type $7 (func (param i32))) - (type $8 (func (param eqref) (result funcref))) - (import "env" "import_global" (global $import_global eqref)) - (import "env" "import_func" (func $import_func (type $8) (param eqref) (result funcref))) - (global $global_eqref (mut eqref) (ref.null none)) - (global $global_funcref (mut funcref) (ref.null nofunc)) - (global $global_funcref_func (mut funcref) (ref.func $foo)) - (global $global_anyref (mut anyref) (ref.null none)) - (global $global_anyref2 (mut anyref) (ref.null none)) - (table $0 3 3 funcref) - (elem $0 (i32.const 0) $take_eqref $take_funcref $take_anyref) - (elem declare func $foo $ref-taken-but-not-in-table) - (tag $e-i32 (param i32)) - (export "export_func" (func $import_func)) - (export "export_global" (global $import_global)) - (func $take_eqref (type $sig_eqref) (param $0 eqref) - (nop) - ) - (func $take_funcref (type $sig_funcref) (param $0 funcref) - (nop) - ) - (func $take_anyref (type $sig_anyref) (param $0 anyref) - (nop) - ) - (func $foo (type $5) - (nop) - ) - (func $test (type $5) - (local $local_eqref eqref) - (local $local_funcref funcref) - (local $local_anyref anyref) - (local.set $local_eqref - (local.get $local_eqref) - ) - (local.set $local_eqref - (global.get $global_eqref) - ) - (local.set $local_eqref - (ref.null none) - ) - (local.set $local_funcref - (local.get $local_funcref) - ) - (local.set $local_funcref - (global.get $global_funcref) - ) - (local.set $local_funcref - (ref.null nofunc) - ) - (local.set $local_funcref - (ref.func $foo) - ) - (local.set $local_anyref - (local.get $local_anyref) - ) - (local.set $local_anyref - (global.get $global_anyref) - ) - (local.set $local_anyref - (ref.null none) - ) - (local.set $local_anyref - (local.get $local_eqref) - ) - (local.set $local_anyref - (global.get $global_eqref) - ) - (local.set $local_anyref - (ref.null none) - ) - (global.set $global_eqref - (global.get $global_eqref) - ) - (global.set $global_eqref - (local.get $local_eqref) - ) - (global.set $global_eqref - (ref.null none) - ) - (global.set $global_funcref - (global.get $global_funcref) - ) - (global.set $global_funcref - (local.get $local_funcref) - ) - (global.set $global_funcref - (ref.null nofunc) - ) - (global.set $global_funcref - (ref.func $foo) - ) - (global.set $global_anyref - (global.get $global_anyref) - ) - (global.set $global_anyref - (local.get $local_anyref) - ) - (global.set $global_anyref - (ref.null none) - ) - (global.set $global_anyref - (global.get $global_eqref) - ) - (global.set $global_anyref - (local.get $local_eqref) - ) - (global.set $global_anyref - (ref.null none) - ) - (call $take_eqref - (local.get $local_eqref) - ) - (call $take_eqref - (global.get $global_eqref) - ) - (call $take_eqref - (ref.null none) - ) - (call $take_funcref - (local.get $local_funcref) - ) - (call $take_funcref - (global.get $global_funcref) - ) - (call $take_funcref - (ref.null nofunc) - ) - (call $take_funcref - (ref.func $foo) - ) - (call $take_anyref - (local.get $local_anyref) - ) - (call $take_anyref - (global.get $global_anyref) - ) - (call $take_anyref - (ref.null none) - ) - (call $take_anyref - (local.get $local_eqref) - ) - (call $take_anyref - (global.get $global_eqref) - ) - (call $take_anyref - (ref.null none) - ) - (call_indirect $0 (type $sig_eqref) - (local.get $local_eqref) - (i32.const 0) - ) - (call_indirect $0 (type $sig_eqref) - (global.get $global_eqref) - (i32.const 0) - ) - (call_indirect $0 (type $sig_eqref) - (ref.null none) - (i32.const 0) - ) - (call_indirect $0 (type $sig_funcref) - (local.get $local_funcref) - (i32.const 1) - ) - (call_indirect $0 (type $sig_funcref) - (global.get $global_funcref) - (i32.const 1) - ) - (call_indirect $0 (type $sig_funcref) - (ref.null nofunc) - (i32.const 1) - ) - (call_indirect $0 (type $sig_funcref) - (ref.func $foo) - (i32.const 1) - ) - (call_indirect $0 (type $sig_anyref) - (local.get $local_anyref) - (i32.const 3) - ) - (call_indirect $0 (type $sig_anyref) - (global.get $global_anyref) - (i32.const 3) - ) - (call_indirect $0 (type $sig_anyref) - (ref.null none) - (i32.const 3) - ) - (call_indirect $0 (type $sig_anyref) - (local.get $local_eqref) - (i32.const 3) - ) - (call_indirect $0 (type $sig_anyref) - (global.get $global_eqref) - (i32.const 3) - ) - (call_indirect $0 (type $sig_anyref) - (ref.null none) - (i32.const 3) - ) - (drop - (block $block (result eqref) - (br_if $block - (local.get $local_eqref) - (i32.const 1) - ) - ) - ) - (drop - (block $block0 (result eqref) - (br_if $block0 - (global.get $global_eqref) - (i32.const 1) - ) - ) - ) - (drop - (block $block1 (result eqref) - (br_if $block1 - (ref.null none) - (i32.const 1) - ) - ) - ) - (drop - (block $block2 (result funcref) - (br_if $block2 - (local.get $local_funcref) - (i32.const 1) - ) - ) - ) - (drop - (block $block3 (result funcref) - (br_if $block3 - (global.get $global_funcref) - (i32.const 1) - ) - ) - ) - (drop - (block $block4 (result funcref) - (br_if $block4 - (ref.null nofunc) - (i32.const 1) - ) - ) - ) - (drop - (block $block5 (result funcref) - (br_if $block5 - (ref.func $foo) - (i32.const 1) - ) - ) - ) - (drop - (block $block6 (result anyref) - (br_if $block6 - (local.get $local_anyref) - (i32.const 1) - ) - ) - ) - (drop - (block $block7 (result anyref) - (br_if $block7 - (global.get $global_anyref) - (i32.const 1) - ) - ) - ) - (drop - (block $block8 (result anyref) - (br_if $block8 - (ref.null none) - (i32.const 1) - ) - ) - ) - (drop - (block $block9 (result anyref) - (br_if $block9 - (local.get $local_eqref) - (i32.const 1) - ) - ) - ) - (drop - (block $block10 (result anyref) - (br_if $block10 - (ref.null none) - (i32.const 1) - ) - ) - ) - (drop - (loop $loop-in (result eqref) - (local.get $local_eqref) - ) - ) - (drop - (loop $loop-in11 (result eqref) - (global.get $global_eqref) - ) - ) - (drop - (loop $loop-in12 (result eqref) - (ref.null none) - ) - ) - (drop - (loop $loop-in13 (result funcref) - (local.get $local_funcref) - ) - ) - (drop - (loop $loop-in14 (result funcref) - (global.get $global_funcref) - ) - ) - (drop - (loop $loop-in15 (result funcref) - (ref.null nofunc) - ) - ) - (drop - (loop $loop-in16 (result funcref) - (ref.func $foo) - ) - ) - (drop - (loop $loop-in17 (result anyref) - (local.get $local_anyref) - ) - ) - (drop - (loop $loop-in18 (result anyref) - (global.get $global_anyref) - ) - ) - (drop - (loop $loop-in19 (result anyref) - (ref.null none) - ) - ) - (drop - (loop $loop-in20 (result anyref) - (local.get $local_eqref) - ) - ) - (drop - (loop $loop-in21 (result anyref) - (global.get $global_eqref) - ) - ) - (drop - (loop $loop-in22 (result anyref) - (ref.null none) - ) - ) - (drop - (if (result eqref) - (i32.const 1) - (local.get $local_eqref) - (ref.null none) - ) - ) - (drop - (if (result funcref) - (i32.const 1) - (local.get $local_funcref) - (ref.null nofunc) - ) - ) - (drop - (if (result anyref) - (i32.const 1) - (local.get $local_anyref) - (ref.null none) - ) - ) - (drop - (if (result anyref) - (i32.const 1) - (local.get $local_eqref) - (local.get $local_eqref) - ) - ) - (drop - (if (result anyref) - (i32.const 1) - (ref.null none) - (ref.null none) - ) - ) - (drop - (if (result anyref) - (i32.const 1) - (ref.i31 - (i32.const 0) - ) - (ref.null none) - ) - ) - (drop - (try $try (result eqref) - (do - (local.get $local_eqref) - ) - (catch $e-i32 - (drop - (pop i32) - ) - (ref.null none) - ) - ) - ) - (drop - (try $try28 (result funcref) - (do - (ref.func $foo) - ) - (catch $e-i32 - (drop - (pop i32) - ) - (ref.null nofunc) - ) - ) - ) - (drop - (try $try29 (result anyref) - (do - (local.get $local_eqref) - ) - (catch $e-i32 - (drop - (pop i32) - ) - (ref.null none) - ) - ) - ) - (drop - (try $try30 (result anyref) - (do - (ref.null none) - ) - (catch $e-i32 - (drop - (pop i32) - ) - (local.get $local_eqref) - ) - ) - ) - (drop - (select (result eqref) - (local.get $local_eqref) - (ref.null none) - (i32.const 1) - ) - ) - (drop - (select (result funcref) - (local.get $local_funcref) - (ref.null nofunc) - (i32.const 1) - ) - ) - (drop - (select - (i32.const 0) - (i32.const 2) - (i32.const 1) - ) - ) - (drop - (select (result anyref) - (local.get $local_eqref) - (ref.i31 - (i32.const 0) - ) - (i32.const 1) - ) - ) - (drop - (ref.is_null - (local.get $local_eqref) - ) - ) - (drop - (ref.is_null - (global.get $global_eqref) - ) - ) - (drop - (ref.is_null - (ref.null none) - ) - ) - (drop - (ref.is_null - (local.get $local_funcref) - ) - ) - (drop - (ref.is_null - (global.get $global_funcref) - ) - ) - (drop - (ref.is_null - (ref.null nofunc) - ) - ) - (drop - (ref.is_null - (ref.func $foo) - ) - ) - (drop - (ref.is_null - (local.get $local_anyref) - ) - ) - (drop - (ref.is_null - (global.get $global_anyref) - ) - ) - (drop - (ref.is_null - (ref.null none) - ) - ) - ) - (func $return_eqref_local (type $6) (result eqref) - (local $local_eqref eqref) - (local.get $local_eqref) - ) - (func $return_eqref_global (type $6) (result eqref) - (global.get $global_eqref) - ) - (func $return_eqref_null (type $6) (result eqref) - (ref.null none) - ) - (func $return_funcref_local (type $3) (result funcref) - (local $local_funcref funcref) - (local.get $local_funcref) - ) - (func $return_funcref_global (type $3) (result funcref) - (global.get $global_funcref) - ) - (func $return_funcref_null (type $3) (result funcref) - (ref.null nofunc) - ) - (func $return_funcref_func (type $3) (result funcref) - (ref.func $foo) - ) - (func $return_anyref_local (type $0) (result anyref) - (local $local_anyref anyref) - (local.get $local_anyref) - ) - (func $return_anyref_global (type $0) (result anyref) - (global.get $global_anyref) - ) - (func $return_anyref_null (type $0) (result anyref) - (ref.null none) - ) - (func $return_anyref2 (type $0) (result anyref) - (local $local_eqref eqref) - (local.get $local_eqref) - ) - (func $return_anyref3 (type $0) (result anyref) - (global.get $global_eqref) - ) - (func $return_anyref4 (type $0) (result anyref) - (ref.null none) - ) - (func $returns_eqref (type $6) (result eqref) - (local $local_eqref eqref) - (return - (local.get $local_eqref) - ) - (return - (global.get $global_eqref) - ) - (return - (ref.null none) - ) - ) - (func $returns_funcref (type $3) (result funcref) - (local $local_funcref funcref) - (return - (local.get $local_funcref) - ) - (return - (global.get $global_funcref) - ) - (return - (ref.func $foo) - ) - (return - (ref.null nofunc) - ) - ) - (func $returns_anyref (type $0) (result anyref) - (local $local_anyref anyref) - (return - (local.get $local_anyref) - ) - (return - (global.get $global_anyref) - ) - (return - (ref.null none) - ) - ) - (func $returns_anyref2 (type $0) (result anyref) - (local $local_eqref eqref) - (local $local_funcref funcref) - (return - (local.get $local_eqref) - ) - (return - (global.get $global_eqref) - ) - (return - (ref.null none) - ) - ) - (func $ref-user (type $5) - (drop - (ref.func $ref-taken-but-not-in-table) - ) - ) - (func $ref-taken-but-not-in-table (type $5) - (nop) - ) -) diff --git a/test/reference-types.wast.fromBinary b/test/reference-types.wast.fromBinary deleted file mode 100644 index 0ce71eb38..000000000 --- a/test/reference-types.wast.fromBinary +++ /dev/null @@ -1,624 +0,0 @@ -(module - (type $0 (func (result anyref))) - (type $sig_anyref (func (param anyref))) - (type $sig_funcref (func (param funcref))) - (type $3 (func (result funcref))) - (type $sig_eqref (func (param eqref))) - (type $5 (func)) - (type $6 (func (result eqref))) - (type $7 (func (param i32))) - (type $8 (func (param eqref) (result funcref))) - (import "env" "import_global" (global $import_global eqref)) - (import "env" "import_func" (func $import_func (type $8) (param eqref) (result funcref))) - (global $global_eqref (mut eqref) (ref.null none)) - (global $global_funcref (mut funcref) (ref.null nofunc)) - (global $global_funcref_func (mut funcref) (ref.func $foo)) - (global $global_anyref (mut anyref) (ref.null none)) - (global $global_anyref2 (mut anyref) (ref.null none)) - (table $0 3 3 funcref) - (elem $0 (i32.const 0) $take_eqref $take_funcref $take_anyref) - (elem declare func $foo $ref-taken-but-not-in-table) - (tag $e-i32 (param i32)) - (export "export_func" (func $import_func)) - (export "export_global" (global $import_global)) - (func $take_eqref (type $sig_eqref) (param $0 eqref) - (nop) - ) - (func $take_funcref (type $sig_funcref) (param $0 funcref) - (nop) - ) - (func $take_anyref (type $sig_anyref) (param $0 anyref) - (nop) - ) - (func $foo (type $5) - (nop) - ) - (func $test (type $5) - (local $local_eqref eqref) - (local $local_funcref funcref) - (local $local_anyref anyref) - (local.set $local_eqref - (local.get $local_eqref) - ) - (local.set $local_eqref - (global.get $global_eqref) - ) - (local.set $local_eqref - (ref.null none) - ) - (local.set $local_funcref - (local.get $local_funcref) - ) - (local.set $local_funcref - (global.get $global_funcref) - ) - (local.set $local_funcref - (ref.null nofunc) - ) - (local.set $local_funcref - (ref.func $foo) - ) - (local.set $local_anyref - (local.get $local_anyref) - ) - (local.set $local_anyref - (global.get $global_anyref) - ) - (local.set $local_anyref - (ref.null none) - ) - (local.set $local_anyref - (local.get $local_eqref) - ) - (local.set $local_anyref - (global.get $global_eqref) - ) - (local.set $local_anyref - (ref.null none) - ) - (global.set $global_eqref - (global.get $global_eqref) - ) - (global.set $global_eqref - (local.get $local_eqref) - ) - (global.set $global_eqref - (ref.null none) - ) - (global.set $global_funcref - (global.get $global_funcref) - ) - (global.set $global_funcref - (local.get $local_funcref) - ) - (global.set $global_funcref - (ref.null nofunc) - ) - (global.set $global_funcref - (ref.func $foo) - ) - (global.set $global_anyref - (global.get $global_anyref) - ) - (global.set $global_anyref - (local.get $local_anyref) - ) - (global.set $global_anyref - (ref.null none) - ) - (global.set $global_anyref - (global.get $global_eqref) - ) - (global.set $global_anyref - (local.get $local_eqref) - ) - (global.set $global_anyref - (ref.null none) - ) - (call $take_eqref - (local.get $local_eqref) - ) - (call $take_eqref - (global.get $global_eqref) - ) - (call $take_eqref - (ref.null none) - ) - (call $take_funcref - (local.get $local_funcref) - ) - (call $take_funcref - (global.get $global_funcref) - ) - (call $take_funcref - (ref.null nofunc) - ) - (call $take_funcref - (ref.func $foo) - ) - (call $take_anyref - (local.get $local_anyref) - ) - (call $take_anyref - (global.get $global_anyref) - ) - (call $take_anyref - (ref.null none) - ) - (call $take_anyref - (local.get $local_eqref) - ) - (call $take_anyref - (global.get $global_eqref) - ) - (call $take_anyref - (ref.null none) - ) - (call_indirect $0 (type $sig_eqref) - (local.get $local_eqref) - (i32.const 0) - ) - (call_indirect $0 (type $sig_eqref) - (global.get $global_eqref) - (i32.const 0) - ) - (call_indirect $0 (type $sig_eqref) - (ref.null none) - (i32.const 0) - ) - (call_indirect $0 (type $sig_funcref) - (local.get $local_funcref) - (i32.const 1) - ) - (call_indirect $0 (type $sig_funcref) - (global.get $global_funcref) - (i32.const 1) - ) - (call_indirect $0 (type $sig_funcref) - (ref.null nofunc) - (i32.const 1) - ) - (call_indirect $0 (type $sig_funcref) - (ref.func $foo) - (i32.const 1) - ) - (call_indirect $0 (type $sig_anyref) - (local.get $local_anyref) - (i32.const 3) - ) - (call_indirect $0 (type $sig_anyref) - (global.get $global_anyref) - (i32.const 3) - ) - (call_indirect $0 (type $sig_anyref) - (ref.null none) - (i32.const 3) - ) - (call_indirect $0 (type $sig_anyref) - (local.get $local_eqref) - (i32.const 3) - ) - (call_indirect $0 (type $sig_anyref) - (global.get $global_eqref) - (i32.const 3) - ) - (call_indirect $0 (type $sig_anyref) - (ref.null none) - (i32.const 3) - ) - (drop - (block $label$1 (result eqref) - (br_if $label$1 - (local.get $local_eqref) - (i32.const 1) - ) - ) - ) - (drop - (block $label$2 (result eqref) - (br_if $label$2 - (global.get $global_eqref) - (i32.const 1) - ) - ) - ) - (drop - (block $label$3 (result eqref) - (br_if $label$3 - (ref.null none) - (i32.const 1) - ) - ) - ) - (drop - (block $label$4 (result funcref) - (br_if $label$4 - (local.get $local_funcref) - (i32.const 1) - ) - ) - ) - (drop - (block $label$5 (result funcref) - (br_if $label$5 - (global.get $global_funcref) - (i32.const 1) - ) - ) - ) - (drop - (block $label$6 (result funcref) - (br_if $label$6 - (ref.null nofunc) - (i32.const 1) - ) - ) - ) - (drop - (block $label$7 (result funcref) - (br_if $label$7 - (ref.func $foo) - (i32.const 1) - ) - ) - ) - (drop - (block $label$8 (result anyref) - (br_if $label$8 - (local.get $local_anyref) - (i32.const 1) - ) - ) - ) - (drop - (block $label$9 (result anyref) - (br_if $label$9 - (global.get $global_anyref) - (i32.const 1) - ) - ) - ) - (drop - (block $label$10 (result anyref) - (br_if $label$10 - (ref.null none) - (i32.const 1) - ) - ) - ) - (drop - (block $label$11 (result anyref) - (br_if $label$11 - (local.get $local_eqref) - (i32.const 1) - ) - ) - ) - (drop - (block $label$12 (result anyref) - (br_if $label$12 - (ref.null none) - (i32.const 1) - ) - ) - ) - (drop - (loop $label$13 (result eqref) - (local.get $local_eqref) - ) - ) - (drop - (loop $label$14 (result eqref) - (global.get $global_eqref) - ) - ) - (drop - (loop $label$15 (result eqref) - (ref.null none) - ) - ) - (drop - (loop $label$16 (result funcref) - (local.get $local_funcref) - ) - ) - (drop - (loop $label$17 (result funcref) - (global.get $global_funcref) - ) - ) - (drop - (loop $label$18 (result funcref) - (ref.null nofunc) - ) - ) - (drop - (loop $label$19 (result funcref) - (ref.func $foo) - ) - ) - (drop - (loop $label$20 (result anyref) - (local.get $local_anyref) - ) - ) - (drop - (loop $label$21 (result anyref) - (global.get $global_anyref) - ) - ) - (drop - (loop $label$22 (result anyref) - (ref.null none) - ) - ) - (drop - (loop $label$23 (result anyref) - (local.get $local_eqref) - ) - ) - (drop - (loop $label$24 (result anyref) - (global.get $global_eqref) - ) - ) - (drop - (loop $label$25 (result anyref) - (ref.null none) - ) - ) - (drop - (if (result eqref) - (i32.const 1) - (local.get $local_eqref) - (ref.null none) - ) - ) - (drop - (if (result funcref) - (i32.const 1) - (local.get $local_funcref) - (ref.null nofunc) - ) - ) - (drop - (if (result anyref) - (i32.const 1) - (local.get $local_anyref) - (ref.null none) - ) - ) - (drop - (if (result anyref) - (i32.const 1) - (local.get $local_eqref) - (local.get $local_eqref) - ) - ) - (drop - (if (result anyref) - (i32.const 1) - (ref.null none) - (ref.null none) - ) - ) - (drop - (if (result anyref) - (i32.const 1) - (ref.i31 - (i32.const 0) - ) - (ref.null none) - ) - ) - (drop - (try $label$40 (result eqref) - (do - (local.get $local_eqref) - ) - (catch $e-i32 - (drop - (pop i32) - ) - (ref.null none) - ) - ) - ) - (drop - (try $label$43 (result funcref) - (do - (ref.func $foo) - ) - (catch $e-i32 - (drop - (pop i32) - ) - (ref.null nofunc) - ) - ) - ) - (drop - (try $label$46 (result anyref) - (do - (local.get $local_eqref) - ) - (catch $e-i32 - (drop - (pop i32) - ) - (ref.null none) - ) - ) - ) - (drop - (try $label$49 (result anyref) - (do - (ref.null none) - ) - (catch $e-i32 - (drop - (pop i32) - ) - (local.get $local_eqref) - ) - ) - ) - (drop - (select (result eqref) - (local.get $local_eqref) - (ref.null none) - (i32.const 1) - ) - ) - (drop - (select (result funcref) - (local.get $local_funcref) - (ref.null nofunc) - (i32.const 1) - ) - ) - (drop - (select - (i32.const 0) - (i32.const 2) - (i32.const 1) - ) - ) - (drop - (select (result anyref) - (local.get $local_eqref) - (ref.i31 - (i32.const 0) - ) - (i32.const 1) - ) - ) - (drop - (ref.is_null - (local.get $local_eqref) - ) - ) - (drop - (ref.is_null - (global.get $global_eqref) - ) - ) - (drop - (ref.is_null - (ref.null none) - ) - ) - (drop - (ref.is_null - (local.get $local_funcref) - ) - ) - (drop - (ref.is_null - (global.get $global_funcref) - ) - ) - (drop - (ref.is_null - (ref.null nofunc) - ) - ) - (drop - (ref.is_null - (ref.func $foo) - ) - ) - (drop - (ref.is_null - (local.get $local_anyref) - ) - ) - (drop - (ref.is_null - (global.get $global_anyref) - ) - ) - (drop - (ref.is_null - (ref.null none) - ) - ) - ) - (func $return_eqref_local (type $6) (result eqref) - (local $local_eqref eqref) - (local.get $local_eqref) - ) - (func $return_eqref_global (type $6) (result eqref) - (global.get $global_eqref) - ) - (func $return_eqref_null (type $6) (result eqref) - (ref.null none) - ) - (func $return_funcref_local (type $3) (result funcref) - (local $local_funcref funcref) - (local.get $local_funcref) - ) - (func $return_funcref_global (type $3) (result funcref) - (global.get $global_funcref) - ) - (func $return_funcref_null (type $3) (result funcref) - (ref.null nofunc) - ) - (func $return_funcref_func (type $3) (result funcref) - (ref.func $foo) - ) - (func $return_anyref_local (type $0) (result anyref) - (local $local_anyref anyref) - (local.get $local_anyref) - ) - (func $return_anyref_global (type $0) (result anyref) - (global.get $global_anyref) - ) - (func $return_anyref_null (type $0) (result anyref) - (ref.null none) - ) - (func $return_anyref2 (type $0) (result anyref) - (local $local_eqref eqref) - (local.get $local_eqref) - ) - (func $return_anyref3 (type $0) (result anyref) - (global.get $global_eqref) - ) - (func $return_anyref4 (type $0) (result anyref) - (ref.null none) - ) - (func $returns_eqref (type $6) (result eqref) - (local $local_eqref eqref) - (return - (local.get $local_eqref) - ) - ) - (func $returns_funcref (type $3) (result funcref) - (local $local_funcref funcref) - (return - (local.get $local_funcref) - ) - ) - (func $returns_anyref (type $0) (result anyref) - (local $local_anyref anyref) - (return - (local.get $local_anyref) - ) - ) - (func $returns_anyref2 (type $0) (result anyref) - (local $local_eqref eqref) - (local $local_funcref funcref) - (return - (local.get $local_eqref) - ) - ) - (func $ref-user (type $5) - (drop - (ref.func $ref-taken-but-not-in-table) - ) - ) - (func $ref-taken-but-not-in-table (type $5) - (nop) - ) -) - diff --git a/test/reference-types.wast.fromBinary.noDebugInfo b/test/reference-types.wast.fromBinary.noDebugInfo deleted file mode 100644 index 983dc58fe..000000000 --- a/test/reference-types.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,624 +0,0 @@ -(module - (type $0 (func (result anyref))) - (type $1 (func (param anyref))) - (type $2 (func (param funcref))) - (type $3 (func (result funcref))) - (type $4 (func (param eqref))) - (type $5 (func)) - (type $6 (func (result eqref))) - (type $7 (func (param i32))) - (type $8 (func (param eqref) (result funcref))) - (import "env" "import_global" (global $gimport$0 eqref)) - (import "env" "import_func" (func $fimport$0 (type $8) (param eqref) (result funcref))) - (global $global$0 (mut eqref) (ref.null none)) - (global $global$1 (mut funcref) (ref.null nofunc)) - (global $global$2 (mut funcref) (ref.func $3)) - (global $global$3 (mut anyref) (ref.null none)) - (global $global$4 (mut anyref) (ref.null none)) - (table $0 3 3 funcref) - (elem $0 (i32.const 0) $0 $1 $2) - (elem declare func $23 $3) - (tag $tag$0 (param i32)) - (export "export_func" (func $fimport$0)) - (export "export_global" (global $gimport$0)) - (func $0 (type $4) (param $0 eqref) - (nop) - ) - (func $1 (type $2) (param $0 funcref) - (nop) - ) - (func $2 (type $1) (param $0 anyref) - (nop) - ) - (func $3 (type $5) - (nop) - ) - (func $4 (type $5) - (local $0 eqref) - (local $1 funcref) - (local $2 anyref) - (local.set $0 - (local.get $0) - ) - (local.set $0 - (global.get $global$0) - ) - (local.set $0 - (ref.null none) - ) - (local.set $1 - (local.get $1) - ) - (local.set $1 - (global.get $global$1) - ) - (local.set $1 - (ref.null nofunc) - ) - (local.set $1 - (ref.func $3) - ) - (local.set $2 - (local.get $2) - ) - (local.set $2 - (global.get $global$3) - ) - (local.set $2 - (ref.null none) - ) - (local.set $2 - (local.get $0) - ) - (local.set $2 - (global.get $global$0) - ) - (local.set $2 - (ref.null none) - ) - (global.set $global$0 - (global.get $global$0) - ) - (global.set $global$0 - (local.get $0) - ) - (global.set $global$0 - (ref.null none) - ) - (global.set $global$1 - (global.get $global$1) - ) - (global.set $global$1 - (local.get $1) - ) - (global.set $global$1 - (ref.null nofunc) - ) - (global.set $global$1 - (ref.func $3) - ) - (global.set $global$3 - (global.get $global$3) - ) - (global.set $global$3 - (local.get $2) - ) - (global.set $global$3 - (ref.null none) - ) - (global.set $global$3 - (global.get $global$0) - ) - (global.set $global$3 - (local.get $0) - ) - (global.set $global$3 - (ref.null none) - ) - (call $0 - (local.get $0) - ) - (call $0 - (global.get $global$0) - ) - (call $0 - (ref.null none) - ) - (call $1 - (local.get $1) - ) - (call $1 - (global.get $global$1) - ) - (call $1 - (ref.null nofunc) - ) - (call $1 - (ref.func $3) - ) - (call $2 - (local.get $2) - ) - (call $2 - (global.get $global$3) - ) - (call $2 - (ref.null none) - ) - (call $2 - (local.get $0) - ) - (call $2 - (global.get $global$0) - ) - (call $2 - (ref.null none) - ) - (call_indirect $0 (type $4) - (local.get $0) - (i32.const 0) - ) - (call_indirect $0 (type $4) - (global.get $global$0) - (i32.const 0) - ) - (call_indirect $0 (type $4) - (ref.null none) - (i32.const 0) - ) - (call_indirect $0 (type $2) - (local.get $1) - (i32.const 1) - ) - (call_indirect $0 (type $2) - (global.get $global$1) - (i32.const 1) - ) - (call_indirect $0 (type $2) - (ref.null nofunc) - (i32.const 1) - ) - (call_indirect $0 (type $2) - (ref.func $3) - (i32.const 1) - ) - (call_indirect $0 (type $1) - (local.get $2) - (i32.const 3) - ) - (call_indirect $0 (type $1) - (global.get $global$3) - (i32.const 3) - ) - (call_indirect $0 (type $1) - (ref.null none) - (i32.const 3) - ) - (call_indirect $0 (type $1) - (local.get $0) - (i32.const 3) - ) - (call_indirect $0 (type $1) - (global.get $global$0) - (i32.const 3) - ) - (call_indirect $0 (type $1) - (ref.null none) - (i32.const 3) - ) - (drop - (block $label$1 (result eqref) - (br_if $label$1 - (local.get $0) - (i32.const 1) - ) - ) - ) - (drop - (block $label$2 (result eqref) - (br_if $label$2 - (global.get $global$0) - (i32.const 1) - ) - ) - ) - (drop - (block $label$3 (result eqref) - (br_if $label$3 - (ref.null none) - (i32.const 1) - ) - ) - ) - (drop - (block $label$4 (result funcref) - (br_if $label$4 - (local.get $1) - (i32.const 1) - ) - ) - ) - (drop - (block $label$5 (result funcref) - (br_if $label$5 - (global.get $global$1) - (i32.const 1) - ) - ) - ) - (drop - (block $label$6 (result funcref) - (br_if $label$6 - (ref.null nofunc) - (i32.const 1) - ) - ) - ) - (drop - (block $label$7 (result funcref) - (br_if $label$7 - (ref.func $3) - (i32.const 1) - ) - ) - ) - (drop - (block $label$8 (result anyref) - (br_if $label$8 - (local.get $2) - (i32.const 1) - ) - ) - ) - (drop - (block $label$9 (result anyref) - (br_if $label$9 - (global.get $global$3) - (i32.const 1) - ) - ) - ) - (drop - (block $label$10 (result anyref) - (br_if $label$10 - (ref.null none) - (i32.const 1) - ) - ) - ) - (drop - (block $label$11 (result anyref) - (br_if $label$11 - (local.get $0) - (i32.const 1) - ) - ) - ) - (drop - (block $label$12 (result anyref) - (br_if $label$12 - (ref.null none) - (i32.const 1) - ) - ) - ) - (drop - (loop $label$13 (result eqref) - (local.get $0) - ) - ) - (drop - (loop $label$14 (result eqref) - (global.get $global$0) - ) - ) - (drop - (loop $label$15 (result eqref) - (ref.null none) - ) - ) - (drop - (loop $label$16 (result funcref) - (local.get $1) - ) - ) - (drop - (loop $label$17 (result funcref) - (global.get $global$1) - ) - ) - (drop - (loop $label$18 (result funcref) - (ref.null nofunc) - ) - ) - (drop - (loop $label$19 (result funcref) - (ref.func $3) - ) - ) - (drop - (loop $label$20 (result anyref) - (local.get $2) - ) - ) - (drop - (loop $label$21 (result anyref) - (global.get $global$3) - ) - ) - (drop - (loop $label$22 (result anyref) - (ref.null none) - ) - ) - (drop - (loop $label$23 (result anyref) - (local.get $0) - ) - ) - (drop - (loop $label$24 (result anyref) - (global.get $global$0) - ) - ) - (drop - (loop $label$25 (result anyref) - (ref.null none) - ) - ) - (drop - (if (result eqref) - (i32.const 1) - (local.get $0) - (ref.null none) - ) - ) - (drop - (if (result funcref) - (i32.const 1) - (local.get $1) - (ref.null nofunc) - ) - ) - (drop - (if (result anyref) - (i32.const 1) - (local.get $2) - (ref.null none) - ) - ) - (drop - (if (result anyref) - (i32.const 1) - (local.get $0) - (local.get $0) - ) - ) - (drop - (if (result anyref) - (i32.const 1) - (ref.null none) - (ref.null none) - ) - ) - (drop - (if (result anyref) - (i32.const 1) - (ref.i31 - (i32.const 0) - ) - (ref.null none) - ) - ) - (drop - (try $label$40 (result eqref) - (do - (local.get $0) - ) - (catch $tag$0 - (drop - (pop i32) - ) - (ref.null none) - ) - ) - ) - (drop - (try $label$43 (result funcref) - (do - (ref.func $3) - ) - (catch $tag$0 - (drop - (pop i32) - ) - (ref.null nofunc) - ) - ) - ) - (drop - (try $label$46 (result anyref) - (do - (local.get $0) - ) - (catch $tag$0 - (drop - (pop i32) - ) - (ref.null none) - ) - ) - ) - (drop - (try $label$49 (result anyref) - (do - (ref.null none) - ) - (catch $tag$0 - (drop - (pop i32) - ) - (local.get $0) - ) - ) - ) - (drop - (select (result eqref) - (local.get $0) - (ref.null none) - (i32.const 1) - ) - ) - (drop - (select (result funcref) - (local.get $1) - (ref.null nofunc) - (i32.const 1) - ) - ) - (drop - (select - (i32.const 0) - (i32.const 2) - (i32.const 1) - ) - ) - (drop - (select (result anyref) - (local.get $0) - (ref.i31 - (i32.const 0) - ) - (i32.const 1) - ) - ) - (drop - (ref.is_null - (local.get $0) - ) - ) - (drop - (ref.is_null - (global.get $global$0) - ) - ) - (drop - (ref.is_null - (ref.null none) - ) - ) - (drop - (ref.is_null - (local.get $1) - ) - ) - (drop - (ref.is_null - (global.get $global$1) - ) - ) - (drop - (ref.is_null - (ref.null nofunc) - ) - ) - (drop - (ref.is_null - (ref.func $3) - ) - ) - (drop - (ref.is_null - (local.get $2) - ) - ) - (drop - (ref.is_null - (global.get $global$3) - ) - ) - (drop - (ref.is_null - (ref.null none) - ) - ) - ) - (func $5 (type $6) (result eqref) - (local $0 eqref) - (local.get $0) - ) - (func $6 (type $6) (result eqref) - (global.get $global$0) - ) - (func $7 (type $6) (result eqref) - (ref.null none) - ) - (func $8 (type $3) (result funcref) - (local $0 funcref) - (local.get $0) - ) - (func $9 (type $3) (result funcref) - (global.get $global$1) - ) - (func $10 (type $3) (result funcref) - (ref.null nofunc) - ) - (func $11 (type $3) (result funcref) - (ref.func $3) - ) - (func $12 (type $0) (result anyref) - (local $0 anyref) - (local.get $0) - ) - (func $13 (type $0) (result anyref) - (global.get $global$3) - ) - (func $14 (type $0) (result anyref) - (ref.null none) - ) - (func $15 (type $0) (result anyref) - (local $0 eqref) - (local.get $0) - ) - (func $16 (type $0) (result anyref) - (global.get $global$0) - ) - (func $17 (type $0) (result anyref) - (ref.null none) - ) - (func $18 (type $6) (result eqref) - (local $0 eqref) - (return - (local.get $0) - ) - ) - (func $19 (type $3) (result funcref) - (local $0 funcref) - (return - (local.get $0) - ) - ) - (func $20 (type $0) (result anyref) - (local $0 anyref) - (return - (local.get $0) - ) - ) - (func $21 (type $0) (result anyref) - (local $0 eqref) - (local $1 funcref) - (return - (local.get $0) - ) - ) - (func $22 (type $5) - (drop - (ref.func $23) - ) - ) - (func $23 (type $5) - (nop) - ) -) - diff --git a/test/reg_switch.wast b/test/reg_switch.wast deleted file mode 100644 index 3bae4683d..000000000 --- a/test/reg_switch.wast +++ /dev/null @@ -1,14 +0,0 @@ -(module - (type $0 (func)) - (memory $0 0) - (func $0 (type $0) - (if - (i32.const 0) - (block $A - (br_table $A - (i32.const 0) - ) - ) - ) - ) -) diff --git a/test/reg_switch.wast.from-wast b/test/reg_switch.wast.from-wast deleted file mode 100644 index a76690804..000000000 --- a/test/reg_switch.wast.from-wast +++ /dev/null @@ -1,14 +0,0 @@ -(module - (type $0 (func)) - (memory $0 0) - (func $0 (type $0) - (if - (i32.const 0) - (block $A - (br_table $A - (i32.const 0) - ) - ) - ) - ) -) diff --git a/test/reg_switch.wast.fromBinary b/test/reg_switch.wast.fromBinary deleted file mode 100644 index 00b78d79c..000000000 --- a/test/reg_switch.wast.fromBinary +++ /dev/null @@ -1,15 +0,0 @@ -(module - (type $0 (func)) - (memory $0 0) - (func $0 (type $0) - (if - (i32.const 0) - (block $label$2 - (br_table $label$2 - (i32.const 0) - ) - ) - ) - ) -) - diff --git a/test/reg_switch.wast.fromBinary.noDebugInfo b/test/reg_switch.wast.fromBinary.noDebugInfo deleted file mode 100644 index 00b78d79c..000000000 --- a/test/reg_switch.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,15 +0,0 @@ -(module - (type $0 (func)) - (memory $0 0) - (func $0 (type $0) - (if - (i32.const 0) - (block $label$2 - (br_table $label$2 - (i32.const 0) - ) - ) - ) - ) -) - diff --git a/test/segment-overlap.wast b/test/segment-overlap.wast deleted file mode 100644 index dce86fd88..000000000 --- a/test/segment-overlap.wast +++ /dev/null @@ -1,6 +0,0 @@ -(module - (memory $0 10) - (data (i32.const 100) "\ff\ff\ff\ff\ff\ff\ff\ff") ;; overlaps with the next - (data (i32.const 104) "\00\00\00\00") -) - diff --git a/test/segment-overlap.wast.from-wast b/test/segment-overlap.wast.from-wast deleted file mode 100644 index 52f23d834..000000000 --- a/test/segment-overlap.wast.from-wast +++ /dev/null @@ -1,5 +0,0 @@ -(module - (memory $0 10) - (data $0 (i32.const 100) "\ff\ff\ff\ff\ff\ff\ff\ff") - (data $1 (i32.const 104) "\00\00\00\00") -) diff --git a/test/segment-overlap.wast.fromBinary b/test/segment-overlap.wast.fromBinary deleted file mode 100644 index 6ff742a5f..000000000 --- a/test/segment-overlap.wast.fromBinary +++ /dev/null @@ -1,6 +0,0 @@ -(module - (memory $0 10) - (data $0 (i32.const 100) "\ff\ff\ff\ff\ff\ff\ff\ff") - (data $1 (i32.const 104) "\00\00\00\00") -) - diff --git a/test/segment-overlap.wast.fromBinary.noDebugInfo b/test/segment-overlap.wast.fromBinary.noDebugInfo deleted file mode 100644 index 6ff742a5f..000000000 --- a/test/segment-overlap.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,6 +0,0 @@ -(module - (memory $0 10) - (data $0 (i32.const 100) "\ff\ff\ff\ff\ff\ff\ff\ff") - (data $1 (i32.const 104) "\00\00\00\00") -) - diff --git a/test/signext.wast b/test/signext.wast deleted file mode 100644 index 74bd488e7..000000000 --- a/test/signext.wast +++ /dev/null @@ -1,12 +0,0 @@ -(module - (type $0 (func)) - (func $signext (type $0) - (local $0 i32) - (local $1 i64) - (drop (i32.extend8_s (local.get $0))) - (drop (i32.extend16_s (local.get $0))) - (drop (i64.extend8_s (local.get $1))) - (drop (i64.extend16_s (local.get $1))) - (drop (i64.extend32_s (local.get $1))) - ) -) diff --git a/test/signext.wast.from-wast b/test/signext.wast.from-wast deleted file mode 100644 index 128bf5b11..000000000 --- a/test/signext.wast.from-wast +++ /dev/null @@ -1,32 +0,0 @@ -(module - (type $0 (func)) - (func $signext (type $0) - (local $0 i32) - (local $1 i64) - (drop - (i32.extend8_s - (local.get $0) - ) - ) - (drop - (i32.extend16_s - (local.get $0) - ) - ) - (drop - (i64.extend8_s - (local.get $1) - ) - ) - (drop - (i64.extend16_s - (local.get $1) - ) - ) - (drop - (i64.extend32_s - (local.get $1) - ) - ) - ) -) diff --git a/test/signext.wast.fromBinary b/test/signext.wast.fromBinary deleted file mode 100644 index 55b8b92eb..000000000 --- a/test/signext.wast.fromBinary +++ /dev/null @@ -1,33 +0,0 @@ -(module - (type $0 (func)) - (func $signext (type $0) - (local $0 i32) - (local $1 i64) - (drop - (i32.extend8_s - (local.get $0) - ) - ) - (drop - (i32.extend16_s - (local.get $0) - ) - ) - (drop - (i64.extend8_s - (local.get $1) - ) - ) - (drop - (i64.extend16_s - (local.get $1) - ) - ) - (drop - (i64.extend32_s - (local.get $1) - ) - ) - ) -) - diff --git a/test/signext.wast.fromBinary.noDebugInfo b/test/signext.wast.fromBinary.noDebugInfo deleted file mode 100644 index e7b5303dd..000000000 --- a/test/signext.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,33 +0,0 @@ -(module - (type $0 (func)) - (func $0 (type $0) - (local $0 i32) - (local $1 i64) - (drop - (i32.extend8_s - (local.get $0) - ) - ) - (drop - (i32.extend16_s - (local.get $0) - ) - ) - (drop - (i64.extend8_s - (local.get $1) - ) - ) - (drop - (i64.extend16_s - (local.get $1) - ) - ) - (drop - (i64.extend32_s - (local.get $1) - ) - ) - ) -) - diff --git a/test/simd.wast b/test/simd.wast deleted file mode 100644 index a89efb384..000000000 --- a/test/simd.wast +++ /dev/null @@ -1,1372 +0,0 @@ -(module - (memory 1 1) - (func $v128.load (param $0 i32) (result v128) - (v128.load offset=0 align=16 - (local.get $0) - ) - ) - (func $v128.load8x8_s (param $0 i32) (result v128) - (v128.load8x8_s - (local.get $0) - ) - ) - (func $v128.load8x8_u (param $0 i32) (result v128) - (v128.load8x8_u - (local.get $0) - ) - ) - (func $v128.load16x4_s (param $0 i32) (result v128) - (v128.load16x4_s - (local.get $0) - ) - ) - (func $v128.load16x4_u (param $0 i32) (result v128) - (v128.load16x4_u - (local.get $0) - ) - ) - (func $v128.load32x2_s (param $0 i32) (result v128) - (v128.load32x2_s - (local.get $0) - ) - ) - (func $v128.load32x2_u (param $0 i32) (result v128) - (v128.load32x2_u - (local.get $0) - ) - ) - (func $v128.load8_splat (param $0 i32) (result v128) - (v128.load8_splat - (local.get $0) - ) - ) - (func $v128.load16_splat (param $0 i32) (result v128) - (v128.load16_splat - (local.get $0) - ) - ) - (func $v128.load32_splat (param $0 i32) (result v128) - (v128.load32_splat - (local.get $0) - ) - ) - (func $v128.load64_splat (param $0 i32) (result v128) - (v128.load64_splat - (local.get $0) - ) - ) - (func $v128.store (param $0 i32) (param $1 v128) - (v128.store offset=0 align=16 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.const.i8x16 (result v128) - (v128.const i8x16 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16) - ) - (func $v128.const.i16x8 (result v128) - (v128.const i16x8 1 2 3 4 5 6 7 8) - ) - (func $v128.const.i32x4 (result v128) - (v128.const i32x4 1 2 3 4) - ) - (func $v128.const.i64x2 (result v128) - (v128.const i64x2 1 2) - ) - (func $v128.const.f32x4 (result v128) - (v128.const f32x4 1.0 2 3 4) - ) - (func $v128.const.f64x2 (result v128) - (v128.const f64x2 1.0 2) - ) - (func $i8x16.shuffle (param $0 v128) (param $1 v128) (result v128) - (i8x16.shuffle 0 17 2 19 4 21 6 23 8 25 10 27 12 29 14 31 - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.swizzle (param $0 v128) (param $1 v128) (result v128) - (i8x16.swizzle - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.splat (param $0 i32) (result v128) - (i8x16.splat - (local.get $0) - ) - ) - (func $i16x8.splat (param $0 i32) (result v128) - (i16x8.splat - (local.get $0) - ) - ) - (func $f32x4.splat (param $0 f32) (result v128) - (f32x4.splat - (local.get $0) - ) - ) - (func $f64x2.splat (param $0 f64) (result v128) - (f64x2.splat - (local.get $0) - ) - ) - (func $i8x16.extract_lane_s (param $0 v128) (result i32) - (i8x16.extract_lane_s 0 - (local.get $0) - ) - ) - (func $i8x16.extract_lane_u (param $0 v128) (result i32) - (i8x16.extract_lane_u 0 - (local.get $0) - ) - ) - (func $i8x16.replace_lane (param $0 v128) (param $1 i32) (result v128) - (i8x16.replace_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.extract_lane_s (param $0 v128) (result i32) - (i16x8.extract_lane_s 0 - (local.get $0) - ) - ) - (func $i16x8.extract_lane_u (param $0 v128) (result i32) - (i16x8.extract_lane_u 0 - (local.get $0) - ) - ) - (func $i16x8.replace_lane (param $0 v128) (param $1 i32) (result v128) - (i16x8.replace_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.extract_lane (param $0 v128) (result i32) - (i32x4.extract_lane 0 - (local.get $0) - ) - ) - (func $i32x4.replace_lane (param $0 v128) (param $1 i32) (result v128) - (i32x4.replace_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.extract_lane (param $0 v128) (result i64) - (i64x2.extract_lane 0 - (local.get $0) - ) - ) - (func $i64x2.replace_lane (param $0 v128) (param $1 i64) (result v128) - (i64x2.replace_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.extract_lane (param $0 v128) (result f32) - (f32x4.extract_lane 0 - (local.get $0) - ) - ) - (func $f32x4.replace_lane (param $0 v128) (param $1 f32) (result v128) - (f32x4.replace_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.extract_lane (param $0 v128) (result f64) - (f64x2.extract_lane 0 - (local.get $0) - ) - ) - (func $f64x2.replace_lane (param $0 v128) (param $1 f64) (result v128) - (f64x2.replace_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.eq (param $0 v128) (param $1 v128) (result v128) - (i8x16.eq - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.ne (param $0 v128) (param $1 v128) (result v128) - (i8x16.ne - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.lt_s (param $0 v128) (param $1 v128) (result v128) - (i8x16.lt_s - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.lt_u (param $0 v128) (param $1 v128) (result v128) - (i8x16.lt_u - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.gt_s (param $0 v128) (param $1 v128) (result v128) - (i8x16.gt_s - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.gt_u (param $0 v128) (param $1 v128) (result v128) - (i8x16.gt_u - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.le_s (param $0 v128) (param $1 v128) (result v128) - (i8x16.le_s - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.le_u (param $0 v128) (param $1 v128) (result v128) - (i8x16.le_u - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.ge_s (param $0 v128) (param $1 v128) (result v128) - (i8x16.ge_s - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.ge_u (param $0 v128) (param $1 v128) (result v128) - (i8x16.ge_u - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.eq (param $0 v128) (param $1 v128) (result v128) - (i16x8.eq - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.ne (param $0 v128) (param $1 v128) (result v128) - (i16x8.ne - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.lt_s (param $0 v128) (param $1 v128) (result v128) - (i16x8.lt_s - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.lt_u (param $0 v128) (param $1 v128) (result v128) - (i16x8.lt_u - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.gt_s (param $0 v128) (param $1 v128) (result v128) - (i16x8.gt_s - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.gt_u (param $0 v128) (param $1 v128) (result v128) - (i16x8.gt_u - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.le_s (param $0 v128) (param $1 v128) (result v128) - (i16x8.le_s - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.le_u (param $0 v128) (param $1 v128) (result v128) - (i16x8.le_u - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.ge_s (param $0 v128) (param $1 v128) (result v128) - (i16x8.ge_s - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.ge_u (param $0 v128) (param $1 v128) (result v128) - (i16x8.ge_u - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.eq (param $0 v128) (param $1 v128) (result v128) - (i32x4.eq - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.ne (param $0 v128) (param $1 v128) (result v128) - (i32x4.ne - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.lt_s (param $0 v128) (param $1 v128) (result v128) - (i32x4.lt_s - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.lt_u (param $0 v128) (param $1 v128) (result v128) - (i32x4.lt_u - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.gt_s (param $0 v128) (param $1 v128) (result v128) - (i32x4.gt_s - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.gt_u (param $0 v128) (param $1 v128) (result v128) - (i32x4.gt_u - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.le_s (param $0 v128) (param $1 v128) (result v128) - (i32x4.le_s - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.le_u (param $0 v128) (param $1 v128) (result v128) - (i32x4.le_u - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.ge_s (param $0 v128) (param $1 v128) (result v128) - (i32x4.ge_s - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.ge_u (param $0 v128) (param $1 v128) (result v128) - (i32x4.ge_u - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.eq (param $0 v128) (param $1 v128) (result v128) - (f32x4.eq - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.ne (param $0 v128) (param $1 v128) (result v128) - (f32x4.ne - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.lt (param $0 v128) (param $1 v128) (result v128) - (f32x4.lt - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.gt (param $0 v128) (param $1 v128) (result v128) - (f32x4.gt - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.le (param $0 v128) (param $1 v128) (result v128) - (f32x4.le - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.ge (param $0 v128) (param $1 v128) (result v128) - (f32x4.ge - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.eq (param $0 v128) (param $1 v128) (result v128) - (f64x2.eq - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.ne (param $0 v128) (param $1 v128) (result v128) - (f64x2.ne - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.lt (param $0 v128) (param $1 v128) (result v128) - (f64x2.lt - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.gt (param $0 v128) (param $1 v128) (result v128) - (f64x2.gt - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.le (param $0 v128) (param $1 v128) (result v128) - (f64x2.le - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.ge (param $0 v128) (param $1 v128) (result v128) - (f64x2.ge - (local.get $0) - (local.get $1) - ) - ) - (func $v128.not (param $0 v128) (result v128) - (v128.not - (local.get $0) - ) - ) - (func $v128.and (param $0 v128) (param $1 v128) (result v128) - (v128.and - (local.get $0) - (local.get $1) - ) - ) - (func $v128.andnot (param $0 v128) (param $1 v128) (result v128) - (v128.andnot - (local.get $0) - (local.get $1) - ) - ) - (func $v128.or (param $0 v128) (param $1 v128) (result v128) - (v128.or - (local.get $0) - (local.get $1) - ) - ) - (func $v128.xor (param $0 v128) (param $1 v128) (result v128) - (v128.xor - (local.get $0) - (local.get $1) - ) - ) - (func $v128.bitselect (param $0 v128) (param $1 v128) (param $2 v128) (result v128) - (v128.bitselect - (local.get $0) - (local.get $1) - (local.get $2) - ) - ) - (func $v128.any_true (param $0 v128) (result i32) - (v128.any_true - (local.get $0) - ) - ) - (func $v128.load8_lane (param $0 i32) (param $1 v128) (result v128) - (v128.load8_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load16_lane (param $0 i32) (param $1 v128) (result v128) - (v128.load16_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load32_lane (param $0 i32) (param $1 v128) (result v128) - (v128.load32_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load64_lane (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load64_lane_align (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load64_lane_offset (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane offset=32 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load64_lane_align_offset (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane align=1 offset=32 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store8_lane (param $0 i32) (param $1 v128) - (v128.store8_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store16_lane (param $0 i32) (param $1 v128) - (v128.store16_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store32_lane (param $0 i32) (param $1 v128) - (v128.store32_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store64_lane (param $0 i32) (param $1 v128) - (v128.store64_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store64_lane_align (param $0 i32) (param $1 v128) - (v128.store64_lane align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store64_lane_offset (param $0 i32) (param $1 v128) - (v128.store64_lane offset=32 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store64_lane_align_offset (param $0 i32) (param $1 v128) - (v128.store64_lane align=1 offset=32 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load32_zero (param $0 i32) (result v128) - (v128.load32_zero - (local.get $0) - ) - ) - (func $v128.load64_zero (param $0 i32) (result v128) - (v128.load64_zero - (local.get $0) - ) - ) - (func $f32x4.demote_f64x2_zero (param $0 v128) (result v128) - (f32x4.demote_f64x2_zero - (local.get $0) - ) - ) - (func $f64x2.promote_low_f32x4 (param $0 v128) (result v128) - (f64x2.promote_low_f32x4 - (local.get $0) - ) - ) - (func $i8x16.abs (param $0 v128) (result v128) - (i8x16.abs - (local.get $0) - ) - ) - (func $i8x16.neg (param $0 v128) (result v128) - (i8x16.neg - (local.get $0) - ) - ) - (func $i8x16.popcnt (param $0 v128) (result v128) - (i8x16.popcnt - (local.get $0) - ) - ) - (func $i8x16.all_true (param $0 v128) (result i32) - (i8x16.all_true - (local.get $0) - ) - ) - (func $i8x16.bitmask (param $0 v128) (result i32) - (i8x16.bitmask - (local.get $0) - ) - ) - (func $i8x16.narrow_i16x8_s (param $0 v128) (param $1 v128) (result v128) - (i8x16.narrow_i16x8_s - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.narrow_i16x8_u (param $0 v128) (param $1 v128) (result v128) - (i8x16.narrow_i16x8_u - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.ceil (param $0 v128) (result v128) - (f32x4.ceil - (local.get $0) - ) - ) - (func $f32x4.floor (param $0 v128) (result v128) - (f32x4.floor - (local.get $0) - ) - ) - (func $f32x4.trunc (param $0 v128) (result v128) - (f32x4.trunc - (local.get $0) - ) - ) - (func $f32x4.nearest (param $0 v128) (result v128) - (f32x4.nearest - (local.get $0) - ) - ) - (func $i8x16.shl (param $0 v128) (param $1 i32) (result v128) - (i8x16.shl - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.shr_s (param $0 v128) (param $1 i32) (result v128) - (i8x16.shr_s - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.shr_u (param $0 v128) (param $1 i32) (result v128) - (i8x16.shr_u - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.add (param $0 v128) (param $1 v128) (result v128) - (i8x16.add - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.add_sat_s (param $0 v128) (param $1 v128) (result v128) - (i8x16.add_sat_s - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.add_sat_u (param $0 v128) (param $1 v128) (result v128) - (i8x16.add_sat_u - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.sub (param $0 v128) (param $1 v128) (result v128) - (i8x16.sub - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.sub_sat_s (param $0 v128) (param $1 v128) (result v128) - (i8x16.sub_sat_s - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.sub_sat_u (param $0 v128) (param $1 v128) (result v128) - (i8x16.sub_sat_u - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.ceil (param $0 v128) (result v128) - (f64x2.ceil - (local.get $0) - ) - ) - (func $f64x2.floor (param $0 v128) (result v128) - (f64x2.floor - (local.get $0) - ) - ) - (func $i8x16.min_s (param $0 v128) (param $1 v128) (result v128) - (i8x16.min_s - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.min_u (param $0 v128) (param $1 v128) (result v128) - (i8x16.min_u - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.max_s (param $0 v128) (param $1 v128) (result v128) - (i8x16.max_s - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.max_u (param $0 v128) (param $1 v128) (result v128) - (i8x16.max_u - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.trunc (param $0 v128) (result v128) - (f64x2.trunc - (local.get $0) - ) - ) - (func $i8x16.avgr_u (param $0 v128) (param $1 v128) (result v128) - (i8x16.avgr_u - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.extadd_pairwise_i8x16_s (param $0 v128) (result v128) - (i16x8.extadd_pairwise_i8x16_s - (local.get $0) - ) - ) - (func $i16x8.extadd_pairwise_i8x16_u (param $0 v128) (result v128) - (i16x8.extadd_pairwise_i8x16_u - (local.get $0) - ) - ) - (func $i32x4.extadd_pairwise_i16x8_s (param $0 v128) (result v128) - (i32x4.extadd_pairwise_i16x8_s - (local.get $0) - ) - ) - (func $i32x4.extadd_pairwise_i16x8_u (param $0 v128) (result v128) - (i32x4.extadd_pairwise_i16x8_u - (local.get $0) - ) - ) - (func $i16x8.abs (param $0 v128) (result v128) - (i16x8.abs - (local.get $0) - ) - ) - (func $i16x8.neg (param $0 v128) (result v128) - (i16x8.neg - (local.get $0) - ) - ) - (func $i16x8.q15mulr_sat_s (param $0 v128) (param $1 v128) (result v128) - (i16x8.q15mulr_sat_s - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.all_true (param $0 v128) (result i32) - (i16x8.all_true - (local.get $0) - ) - ) - (func $i16x8.bitmask (param $0 v128) (result i32) - (i16x8.bitmask - (local.get $0) - ) - ) - (func $i16x8.narrow_i32x4_s (param $0 v128) (param $1 v128) (result v128) - (i16x8.narrow_i32x4_s - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.narrow_i32x4_u (param $0 v128) (param $1 v128) (result v128) - (i16x8.narrow_i32x4_u - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.extend_low_i8x16_s (param $0 v128) (result v128) - (i16x8.extend_low_i8x16_s - (local.get $0) - ) - ) - (func $i16x8.extend_high_i8x16_s (param $0 v128) (result v128) - (i16x8.extend_high_i8x16_s - (local.get $0) - ) - ) - (func $i16x8.extend_low_i8x16_u (param $0 v128) (result v128) - (i16x8.extend_low_i8x16_u - (local.get $0) - ) - ) - (func $i16x8.extend_high_i8x16_u (param $0 v128) (result v128) - (i16x8.extend_high_i8x16_u - (local.get $0) - ) - ) -(func $i16x8.shl (param $0 v128) (param $1 i32) (result v128) - (i16x8.shl - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.shr_s (param $0 v128) (param $1 i32) (result v128) - (i16x8.shr_s - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.shr_u (param $0 v128) (param $1 i32) (result v128) - (i16x8.shr_u - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.add (param $0 v128) (param $1 v128) (result v128) - (i16x8.add - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.add_sat_s (param $0 v128) (param $1 v128) (result v128) - (i16x8.add_sat_s - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.add_sat_u (param $0 v128) (param $1 v128) (result v128) - (i16x8.add_sat_u - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.sub (param $0 v128) (param $1 v128) (result v128) - (i16x8.sub - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.sub_sat_s (param $0 v128) (param $1 v128) (result v128) - (i16x8.sub_sat_s - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.sub_sat_u (param $0 v128) (param $1 v128) (result v128) - (i16x8.sub_sat_u - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.nearest (param $0 v128) (result v128) - (f64x2.nearest - (local.get $0) - ) - ) - (func $i16x8.mul (param $0 v128) (param $1 v128) (result v128) - (i16x8.mul - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.min_s (param $0 v128) (param $1 v128) (result v128) - (i16x8.min_s - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.min_u (param $0 v128) (param $1 v128) (result v128) - (i16x8.min_u - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.max_s (param $0 v128) (param $1 v128) (result v128) - (i16x8.max_s - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.max_u (param $0 v128) (param $1 v128) (result v128) - (i16x8.max_u - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.avgr_u (param $0 v128) (param $1 v128) (result v128) - (i16x8.avgr_u - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.extmul_low_i8x16_s (param $0 v128) (param $1 v128) (result v128) - (i16x8.extmul_low_i8x16_s - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.extmul_high_i8x16_s (param $0 v128) (param $1 v128) (result v128) - (i16x8.extmul_high_i8x16_s - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.extmul_low_i8x16_u (param $0 v128) (param $1 v128) (result v128) - (i16x8.extmul_low_i8x16_u - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.extmul_high_i8x16_u (param $0 v128) (param $1 v128) (result v128) - (i16x8.extmul_high_i8x16_u - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.abs (param $0 v128) (result v128) - (i32x4.abs - (local.get $0) - ) - ) - (func $i32x4.neg (param $0 v128) (result v128) - (i32x4.neg - (local.get $0) - ) - ) - (func $i32x4.all_true (param $0 v128) (result i32) - (i32x4.all_true - (local.get $0) - ) - ) - (func $i32x4.bitmask (param $0 v128) (result i32) - (i32x4.bitmask - (local.get $0) - ) - ) - (func $i32x4.extend_low_i16x8_s (param $0 v128) (result v128) - (i32x4.extend_low_i16x8_s - (local.get $0) - ) - ) - (func $i32x4.extend_high_i16x8_s (param $0 v128) (result v128) - (i32x4.extend_high_i16x8_s - (local.get $0) - ) - ) - (func $i32x4.extend_low_i16x8_u (param $0 v128) (result v128) - (i32x4.extend_low_i16x8_u - (local.get $0) - ) - ) - (func $i32x4.extend_high_i16x8_u (param $0 v128) (result v128) - (i32x4.extend_high_i16x8_u - (local.get $0) - ) - ) - (func $i32x4.shl (param $0 v128) (param $1 i32) (result v128) - (i32x4.shl - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.shr_s (param $0 v128) (param $1 i32) (result v128) - (i32x4.shr_s - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.shr_u (param $0 v128) (param $1 i32) (result v128) - (i32x4.shr_u - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.add (param $0 v128) (param $1 v128) (result v128) - (i32x4.add - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.sub (param $0 v128) (param $1 v128) (result v128) - (i32x4.sub - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.mul (param $0 v128) (param $1 v128) (result v128) - (i32x4.mul - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.min_s (param $0 v128) (param $1 v128) (result v128) - (i32x4.min_s - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.min_u (param $0 v128) (param $1 v128) (result v128) - (i32x4.min_u - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.max_s (param $0 v128) (param $1 v128) (result v128) - (i32x4.max_s - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.max_u (param $0 v128) (param $1 v128) (result v128) - (i32x4.max_u - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.dot_i16x8_s (param $0 v128) (param $1 v128) (result v128) - (i32x4.dot_i16x8_s - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.extmul_low_i16x8_s (param $0 v128) (param $1 v128) (result v128) - (i32x4.extmul_low_i16x8_s - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.extmul_high_i16x8_s (param $0 v128) (param $1 v128) (result v128) - (i32x4.extmul_high_i16x8_s - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.extmul_low_i16x8_u (param $0 v128) (param $1 v128) (result v128) - (i32x4.extmul_low_i16x8_u - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.extmul_high_i16x8_u (param $0 v128) (param $1 v128) (result v128) - (i32x4.extmul_high_i16x8_u - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.abs (param $0 v128) (result v128) - (i64x2.abs - (local.get $0) - ) - ) - (func $i64x2.neg (param $0 v128) (result v128) - (i64x2.neg - (local.get $0) - ) - ) - (func $i64x2.all_true (param $0 v128) (result i32) - (i64x2.all_true - (local.get $0) - ) - ) - (func $i64x2.bitmask (param $0 v128) (result i32) - (i64x2.bitmask - (local.get $0) - ) - ) - (func $i64x2.extend_low_i32x4_s (param $0 v128) (result v128) - (i64x2.extend_low_i32x4_s - (local.get $0) - ) - ) - (func $i64x2.extend_high_i32x4_s (param $0 v128) (result v128) - (i64x2.extend_high_i32x4_s - (local.get $0) - ) - ) - (func $i64x2.extend_low_i32x4_u (param $0 v128) (result v128) - (i64x2.extend_low_i32x4_u - (local.get $0) - ) - ) - (func $i64x2.extend_high_i32x4_u (param $0 v128) (result v128) - (i64x2.extend_high_i32x4_u - (local.get $0) - ) - ) - (func $i64x2.shl (param $0 v128) (param $1 i32) (result v128) - (i64x2.shl - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.shr_s (param $0 v128) (param $1 i32) (result v128) - (i64x2.shr_s - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.shr_u (param $0 v128) (param $1 i32) (result v128) - (i64x2.shr_u - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.add (param $0 v128) (param $1 v128) (result v128) - (i64x2.add - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.sub (param $0 v128) (param $1 v128) (result v128) - (i64x2.sub - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.mul (param $0 v128) (param $1 v128) (result v128) - (i64x2.mul - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.eq (param $0 v128) (param $1 v128) (result v128) - (i64x2.eq - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.ne (param $0 v128) (param $1 v128) (result v128) - (i64x2.ne - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.lt_s (param $0 v128) (param $1 v128) (result v128) - (i64x2.lt_s - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.gt_s (param $0 v128) (param $1 v128) (result v128) - (i64x2.gt_s - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.le_s (param $0 v128) (param $1 v128) (result v128) - (i64x2.le_s - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.ge_s (param $0 v128) (param $1 v128) (result v128) - (i64x2.ge_s - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.extmul_low_i32x4_s (param $0 v128) (param $1 v128) (result v128) - (i64x2.extmul_low_i32x4_s - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.extmul_high_i32x4_s (param $0 v128) (param $1 v128) (result v128) - (i64x2.extmul_high_i32x4_s - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.extmul_low_i32x4_u (param $0 v128) (param $1 v128) (result v128) - (i64x2.extmul_low_i32x4_u - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.extmul_high_i32x4_u (param $0 v128) (param $1 v128) (result v128) - (i64x2.extmul_high_i32x4_u - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.abs (param $0 v128) (result v128) - (f32x4.abs - (local.get $0) - ) - ) - (func $f32x4.neg (param $0 v128) (result v128) - (f32x4.neg - (local.get $0) - ) - ) - (func $f32x4.sqrt (param $0 v128) (result v128) - (f32x4.sqrt - (local.get $0) - ) - ) - (func $f32x4.add (param $0 v128) (param $1 v128) (result v128) - (f32x4.add - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.sub (param $0 v128) (param $1 v128) (result v128) - (f32x4.sub - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.mul (param $0 v128) (param $1 v128) (result v128) - (f32x4.mul - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.div (param $0 v128) (param $1 v128) (result v128) - (f32x4.div - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.min (param $0 v128) (param $1 v128) (result v128) - (f32x4.min - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.max (param $0 v128) (param $1 v128) (result v128) - (f32x4.max - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.pmin (param $0 v128) (param $1 v128) (result v128) - (f32x4.pmin - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.pmax (param $0 v128) (param $1 v128) (result v128) - (f32x4.pmax - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.abs (param $0 v128) (result v128) - (f64x2.abs - (local.get $0) - ) - ) - (func $f64x2.neg (param $0 v128) (result v128) - (f64x2.neg - (local.get $0) - ) - ) - (func $f64x2.sqrt (param $0 v128) (result v128) - (f64x2.sqrt - (local.get $0) - ) - ) - (func $f64x2.add (param $0 v128) (param $1 v128) (result v128) - (f64x2.add - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.sub (param $0 v128) (param $1 v128) (result v128) - (f64x2.sub - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.mul (param $0 v128) (param $1 v128) (result v128) - (f64x2.mul - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.div (param $0 v128) (param $1 v128) (result v128) - (f64x2.div - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.min (param $0 v128) (param $1 v128) (result v128) - (f64x2.min - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.max (param $0 v128) (param $1 v128) (result v128) - (f64x2.max - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.pmin (param $0 v128) (param $1 v128) (result v128) - (f64x2.pmin - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.pmax (param $0 v128) (param $1 v128) (result v128) - (f64x2.pmax - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.trunc_sat_f32x4_s (param $0 v128) (result v128) - (i32x4.trunc_sat_f32x4_s - (local.get $0) - ) - ) - (func $i32x4.trunc_sat_f32x4_u (param $0 v128) (result v128) - (i32x4.trunc_sat_f32x4_u - (local.get $0) - ) - ) - (func $f32x4.convert_i32x4_s (param $0 v128) (result v128) - (f32x4.convert_i32x4_s - (local.get $0) - ) - ) - (func $f32x4.convert_i32x4_u (param $0 v128) (result v128) - (f32x4.convert_i32x4_u - (local.get $0) - ) - ) - (func $i32x4.trunc_sat_f64x2_s_zero (param $0 v128) (result v128) - (i32x4.trunc_sat_f64x2_s_zero - (local.get $0) - ) - ) - (func $i32x4.trunc_sat_f64x2_u_zero (param $0 v128) (result v128) - (i32x4.trunc_sat_f64x2_u_zero - (local.get $0) - ) - ) - (func $f64x2.convert_low_i32x4_s (param $0 v128) (result v128) - (f64x2.convert_low_i32x4_s - (local.get $0) - ) - ) - (func $f64x2.convert_low_i32x4_u (param $0 v128) (result v128) - (f64x2.convert_low_i32x4_u - (local.get $0) - ) - ) -) diff --git a/test/simd.wast.from-wast b/test/simd.wast.from-wast deleted file mode 100644 index b25fc0d45..000000000 --- a/test/simd.wast.from-wast +++ /dev/null @@ -1,1389 +0,0 @@ -(module - (type $0 (func (param v128 v128) (result v128))) - (type $1 (func (param v128) (result v128))) - (type $2 (func (param i32) (result v128))) - (type $3 (func (param v128 i32) (result v128))) - (type $4 (func (param v128) (result i32))) - (type $5 (func (param i32 v128))) - (type $6 (func (param i32 v128) (result v128))) - (type $7 (func (result v128))) - (type $8 (func (param f32) (result v128))) - (type $9 (func (param f64) (result v128))) - (type $10 (func (param v128) (result i64))) - (type $11 (func (param v128 i64) (result v128))) - (type $12 (func (param v128) (result f32))) - (type $13 (func (param v128 f32) (result v128))) - (type $14 (func (param v128) (result f64))) - (type $15 (func (param v128 f64) (result v128))) - (type $16 (func (param v128 v128 v128) (result v128))) - (memory $0 1 1) - (func $v128.load (type $2) (param $0 i32) (result v128) - (v128.load - (local.get $0) - ) - ) - (func $v128.load8x8_s (type $2) (param $0 i32) (result v128) - (v128.load8x8_s - (local.get $0) - ) - ) - (func $v128.load8x8_u (type $2) (param $0 i32) (result v128) - (v128.load8x8_u - (local.get $0) - ) - ) - (func $v128.load16x4_s (type $2) (param $0 i32) (result v128) - (v128.load16x4_s - (local.get $0) - ) - ) - (func $v128.load16x4_u (type $2) (param $0 i32) (result v128) - (v128.load16x4_u - (local.get $0) - ) - ) - (func $v128.load32x2_s (type $2) (param $0 i32) (result v128) - (v128.load32x2_s - (local.get $0) - ) - ) - (func $v128.load32x2_u (type $2) (param $0 i32) (result v128) - (v128.load32x2_u - (local.get $0) - ) - ) - (func $v128.load8_splat (type $2) (param $0 i32) (result v128) - (v128.load8_splat - (local.get $0) - ) - ) - (func $v128.load16_splat (type $2) (param $0 i32) (result v128) - (v128.load16_splat - (local.get $0) - ) - ) - (func $v128.load32_splat (type $2) (param $0 i32) (result v128) - (v128.load32_splat - (local.get $0) - ) - ) - (func $v128.load64_splat (type $2) (param $0 i32) (result v128) - (v128.load64_splat - (local.get $0) - ) - ) - (func $v128.store (type $5) (param $0 i32) (param $1 v128) - (v128.store - (local.get $0) - (local.get $1) - ) - ) - (func $v128.const.i8x16 (type $7) (result v128) - (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) - ) - (func $v128.const.i16x8 (type $7) (result v128) - (v128.const i32x4 0x00020001 0x00040003 0x00060005 0x00080007) - ) - (func $v128.const.i32x4 (type $7) (result v128) - (v128.const i32x4 0x00000001 0x00000002 0x00000003 0x00000004) - ) - (func $v128.const.i64x2 (type $7) (result v128) - (v128.const i32x4 0x00000001 0x00000000 0x00000002 0x00000000) - ) - (func $v128.const.f32x4 (type $7) (result v128) - (v128.const i32x4 0x3f800000 0x40000000 0x40400000 0x40800000) - ) - (func $v128.const.f64x2 (type $7) (result v128) - (v128.const i32x4 0x00000000 0x3ff00000 0x00000000 0x40000000) - ) - (func $i8x16.shuffle (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.shuffle 0 17 2 19 4 21 6 23 8 25 10 27 12 29 14 31 - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.swizzle (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.swizzle - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.splat (type $2) (param $0 i32) (result v128) - (i8x16.splat - (local.get $0) - ) - ) - (func $i16x8.splat (type $2) (param $0 i32) (result v128) - (i16x8.splat - (local.get $0) - ) - ) - (func $f32x4.splat (type $8) (param $0 f32) (result v128) - (f32x4.splat - (local.get $0) - ) - ) - (func $f64x2.splat (type $9) (param $0 f64) (result v128) - (f64x2.splat - (local.get $0) - ) - ) - (func $i8x16.extract_lane_s (type $4) (param $0 v128) (result i32) - (i8x16.extract_lane_s 0 - (local.get $0) - ) - ) - (func $i8x16.extract_lane_u (type $4) (param $0 v128) (result i32) - (i8x16.extract_lane_u 0 - (local.get $0) - ) - ) - (func $i8x16.replace_lane (type $3) (param $0 v128) (param $1 i32) (result v128) - (i8x16.replace_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.extract_lane_s (type $4) (param $0 v128) (result i32) - (i16x8.extract_lane_s 0 - (local.get $0) - ) - ) - (func $i16x8.extract_lane_u (type $4) (param $0 v128) (result i32) - (i16x8.extract_lane_u 0 - (local.get $0) - ) - ) - (func $i16x8.replace_lane (type $3) (param $0 v128) (param $1 i32) (result v128) - (i16x8.replace_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.extract_lane (type $4) (param $0 v128) (result i32) - (i32x4.extract_lane 0 - (local.get $0) - ) - ) - (func $i32x4.replace_lane (type $3) (param $0 v128) (param $1 i32) (result v128) - (i32x4.replace_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.extract_lane (type $10) (param $0 v128) (result i64) - (i64x2.extract_lane 0 - (local.get $0) - ) - ) - (func $i64x2.replace_lane (type $11) (param $0 v128) (param $1 i64) (result v128) - (i64x2.replace_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.extract_lane (type $12) (param $0 v128) (result f32) - (f32x4.extract_lane 0 - (local.get $0) - ) - ) - (func $f32x4.replace_lane (type $13) (param $0 v128) (param $1 f32) (result v128) - (f32x4.replace_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.extract_lane (type $14) (param $0 v128) (result f64) - (f64x2.extract_lane 0 - (local.get $0) - ) - ) - (func $f64x2.replace_lane (type $15) (param $0 v128) (param $1 f64) (result v128) - (f64x2.replace_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.eq (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.eq - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.ne (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.ne - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.lt_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.lt_s - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.lt_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.lt_u - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.gt_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.gt_s - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.gt_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.gt_u - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.le_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.le_s - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.le_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.le_u - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.ge_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.ge_s - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.ge_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.ge_u - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.eq (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.eq - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.ne (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.ne - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.lt_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.lt_s - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.lt_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.lt_u - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.gt_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.gt_s - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.gt_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.gt_u - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.le_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.le_s - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.le_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.le_u - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.ge_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.ge_s - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.ge_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.ge_u - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.eq (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.eq - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.ne (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.ne - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.lt_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.lt_s - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.lt_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.lt_u - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.gt_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.gt_s - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.gt_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.gt_u - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.le_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.le_s - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.le_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.le_u - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.ge_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.ge_s - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.ge_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.ge_u - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.eq (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.eq - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.ne (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.ne - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.lt (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.lt - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.gt (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.gt - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.le (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.le - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.ge (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.ge - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.eq (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.eq - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.ne (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.ne - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.lt (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.lt - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.gt (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.gt - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.le (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.le - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.ge (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.ge - (local.get $0) - (local.get $1) - ) - ) - (func $v128.not (type $1) (param $0 v128) (result v128) - (v128.not - (local.get $0) - ) - ) - (func $v128.and (type $0) (param $0 v128) (param $1 v128) (result v128) - (v128.and - (local.get $0) - (local.get $1) - ) - ) - (func $v128.andnot (type $0) (param $0 v128) (param $1 v128) (result v128) - (v128.andnot - (local.get $0) - (local.get $1) - ) - ) - (func $v128.or (type $0) (param $0 v128) (param $1 v128) (result v128) - (v128.or - (local.get $0) - (local.get $1) - ) - ) - (func $v128.xor (type $0) (param $0 v128) (param $1 v128) (result v128) - (v128.xor - (local.get $0) - (local.get $1) - ) - ) - (func $v128.bitselect (type $16) (param $0 v128) (param $1 v128) (param $2 v128) (result v128) - (v128.bitselect - (local.get $0) - (local.get $1) - (local.get $2) - ) - ) - (func $v128.any_true (type $4) (param $0 v128) (result i32) - (v128.any_true - (local.get $0) - ) - ) - (func $v128.load8_lane (type $6) (param $0 i32) (param $1 v128) (result v128) - (v128.load8_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load16_lane (type $6) (param $0 i32) (param $1 v128) (result v128) - (v128.load16_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load32_lane (type $6) (param $0 i32) (param $1 v128) (result v128) - (v128.load32_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load64_lane (type $6) (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load64_lane_align (type $6) (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load64_lane_offset (type $6) (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane offset=32 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load64_lane_align_offset (type $6) (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane offset=32 align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store8_lane (type $5) (param $0 i32) (param $1 v128) - (v128.store8_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store16_lane (type $5) (param $0 i32) (param $1 v128) - (v128.store16_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store32_lane (type $5) (param $0 i32) (param $1 v128) - (v128.store32_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store64_lane (type $5) (param $0 i32) (param $1 v128) - (v128.store64_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store64_lane_align (type $5) (param $0 i32) (param $1 v128) - (v128.store64_lane align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store64_lane_offset (type $5) (param $0 i32) (param $1 v128) - (v128.store64_lane offset=32 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store64_lane_align_offset (type $5) (param $0 i32) (param $1 v128) - (v128.store64_lane offset=32 align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load32_zero (type $2) (param $0 i32) (result v128) - (v128.load32_zero - (local.get $0) - ) - ) - (func $v128.load64_zero (type $2) (param $0 i32) (result v128) - (v128.load64_zero - (local.get $0) - ) - ) - (func $f32x4.demote_f64x2_zero (type $1) (param $0 v128) (result v128) - (f32x4.demote_f64x2_zero - (local.get $0) - ) - ) - (func $f64x2.promote_low_f32x4 (type $1) (param $0 v128) (result v128) - (f64x2.promote_low_f32x4 - (local.get $0) - ) - ) - (func $i8x16.abs (type $1) (param $0 v128) (result v128) - (i8x16.abs - (local.get $0) - ) - ) - (func $i8x16.neg (type $1) (param $0 v128) (result v128) - (i8x16.neg - (local.get $0) - ) - ) - (func $i8x16.popcnt (type $1) (param $0 v128) (result v128) - (i8x16.popcnt - (local.get $0) - ) - ) - (func $i8x16.all_true (type $4) (param $0 v128) (result i32) - (i8x16.all_true - (local.get $0) - ) - ) - (func $i8x16.bitmask (type $4) (param $0 v128) (result i32) - (i8x16.bitmask - (local.get $0) - ) - ) - (func $i8x16.narrow_i16x8_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.narrow_i16x8_s - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.narrow_i16x8_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.narrow_i16x8_u - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.ceil (type $1) (param $0 v128) (result v128) - (f32x4.ceil - (local.get $0) - ) - ) - (func $f32x4.floor (type $1) (param $0 v128) (result v128) - (f32x4.floor - (local.get $0) - ) - ) - (func $f32x4.trunc (type $1) (param $0 v128) (result v128) - (f32x4.trunc - (local.get $0) - ) - ) - (func $f32x4.nearest (type $1) (param $0 v128) (result v128) - (f32x4.nearest - (local.get $0) - ) - ) - (func $i8x16.shl (type $3) (param $0 v128) (param $1 i32) (result v128) - (i8x16.shl - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.shr_s (type $3) (param $0 v128) (param $1 i32) (result v128) - (i8x16.shr_s - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.shr_u (type $3) (param $0 v128) (param $1 i32) (result v128) - (i8x16.shr_u - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.add (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.add - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.add_sat_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.add_sat_s - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.add_sat_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.add_sat_u - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.sub (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.sub - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.sub_sat_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.sub_sat_s - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.sub_sat_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.sub_sat_u - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.ceil (type $1) (param $0 v128) (result v128) - (f64x2.ceil - (local.get $0) - ) - ) - (func $f64x2.floor (type $1) (param $0 v128) (result v128) - (f64x2.floor - (local.get $0) - ) - ) - (func $i8x16.min_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.min_s - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.min_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.min_u - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.max_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.max_s - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.max_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.max_u - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.trunc (type $1) (param $0 v128) (result v128) - (f64x2.trunc - (local.get $0) - ) - ) - (func $i8x16.avgr_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.avgr_u - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.extadd_pairwise_i8x16_s (type $1) (param $0 v128) (result v128) - (i16x8.extadd_pairwise_i8x16_s - (local.get $0) - ) - ) - (func $i16x8.extadd_pairwise_i8x16_u (type $1) (param $0 v128) (result v128) - (i16x8.extadd_pairwise_i8x16_u - (local.get $0) - ) - ) - (func $i32x4.extadd_pairwise_i16x8_s (type $1) (param $0 v128) (result v128) - (i32x4.extadd_pairwise_i16x8_s - (local.get $0) - ) - ) - (func $i32x4.extadd_pairwise_i16x8_u (type $1) (param $0 v128) (result v128) - (i32x4.extadd_pairwise_i16x8_u - (local.get $0) - ) - ) - (func $i16x8.abs (type $1) (param $0 v128) (result v128) - (i16x8.abs - (local.get $0) - ) - ) - (func $i16x8.neg (type $1) (param $0 v128) (result v128) - (i16x8.neg - (local.get $0) - ) - ) - (func $i16x8.q15mulr_sat_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.q15mulr_sat_s - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.all_true (type $4) (param $0 v128) (result i32) - (i16x8.all_true - (local.get $0) - ) - ) - (func $i16x8.bitmask (type $4) (param $0 v128) (result i32) - (i16x8.bitmask - (local.get $0) - ) - ) - (func $i16x8.narrow_i32x4_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.narrow_i32x4_s - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.narrow_i32x4_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.narrow_i32x4_u - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.extend_low_i8x16_s (type $1) (param $0 v128) (result v128) - (i16x8.extend_low_i8x16_s - (local.get $0) - ) - ) - (func $i16x8.extend_high_i8x16_s (type $1) (param $0 v128) (result v128) - (i16x8.extend_high_i8x16_s - (local.get $0) - ) - ) - (func $i16x8.extend_low_i8x16_u (type $1) (param $0 v128) (result v128) - (i16x8.extend_low_i8x16_u - (local.get $0) - ) - ) - (func $i16x8.extend_high_i8x16_u (type $1) (param $0 v128) (result v128) - (i16x8.extend_high_i8x16_u - (local.get $0) - ) - ) - (func $i16x8.shl (type $3) (param $0 v128) (param $1 i32) (result v128) - (i16x8.shl - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.shr_s (type $3) (param $0 v128) (param $1 i32) (result v128) - (i16x8.shr_s - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.shr_u (type $3) (param $0 v128) (param $1 i32) (result v128) - (i16x8.shr_u - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.add (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.add - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.add_sat_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.add_sat_s - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.add_sat_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.add_sat_u - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.sub (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.sub - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.sub_sat_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.sub_sat_s - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.sub_sat_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.sub_sat_u - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.nearest (type $1) (param $0 v128) (result v128) - (f64x2.nearest - (local.get $0) - ) - ) - (func $i16x8.mul (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.mul - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.min_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.min_s - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.min_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.min_u - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.max_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.max_s - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.max_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.max_u - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.avgr_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.avgr_u - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.extmul_low_i8x16_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.extmul_low_i8x16_s - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.extmul_high_i8x16_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.extmul_high_i8x16_s - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.extmul_low_i8x16_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.extmul_low_i8x16_u - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.extmul_high_i8x16_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.extmul_high_i8x16_u - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.abs (type $1) (param $0 v128) (result v128) - (i32x4.abs - (local.get $0) - ) - ) - (func $i32x4.neg (type $1) (param $0 v128) (result v128) - (i32x4.neg - (local.get $0) - ) - ) - (func $i32x4.all_true (type $4) (param $0 v128) (result i32) - (i32x4.all_true - (local.get $0) - ) - ) - (func $i32x4.bitmask (type $4) (param $0 v128) (result i32) - (i32x4.bitmask - (local.get $0) - ) - ) - (func $i32x4.extend_low_i16x8_s (type $1) (param $0 v128) (result v128) - (i32x4.extend_low_i16x8_s - (local.get $0) - ) - ) - (func $i32x4.extend_high_i16x8_s (type $1) (param $0 v128) (result v128) - (i32x4.extend_high_i16x8_s - (local.get $0) - ) - ) - (func $i32x4.extend_low_i16x8_u (type $1) (param $0 v128) (result v128) - (i32x4.extend_low_i16x8_u - (local.get $0) - ) - ) - (func $i32x4.extend_high_i16x8_u (type $1) (param $0 v128) (result v128) - (i32x4.extend_high_i16x8_u - (local.get $0) - ) - ) - (func $i32x4.shl (type $3) (param $0 v128) (param $1 i32) (result v128) - (i32x4.shl - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.shr_s (type $3) (param $0 v128) (param $1 i32) (result v128) - (i32x4.shr_s - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.shr_u (type $3) (param $0 v128) (param $1 i32) (result v128) - (i32x4.shr_u - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.add (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.add - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.sub (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.sub - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.mul (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.mul - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.min_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.min_s - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.min_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.min_u - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.max_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.max_s - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.max_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.max_u - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.dot_i16x8_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.dot_i16x8_s - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.extmul_low_i16x8_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.extmul_low_i16x8_s - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.extmul_high_i16x8_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.extmul_high_i16x8_s - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.extmul_low_i16x8_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.extmul_low_i16x8_u - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.extmul_high_i16x8_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.extmul_high_i16x8_u - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.abs (type $1) (param $0 v128) (result v128) - (i64x2.abs - (local.get $0) - ) - ) - (func $i64x2.neg (type $1) (param $0 v128) (result v128) - (i64x2.neg - (local.get $0) - ) - ) - (func $i64x2.all_true (type $4) (param $0 v128) (result i32) - (i64x2.all_true - (local.get $0) - ) - ) - (func $i64x2.bitmask (type $4) (param $0 v128) (result i32) - (i64x2.bitmask - (local.get $0) - ) - ) - (func $i64x2.extend_low_i32x4_s (type $1) (param $0 v128) (result v128) - (i64x2.extend_low_i32x4_s - (local.get $0) - ) - ) - (func $i64x2.extend_high_i32x4_s (type $1) (param $0 v128) (result v128) - (i64x2.extend_high_i32x4_s - (local.get $0) - ) - ) - (func $i64x2.extend_low_i32x4_u (type $1) (param $0 v128) (result v128) - (i64x2.extend_low_i32x4_u - (local.get $0) - ) - ) - (func $i64x2.extend_high_i32x4_u (type $1) (param $0 v128) (result v128) - (i64x2.extend_high_i32x4_u - (local.get $0) - ) - ) - (func $i64x2.shl (type $3) (param $0 v128) (param $1 i32) (result v128) - (i64x2.shl - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.shr_s (type $3) (param $0 v128) (param $1 i32) (result v128) - (i64x2.shr_s - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.shr_u (type $3) (param $0 v128) (param $1 i32) (result v128) - (i64x2.shr_u - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.add (type $0) (param $0 v128) (param $1 v128) (result v128) - (i64x2.add - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.sub (type $0) (param $0 v128) (param $1 v128) (result v128) - (i64x2.sub - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.mul (type $0) (param $0 v128) (param $1 v128) (result v128) - (i64x2.mul - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.eq (type $0) (param $0 v128) (param $1 v128) (result v128) - (i64x2.eq - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.ne (type $0) (param $0 v128) (param $1 v128) (result v128) - (i64x2.ne - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.lt_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i64x2.lt_s - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.gt_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i64x2.gt_s - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.le_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i64x2.le_s - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.ge_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i64x2.ge_s - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.extmul_low_i32x4_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i64x2.extmul_low_i32x4_s - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.extmul_high_i32x4_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i64x2.extmul_high_i32x4_s - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.extmul_low_i32x4_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i64x2.extmul_low_i32x4_u - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.extmul_high_i32x4_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i64x2.extmul_high_i32x4_u - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.abs (type $1) (param $0 v128) (result v128) - (f32x4.abs - (local.get $0) - ) - ) - (func $f32x4.neg (type $1) (param $0 v128) (result v128) - (f32x4.neg - (local.get $0) - ) - ) - (func $f32x4.sqrt (type $1) (param $0 v128) (result v128) - (f32x4.sqrt - (local.get $0) - ) - ) - (func $f32x4.add (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.add - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.sub (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.sub - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.mul (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.mul - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.div (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.div - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.min (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.min - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.max (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.max - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.pmin (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.pmin - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.pmax (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.pmax - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.abs (type $1) (param $0 v128) (result v128) - (f64x2.abs - (local.get $0) - ) - ) - (func $f64x2.neg (type $1) (param $0 v128) (result v128) - (f64x2.neg - (local.get $0) - ) - ) - (func $f64x2.sqrt (type $1) (param $0 v128) (result v128) - (f64x2.sqrt - (local.get $0) - ) - ) - (func $f64x2.add (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.add - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.sub (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.sub - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.mul (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.mul - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.div (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.div - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.min (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.min - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.max (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.max - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.pmin (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.pmin - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.pmax (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.pmax - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.trunc_sat_f32x4_s (type $1) (param $0 v128) (result v128) - (i32x4.trunc_sat_f32x4_s - (local.get $0) - ) - ) - (func $i32x4.trunc_sat_f32x4_u (type $1) (param $0 v128) (result v128) - (i32x4.trunc_sat_f32x4_u - (local.get $0) - ) - ) - (func $f32x4.convert_i32x4_s (type $1) (param $0 v128) (result v128) - (f32x4.convert_i32x4_s - (local.get $0) - ) - ) - (func $f32x4.convert_i32x4_u (type $1) (param $0 v128) (result v128) - (f32x4.convert_i32x4_u - (local.get $0) - ) - ) - (func $i32x4.trunc_sat_f64x2_s_zero (type $1) (param $0 v128) (result v128) - (i32x4.trunc_sat_f64x2_s_zero - (local.get $0) - ) - ) - (func $i32x4.trunc_sat_f64x2_u_zero (type $1) (param $0 v128) (result v128) - (i32x4.trunc_sat_f64x2_u_zero - (local.get $0) - ) - ) - (func $f64x2.convert_low_i32x4_s (type $1) (param $0 v128) (result v128) - (f64x2.convert_low_i32x4_s - (local.get $0) - ) - ) - (func $f64x2.convert_low_i32x4_u (type $1) (param $0 v128) (result v128) - (f64x2.convert_low_i32x4_u - (local.get $0) - ) - ) -) diff --git a/test/simd.wast.fromBinary b/test/simd.wast.fromBinary deleted file mode 100644 index 892d56754..000000000 --- a/test/simd.wast.fromBinary +++ /dev/null @@ -1,1390 +0,0 @@ -(module - (type $0 (func (param v128 v128) (result v128))) - (type $1 (func (param v128) (result v128))) - (type $2 (func (param i32) (result v128))) - (type $3 (func (param v128 i32) (result v128))) - (type $4 (func (param v128) (result i32))) - (type $5 (func (param i32 v128))) - (type $6 (func (param i32 v128) (result v128))) - (type $7 (func (result v128))) - (type $8 (func (param f32) (result v128))) - (type $9 (func (param f64) (result v128))) - (type $10 (func (param v128) (result i64))) - (type $11 (func (param v128 i64) (result v128))) - (type $12 (func (param v128) (result f32))) - (type $13 (func (param v128 f32) (result v128))) - (type $14 (func (param v128) (result f64))) - (type $15 (func (param v128 f64) (result v128))) - (type $16 (func (param v128 v128 v128) (result v128))) - (memory $0 1 1) - (func $v128.load (type $2) (param $0 i32) (result v128) - (v128.load - (local.get $0) - ) - ) - (func $v128.load8x8_s (type $2) (param $0 i32) (result v128) - (v128.load8x8_s - (local.get $0) - ) - ) - (func $v128.load8x8_u (type $2) (param $0 i32) (result v128) - (v128.load8x8_u - (local.get $0) - ) - ) - (func $v128.load16x4_s (type $2) (param $0 i32) (result v128) - (v128.load16x4_s - (local.get $0) - ) - ) - (func $v128.load16x4_u (type $2) (param $0 i32) (result v128) - (v128.load16x4_u - (local.get $0) - ) - ) - (func $v128.load32x2_s (type $2) (param $0 i32) (result v128) - (v128.load32x2_s - (local.get $0) - ) - ) - (func $v128.load32x2_u (type $2) (param $0 i32) (result v128) - (v128.load32x2_u - (local.get $0) - ) - ) - (func $v128.load8_splat (type $2) (param $0 i32) (result v128) - (v128.load8_splat - (local.get $0) - ) - ) - (func $v128.load16_splat (type $2) (param $0 i32) (result v128) - (v128.load16_splat - (local.get $0) - ) - ) - (func $v128.load32_splat (type $2) (param $0 i32) (result v128) - (v128.load32_splat - (local.get $0) - ) - ) - (func $v128.load64_splat (type $2) (param $0 i32) (result v128) - (v128.load64_splat - (local.get $0) - ) - ) - (func $v128.store (type $5) (param $0 i32) (param $1 v128) - (v128.store - (local.get $0) - (local.get $1) - ) - ) - (func $v128.const.i8x16 (type $7) (result v128) - (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) - ) - (func $v128.const.i16x8 (type $7) (result v128) - (v128.const i32x4 0x00020001 0x00040003 0x00060005 0x00080007) - ) - (func $v128.const.i32x4 (type $7) (result v128) - (v128.const i32x4 0x00000001 0x00000002 0x00000003 0x00000004) - ) - (func $v128.const.i64x2 (type $7) (result v128) - (v128.const i32x4 0x00000001 0x00000000 0x00000002 0x00000000) - ) - (func $v128.const.f32x4 (type $7) (result v128) - (v128.const i32x4 0x3f800000 0x40000000 0x40400000 0x40800000) - ) - (func $v128.const.f64x2 (type $7) (result v128) - (v128.const i32x4 0x00000000 0x3ff00000 0x00000000 0x40000000) - ) - (func $i8x16.shuffle (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.shuffle 0 17 2 19 4 21 6 23 8 25 10 27 12 29 14 31 - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.swizzle (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.swizzle - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.splat (type $2) (param $0 i32) (result v128) - (i8x16.splat - (local.get $0) - ) - ) - (func $i16x8.splat (type $2) (param $0 i32) (result v128) - (i16x8.splat - (local.get $0) - ) - ) - (func $f32x4.splat (type $8) (param $0 f32) (result v128) - (f32x4.splat - (local.get $0) - ) - ) - (func $f64x2.splat (type $9) (param $0 f64) (result v128) - (f64x2.splat - (local.get $0) - ) - ) - (func $i8x16.extract_lane_s (type $4) (param $0 v128) (result i32) - (i8x16.extract_lane_s 0 - (local.get $0) - ) - ) - (func $i8x16.extract_lane_u (type $4) (param $0 v128) (result i32) - (i8x16.extract_lane_u 0 - (local.get $0) - ) - ) - (func $i8x16.replace_lane (type $3) (param $0 v128) (param $1 i32) (result v128) - (i8x16.replace_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.extract_lane_s (type $4) (param $0 v128) (result i32) - (i16x8.extract_lane_s 0 - (local.get $0) - ) - ) - (func $i16x8.extract_lane_u (type $4) (param $0 v128) (result i32) - (i16x8.extract_lane_u 0 - (local.get $0) - ) - ) - (func $i16x8.replace_lane (type $3) (param $0 v128) (param $1 i32) (result v128) - (i16x8.replace_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.extract_lane (type $4) (param $0 v128) (result i32) - (i32x4.extract_lane 0 - (local.get $0) - ) - ) - (func $i32x4.replace_lane (type $3) (param $0 v128) (param $1 i32) (result v128) - (i32x4.replace_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.extract_lane (type $10) (param $0 v128) (result i64) - (i64x2.extract_lane 0 - (local.get $0) - ) - ) - (func $i64x2.replace_lane (type $11) (param $0 v128) (param $1 i64) (result v128) - (i64x2.replace_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.extract_lane (type $12) (param $0 v128) (result f32) - (f32x4.extract_lane 0 - (local.get $0) - ) - ) - (func $f32x4.replace_lane (type $13) (param $0 v128) (param $1 f32) (result v128) - (f32x4.replace_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.extract_lane (type $14) (param $0 v128) (result f64) - (f64x2.extract_lane 0 - (local.get $0) - ) - ) - (func $f64x2.replace_lane (type $15) (param $0 v128) (param $1 f64) (result v128) - (f64x2.replace_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.eq (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.eq - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.ne (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.ne - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.lt_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.lt_s - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.lt_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.lt_u - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.gt_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.gt_s - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.gt_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.gt_u - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.le_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.le_s - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.le_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.le_u - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.ge_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.ge_s - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.ge_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.ge_u - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.eq (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.eq - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.ne (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.ne - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.lt_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.lt_s - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.lt_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.lt_u - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.gt_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.gt_s - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.gt_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.gt_u - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.le_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.le_s - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.le_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.le_u - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.ge_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.ge_s - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.ge_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.ge_u - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.eq (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.eq - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.ne (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.ne - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.lt_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.lt_s - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.lt_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.lt_u - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.gt_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.gt_s - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.gt_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.gt_u - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.le_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.le_s - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.le_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.le_u - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.ge_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.ge_s - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.ge_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.ge_u - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.eq (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.eq - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.ne (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.ne - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.lt (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.lt - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.gt (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.gt - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.le (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.le - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.ge (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.ge - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.eq (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.eq - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.ne (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.ne - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.lt (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.lt - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.gt (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.gt - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.le (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.le - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.ge (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.ge - (local.get $0) - (local.get $1) - ) - ) - (func $v128.not (type $1) (param $0 v128) (result v128) - (v128.not - (local.get $0) - ) - ) - (func $v128.and (type $0) (param $0 v128) (param $1 v128) (result v128) - (v128.and - (local.get $0) - (local.get $1) - ) - ) - (func $v128.andnot (type $0) (param $0 v128) (param $1 v128) (result v128) - (v128.andnot - (local.get $0) - (local.get $1) - ) - ) - (func $v128.or (type $0) (param $0 v128) (param $1 v128) (result v128) - (v128.or - (local.get $0) - (local.get $1) - ) - ) - (func $v128.xor (type $0) (param $0 v128) (param $1 v128) (result v128) - (v128.xor - (local.get $0) - (local.get $1) - ) - ) - (func $v128.bitselect (type $16) (param $0 v128) (param $1 v128) (param $2 v128) (result v128) - (v128.bitselect - (local.get $0) - (local.get $1) - (local.get $2) - ) - ) - (func $v128.any_true (type $4) (param $0 v128) (result i32) - (v128.any_true - (local.get $0) - ) - ) - (func $v128.load8_lane (type $6) (param $0 i32) (param $1 v128) (result v128) - (v128.load8_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load16_lane (type $6) (param $0 i32) (param $1 v128) (result v128) - (v128.load16_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load32_lane (type $6) (param $0 i32) (param $1 v128) (result v128) - (v128.load32_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load64_lane (type $6) (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load64_lane_align (type $6) (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load64_lane_offset (type $6) (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane offset=32 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load64_lane_align_offset (type $6) (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane offset=32 align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store8_lane (type $5) (param $0 i32) (param $1 v128) - (v128.store8_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store16_lane (type $5) (param $0 i32) (param $1 v128) - (v128.store16_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store32_lane (type $5) (param $0 i32) (param $1 v128) - (v128.store32_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store64_lane (type $5) (param $0 i32) (param $1 v128) - (v128.store64_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store64_lane_align (type $5) (param $0 i32) (param $1 v128) - (v128.store64_lane align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store64_lane_offset (type $5) (param $0 i32) (param $1 v128) - (v128.store64_lane offset=32 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.store64_lane_align_offset (type $5) (param $0 i32) (param $1 v128) - (v128.store64_lane offset=32 align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load32_zero (type $2) (param $0 i32) (result v128) - (v128.load32_zero - (local.get $0) - ) - ) - (func $v128.load64_zero (type $2) (param $0 i32) (result v128) - (v128.load64_zero - (local.get $0) - ) - ) - (func $f32x4.demote_f64x2_zero (type $1) (param $0 v128) (result v128) - (f32x4.demote_f64x2_zero - (local.get $0) - ) - ) - (func $f64x2.promote_low_f32x4 (type $1) (param $0 v128) (result v128) - (f64x2.promote_low_f32x4 - (local.get $0) - ) - ) - (func $i8x16.abs (type $1) (param $0 v128) (result v128) - (i8x16.abs - (local.get $0) - ) - ) - (func $i8x16.neg (type $1) (param $0 v128) (result v128) - (i8x16.neg - (local.get $0) - ) - ) - (func $i8x16.popcnt (type $1) (param $0 v128) (result v128) - (i8x16.popcnt - (local.get $0) - ) - ) - (func $i8x16.all_true (type $4) (param $0 v128) (result i32) - (i8x16.all_true - (local.get $0) - ) - ) - (func $i8x16.bitmask (type $4) (param $0 v128) (result i32) - (i8x16.bitmask - (local.get $0) - ) - ) - (func $i8x16.narrow_i16x8_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.narrow_i16x8_s - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.narrow_i16x8_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.narrow_i16x8_u - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.ceil (type $1) (param $0 v128) (result v128) - (f32x4.ceil - (local.get $0) - ) - ) - (func $f32x4.floor (type $1) (param $0 v128) (result v128) - (f32x4.floor - (local.get $0) - ) - ) - (func $f32x4.trunc (type $1) (param $0 v128) (result v128) - (f32x4.trunc - (local.get $0) - ) - ) - (func $f32x4.nearest (type $1) (param $0 v128) (result v128) - (f32x4.nearest - (local.get $0) - ) - ) - (func $i8x16.shl (type $3) (param $0 v128) (param $1 i32) (result v128) - (i8x16.shl - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.shr_s (type $3) (param $0 v128) (param $1 i32) (result v128) - (i8x16.shr_s - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.shr_u (type $3) (param $0 v128) (param $1 i32) (result v128) - (i8x16.shr_u - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.add (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.add - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.add_sat_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.add_sat_s - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.add_sat_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.add_sat_u - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.sub (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.sub - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.sub_sat_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.sub_sat_s - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.sub_sat_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.sub_sat_u - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.ceil (type $1) (param $0 v128) (result v128) - (f64x2.ceil - (local.get $0) - ) - ) - (func $f64x2.floor (type $1) (param $0 v128) (result v128) - (f64x2.floor - (local.get $0) - ) - ) - (func $i8x16.min_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.min_s - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.min_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.min_u - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.max_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.max_s - (local.get $0) - (local.get $1) - ) - ) - (func $i8x16.max_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.max_u - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.trunc (type $1) (param $0 v128) (result v128) - (f64x2.trunc - (local.get $0) - ) - ) - (func $i8x16.avgr_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.avgr_u - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.extadd_pairwise_i8x16_s (type $1) (param $0 v128) (result v128) - (i16x8.extadd_pairwise_i8x16_s - (local.get $0) - ) - ) - (func $i16x8.extadd_pairwise_i8x16_u (type $1) (param $0 v128) (result v128) - (i16x8.extadd_pairwise_i8x16_u - (local.get $0) - ) - ) - (func $i32x4.extadd_pairwise_i16x8_s (type $1) (param $0 v128) (result v128) - (i32x4.extadd_pairwise_i16x8_s - (local.get $0) - ) - ) - (func $i32x4.extadd_pairwise_i16x8_u (type $1) (param $0 v128) (result v128) - (i32x4.extadd_pairwise_i16x8_u - (local.get $0) - ) - ) - (func $i16x8.abs (type $1) (param $0 v128) (result v128) - (i16x8.abs - (local.get $0) - ) - ) - (func $i16x8.neg (type $1) (param $0 v128) (result v128) - (i16x8.neg - (local.get $0) - ) - ) - (func $i16x8.q15mulr_sat_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.q15mulr_sat_s - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.all_true (type $4) (param $0 v128) (result i32) - (i16x8.all_true - (local.get $0) - ) - ) - (func $i16x8.bitmask (type $4) (param $0 v128) (result i32) - (i16x8.bitmask - (local.get $0) - ) - ) - (func $i16x8.narrow_i32x4_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.narrow_i32x4_s - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.narrow_i32x4_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.narrow_i32x4_u - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.extend_low_i8x16_s (type $1) (param $0 v128) (result v128) - (i16x8.extend_low_i8x16_s - (local.get $0) - ) - ) - (func $i16x8.extend_high_i8x16_s (type $1) (param $0 v128) (result v128) - (i16x8.extend_high_i8x16_s - (local.get $0) - ) - ) - (func $i16x8.extend_low_i8x16_u (type $1) (param $0 v128) (result v128) - (i16x8.extend_low_i8x16_u - (local.get $0) - ) - ) - (func $i16x8.extend_high_i8x16_u (type $1) (param $0 v128) (result v128) - (i16x8.extend_high_i8x16_u - (local.get $0) - ) - ) - (func $i16x8.shl (type $3) (param $0 v128) (param $1 i32) (result v128) - (i16x8.shl - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.shr_s (type $3) (param $0 v128) (param $1 i32) (result v128) - (i16x8.shr_s - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.shr_u (type $3) (param $0 v128) (param $1 i32) (result v128) - (i16x8.shr_u - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.add (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.add - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.add_sat_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.add_sat_s - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.add_sat_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.add_sat_u - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.sub (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.sub - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.sub_sat_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.sub_sat_s - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.sub_sat_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.sub_sat_u - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.nearest (type $1) (param $0 v128) (result v128) - (f64x2.nearest - (local.get $0) - ) - ) - (func $i16x8.mul (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.mul - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.min_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.min_s - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.min_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.min_u - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.max_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.max_s - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.max_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.max_u - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.avgr_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.avgr_u - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.extmul_low_i8x16_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.extmul_low_i8x16_s - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.extmul_high_i8x16_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.extmul_high_i8x16_s - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.extmul_low_i8x16_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.extmul_low_i8x16_u - (local.get $0) - (local.get $1) - ) - ) - (func $i16x8.extmul_high_i8x16_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.extmul_high_i8x16_u - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.abs (type $1) (param $0 v128) (result v128) - (i32x4.abs - (local.get $0) - ) - ) - (func $i32x4.neg (type $1) (param $0 v128) (result v128) - (i32x4.neg - (local.get $0) - ) - ) - (func $i32x4.all_true (type $4) (param $0 v128) (result i32) - (i32x4.all_true - (local.get $0) - ) - ) - (func $i32x4.bitmask (type $4) (param $0 v128) (result i32) - (i32x4.bitmask - (local.get $0) - ) - ) - (func $i32x4.extend_low_i16x8_s (type $1) (param $0 v128) (result v128) - (i32x4.extend_low_i16x8_s - (local.get $0) - ) - ) - (func $i32x4.extend_high_i16x8_s (type $1) (param $0 v128) (result v128) - (i32x4.extend_high_i16x8_s - (local.get $0) - ) - ) - (func $i32x4.extend_low_i16x8_u (type $1) (param $0 v128) (result v128) - (i32x4.extend_low_i16x8_u - (local.get $0) - ) - ) - (func $i32x4.extend_high_i16x8_u (type $1) (param $0 v128) (result v128) - (i32x4.extend_high_i16x8_u - (local.get $0) - ) - ) - (func $i32x4.shl (type $3) (param $0 v128) (param $1 i32) (result v128) - (i32x4.shl - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.shr_s (type $3) (param $0 v128) (param $1 i32) (result v128) - (i32x4.shr_s - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.shr_u (type $3) (param $0 v128) (param $1 i32) (result v128) - (i32x4.shr_u - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.add (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.add - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.sub (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.sub - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.mul (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.mul - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.min_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.min_s - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.min_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.min_u - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.max_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.max_s - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.max_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.max_u - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.dot_i16x8_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.dot_i16x8_s - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.extmul_low_i16x8_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.extmul_low_i16x8_s - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.extmul_high_i16x8_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.extmul_high_i16x8_s - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.extmul_low_i16x8_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.extmul_low_i16x8_u - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.extmul_high_i16x8_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.extmul_high_i16x8_u - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.abs (type $1) (param $0 v128) (result v128) - (i64x2.abs - (local.get $0) - ) - ) - (func $i64x2.neg (type $1) (param $0 v128) (result v128) - (i64x2.neg - (local.get $0) - ) - ) - (func $i64x2.all_true (type $4) (param $0 v128) (result i32) - (i64x2.all_true - (local.get $0) - ) - ) - (func $i64x2.bitmask (type $4) (param $0 v128) (result i32) - (i64x2.bitmask - (local.get $0) - ) - ) - (func $i64x2.extend_low_i32x4_s (type $1) (param $0 v128) (result v128) - (i64x2.extend_low_i32x4_s - (local.get $0) - ) - ) - (func $i64x2.extend_high_i32x4_s (type $1) (param $0 v128) (result v128) - (i64x2.extend_high_i32x4_s - (local.get $0) - ) - ) - (func $i64x2.extend_low_i32x4_u (type $1) (param $0 v128) (result v128) - (i64x2.extend_low_i32x4_u - (local.get $0) - ) - ) - (func $i64x2.extend_high_i32x4_u (type $1) (param $0 v128) (result v128) - (i64x2.extend_high_i32x4_u - (local.get $0) - ) - ) - (func $i64x2.shl (type $3) (param $0 v128) (param $1 i32) (result v128) - (i64x2.shl - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.shr_s (type $3) (param $0 v128) (param $1 i32) (result v128) - (i64x2.shr_s - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.shr_u (type $3) (param $0 v128) (param $1 i32) (result v128) - (i64x2.shr_u - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.add (type $0) (param $0 v128) (param $1 v128) (result v128) - (i64x2.add - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.sub (type $0) (param $0 v128) (param $1 v128) (result v128) - (i64x2.sub - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.mul (type $0) (param $0 v128) (param $1 v128) (result v128) - (i64x2.mul - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.eq (type $0) (param $0 v128) (param $1 v128) (result v128) - (i64x2.eq - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.ne (type $0) (param $0 v128) (param $1 v128) (result v128) - (i64x2.ne - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.lt_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i64x2.lt_s - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.gt_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i64x2.gt_s - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.le_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i64x2.le_s - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.ge_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i64x2.ge_s - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.extmul_low_i32x4_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i64x2.extmul_low_i32x4_s - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.extmul_high_i32x4_s (type $0) (param $0 v128) (param $1 v128) (result v128) - (i64x2.extmul_high_i32x4_s - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.extmul_low_i32x4_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i64x2.extmul_low_i32x4_u - (local.get $0) - (local.get $1) - ) - ) - (func $i64x2.extmul_high_i32x4_u (type $0) (param $0 v128) (param $1 v128) (result v128) - (i64x2.extmul_high_i32x4_u - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.abs (type $1) (param $0 v128) (result v128) - (f32x4.abs - (local.get $0) - ) - ) - (func $f32x4.neg (type $1) (param $0 v128) (result v128) - (f32x4.neg - (local.get $0) - ) - ) - (func $f32x4.sqrt (type $1) (param $0 v128) (result v128) - (f32x4.sqrt - (local.get $0) - ) - ) - (func $f32x4.add (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.add - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.sub (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.sub - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.mul (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.mul - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.div (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.div - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.min (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.min - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.max (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.max - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.pmin (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.pmin - (local.get $0) - (local.get $1) - ) - ) - (func $f32x4.pmax (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.pmax - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.abs (type $1) (param $0 v128) (result v128) - (f64x2.abs - (local.get $0) - ) - ) - (func $f64x2.neg (type $1) (param $0 v128) (result v128) - (f64x2.neg - (local.get $0) - ) - ) - (func $f64x2.sqrt (type $1) (param $0 v128) (result v128) - (f64x2.sqrt - (local.get $0) - ) - ) - (func $f64x2.add (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.add - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.sub (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.sub - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.mul (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.mul - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.div (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.div - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.min (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.min - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.max (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.max - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.pmin (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.pmin - (local.get $0) - (local.get $1) - ) - ) - (func $f64x2.pmax (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.pmax - (local.get $0) - (local.get $1) - ) - ) - (func $i32x4.trunc_sat_f32x4_s (type $1) (param $0 v128) (result v128) - (i32x4.trunc_sat_f32x4_s - (local.get $0) - ) - ) - (func $i32x4.trunc_sat_f32x4_u (type $1) (param $0 v128) (result v128) - (i32x4.trunc_sat_f32x4_u - (local.get $0) - ) - ) - (func $f32x4.convert_i32x4_s (type $1) (param $0 v128) (result v128) - (f32x4.convert_i32x4_s - (local.get $0) - ) - ) - (func $f32x4.convert_i32x4_u (type $1) (param $0 v128) (result v128) - (f32x4.convert_i32x4_u - (local.get $0) - ) - ) - (func $i32x4.trunc_sat_f64x2_s_zero (type $1) (param $0 v128) (result v128) - (i32x4.trunc_sat_f64x2_s_zero - (local.get $0) - ) - ) - (func $i32x4.trunc_sat_f64x2_u_zero (type $1) (param $0 v128) (result v128) - (i32x4.trunc_sat_f64x2_u_zero - (local.get $0) - ) - ) - (func $f64x2.convert_low_i32x4_s (type $1) (param $0 v128) (result v128) - (f64x2.convert_low_i32x4_s - (local.get $0) - ) - ) - (func $f64x2.convert_low_i32x4_u (type $1) (param $0 v128) (result v128) - (f64x2.convert_low_i32x4_u - (local.get $0) - ) - ) -) - diff --git a/test/simd.wast.fromBinary.noDebugInfo b/test/simd.wast.fromBinary.noDebugInfo deleted file mode 100644 index 18e2671f3..000000000 --- a/test/simd.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,1390 +0,0 @@ -(module - (type $0 (func (param v128 v128) (result v128))) - (type $1 (func (param v128) (result v128))) - (type $2 (func (param i32) (result v128))) - (type $3 (func (param v128 i32) (result v128))) - (type $4 (func (param v128) (result i32))) - (type $5 (func (param i32 v128))) - (type $6 (func (param i32 v128) (result v128))) - (type $7 (func (result v128))) - (type $8 (func (param f32) (result v128))) - (type $9 (func (param f64) (result v128))) - (type $10 (func (param v128) (result i64))) - (type $11 (func (param v128 i64) (result v128))) - (type $12 (func (param v128) (result f32))) - (type $13 (func (param v128 f32) (result v128))) - (type $14 (func (param v128) (result f64))) - (type $15 (func (param v128 f64) (result v128))) - (type $16 (func (param v128 v128 v128) (result v128))) - (memory $0 1 1) - (func $0 (type $2) (param $0 i32) (result v128) - (v128.load - (local.get $0) - ) - ) - (func $1 (type $2) (param $0 i32) (result v128) - (v128.load8x8_s - (local.get $0) - ) - ) - (func $2 (type $2) (param $0 i32) (result v128) - (v128.load8x8_u - (local.get $0) - ) - ) - (func $3 (type $2) (param $0 i32) (result v128) - (v128.load16x4_s - (local.get $0) - ) - ) - (func $4 (type $2) (param $0 i32) (result v128) - (v128.load16x4_u - (local.get $0) - ) - ) - (func $5 (type $2) (param $0 i32) (result v128) - (v128.load32x2_s - (local.get $0) - ) - ) - (func $6 (type $2) (param $0 i32) (result v128) - (v128.load32x2_u - (local.get $0) - ) - ) - (func $7 (type $2) (param $0 i32) (result v128) - (v128.load8_splat - (local.get $0) - ) - ) - (func $8 (type $2) (param $0 i32) (result v128) - (v128.load16_splat - (local.get $0) - ) - ) - (func $9 (type $2) (param $0 i32) (result v128) - (v128.load32_splat - (local.get $0) - ) - ) - (func $10 (type $2) (param $0 i32) (result v128) - (v128.load64_splat - (local.get $0) - ) - ) - (func $11 (type $5) (param $0 i32) (param $1 v128) - (v128.store - (local.get $0) - (local.get $1) - ) - ) - (func $12 (type $7) (result v128) - (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) - ) - (func $13 (type $7) (result v128) - (v128.const i32x4 0x00020001 0x00040003 0x00060005 0x00080007) - ) - (func $14 (type $7) (result v128) - (v128.const i32x4 0x00000001 0x00000002 0x00000003 0x00000004) - ) - (func $15 (type $7) (result v128) - (v128.const i32x4 0x00000001 0x00000000 0x00000002 0x00000000) - ) - (func $16 (type $7) (result v128) - (v128.const i32x4 0x3f800000 0x40000000 0x40400000 0x40800000) - ) - (func $17 (type $7) (result v128) - (v128.const i32x4 0x00000000 0x3ff00000 0x00000000 0x40000000) - ) - (func $18 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.shuffle 0 17 2 19 4 21 6 23 8 25 10 27 12 29 14 31 - (local.get $0) - (local.get $1) - ) - ) - (func $19 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.swizzle - (local.get $0) - (local.get $1) - ) - ) - (func $20 (type $2) (param $0 i32) (result v128) - (i8x16.splat - (local.get $0) - ) - ) - (func $21 (type $2) (param $0 i32) (result v128) - (i16x8.splat - (local.get $0) - ) - ) - (func $22 (type $8) (param $0 f32) (result v128) - (f32x4.splat - (local.get $0) - ) - ) - (func $23 (type $9) (param $0 f64) (result v128) - (f64x2.splat - (local.get $0) - ) - ) - (func $24 (type $4) (param $0 v128) (result i32) - (i8x16.extract_lane_s 0 - (local.get $0) - ) - ) - (func $25 (type $4) (param $0 v128) (result i32) - (i8x16.extract_lane_u 0 - (local.get $0) - ) - ) - (func $26 (type $3) (param $0 v128) (param $1 i32) (result v128) - (i8x16.replace_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $27 (type $4) (param $0 v128) (result i32) - (i16x8.extract_lane_s 0 - (local.get $0) - ) - ) - (func $28 (type $4) (param $0 v128) (result i32) - (i16x8.extract_lane_u 0 - (local.get $0) - ) - ) - (func $29 (type $3) (param $0 v128) (param $1 i32) (result v128) - (i16x8.replace_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $30 (type $4) (param $0 v128) (result i32) - (i32x4.extract_lane 0 - (local.get $0) - ) - ) - (func $31 (type $3) (param $0 v128) (param $1 i32) (result v128) - (i32x4.replace_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $32 (type $10) (param $0 v128) (result i64) - (i64x2.extract_lane 0 - (local.get $0) - ) - ) - (func $33 (type $11) (param $0 v128) (param $1 i64) (result v128) - (i64x2.replace_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $34 (type $12) (param $0 v128) (result f32) - (f32x4.extract_lane 0 - (local.get $0) - ) - ) - (func $35 (type $13) (param $0 v128) (param $1 f32) (result v128) - (f32x4.replace_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $36 (type $14) (param $0 v128) (result f64) - (f64x2.extract_lane 0 - (local.get $0) - ) - ) - (func $37 (type $15) (param $0 v128) (param $1 f64) (result v128) - (f64x2.replace_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $38 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.eq - (local.get $0) - (local.get $1) - ) - ) - (func $39 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.ne - (local.get $0) - (local.get $1) - ) - ) - (func $40 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.lt_s - (local.get $0) - (local.get $1) - ) - ) - (func $41 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.lt_u - (local.get $0) - (local.get $1) - ) - ) - (func $42 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.gt_s - (local.get $0) - (local.get $1) - ) - ) - (func $43 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.gt_u - (local.get $0) - (local.get $1) - ) - ) - (func $44 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.le_s - (local.get $0) - (local.get $1) - ) - ) - (func $45 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.le_u - (local.get $0) - (local.get $1) - ) - ) - (func $46 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.ge_s - (local.get $0) - (local.get $1) - ) - ) - (func $47 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.ge_u - (local.get $0) - (local.get $1) - ) - ) - (func $48 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.eq - (local.get $0) - (local.get $1) - ) - ) - (func $49 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.ne - (local.get $0) - (local.get $1) - ) - ) - (func $50 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.lt_s - (local.get $0) - (local.get $1) - ) - ) - (func $51 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.lt_u - (local.get $0) - (local.get $1) - ) - ) - (func $52 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.gt_s - (local.get $0) - (local.get $1) - ) - ) - (func $53 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.gt_u - (local.get $0) - (local.get $1) - ) - ) - (func $54 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.le_s - (local.get $0) - (local.get $1) - ) - ) - (func $55 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.le_u - (local.get $0) - (local.get $1) - ) - ) - (func $56 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.ge_s - (local.get $0) - (local.get $1) - ) - ) - (func $57 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.ge_u - (local.get $0) - (local.get $1) - ) - ) - (func $58 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.eq - (local.get $0) - (local.get $1) - ) - ) - (func $59 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.ne - (local.get $0) - (local.get $1) - ) - ) - (func $60 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.lt_s - (local.get $0) - (local.get $1) - ) - ) - (func $61 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.lt_u - (local.get $0) - (local.get $1) - ) - ) - (func $62 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.gt_s - (local.get $0) - (local.get $1) - ) - ) - (func $63 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.gt_u - (local.get $0) - (local.get $1) - ) - ) - (func $64 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.le_s - (local.get $0) - (local.get $1) - ) - ) - (func $65 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.le_u - (local.get $0) - (local.get $1) - ) - ) - (func $66 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.ge_s - (local.get $0) - (local.get $1) - ) - ) - (func $67 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.ge_u - (local.get $0) - (local.get $1) - ) - ) - (func $68 (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.eq - (local.get $0) - (local.get $1) - ) - ) - (func $69 (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.ne - (local.get $0) - (local.get $1) - ) - ) - (func $70 (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.lt - (local.get $0) - (local.get $1) - ) - ) - (func $71 (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.gt - (local.get $0) - (local.get $1) - ) - ) - (func $72 (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.le - (local.get $0) - (local.get $1) - ) - ) - (func $73 (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.ge - (local.get $0) - (local.get $1) - ) - ) - (func $74 (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.eq - (local.get $0) - (local.get $1) - ) - ) - (func $75 (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.ne - (local.get $0) - (local.get $1) - ) - ) - (func $76 (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.lt - (local.get $0) - (local.get $1) - ) - ) - (func $77 (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.gt - (local.get $0) - (local.get $1) - ) - ) - (func $78 (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.le - (local.get $0) - (local.get $1) - ) - ) - (func $79 (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.ge - (local.get $0) - (local.get $1) - ) - ) - (func $80 (type $1) (param $0 v128) (result v128) - (v128.not - (local.get $0) - ) - ) - (func $81 (type $0) (param $0 v128) (param $1 v128) (result v128) - (v128.and - (local.get $0) - (local.get $1) - ) - ) - (func $82 (type $0) (param $0 v128) (param $1 v128) (result v128) - (v128.andnot - (local.get $0) - (local.get $1) - ) - ) - (func $83 (type $0) (param $0 v128) (param $1 v128) (result v128) - (v128.or - (local.get $0) - (local.get $1) - ) - ) - (func $84 (type $0) (param $0 v128) (param $1 v128) (result v128) - (v128.xor - (local.get $0) - (local.get $1) - ) - ) - (func $85 (type $16) (param $0 v128) (param $1 v128) (param $2 v128) (result v128) - (v128.bitselect - (local.get $0) - (local.get $1) - (local.get $2) - ) - ) - (func $86 (type $4) (param $0 v128) (result i32) - (v128.any_true - (local.get $0) - ) - ) - (func $87 (type $6) (param $0 i32) (param $1 v128) (result v128) - (v128.load8_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $88 (type $6) (param $0 i32) (param $1 v128) (result v128) - (v128.load16_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $89 (type $6) (param $0 i32) (param $1 v128) (result v128) - (v128.load32_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $90 (type $6) (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $91 (type $6) (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $92 (type $6) (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane offset=32 0 - (local.get $0) - (local.get $1) - ) - ) - (func $93 (type $6) (param $0 i32) (param $1 v128) (result v128) - (v128.load64_lane offset=32 align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $94 (type $5) (param $0 i32) (param $1 v128) - (v128.store8_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $95 (type $5) (param $0 i32) (param $1 v128) - (v128.store16_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $96 (type $5) (param $0 i32) (param $1 v128) - (v128.store32_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $97 (type $5) (param $0 i32) (param $1 v128) - (v128.store64_lane 0 - (local.get $0) - (local.get $1) - ) - ) - (func $98 (type $5) (param $0 i32) (param $1 v128) - (v128.store64_lane align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $99 (type $5) (param $0 i32) (param $1 v128) - (v128.store64_lane offset=32 0 - (local.get $0) - (local.get $1) - ) - ) - (func $100 (type $5) (param $0 i32) (param $1 v128) - (v128.store64_lane offset=32 align=1 0 - (local.get $0) - (local.get $1) - ) - ) - (func $101 (type $2) (param $0 i32) (result v128) - (v128.load32_zero - (local.get $0) - ) - ) - (func $102 (type $2) (param $0 i32) (result v128) - (v128.load64_zero - (local.get $0) - ) - ) - (func $103 (type $1) (param $0 v128) (result v128) - (f32x4.demote_f64x2_zero - (local.get $0) - ) - ) - (func $104 (type $1) (param $0 v128) (result v128) - (f64x2.promote_low_f32x4 - (local.get $0) - ) - ) - (func $105 (type $1) (param $0 v128) (result v128) - (i8x16.abs - (local.get $0) - ) - ) - (func $106 (type $1) (param $0 v128) (result v128) - (i8x16.neg - (local.get $0) - ) - ) - (func $107 (type $1) (param $0 v128) (result v128) - (i8x16.popcnt - (local.get $0) - ) - ) - (func $108 (type $4) (param $0 v128) (result i32) - (i8x16.all_true - (local.get $0) - ) - ) - (func $109 (type $4) (param $0 v128) (result i32) - (i8x16.bitmask - (local.get $0) - ) - ) - (func $110 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.narrow_i16x8_s - (local.get $0) - (local.get $1) - ) - ) - (func $111 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.narrow_i16x8_u - (local.get $0) - (local.get $1) - ) - ) - (func $112 (type $1) (param $0 v128) (result v128) - (f32x4.ceil - (local.get $0) - ) - ) - (func $113 (type $1) (param $0 v128) (result v128) - (f32x4.floor - (local.get $0) - ) - ) - (func $114 (type $1) (param $0 v128) (result v128) - (f32x4.trunc - (local.get $0) - ) - ) - (func $115 (type $1) (param $0 v128) (result v128) - (f32x4.nearest - (local.get $0) - ) - ) - (func $116 (type $3) (param $0 v128) (param $1 i32) (result v128) - (i8x16.shl - (local.get $0) - (local.get $1) - ) - ) - (func $117 (type $3) (param $0 v128) (param $1 i32) (result v128) - (i8x16.shr_s - (local.get $0) - (local.get $1) - ) - ) - (func $118 (type $3) (param $0 v128) (param $1 i32) (result v128) - (i8x16.shr_u - (local.get $0) - (local.get $1) - ) - ) - (func $119 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.add - (local.get $0) - (local.get $1) - ) - ) - (func $120 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.add_sat_s - (local.get $0) - (local.get $1) - ) - ) - (func $121 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.add_sat_u - (local.get $0) - (local.get $1) - ) - ) - (func $122 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.sub - (local.get $0) - (local.get $1) - ) - ) - (func $123 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.sub_sat_s - (local.get $0) - (local.get $1) - ) - ) - (func $124 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.sub_sat_u - (local.get $0) - (local.get $1) - ) - ) - (func $125 (type $1) (param $0 v128) (result v128) - (f64x2.ceil - (local.get $0) - ) - ) - (func $126 (type $1) (param $0 v128) (result v128) - (f64x2.floor - (local.get $0) - ) - ) - (func $127 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.min_s - (local.get $0) - (local.get $1) - ) - ) - (func $128 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.min_u - (local.get $0) - (local.get $1) - ) - ) - (func $129 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.max_s - (local.get $0) - (local.get $1) - ) - ) - (func $130 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.max_u - (local.get $0) - (local.get $1) - ) - ) - (func $131 (type $1) (param $0 v128) (result v128) - (f64x2.trunc - (local.get $0) - ) - ) - (func $132 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i8x16.avgr_u - (local.get $0) - (local.get $1) - ) - ) - (func $133 (type $1) (param $0 v128) (result v128) - (i16x8.extadd_pairwise_i8x16_s - (local.get $0) - ) - ) - (func $134 (type $1) (param $0 v128) (result v128) - (i16x8.extadd_pairwise_i8x16_u - (local.get $0) - ) - ) - (func $135 (type $1) (param $0 v128) (result v128) - (i32x4.extadd_pairwise_i16x8_s - (local.get $0) - ) - ) - (func $136 (type $1) (param $0 v128) (result v128) - (i32x4.extadd_pairwise_i16x8_u - (local.get $0) - ) - ) - (func $137 (type $1) (param $0 v128) (result v128) - (i16x8.abs - (local.get $0) - ) - ) - (func $138 (type $1) (param $0 v128) (result v128) - (i16x8.neg - (local.get $0) - ) - ) - (func $139 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.q15mulr_sat_s - (local.get $0) - (local.get $1) - ) - ) - (func $140 (type $4) (param $0 v128) (result i32) - (i16x8.all_true - (local.get $0) - ) - ) - (func $141 (type $4) (param $0 v128) (result i32) - (i16x8.bitmask - (local.get $0) - ) - ) - (func $142 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.narrow_i32x4_s - (local.get $0) - (local.get $1) - ) - ) - (func $143 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.narrow_i32x4_u - (local.get $0) - (local.get $1) - ) - ) - (func $144 (type $1) (param $0 v128) (result v128) - (i16x8.extend_low_i8x16_s - (local.get $0) - ) - ) - (func $145 (type $1) (param $0 v128) (result v128) - (i16x8.extend_high_i8x16_s - (local.get $0) - ) - ) - (func $146 (type $1) (param $0 v128) (result v128) - (i16x8.extend_low_i8x16_u - (local.get $0) - ) - ) - (func $147 (type $1) (param $0 v128) (result v128) - (i16x8.extend_high_i8x16_u - (local.get $0) - ) - ) - (func $148 (type $3) (param $0 v128) (param $1 i32) (result v128) - (i16x8.shl - (local.get $0) - (local.get $1) - ) - ) - (func $149 (type $3) (param $0 v128) (param $1 i32) (result v128) - (i16x8.shr_s - (local.get $0) - (local.get $1) - ) - ) - (func $150 (type $3) (param $0 v128) (param $1 i32) (result v128) - (i16x8.shr_u - (local.get $0) - (local.get $1) - ) - ) - (func $151 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.add - (local.get $0) - (local.get $1) - ) - ) - (func $152 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.add_sat_s - (local.get $0) - (local.get $1) - ) - ) - (func $153 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.add_sat_u - (local.get $0) - (local.get $1) - ) - ) - (func $154 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.sub - (local.get $0) - (local.get $1) - ) - ) - (func $155 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.sub_sat_s - (local.get $0) - (local.get $1) - ) - ) - (func $156 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.sub_sat_u - (local.get $0) - (local.get $1) - ) - ) - (func $157 (type $1) (param $0 v128) (result v128) - (f64x2.nearest - (local.get $0) - ) - ) - (func $158 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.mul - (local.get $0) - (local.get $1) - ) - ) - (func $159 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.min_s - (local.get $0) - (local.get $1) - ) - ) - (func $160 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.min_u - (local.get $0) - (local.get $1) - ) - ) - (func $161 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.max_s - (local.get $0) - (local.get $1) - ) - ) - (func $162 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.max_u - (local.get $0) - (local.get $1) - ) - ) - (func $163 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.avgr_u - (local.get $0) - (local.get $1) - ) - ) - (func $164 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.extmul_low_i8x16_s - (local.get $0) - (local.get $1) - ) - ) - (func $165 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.extmul_high_i8x16_s - (local.get $0) - (local.get $1) - ) - ) - (func $166 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.extmul_low_i8x16_u - (local.get $0) - (local.get $1) - ) - ) - (func $167 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i16x8.extmul_high_i8x16_u - (local.get $0) - (local.get $1) - ) - ) - (func $168 (type $1) (param $0 v128) (result v128) - (i32x4.abs - (local.get $0) - ) - ) - (func $169 (type $1) (param $0 v128) (result v128) - (i32x4.neg - (local.get $0) - ) - ) - (func $170 (type $4) (param $0 v128) (result i32) - (i32x4.all_true - (local.get $0) - ) - ) - (func $171 (type $4) (param $0 v128) (result i32) - (i32x4.bitmask - (local.get $0) - ) - ) - (func $172 (type $1) (param $0 v128) (result v128) - (i32x4.extend_low_i16x8_s - (local.get $0) - ) - ) - (func $173 (type $1) (param $0 v128) (result v128) - (i32x4.extend_high_i16x8_s - (local.get $0) - ) - ) - (func $174 (type $1) (param $0 v128) (result v128) - (i32x4.extend_low_i16x8_u - (local.get $0) - ) - ) - (func $175 (type $1) (param $0 v128) (result v128) - (i32x4.extend_high_i16x8_u - (local.get $0) - ) - ) - (func $176 (type $3) (param $0 v128) (param $1 i32) (result v128) - (i32x4.shl - (local.get $0) - (local.get $1) - ) - ) - (func $177 (type $3) (param $0 v128) (param $1 i32) (result v128) - (i32x4.shr_s - (local.get $0) - (local.get $1) - ) - ) - (func $178 (type $3) (param $0 v128) (param $1 i32) (result v128) - (i32x4.shr_u - (local.get $0) - (local.get $1) - ) - ) - (func $179 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.add - (local.get $0) - (local.get $1) - ) - ) - (func $180 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.sub - (local.get $0) - (local.get $1) - ) - ) - (func $181 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.mul - (local.get $0) - (local.get $1) - ) - ) - (func $182 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.min_s - (local.get $0) - (local.get $1) - ) - ) - (func $183 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.min_u - (local.get $0) - (local.get $1) - ) - ) - (func $184 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.max_s - (local.get $0) - (local.get $1) - ) - ) - (func $185 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.max_u - (local.get $0) - (local.get $1) - ) - ) - (func $186 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.dot_i16x8_s - (local.get $0) - (local.get $1) - ) - ) - (func $187 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.extmul_low_i16x8_s - (local.get $0) - (local.get $1) - ) - ) - (func $188 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.extmul_high_i16x8_s - (local.get $0) - (local.get $1) - ) - ) - (func $189 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.extmul_low_i16x8_u - (local.get $0) - (local.get $1) - ) - ) - (func $190 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i32x4.extmul_high_i16x8_u - (local.get $0) - (local.get $1) - ) - ) - (func $191 (type $1) (param $0 v128) (result v128) - (i64x2.abs - (local.get $0) - ) - ) - (func $192 (type $1) (param $0 v128) (result v128) - (i64x2.neg - (local.get $0) - ) - ) - (func $193 (type $4) (param $0 v128) (result i32) - (i64x2.all_true - (local.get $0) - ) - ) - (func $194 (type $4) (param $0 v128) (result i32) - (i64x2.bitmask - (local.get $0) - ) - ) - (func $195 (type $1) (param $0 v128) (result v128) - (i64x2.extend_low_i32x4_s - (local.get $0) - ) - ) - (func $196 (type $1) (param $0 v128) (result v128) - (i64x2.extend_high_i32x4_s - (local.get $0) - ) - ) - (func $197 (type $1) (param $0 v128) (result v128) - (i64x2.extend_low_i32x4_u - (local.get $0) - ) - ) - (func $198 (type $1) (param $0 v128) (result v128) - (i64x2.extend_high_i32x4_u - (local.get $0) - ) - ) - (func $199 (type $3) (param $0 v128) (param $1 i32) (result v128) - (i64x2.shl - (local.get $0) - (local.get $1) - ) - ) - (func $200 (type $3) (param $0 v128) (param $1 i32) (result v128) - (i64x2.shr_s - (local.get $0) - (local.get $1) - ) - ) - (func $201 (type $3) (param $0 v128) (param $1 i32) (result v128) - (i64x2.shr_u - (local.get $0) - (local.get $1) - ) - ) - (func $202 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i64x2.add - (local.get $0) - (local.get $1) - ) - ) - (func $203 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i64x2.sub - (local.get $0) - (local.get $1) - ) - ) - (func $204 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i64x2.mul - (local.get $0) - (local.get $1) - ) - ) - (func $205 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i64x2.eq - (local.get $0) - (local.get $1) - ) - ) - (func $206 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i64x2.ne - (local.get $0) - (local.get $1) - ) - ) - (func $207 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i64x2.lt_s - (local.get $0) - (local.get $1) - ) - ) - (func $208 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i64x2.gt_s - (local.get $0) - (local.get $1) - ) - ) - (func $209 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i64x2.le_s - (local.get $0) - (local.get $1) - ) - ) - (func $210 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i64x2.ge_s - (local.get $0) - (local.get $1) - ) - ) - (func $211 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i64x2.extmul_low_i32x4_s - (local.get $0) - (local.get $1) - ) - ) - (func $212 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i64x2.extmul_high_i32x4_s - (local.get $0) - (local.get $1) - ) - ) - (func $213 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i64x2.extmul_low_i32x4_u - (local.get $0) - (local.get $1) - ) - ) - (func $214 (type $0) (param $0 v128) (param $1 v128) (result v128) - (i64x2.extmul_high_i32x4_u - (local.get $0) - (local.get $1) - ) - ) - (func $215 (type $1) (param $0 v128) (result v128) - (f32x4.abs - (local.get $0) - ) - ) - (func $216 (type $1) (param $0 v128) (result v128) - (f32x4.neg - (local.get $0) - ) - ) - (func $217 (type $1) (param $0 v128) (result v128) - (f32x4.sqrt - (local.get $0) - ) - ) - (func $218 (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.add - (local.get $0) - (local.get $1) - ) - ) - (func $219 (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.sub - (local.get $0) - (local.get $1) - ) - ) - (func $220 (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.mul - (local.get $0) - (local.get $1) - ) - ) - (func $221 (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.div - (local.get $0) - (local.get $1) - ) - ) - (func $222 (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.min - (local.get $0) - (local.get $1) - ) - ) - (func $223 (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.max - (local.get $0) - (local.get $1) - ) - ) - (func $224 (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.pmin - (local.get $0) - (local.get $1) - ) - ) - (func $225 (type $0) (param $0 v128) (param $1 v128) (result v128) - (f32x4.pmax - (local.get $0) - (local.get $1) - ) - ) - (func $226 (type $1) (param $0 v128) (result v128) - (f64x2.abs - (local.get $0) - ) - ) - (func $227 (type $1) (param $0 v128) (result v128) - (f64x2.neg - (local.get $0) - ) - ) - (func $228 (type $1) (param $0 v128) (result v128) - (f64x2.sqrt - (local.get $0) - ) - ) - (func $229 (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.add - (local.get $0) - (local.get $1) - ) - ) - (func $230 (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.sub - (local.get $0) - (local.get $1) - ) - ) - (func $231 (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.mul - (local.get $0) - (local.get $1) - ) - ) - (func $232 (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.div - (local.get $0) - (local.get $1) - ) - ) - (func $233 (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.min - (local.get $0) - (local.get $1) - ) - ) - (func $234 (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.max - (local.get $0) - (local.get $1) - ) - ) - (func $235 (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.pmin - (local.get $0) - (local.get $1) - ) - ) - (func $236 (type $0) (param $0 v128) (param $1 v128) (result v128) - (f64x2.pmax - (local.get $0) - (local.get $1) - ) - ) - (func $237 (type $1) (param $0 v128) (result v128) - (i32x4.trunc_sat_f32x4_s - (local.get $0) - ) - ) - (func $238 (type $1) (param $0 v128) (result v128) - (i32x4.trunc_sat_f32x4_u - (local.get $0) - ) - ) - (func $239 (type $1) (param $0 v128) (result v128) - (f32x4.convert_i32x4_s - (local.get $0) - ) - ) - (func $240 (type $1) (param $0 v128) (result v128) - (f32x4.convert_i32x4_u - (local.get $0) - ) - ) - (func $241 (type $1) (param $0 v128) (result v128) - (i32x4.trunc_sat_f64x2_s_zero - (local.get $0) - ) - ) - (func $242 (type $1) (param $0 v128) (result v128) - (i32x4.trunc_sat_f64x2_u_zero - (local.get $0) - ) - ) - (func $243 (type $1) (param $0 v128) (result v128) - (f64x2.convert_low_i32x4_s - (local.get $0) - ) - ) - (func $244 (type $1) (param $0 v128) (result v128) - (f64x2.convert_low_i32x4_u - (local.get $0) - ) - ) -) - diff --git a/test/simd64.wast b/test/simd64.wast deleted file mode 100644 index f5cf85055..000000000 --- a/test/simd64.wast +++ /dev/null @@ -1,74 +0,0 @@ -(module - (memory i64 1 1) - (func $v128.load (param $0 i64) (result v128) - (v128.load offset=0 align=16 - (local.get $0) - ) - ) - (func $v128.store (param $0 i64) (param $1 v128) - (v128.store offset=0 align=16 - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load8_splat (param $0 i64) (result v128) - (v128.load8_splat - (local.get $0) - ) - ) - (func $v128.load16_splat (param $0 i64) (result v128) - (v128.load16_splat - (local.get $0) - ) - ) - (func $v128.load32_splat (param $0 i64) (result v128) - (v128.load32_splat - (local.get $0) - ) - ) - (func $v128.load64_splat (param $0 i64) (result v128) - (v128.load64_splat - (local.get $0) - ) - ) - (func $v128.load8x8_u (param $0 i64) (result v128) - (v128.load8x8_u - (local.get $0) - ) - ) - (func $v128.load8x8_s (param $0 i64) (result v128) - (v128.load8x8_s - (local.get $0) - ) - ) - (func $v128.load16x4_s (param $0 i64) (result v128) - (v128.load16x4_s - (local.get $0) - ) - ) - (func $v128.load16x4_u (param $0 i64) (result v128) - (v128.load16x4_u - (local.get $0) - ) - ) - (func $v128.load32x2_s (param $0 i64) (result v128) - (v128.load32x2_s - (local.get $0) - ) - ) - (func $v128.load32x2_u (param $0 i64) (result v128) - (v128.load32x2_u - (local.get $0) - ) - ) - (func $v128.load32_zero (param $0 i64) (result v128) - (v128.load32_zero - (local.get $0) - ) - ) - (func $v128.load64_zero (param $0 i64) (result v128) - (v128.load64_zero - (local.get $0) - ) - ) -) diff --git a/test/simd64.wast.from-wast b/test/simd64.wast.from-wast deleted file mode 100644 index 163225ab0..000000000 --- a/test/simd64.wast.from-wast +++ /dev/null @@ -1,76 +0,0 @@ -(module - (type $0 (func (param i64) (result v128))) - (type $1 (func (param i64 v128))) - (memory $0 i64 1 1) - (func $v128.load (type $0) (param $0 i64) (result v128) - (v128.load - (local.get $0) - ) - ) - (func $v128.store (type $1) (param $0 i64) (param $1 v128) - (v128.store - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load8_splat (type $0) (param $0 i64) (result v128) - (v128.load8_splat - (local.get $0) - ) - ) - (func $v128.load16_splat (type $0) (param $0 i64) (result v128) - (v128.load16_splat - (local.get $0) - ) - ) - (func $v128.load32_splat (type $0) (param $0 i64) (result v128) - (v128.load32_splat - (local.get $0) - ) - ) - (func $v128.load64_splat (type $0) (param $0 i64) (result v128) - (v128.load64_splat - (local.get $0) - ) - ) - (func $v128.load8x8_u (type $0) (param $0 i64) (result v128) - (v128.load8x8_u - (local.get $0) - ) - ) - (func $v128.load8x8_s (type $0) (param $0 i64) (result v128) - (v128.load8x8_s - (local.get $0) - ) - ) - (func $v128.load16x4_s (type $0) (param $0 i64) (result v128) - (v128.load16x4_s - (local.get $0) - ) - ) - (func $v128.load16x4_u (type $0) (param $0 i64) (result v128) - (v128.load16x4_u - (local.get $0) - ) - ) - (func $v128.load32x2_s (type $0) (param $0 i64) (result v128) - (v128.load32x2_s - (local.get $0) - ) - ) - (func $v128.load32x2_u (type $0) (param $0 i64) (result v128) - (v128.load32x2_u - (local.get $0) - ) - ) - (func $v128.load32_zero (type $0) (param $0 i64) (result v128) - (v128.load32_zero - (local.get $0) - ) - ) - (func $v128.load64_zero (type $0) (param $0 i64) (result v128) - (v128.load64_zero - (local.get $0) - ) - ) -) diff --git a/test/simd64.wast.fromBinary b/test/simd64.wast.fromBinary deleted file mode 100644 index 27fa123b0..000000000 --- a/test/simd64.wast.fromBinary +++ /dev/null @@ -1,77 +0,0 @@ -(module - (type $0 (func (param i64) (result v128))) - (type $1 (func (param i64 v128))) - (memory $0 i64 1 1) - (func $v128.load (type $0) (param $0 i64) (result v128) - (v128.load - (local.get $0) - ) - ) - (func $v128.store (type $1) (param $0 i64) (param $1 v128) - (v128.store - (local.get $0) - (local.get $1) - ) - ) - (func $v128.load8_splat (type $0) (param $0 i64) (result v128) - (v128.load8_splat - (local.get $0) - ) - ) - (func $v128.load16_splat (type $0) (param $0 i64) (result v128) - (v128.load16_splat - (local.get $0) - ) - ) - (func $v128.load32_splat (type $0) (param $0 i64) (result v128) - (v128.load32_splat - (local.get $0) - ) - ) - (func $v128.load64_splat (type $0) (param $0 i64) (result v128) - (v128.load64_splat - (local.get $0) - ) - ) - (func $v128.load8x8_u (type $0) (param $0 i64) (result v128) - (v128.load8x8_u - (local.get $0) - ) - ) - (func $v128.load8x8_s (type $0) (param $0 i64) (result v128) - (v128.load8x8_s - (local.get $0) - ) - ) - (func $v128.load16x4_s (type $0) (param $0 i64) (result v128) - (v128.load16x4_s - (local.get $0) - ) - ) - (func $v128.load16x4_u (type $0) (param $0 i64) (result v128) - (v128.load16x4_u - (local.get $0) - ) - ) - (func $v128.load32x2_s (type $0) (param $0 i64) (result v128) - (v128.load32x2_s - (local.get $0) - ) - ) - (func $v128.load32x2_u (type $0) (param $0 i64) (result v128) - (v128.load32x2_u - (local.get $0) - ) - ) - (func $v128.load32_zero (type $0) (param $0 i64) (result v128) - (v128.load32_zero - (local.get $0) - ) - ) - (func $v128.load64_zero (type $0) (param $0 i64) (result v128) - (v128.load64_zero - (local.get $0) - ) - ) -) - diff --git a/test/simd64.wast.fromBinary.noDebugInfo b/test/simd64.wast.fromBinary.noDebugInfo deleted file mode 100644 index c77e914aa..000000000 --- a/test/simd64.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,77 +0,0 @@ -(module - (type $0 (func (param i64) (result v128))) - (type $1 (func (param i64 v128))) - (memory $0 i64 1 1) - (func $0 (type $0) (param $0 i64) (result v128) - (v128.load - (local.get $0) - ) - ) - (func $1 (type $1) (param $0 i64) (param $1 v128) - (v128.store - (local.get $0) - (local.get $1) - ) - ) - (func $2 (type $0) (param $0 i64) (result v128) - (v128.load8_splat - (local.get $0) - ) - ) - (func $3 (type $0) (param $0 i64) (result v128) - (v128.load16_splat - (local.get $0) - ) - ) - (func $4 (type $0) (param $0 i64) (result v128) - (v128.load32_splat - (local.get $0) - ) - ) - (func $5 (type $0) (param $0 i64) (result v128) - (v128.load64_splat - (local.get $0) - ) - ) - (func $6 (type $0) (param $0 i64) (result v128) - (v128.load8x8_u - (local.get $0) - ) - ) - (func $7 (type $0) (param $0 i64) (result v128) - (v128.load8x8_s - (local.get $0) - ) - ) - (func $8 (type $0) (param $0 i64) (result v128) - (v128.load16x4_s - (local.get $0) - ) - ) - (func $9 (type $0) (param $0 i64) (result v128) - (v128.load16x4_u - (local.get $0) - ) - ) - (func $10 (type $0) (param $0 i64) (result v128) - (v128.load32x2_s - (local.get $0) - ) - ) - (func $11 (type $0) (param $0 i64) (result v128) - (v128.load32x2_u - (local.get $0) - ) - ) - (func $12 (type $0) (param $0 i64) (result v128) - (v128.load32_zero - (local.get $0) - ) - ) - (func $13 (type $0) (param $0 i64) (result v128) - (v128.load64_zero - (local.get $0) - ) - ) -) - diff --git a/test/subtypes.wast b/test/subtypes.wast deleted file mode 100644 index 08059e723..000000000 --- a/test/subtypes.wast +++ /dev/null @@ -1,59 +0,0 @@ -;; Test that we can roundtrip struct and array types -(module - ;; Arrays - (type $vector-i32 (array i32)) - - (type $vector-any (sub (array (ref any)))) - (type $vector-i31 (sub $vector-any (array (ref i31)))) - - ;; Structs - (type $struct-any (sub (struct - (field (ref any)) - ))) - (type $struct-i31 (sub $struct-any (struct - (field (ref i31)) - ))) - (type $struct-i31_any (sub $struct-i31(struct - (field (ref i31)) - (field (ref any)) - ))) - - ;; Recursive structs - (type $struct-rec-one (sub (struct - (field (ref $struct-rec-one)) - ))) - (type $struct-rec-two (sub $struct-rec-one (struct - (field (ref $struct-rec-two)) - (field (ref $struct-rec-two)) - ))) - - (func $foo (param $no-null (ref $vector-i32)) - (param $yes-null (ref null $vector-i32)) - ;; ok to set a non-nullable reference to a nullable target - (local.set $yes-null (local.get $no-null)) - ) - - (func $bar (param $v-i31 (ref $vector-i31)) - (param $v-any (ref $vector-any)) - ;; ok to set a vector of (immutable) i31s to a vector of anyies - (local.set $v-any (local.get $v-i31)) - ) - - (func $baz (param $s-i31 (ref $struct-i31)) - (param $s-any (ref $struct-any)) - ;; ok to set a struct of an (immutable) i31 to a one of an any - (local.set $s-any (local.get $s-i31)) - ) - - (func $boo (param $s-i31 (ref $struct-i31)) - (param $s-i31_any (ref $struct-i31_any)) - ;; also ok to have extra fields - (local.set $s-i31 (local.get $s-i31_any)) - ) - - (func $coinductive (param $rec-one (ref $struct-rec-one)) - (param $rec-two (ref $struct-rec-two)) - ;; Do not infinitely recurse when determining this subtype relation! - (local.set $rec-one (local.get $rec-two)) - ) -) diff --git a/test/subtypes.wast.from-wast b/test/subtypes.wast.from-wast deleted file mode 100644 index 1304c0c31..000000000 --- a/test/subtypes.wast.from-wast +++ /dev/null @@ -1,40 +0,0 @@ -(module - (type $struct-rec-one (sub (struct (field (ref $struct-rec-one))))) - (type $struct-rec-two (sub $struct-rec-one (struct (field (ref $struct-rec-two)) (field (ref $struct-rec-two))))) - (type $vector-i32 (array i32)) - (type $struct-any (sub (struct (field (ref any))))) - (type $struct-i31 (sub $struct-any (struct (field (ref i31))))) - (type $5 (func (param (ref $vector-i32) (ref null $vector-i32)))) - (type $vector-any (sub (array (ref any)))) - (type $vector-i31 (sub $vector-any (array (ref i31)))) - (type $8 (func (param (ref $vector-i31) (ref $vector-any)))) - (type $9 (func (param (ref $struct-i31) (ref $struct-any)))) - (type $struct-i31_any (sub $struct-i31 (struct (field (ref i31)) (field (ref any))))) - (type $11 (func (param (ref $struct-i31) (ref $struct-i31_any)))) - (type $12 (func (param (ref $struct-rec-one) (ref $struct-rec-two)))) - (func $foo (type $5) (param $no-null (ref $vector-i32)) (param $yes-null (ref null $vector-i32)) - (local.set $yes-null - (local.get $no-null) - ) - ) - (func $bar (type $8) (param $v-i31 (ref $vector-i31)) (param $v-any (ref $vector-any)) - (local.set $v-any - (local.get $v-i31) - ) - ) - (func $baz (type $9) (param $s-i31 (ref $struct-i31)) (param $s-any (ref $struct-any)) - (local.set $s-any - (local.get $s-i31) - ) - ) - (func $boo (type $11) (param $s-i31 (ref $struct-i31)) (param $s-i31_any (ref $struct-i31_any)) - (local.set $s-i31 - (local.get $s-i31_any) - ) - ) - (func $coinductive (type $12) (param $rec-one (ref $struct-rec-one)) (param $rec-two (ref $struct-rec-two)) - (local.set $rec-one - (local.get $rec-two) - ) - ) -) diff --git a/test/subtypes.wast.fromBinary b/test/subtypes.wast.fromBinary deleted file mode 100644 index 6a3ef7345..000000000 --- a/test/subtypes.wast.fromBinary +++ /dev/null @@ -1,41 +0,0 @@ -(module - (type $struct-rec-one (sub (struct (field (ref $struct-rec-one))))) - (type $struct-rec-two (sub $struct-rec-one (struct (field (ref $struct-rec-two)) (field (ref $struct-rec-two))))) - (type $vector-i32 (array i32)) - (type $struct-any (sub (struct (field (ref any))))) - (type $struct-i31 (sub $struct-any (struct (field (ref i31))))) - (type $5 (func (param (ref $vector-i32) (ref null $vector-i32)))) - (type $vector-any (sub (array (ref any)))) - (type $vector-i31 (sub $vector-any (array (ref i31)))) - (type $8 (func (param (ref $vector-i31) (ref $vector-any)))) - (type $9 (func (param (ref $struct-i31) (ref $struct-any)))) - (type $struct-i31_any (sub $struct-i31 (struct (field (ref i31)) (field (ref any))))) - (type $11 (func (param (ref $struct-i31) (ref $struct-i31_any)))) - (type $12 (func (param (ref $struct-rec-one) (ref $struct-rec-two)))) - (func $foo (type $5) (param $no-null (ref $vector-i32)) (param $yes-null (ref null $vector-i32)) - (local.set $yes-null - (local.get $no-null) - ) - ) - (func $bar (type $8) (param $v-i31 (ref $vector-i31)) (param $v-any (ref $vector-any)) - (local.set $v-any - (local.get $v-i31) - ) - ) - (func $baz (type $9) (param $s-i31 (ref $struct-i31)) (param $s-any (ref $struct-any)) - (local.set $s-any - (local.get $s-i31) - ) - ) - (func $boo (type $11) (param $s-i31 (ref $struct-i31)) (param $s-i31_any (ref $struct-i31_any)) - (local.set $s-i31 - (local.get $s-i31_any) - ) - ) - (func $coinductive (type $12) (param $rec-one (ref $struct-rec-one)) (param $rec-two (ref $struct-rec-two)) - (local.set $rec-one - (local.get $rec-two) - ) - ) -) - diff --git a/test/subtypes.wast.fromBinary.noDebugInfo b/test/subtypes.wast.fromBinary.noDebugInfo deleted file mode 100644 index 29e575555..000000000 --- a/test/subtypes.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,41 +0,0 @@ -(module - (type $0 (sub (struct (field (ref $0))))) - (type $1 (sub $0 (struct (field (ref $1)) (field (ref $1))))) - (type $2 (array i32)) - (type $3 (sub (struct (field (ref any))))) - (type $4 (sub $3 (struct (field (ref i31))))) - (type $5 (func (param (ref $2) (ref null $2)))) - (type $6 (sub (array (ref any)))) - (type $7 (sub $6 (array (ref i31)))) - (type $8 (func (param (ref $7) (ref $6)))) - (type $9 (func (param (ref $4) (ref $3)))) - (type $10 (sub $4 (struct (field (ref i31)) (field (ref any))))) - (type $11 (func (param (ref $4) (ref $10)))) - (type $12 (func (param (ref $0) (ref $1)))) - (func $0 (type $5) (param $0 (ref $2)) (param $1 (ref null $2)) - (local.set $1 - (local.get $0) - ) - ) - (func $1 (type $8) (param $0 (ref $7)) (param $1 (ref $6)) - (local.set $1 - (local.get $0) - ) - ) - (func $2 (type $9) (param $0 (ref $4)) (param $1 (ref $3)) - (local.set $1 - (local.get $0) - ) - ) - (func $3 (type $11) (param $0 (ref $4)) (param $1 (ref $10)) - (local.set $0 - (local.get $1) - ) - ) - (func $4 (type $12) (param $0 (ref $0)) (param $1 (ref $1)) - (local.set $0 - (local.get $1) - ) - ) -) - diff --git a/test/table-import.wast b/test/table-import.wast deleted file mode 100644 index bbce9e2fd..000000000 --- a/test/table-import.wast +++ /dev/null @@ -1,9 +0,0 @@ -(module - (type $0 (func)) - (import "env" "table" (table 1 1 funcref)) - (elem (i32.const 0) $foo) - (memory $0 0) - (func $foo (type $0) - (nop) - ) -) diff --git a/test/table-import.wast.from-wast b/test/table-import.wast.from-wast deleted file mode 100644 index ab805d22d..000000000 --- a/test/table-import.wast.from-wast +++ /dev/null @@ -1,9 +0,0 @@ -(module - (type $0 (func)) - (import "env" "table" (table $timport$0 1 1 funcref)) - (memory $0 0) - (elem $0 (i32.const 0) $foo) - (func $foo (type $0) - (nop) - ) -) diff --git a/test/table-import.wast.fromBinary b/test/table-import.wast.fromBinary deleted file mode 100644 index 52043bc10..000000000 --- a/test/table-import.wast.fromBinary +++ /dev/null @@ -1,10 +0,0 @@ -(module - (type $0 (func)) - (import "env" "table" (table $timport$0 1 1 funcref)) - (memory $0 0) - (elem $0 (i32.const 0) $foo) - (func $foo (type $0) - (nop) - ) -) - diff --git a/test/table-import.wast.fromBinary.noDebugInfo b/test/table-import.wast.fromBinary.noDebugInfo deleted file mode 100644 index 6c92becc8..000000000 --- a/test/table-import.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,10 +0,0 @@ -(module - (type $0 (func)) - (import "env" "table" (table $timport$0 1 1 funcref)) - (memory $0 0) - (elem $0 (i32.const 0) $0) - (func $0 (type $0) - (nop) - ) -) - diff --git a/test/tags.wast b/test/tags.wast deleted file mode 100644 index 6dc383a86..000000000 --- a/test/tags.wast +++ /dev/null @@ -1,16 +0,0 @@ -;; Test tags - -(module - (tag (param i32)) - (tag $e (param i32 f32)) - (tag $empty) - - (tag $e-params0 (param i32 f32)) - (tag $e-params1 (param i32) (param f32)) - - (tag $e-export (export "ex0") (param i32)) - (tag $e-import (import "env" "im0") (param i32)) - - (import "env" "im1" (tag (param i32 f32))) - (export "ex1" (tag $e)) -) diff --git a/test/tags.wast.from-wast b/test/tags.wast.from-wast deleted file mode 100644 index 8b1645a0b..000000000 --- a/test/tags.wast.from-wast +++ /dev/null @@ -1,15 +0,0 @@ -(module - (type $0 (func (param i32 f32))) - (type $1 (func (param i32))) - (type $2 (func)) - (import "env" "im0" (tag $e-import (param i32))) - (import "env" "im1" (tag $eimport$1 (param i32 f32))) - (tag $2 (param i32)) - (tag $e (param i32 f32)) - (tag $empty) - (tag $e-params0 (param i32 f32)) - (tag $e-params1 (param i32 f32)) - (tag $e-export (param i32)) - (export "ex0" (tag $e-export)) - (export "ex1" (tag $e)) -) diff --git a/test/tags.wast.fromBinary b/test/tags.wast.fromBinary deleted file mode 100644 index 99b478add..000000000 --- a/test/tags.wast.fromBinary +++ /dev/null @@ -1,16 +0,0 @@ -(module - (type $0 (func (param i32 f32))) - (type $1 (func (param i32))) - (type $2 (func)) - (import "env" "im0" (tag $e-import (param i32))) - (import "env" "im1" (tag $eimport$1 (param i32 f32))) - (tag $tag$0 (param i32)) - (tag $e (param i32 f32)) - (tag $empty) - (tag $e-params0 (param i32 f32)) - (tag $e-params1 (param i32 f32)) - (tag $e-export (param i32)) - (export "ex0" (tag $e-export)) - (export "ex1" (tag $e)) -) - diff --git a/test/tags.wast.fromBinary.noDebugInfo b/test/tags.wast.fromBinary.noDebugInfo deleted file mode 100644 index 6cd126efb..000000000 --- a/test/tags.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,16 +0,0 @@ -(module - (type $0 (func (param i32 f32))) - (type $1 (func (param i32))) - (type $2 (func)) - (import "env" "im0" (tag $eimport$0 (param i32))) - (import "env" "im1" (tag $eimport$1 (param i32 f32))) - (tag $tag$0 (param i32)) - (tag $tag$1 (param i32 f32)) - (tag $tag$2) - (tag $tag$3 (param i32 f32)) - (tag $tag$4 (param i32 f32)) - (tag $tag$5 (param i32)) - (export "ex0" (tag $tag$5)) - (export "ex1" (tag $tag$1)) -) - diff --git a/test/tail-call.wast.from-wast b/test/tail-call.wast.from-wast deleted file mode 100644 index 3c0e0c150..000000000 --- a/test/tail-call.wast.from-wast +++ /dev/null @@ -1,13 +0,0 @@ -(module - (type $void (func)) - (table $0 1 1 funcref) - (elem (i32.const 0) $foo) - (func $foo - (return_call $bar) - ) - (func $bar - (return_call_indirect $0 (type $void) - (i32.const 0) - ) - ) -) diff --git a/test/tail-call.wast.fromBinary b/test/tail-call.wast.fromBinary deleted file mode 100644 index 81a5c4f9f..000000000 --- a/test/tail-call.wast.fromBinary +++ /dev/null @@ -1,14 +0,0 @@ -(module - (type $void (func)) - (table $0 1 1 funcref) - (elem (i32.const 0) $foo) - (func $foo - (return_call $bar) - ) - (func $bar - (return_call_indirect $0 (type $void) - (i32.const 0) - ) - ) -) - diff --git a/test/tail-call.wast.fromBinary.noDebugInfo b/test/tail-call.wast.fromBinary.noDebugInfo deleted file mode 100644 index 919626330..000000000 --- a/test/tail-call.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,14 +0,0 @@ -(module - (type $none_=>_none (func)) - (table $0 1 1 funcref) - (elem (i32.const 0) $0) - (func $0 - (return_call $1) - ) - (func $1 - (return_call_indirect $0 (type $none_=>_none) - (i32.const 0) - ) - ) -) - diff --git a/test/unit.wast.from-wast b/test/unit.wast.from-wast deleted file mode 100644 index bba5203e0..000000000 --- a/test/unit.wast.from-wast +++ /dev/null @@ -1,619 +0,0 @@ -(module - (type $none_=>_i32 (func (result i32))) - (type $none_=>_none (func)) - (type $f32_=>_none (func (param f32))) - (type $none_=>_f64 (func (result f64))) - (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) - (type $i32_i64_=>_none (func (param i32 i64))) - (type $i32_=>_i32 (func (param i32) (result i32))) - (type $f64_=>_i32 (func (param f64) (result i32))) - (type $none_=>_i64 (func (result i64))) - (type $f64_=>_f64 (func (param f64) (result f64))) - (import "env" "_emscripten_asm_const_vi" (func $_emscripten_asm_const_vi)) - (import "asm2wasm" "f64-to-int" (func $f64-to-int (param f64) (result i32))) - (import "asm2wasm" "f64-rem" (func $f64-rem (param f64 f64) (result f64))) - (memory $0 4096 4096) - (data (i32.const 1026) "\14\00") - (table $0 10 funcref) - (elem (i32.const 0) $z $big_negative $z $z $w $w $importedDoubles $w $z $cneg) - (export "big_negative" (func $big_negative)) - (func $big_negative (; 3 ;) - (local $temp f64) - (block $block0 - (local.set $temp - (f64.const -2147483648) - ) - (local.set $temp - (f64.const -2147483648) - ) - (local.set $temp - (f64.const -21474836480) - ) - (local.set $temp - (f64.const 0.039625) - ) - (local.set $temp - (f64.const -0.039625) - ) - ) - ) - (func $importedDoubles (; 4 ;) (result f64) - (local $temp f64) - (block $topmost (result f64) - (local.set $temp - (f64.add - (f64.add - (f64.add - (f64.load - (i32.const 8) - ) - (f64.load - (i32.const 16) - ) - ) - (f64.neg - (f64.load - (i32.const 16) - ) - ) - ) - (f64.neg - (f64.load - (i32.const 8) - ) - ) - ) - ) - (if - (i32.gt_s - (i32.load - (i32.const 24) - ) - (i32.const 0) - ) - (br $topmost - (f64.const -3.4) - ) - ) - (if - (f64.gt - (f64.load - (i32.const 32) - ) - (f64.const 0) - ) - (br $topmost - (f64.const 5.6) - ) - ) - (f64.const 1.2) - ) - ) - (func $doubleCompares (; 5 ;) (param $x f64) (param $y f64) (result f64) - (local $t f64) - (local $Int f64) - (local $Double i32) - (block $topmost (result f64) - (if - (f64.gt - (local.get $x) - (f64.const 0) - ) - (br $topmost - (f64.const 1.2) - ) - ) - (if - (f64.gt - (local.get $Int) - (f64.const 0) - ) - (br $topmost - (f64.const -3.4) - ) - ) - (if - (i32.gt_s - (local.get $Double) - (i32.const 0) - ) - (br $topmost - (f64.const 5.6) - ) - ) - (if - (f64.lt - (local.get $x) - (local.get $y) - ) - (br $topmost - (local.get $x) - ) - ) - (local.get $y) - ) - ) - (func $intOps (; 6 ;) (result i32) - (local $x i32) - (i32.eq - (local.get $x) - (i32.const 0) - ) - ) - (func $hexLiterals (; 7 ;) - (drop - (i32.add - (i32.add - (i32.const 0) - (i32.const 313249263) - ) - (i32.const -19088752) - ) - ) - ) - (func $conversions (; 8 ;) - (local $i i32) - (local $d f64) - (block $block0 - (local.set $i - (call $f64-to-int - (local.get $d) - ) - ) - (local.set $d - (f64.convert_i32_s - (local.get $i) - ) - ) - (local.set $d - (f64.convert_i32_u - (i32.shr_u - (local.get $i) - (i32.const 0) - ) - ) - ) - ) - ) - (func $seq (; 9 ;) - (local $J f64) - (local.set $J - (f64.sub - (block $block0 (result f64) - (drop - (f64.const 0.1) - ) - (f64.const 5.1) - ) - (block $block1 (result f64) - (drop - (f64.const 3.2) - ) - (f64.const 4.2) - ) - ) - ) - ) - (func $switcher (; 10 ;) (param $x i32) (result i32) - (block $topmost (result i32) - (block $switch$0 - (block $switch-default$3 - (block $switch-case$2 - (block $switch-case$1 - (br_table $switch-case$1 $switch-case$2 $switch-default$3 - (i32.sub - (local.get $x) - (i32.const 1) - ) - ) - ) - (br $topmost - (i32.const 1) - ) - ) - (br $topmost - (i32.const 2) - ) - ) - (nop) - ) - (block $switch$4 - (block $switch-default$7 - (block $switch-case$6 - (block $switch-case$5 - (br_table $switch-case$6 $switch-default$7 $switch-default$7 $switch-default$7 $switch-default$7 $switch-default$7 $switch-default$7 $switch-case$5 $switch-default$7 - (i32.sub - (local.get $x) - (i32.const 5) - ) - ) - ) - (br $topmost - (i32.const 121) - ) - ) - (br $topmost - (i32.const 51) - ) - ) - (nop) - ) - (block $label$break$Lout - (block $switch-default$16 - (block $switch-case$15 - (block $switch-case$12 - (block $switch-case$9 - (block $switch-case$8 - (br_table $switch-case$15 $switch-default$16 $switch-default$16 $switch-case$12 $switch-default$16 $switch-default$16 $switch-default$16 $switch-default$16 $switch-case$9 $switch-default$16 $switch-case$8 $switch-default$16 - (i32.sub - (local.get $x) - (i32.const 2) - ) - ) - ) - (br $label$break$Lout) - ) - (br $label$break$Lout) - ) - (block $while-out$10 - (loop $while-in$11 - (block $block1 - (br $while-out$10) - (br $while-in$11) - ) - ) - (br $label$break$Lout) - ) - ) - (block $while-out$13 - (loop $while-in$14 - (block $block3 - (br $label$break$Lout) - (br $while-in$14) - ) - ) - (br $label$break$Lout) - ) - ) - (nop) - ) - (i32.const 0) - ) - ) - (func $blocker (; 11 ;) - (block $label$break$L - (br $label$break$L) - ) - ) - (func $frem (; 12 ;) (result f64) - (call $f64-rem - (f64.const 5.5) - (f64.const 1.2) - ) - ) - (func $big_uint_div_u (; 13 ;) (result i32) - (local $x i32) - (block $topmost (result i32) - (local.set $x - (i32.and - (i32.div_u - (i32.const -1) - (i32.const 2) - ) - (i32.const -1) - ) - ) - (local.get $x) - ) - ) - (func $fr (; 14 ;) (param $x f32) - (local $y f32) - (local $z f64) - (block $block0 - (drop - (f32.demote_f64 - (local.get $z) - ) - ) - (drop - (local.get $y) - ) - (drop - (f32.const 5) - ) - (drop - (f32.const 0) - ) - (drop - (f32.const 5) - ) - (drop - (f32.const 0) - ) - ) - ) - (func $negZero (; 15 ;) (result f64) - (f64.const -0) - ) - (func $abs (; 16 ;) - (local $x i32) - (local $y f64) - (local $z f32) - (local $asm2wasm_i32_temp i32) - (block $block0 - (local.set $x - (block $block1 (result i32) - (local.set $asm2wasm_i32_temp - (i32.const 0) - ) - (select - (i32.sub - (i32.const 0) - (local.get $asm2wasm_i32_temp) - ) - (local.get $asm2wasm_i32_temp) - (i32.lt_s - (local.get $asm2wasm_i32_temp) - (i32.const 0) - ) - ) - ) - ) - (local.set $y - (f64.abs - (f64.const 0) - ) - ) - (local.set $z - (f32.abs - (f32.const 0) - ) - ) - ) - ) - (func $neg (; 17 ;) - (local $x f32) - (block $block0 - (local.set $x - (f32.neg - (local.get $x) - ) - ) - (call_indirect (type $f32_=>_none) - (local.get $x) - (i32.add - (i32.and - (i32.const 1) - (i32.const 7) - ) - (i32.const 8) - ) - ) - ) - ) - (func $cneg (; 18 ;) (param $x f32) - (call_indirect (type $f32_=>_none) - (local.get $x) - (i32.add - (i32.and - (i32.const 1) - (i32.const 7) - ) - (i32.const 8) - ) - ) - ) - (func $___syscall_ret (; 19 ;) - (local $$0 i32) - (drop - (i32.gt_u - (i32.shr_u - (local.get $$0) - (i32.const 0) - ) - (i32.const -4096) - ) - ) - ) - (func $z (; 20 ;) - (nop) - ) - (func $w (; 21 ;) - (nop) - ) - (func $block_and_after (; 22 ;) (result i32) - (block $waka - (drop - (i32.const 1) - ) - (br $waka) - ) - (i32.const 0) - ) - (func $loop-roundtrip (; 23 ;) (param $0 f64) (result f64) - (loop $loop-in1 (result f64) - (drop - (local.get $0) - ) - (local.get $0) - ) - ) - (func $big-i64 (; 24 ;) (result i64) - (i64.const -9218868437227405313) - ) - (func $i64-store32 (; 25 ;) (param $0 i32) (param $1 i64) - (i64.store32 - (local.get $0) - (local.get $1) - ) - ) - (func $return-unreachable (; 26 ;) (result i32) - (return - (i32.const 1) - ) - ) - (func $unreachable-block (; 27 ;) (result i32) - (f64.abs - (block $block - (drop - (i32.const 1) - ) - (return - (i32.const 2) - ) - ) - ) - ) - (func $unreachable-block-toplevel (; 28 ;) (result i32) - (block $block - (drop - (i32.const 1) - ) - (return - (i32.const 2) - ) - ) - ) - (func $unreachable-block0 (; 29 ;) (result i32) - (f64.abs - (block $block - (return - (i32.const 2) - ) - ) - ) - ) - (func $unreachable-block0-toplevel (; 30 ;) (result i32) - (block $block - (return - (i32.const 2) - ) - ) - ) - (func $unreachable-block-with-br (; 31 ;) (result i32) - (block $block - (drop - (i32.const 1) - ) - (br $block) - ) - (i32.const 1) - ) - (func $unreachable-if (; 32 ;) (result i32) - (f64.abs - (if - (i32.const 3) - (return - (i32.const 2) - ) - (return - (i32.const 1) - ) - ) - ) - ) - (func $unreachable-if-toplevel (; 33 ;) (result i32) - (if - (i32.const 3) - (return - (i32.const 2) - ) - (return - (i32.const 1) - ) - ) - ) - (func $unreachable-loop (; 34 ;) (result i32) - (f64.abs - (loop $loop-in - (nop) - (return - (i32.const 1) - ) - ) - ) - ) - (func $unreachable-loop0 (; 35 ;) (result i32) - (f64.abs - (loop $loop-in - (return - (i32.const 1) - ) - ) - ) - ) - (func $unreachable-loop-toplevel (; 36 ;) (result i32) - (loop $loop-in - (nop) - (return - (i32.const 1) - ) - ) - ) - (func $unreachable-loop0-toplevel (; 37 ;) (result i32) - (loop $loop-in - (return - (i32.const 1) - ) - ) - ) - (func $unreachable-ifs (; 38 ;) - (if - (unreachable) - (nop) - ) - (if - (unreachable) - (unreachable) - ) - (if - (unreachable) - (nop) - (nop) - ) - (if - (unreachable) - (unreachable) - (nop) - ) - (if - (unreachable) - (nop) - (unreachable) - ) - (if - (unreachable) - (unreachable) - (unreachable) - ) - (if - (i32.const 1) - (unreachable) - (nop) - ) - (if - (i32.const 1) - (nop) - (unreachable) - ) - (if - (i32.const 1) - (unreachable) - (unreachable) - ) - ) - (func $unreachable-if-arm (; 39 ;) - (if - (i32.const 1) - (block $block - (nop) - ) - (block $block12 - (unreachable) - (drop - (i32.const 1) - ) - ) - ) - ) -) diff --git a/test/unit.wast.fromBinary b/test/unit.wast.fromBinary deleted file mode 100644 index 9564e9eca..000000000 --- a/test/unit.wast.fromBinary +++ /dev/null @@ -1,537 +0,0 @@ -(module - (type $none_=>_i32 (func (result i32))) - (type $none_=>_none (func)) - (type $f32_=>_none (func (param f32))) - (type $none_=>_f64 (func (result f64))) - (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) - (type $i32_i64_=>_none (func (param i32 i64))) - (type $i32_=>_i32 (func (param i32) (result i32))) - (type $f64_=>_i32 (func (param f64) (result i32))) - (type $none_=>_i64 (func (result i64))) - (type $f64_=>_f64 (func (param f64) (result f64))) - (import "env" "_emscripten_asm_const_vi" (func $_emscripten_asm_const_vi)) - (import "asm2wasm" "f64-to-int" (func $f64-to-int (param f64) (result i32))) - (import "asm2wasm" "f64-rem" (func $f64-rem (param f64 f64) (result f64))) - (memory $0 4096 4096) - (data (i32.const 1026) "\14\00") - (table $0 10 funcref) - (elem (i32.const 0) $z $big_negative $z $z $w $w $importedDoubles $w $z $cneg) - (export "big_negative" (func $big_negative)) - (func $big_negative (; 3 ;) - (local $0 f64) - (local.set $0 - (f64.const -2147483648) - ) - (local.set $0 - (f64.const -2147483648) - ) - (local.set $0 - (f64.const -21474836480) - ) - (local.set $0 - (f64.const 0.039625) - ) - (local.set $0 - (f64.const -0.039625) - ) - ) - (func $importedDoubles (; 4 ;) (result f64) - (local $0 f64) - (block $label$1 (result f64) - (local.set $0 - (f64.add - (f64.add - (f64.add - (f64.load - (i32.const 8) - ) - (f64.load - (i32.const 16) - ) - ) - (f64.neg - (f64.load - (i32.const 16) - ) - ) - ) - (f64.neg - (f64.load - (i32.const 8) - ) - ) - ) - ) - (if - (i32.gt_s - (i32.load - (i32.const 24) - ) - (i32.const 0) - ) - (br $label$1 - (f64.const -3.4) - ) - ) - (if - (f64.gt - (f64.load - (i32.const 32) - ) - (f64.const 0) - ) - (br $label$1 - (f64.const 5.6) - ) - ) - (f64.const 1.2) - ) - ) - (func $doubleCompares (; 5 ;) (param $0 f64) (param $1 f64) (result f64) - (local $2 i32) - (local $3 f64) - (local $4 f64) - (block $label$1 (result f64) - (if - (f64.gt - (local.get $0) - (f64.const 0) - ) - (br $label$1 - (f64.const 1.2) - ) - ) - (if - (f64.gt - (local.get $4) - (f64.const 0) - ) - (br $label$1 - (f64.const -3.4) - ) - ) - (if - (i32.gt_s - (local.get $2) - (i32.const 0) - ) - (br $label$1 - (f64.const 5.6) - ) - ) - (if - (f64.lt - (local.get $0) - (local.get $1) - ) - (br $label$1 - (local.get $0) - ) - ) - (local.get $1) - ) - ) - (func $intOps (; 6 ;) (result i32) - (local $0 i32) - (i32.eq - (local.get $0) - (i32.const 0) - ) - ) - (func $hexLiterals (; 7 ;) - (drop - (i32.add - (i32.add - (i32.const 0) - (i32.const 313249263) - ) - (i32.const -19088752) - ) - ) - ) - (func $conversions (; 8 ;) - (local $0 i32) - (local $1 f64) - (local.set $0 - (call $f64-to-int - (local.get $1) - ) - ) - (local.set $1 - (f64.convert_i32_s - (local.get $0) - ) - ) - (local.set $1 - (f64.convert_i32_u - (i32.shr_u - (local.get $0) - (i32.const 0) - ) - ) - ) - ) - (func $seq (; 9 ;) - (local $0 f64) - (local.set $0 - (f64.sub - (block $label$1 (result f64) - (drop - (f64.const 0.1) - ) - (f64.const 5.1) - ) - (block $label$2 (result f64) - (drop - (f64.const 3.2) - ) - (f64.const 4.2) - ) - ) - ) - ) - (func $switcher (; 10 ;) (param $0 i32) (result i32) - (block $label$1 (result i32) - (block $label$2 - (block $label$3 - (block $label$4 - (block $label$5 - (br_table $label$5 $label$4 $label$3 - (i32.sub - (local.get $0) - (i32.const 1) - ) - ) - ) - (br $label$1 - (i32.const 1) - ) - ) - (br $label$1 - (i32.const 2) - ) - ) - (nop) - ) - (block $label$6 - (block $label$7 - (block $label$8 - (block $label$9 - (br_table $label$8 $label$7 $label$7 $label$7 $label$7 $label$7 $label$7 $label$9 $label$7 - (i32.sub - (local.get $0) - (i32.const 5) - ) - ) - ) - (br $label$1 - (i32.const 121) - ) - ) - (br $label$1 - (i32.const 51) - ) - ) - (nop) - ) - (block $label$10 - (block $label$11 - (block $label$12 - (block $label$13 - (block $label$14 - (block $label$15 - (br_table $label$12 $label$11 $label$11 $label$13 $label$11 $label$11 $label$11 $label$11 $label$14 $label$11 $label$15 $label$11 - (i32.sub - (local.get $0) - (i32.const 2) - ) - ) - ) - (br $label$10) - ) - (br $label$10) - ) - (block $label$16 - (loop $label$17 - (br $label$16) - ) - ) - ) - (block $label$18 - (loop $label$19 - (br $label$10) - ) - ) - ) - (nop) - ) - (i32.const 0) - ) - ) - (func $blocker (; 11 ;) - (block $label$1 - (br $label$1) - ) - ) - (func $frem (; 12 ;) (result f64) - (call $f64-rem - (f64.const 5.5) - (f64.const 1.2) - ) - ) - (func $big_uint_div_u (; 13 ;) (result i32) - (local $0 i32) - (local.set $0 - (i32.and - (i32.div_u - (i32.const -1) - (i32.const 2) - ) - (i32.const -1) - ) - ) - (local.get $0) - ) - (func $fr (; 14 ;) (param $0 f32) - (local $1 f32) - (local $2 f64) - (drop - (f32.demote_f64 - (local.get $2) - ) - ) - (drop - (local.get $1) - ) - (drop - (f32.const 5) - ) - (drop - (f32.const 0) - ) - (drop - (f32.const 5) - ) - (drop - (f32.const 0) - ) - ) - (func $negZero (; 15 ;) (result f64) - (f64.const -0) - ) - (func $abs (; 16 ;) - (local $0 i32) - (local $1 i32) - (local $2 f32) - (local $3 f64) - (local.set $0 - (block $label$1 (result i32) - (local.set $1 - (i32.const 0) - ) - (select - (i32.sub - (i32.const 0) - (local.get $1) - ) - (local.get $1) - (i32.lt_s - (local.get $1) - (i32.const 0) - ) - ) - ) - ) - (local.set $3 - (f64.abs - (f64.const 0) - ) - ) - (local.set $2 - (f32.abs - (f32.const 0) - ) - ) - ) - (func $neg (; 17 ;) - (local $0 f32) - (local.set $0 - (f32.neg - (local.get $0) - ) - ) - (call_indirect (type $f32_=>_none) - (local.get $0) - (i32.add - (i32.and - (i32.const 1) - (i32.const 7) - ) - (i32.const 8) - ) - ) - ) - (func $cneg (; 18 ;) (param $0 f32) - (call_indirect (type $f32_=>_none) - (local.get $0) - (i32.add - (i32.and - (i32.const 1) - (i32.const 7) - ) - (i32.const 8) - ) - ) - ) - (func $___syscall_ret (; 19 ;) - (local $0 i32) - (drop - (i32.gt_u - (i32.shr_u - (local.get $0) - (i32.const 0) - ) - (i32.const -4096) - ) - ) - ) - (func $z (; 20 ;) - (nop) - ) - (func $w (; 21 ;) - (nop) - ) - (func $block_and_after (; 22 ;) (result i32) - (block $label$1 - (drop - (i32.const 1) - ) - (br $label$1) - ) - (i32.const 0) - ) - (func $loop-roundtrip (; 23 ;) (param $0 f64) (result f64) - (loop $label$1 (result f64) - (drop - (local.get $0) - ) - (local.get $0) - ) - ) - (func $big-i64 (; 24 ;) (result i64) - (i64.const -9218868437227405313) - ) - (func $i64-store32 (; 25 ;) (param $0 i32) (param $1 i64) - (i64.store32 - (local.get $0) - (local.get $1) - ) - ) - (func $return-unreachable (; 26 ;) (result i32) - (return - (i32.const 1) - ) - ) - (func $unreachable-block (; 27 ;) (result i32) - (block $label$1 - (drop - (i32.const 1) - ) - (return - (i32.const 2) - ) - ) - ) - (func $unreachable-block-toplevel (; 28 ;) (result i32) - (drop - (i32.const 1) - ) - (return - (i32.const 2) - ) - ) - (func $unreachable-block0 (; 29 ;) (result i32) - (block $label$1 - (return - (i32.const 2) - ) - ) - ) - (func $unreachable-block0-toplevel (; 30 ;) (result i32) - (return - (i32.const 2) - ) - ) - (func $unreachable-block-with-br (; 31 ;) (result i32) - (block $label$1 - (drop - (i32.const 1) - ) - (br $label$1) - ) - (i32.const 1) - ) - (func $unreachable-if (; 32 ;) (result i32) - (if - (i32.const 3) - (return - (i32.const 2) - ) - (return - (i32.const 1) - ) - ) - ) - (func $unreachable-if-toplevel (; 33 ;) (result i32) - (if - (i32.const 3) - (return - (i32.const 2) - ) - (return - (i32.const 1) - ) - ) - ) - (func $unreachable-loop (; 34 ;) (result i32) - (loop $label$1 - (nop) - (return - (i32.const 1) - ) - ) - ) - (func $unreachable-loop0 (; 35 ;) (result i32) - (loop $label$1 - (return - (i32.const 1) - ) - ) - ) - (func $unreachable-loop-toplevel (; 36 ;) (result i32) - (loop $label$1 - (nop) - (return - (i32.const 1) - ) - ) - ) - (func $unreachable-loop0-toplevel (; 37 ;) (result i32) - (loop $label$1 - (return - (i32.const 1) - ) - ) - ) - (func $unreachable-ifs (; 38 ;) - (unreachable) - ) - (func $unreachable-if-arm (; 39 ;) - (if - (i32.const 1) - (nop) - (unreachable) - ) - ) -) - diff --git a/test/unit.wast.fromBinary.noDebugInfo b/test/unit.wast.fromBinary.noDebugInfo deleted file mode 100644 index 8ad733079..000000000 --- a/test/unit.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,537 +0,0 @@ -(module - (type $none_=>_i32 (func (result i32))) - (type $none_=>_none (func)) - (type $f32_=>_none (func (param f32))) - (type $none_=>_f64 (func (result f64))) - (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) - (type $i32_i64_=>_none (func (param i32 i64))) - (type $i32_=>_i32 (func (param i32) (result i32))) - (type $f64_=>_i32 (func (param f64) (result i32))) - (type $none_=>_i64 (func (result i64))) - (type $f64_=>_f64 (func (param f64) (result f64))) - (import "env" "_emscripten_asm_const_vi" (func $fimport$0)) - (import "asm2wasm" "f64-to-int" (func $fimport$1 (param f64) (result i32))) - (import "asm2wasm" "f64-rem" (func $fimport$2 (param f64 f64) (result f64))) - (memory $0 4096 4096) - (data (i32.const 1026) "\14\00") - (table $0 10 funcref) - (elem (i32.const 0) $17 $0 $17 $17 $18 $18 $1 $18 $17 $15) - (export "big_negative" (func $0)) - (func $0 (; 3 ;) - (local $0 f64) - (local.set $0 - (f64.const -2147483648) - ) - (local.set $0 - (f64.const -2147483648) - ) - (local.set $0 - (f64.const -21474836480) - ) - (local.set $0 - (f64.const 0.039625) - ) - (local.set $0 - (f64.const -0.039625) - ) - ) - (func $1 (; 4 ;) (result f64) - (local $0 f64) - (block $label$1 (result f64) - (local.set $0 - (f64.add - (f64.add - (f64.add - (f64.load - (i32.const 8) - ) - (f64.load - (i32.const 16) - ) - ) - (f64.neg - (f64.load - (i32.const 16) - ) - ) - ) - (f64.neg - (f64.load - (i32.const 8) - ) - ) - ) - ) - (if - (i32.gt_s - (i32.load - (i32.const 24) - ) - (i32.const 0) - ) - (br $label$1 - (f64.const -3.4) - ) - ) - (if - (f64.gt - (f64.load - (i32.const 32) - ) - (f64.const 0) - ) - (br $label$1 - (f64.const 5.6) - ) - ) - (f64.const 1.2) - ) - ) - (func $2 (; 5 ;) (param $0 f64) (param $1 f64) (result f64) - (local $2 i32) - (local $3 f64) - (local $4 f64) - (block $label$1 (result f64) - (if - (f64.gt - (local.get $0) - (f64.const 0) - ) - (br $label$1 - (f64.const 1.2) - ) - ) - (if - (f64.gt - (local.get $4) - (f64.const 0) - ) - (br $label$1 - (f64.const -3.4) - ) - ) - (if - (i32.gt_s - (local.get $2) - (i32.const 0) - ) - (br $label$1 - (f64.const 5.6) - ) - ) - (if - (f64.lt - (local.get $0) - (local.get $1) - ) - (br $label$1 - (local.get $0) - ) - ) - (local.get $1) - ) - ) - (func $3 (; 6 ;) (result i32) - (local $0 i32) - (i32.eq - (local.get $0) - (i32.const 0) - ) - ) - (func $4 (; 7 ;) - (drop - (i32.add - (i32.add - (i32.const 0) - (i32.const 313249263) - ) - (i32.const -19088752) - ) - ) - ) - (func $5 (; 8 ;) - (local $0 i32) - (local $1 f64) - (local.set $0 - (call $fimport$1 - (local.get $1) - ) - ) - (local.set $1 - (f64.convert_i32_s - (local.get $0) - ) - ) - (local.set $1 - (f64.convert_i32_u - (i32.shr_u - (local.get $0) - (i32.const 0) - ) - ) - ) - ) - (func $6 (; 9 ;) - (local $0 f64) - (local.set $0 - (f64.sub - (block $label$1 (result f64) - (drop - (f64.const 0.1) - ) - (f64.const 5.1) - ) - (block $label$2 (result f64) - (drop - (f64.const 3.2) - ) - (f64.const 4.2) - ) - ) - ) - ) - (func $7 (; 10 ;) (param $0 i32) (result i32) - (block $label$1 (result i32) - (block $label$2 - (block $label$3 - (block $label$4 - (block $label$5 - (br_table $label$5 $label$4 $label$3 - (i32.sub - (local.get $0) - (i32.const 1) - ) - ) - ) - (br $label$1 - (i32.const 1) - ) - ) - (br $label$1 - (i32.const 2) - ) - ) - (nop) - ) - (block $label$6 - (block $label$7 - (block $label$8 - (block $label$9 - (br_table $label$8 $label$7 $label$7 $label$7 $label$7 $label$7 $label$7 $label$9 $label$7 - (i32.sub - (local.get $0) - (i32.const 5) - ) - ) - ) - (br $label$1 - (i32.const 121) - ) - ) - (br $label$1 - (i32.const 51) - ) - ) - (nop) - ) - (block $label$10 - (block $label$11 - (block $label$12 - (block $label$13 - (block $label$14 - (block $label$15 - (br_table $label$12 $label$11 $label$11 $label$13 $label$11 $label$11 $label$11 $label$11 $label$14 $label$11 $label$15 $label$11 - (i32.sub - (local.get $0) - (i32.const 2) - ) - ) - ) - (br $label$10) - ) - (br $label$10) - ) - (block $label$16 - (loop $label$17 - (br $label$16) - ) - ) - ) - (block $label$18 - (loop $label$19 - (br $label$10) - ) - ) - ) - (nop) - ) - (i32.const 0) - ) - ) - (func $8 (; 11 ;) - (block $label$1 - (br $label$1) - ) - ) - (func $9 (; 12 ;) (result f64) - (call $fimport$2 - (f64.const 5.5) - (f64.const 1.2) - ) - ) - (func $10 (; 13 ;) (result i32) - (local $0 i32) - (local.set $0 - (i32.and - (i32.div_u - (i32.const -1) - (i32.const 2) - ) - (i32.const -1) - ) - ) - (local.get $0) - ) - (func $11 (; 14 ;) (param $0 f32) - (local $1 f32) - (local $2 f64) - (drop - (f32.demote_f64 - (local.get $2) - ) - ) - (drop - (local.get $1) - ) - (drop - (f32.const 5) - ) - (drop - (f32.const 0) - ) - (drop - (f32.const 5) - ) - (drop - (f32.const 0) - ) - ) - (func $12 (; 15 ;) (result f64) - (f64.const -0) - ) - (func $13 (; 16 ;) - (local $0 i32) - (local $1 i32) - (local $2 f32) - (local $3 f64) - (local.set $0 - (block $label$1 (result i32) - (local.set $1 - (i32.const 0) - ) - (select - (i32.sub - (i32.const 0) - (local.get $1) - ) - (local.get $1) - (i32.lt_s - (local.get $1) - (i32.const 0) - ) - ) - ) - ) - (local.set $3 - (f64.abs - (f64.const 0) - ) - ) - (local.set $2 - (f32.abs - (f32.const 0) - ) - ) - ) - (func $14 (; 17 ;) - (local $0 f32) - (local.set $0 - (f32.neg - (local.get $0) - ) - ) - (call_indirect (type $f32_=>_none) - (local.get $0) - (i32.add - (i32.and - (i32.const 1) - (i32.const 7) - ) - (i32.const 8) - ) - ) - ) - (func $15 (; 18 ;) (param $0 f32) - (call_indirect (type $f32_=>_none) - (local.get $0) - (i32.add - (i32.and - (i32.const 1) - (i32.const 7) - ) - (i32.const 8) - ) - ) - ) - (func $16 (; 19 ;) - (local $0 i32) - (drop - (i32.gt_u - (i32.shr_u - (local.get $0) - (i32.const 0) - ) - (i32.const -4096) - ) - ) - ) - (func $17 (; 20 ;) - (nop) - ) - (func $18 (; 21 ;) - (nop) - ) - (func $19 (; 22 ;) (result i32) - (block $label$1 - (drop - (i32.const 1) - ) - (br $label$1) - ) - (i32.const 0) - ) - (func $20 (; 23 ;) (param $0 f64) (result f64) - (loop $label$1 (result f64) - (drop - (local.get $0) - ) - (local.get $0) - ) - ) - (func $21 (; 24 ;) (result i64) - (i64.const -9218868437227405313) - ) - (func $22 (; 25 ;) (param $0 i32) (param $1 i64) - (i64.store32 - (local.get $0) - (local.get $1) - ) - ) - (func $23 (; 26 ;) (result i32) - (return - (i32.const 1) - ) - ) - (func $24 (; 27 ;) (result i32) - (block $label$1 - (drop - (i32.const 1) - ) - (return - (i32.const 2) - ) - ) - ) - (func $25 (; 28 ;) (result i32) - (drop - (i32.const 1) - ) - (return - (i32.const 2) - ) - ) - (func $26 (; 29 ;) (result i32) - (block $label$1 - (return - (i32.const 2) - ) - ) - ) - (func $27 (; 30 ;) (result i32) - (return - (i32.const 2) - ) - ) - (func $28 (; 31 ;) (result i32) - (block $label$1 - (drop - (i32.const 1) - ) - (br $label$1) - ) - (i32.const 1) - ) - (func $29 (; 32 ;) (result i32) - (if - (i32.const 3) - (return - (i32.const 2) - ) - (return - (i32.const 1) - ) - ) - ) - (func $30 (; 33 ;) (result i32) - (if - (i32.const 3) - (return - (i32.const 2) - ) - (return - (i32.const 1) - ) - ) - ) - (func $31 (; 34 ;) (result i32) - (loop $label$1 - (nop) - (return - (i32.const 1) - ) - ) - ) - (func $32 (; 35 ;) (result i32) - (loop $label$1 - (return - (i32.const 1) - ) - ) - ) - (func $33 (; 36 ;) (result i32) - (loop $label$1 - (nop) - (return - (i32.const 1) - ) - ) - ) - (func $34 (; 37 ;) (result i32) - (loop $label$1 - (return - (i32.const 1) - ) - ) - ) - (func $35 (; 38 ;) - (unreachable) - ) - (func $36 (; 39 ;) - (if - (i32.const 1) - (nop) - (unreachable) - ) - ) -) - diff --git a/test/unit.wat b/test/unit.wat deleted file mode 100644 index 6d15b26d1..000000000 --- a/test/unit.wat +++ /dev/null @@ -1,554 +0,0 @@ -(module - (type $FUNCSIG$vf (func (param f32))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$id (func (param f64) (result i32))) - (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) - (type $4 (func (result f64))) - (type $5 (func (result i32))) - (type $6 (func (param i32) (result i32))) - (type $7 (func (param f64) (result f64))) - (type $8 (func (result i64))) - (type $9 (func (param i32 i64))) - (import "env" "_emscripten_asm_const_vi" (func $_emscripten_asm_const_vi)) - (import "asm2wasm" "f64-to-int" (func $f64-to-int (param f64) (result i32))) - (import "asm2wasm" "f64-rem" (func $f64-rem (param f64 f64) (result f64))) - (table 10 funcref) - (elem (i32.const 0) $z $big_negative $z $z $w $w $importedDoubles $w $z $cneg) - (memory $0 4096 4096) - (data (i32.const 1026) "\14\00") - (export "big_negative" (func $big_negative)) - (func $big_negative (type $FUNCSIG$v) - (local $temp f64) - (block $block0 - (local.set $temp - (f64.const -2147483648) - ) - (local.set $temp - (f64.const -2147483648) - ) - (local.set $temp - (f64.const -21474836480) - ) - (local.set $temp - (f64.const 0.039625) - ) - (local.set $temp - (f64.const -0.039625) - ) - ) - ) - (func $importedDoubles (type $4) (result f64) - (local $temp f64) - (block $topmost (result f64) - (local.set $temp - (f64.add - (f64.add - (f64.add - (f64.load - (i32.const 8) - ) - (f64.load - (i32.const 16) - ) - ) - (f64.neg - (f64.load - (i32.const 16) - ) - ) - ) - (f64.neg - (f64.load - (i32.const 8) - ) - ) - ) - ) - (if - (i32.gt_s - (i32.load - (i32.const 24) - ) - (i32.const 0) - ) - (br $topmost - (f64.const -3.4) - ) - ) - (if - (f64.gt - (f64.load - (i32.const 32) - ) - (f64.const 0) - ) - (br $topmost - (f64.const 5.6) - ) - ) - (f64.const 1.2) - ) - ) - (func $doubleCompares (type $FUNCSIG$ddd) (param $x f64) (param $y f64) (result f64) - (local $t f64) - (local $Int f64) - (local $Double i32) - (block $topmost (result f64) - (if - (f64.gt - (local.get $x) - (f64.const 0) - ) - (br $topmost - (f64.const 1.2) - ) - ) - (if - (f64.gt - (local.get $Int) - (f64.const 0) - ) - (br $topmost - (f64.const -3.4) - ) - ) - (if - (i32.gt_s - (local.get $Double) - (i32.const 0) - ) - (br $topmost - (f64.const 5.6) - ) - ) - (if - (f64.lt - (local.get $x) - (local.get $y) - ) - (br $topmost - (local.get $x) - ) - ) - (local.get $y) - ) - ) - (func $intOps (type $5) (result i32) - (local $x i32) - (i32.eq - (local.get $x) - (i32.const 0) - ) - ) - (func $hexLiterals (type $FUNCSIG$v) - (drop - (i32.add - (i32.add - (i32.const 0) - (i32.const 313249263) - ) - (i32.const -19088752) - ) - ) - ) - (func $conversions (type $FUNCSIG$v) - (local $i i32) - (local $d f64) - (block $block0 - (local.set $i - (call $f64-to-int - (local.get $d) - ) - ) - (local.set $d - (f64.convert_i32_s - (local.get $i) - ) - ) - (local.set $d - (f64.convert_i32_u - (i32.shr_u - (local.get $i) - (i32.const 0) - ) - ) - ) - ) - ) - (func $seq (type $FUNCSIG$v) - (local $J f64) - (local.set $J - (f64.sub - (block $block0 (result f64) - (drop - (f64.const 0.1) - ) - (f64.const 5.1) - ) - (block $block1 (result f64) - (drop - (f64.const 3.2) - ) - (f64.const 4.2) - ) - ) - ) - ) - (func $switcher (type $6) (param $x i32) (result i32) - (block $topmost (result i32) - (block $switch$0 - (block $switch-default$3 - (block $switch-case$2 - (block $switch-case$1 - (br_table $switch-case$1 $switch-case$2 $switch-default$3 - (i32.sub - (local.get $x) - (i32.const 1) - ) - ) - ) - (br $topmost - (i32.const 1) - ) - ) - (br $topmost - (i32.const 2) - ) - ) - (nop) - ) - (block $switch$4 - (block $switch-default$7 - (block $switch-case$6 - (block $switch-case$5 - (br_table $switch-case$6 $switch-default$7 $switch-default$7 $switch-default$7 $switch-default$7 $switch-default$7 $switch-default$7 $switch-case$5 $switch-default$7 - (i32.sub - (local.get $x) - (i32.const 5) - ) - ) - ) - (br $topmost - (i32.const 121) - ) - ) - (br $topmost - (i32.const 51) - ) - ) - (nop) - ) - (block $label$break$Lout - (block $switch-default$16 - (block $switch-case$15 - (block $switch-case$12 - (block $switch-case$9 - (block $switch-case$8 - (br_table $switch-case$15 $switch-default$16 $switch-default$16 $switch-case$12 $switch-default$16 $switch-default$16 $switch-default$16 $switch-default$16 $switch-case$9 $switch-default$16 $switch-case$8 $switch-default$16 - (i32.sub - (local.get $x) - (i32.const 2) - ) - ) - ) - (br $label$break$Lout) - ) - (br $label$break$Lout) - ) - (block $while-out$10 - (loop $while-in$11 - (block $block1 - (br $while-out$10) - (br $while-in$11) - ) - ) - (br $label$break$Lout) - ) - ) - (block $while-out$13 - (loop $while-in$14 - (block $block3 - (br $label$break$Lout) - (br $while-in$14) - ) - ) - (br $label$break$Lout) - ) - ) - (nop) - ) - (i32.const 0) - ) - ) - (func $blocker (type $FUNCSIG$v) - (block $label$break$L - (br $label$break$L) - ) - ) - (func $frem (type $4) (result f64) - (call $f64-rem - (f64.const 5.5) - (f64.const 1.2) - ) - ) - (func $big_uint_div_u (type $5) (result i32) - (local $x i32) - (block $topmost (result i32) - (local.set $x - (i32.and - (i32.div_u - (i32.const -1) - (i32.const 2) - ) - (i32.const -1) - ) - ) - (local.get $x) - ) - ) - (func $fr (type $FUNCSIG$vf) (param $x f32) - (local $y f32) - (local $z f64) - (block $block0 - (drop - (f32.demote_f64 - (local.get $z) - ) - ) - (drop - (local.get $y) - ) - (drop - (f32.const 5) - ) - (drop - (f32.const 0) - ) - (drop - (f32.const 5) - ) - (drop - (f32.const 0) - ) - ) - ) - (func $negZero (type $4) (result f64) - (f64.const -0) - ) - (func $abs (type $FUNCSIG$v) - (local $x i32) - (local $y f64) - (local $z f32) - (local $asm2wasm_i32_temp i32) - (block $block0 - (local.set $x - (block $block1 (result i32) - (local.set $asm2wasm_i32_temp - (i32.const 0) - ) - (select - (i32.sub - (i32.const 0) - (local.get $asm2wasm_i32_temp) - ) - (local.get $asm2wasm_i32_temp) - (i32.lt_s - (local.get $asm2wasm_i32_temp) - (i32.const 0) - ) - ) - ) - ) - (local.set $y - (f64.abs - (f64.const 0) - ) - ) - (local.set $z - (f32.abs - (f32.const 0) - ) - ) - ) - ) - (func $neg (type $FUNCSIG$v) - (local $x f32) - (block $block0 - (local.set $x - (f32.neg - (local.get $x) - ) - ) - (call_indirect (type $FUNCSIG$vf) - (local.get $x) - (i32.add - (i32.and - (i32.const 1) - (i32.const 7) - ) - (i32.const 8) - ) - ) - ) - ) - (func $cneg (type $FUNCSIG$vf) (param $x f32) - (call_indirect (type $FUNCSIG$vf) - (local.get $x) - (i32.add - (i32.and - (i32.const 1) - (i32.const 7) - ) - (i32.const 8) - ) - ) - ) - (func $___syscall_ret (type $FUNCSIG$v) - (local $$0 i32) - (drop - (i32.gt_u - (i32.shr_u - (local.get $$0) - (i32.const 0) - ) - (i32.const -4096) - ) - ) - ) - (func $z (type $FUNCSIG$v) - (nop) - ) - (func $w (type $FUNCSIG$v) - (nop) - ) - (func $block_and_after (type $5) (result i32) - (block $waka - (drop - (i32.const 1) - ) - (br $waka) - ) - (i32.const 0) - ) - (func $loop-roundtrip (type $7) (param $0 f64) (result f64) - (loop $loop-in1 (result f64) - (drop - (local.get $0) - ) - (local.get $0) - ) - ) - (func $big-i64 (type $8) (result i64) - (i64.const -9218868437227405313) - ) - (func $i64-store32 (type $9) (param $0 i32) (param $1 i64) - (i64.store32 - (local.get $0) - (local.get $1) - ) - ) - (func $return-unreachable (result i32) - (return (i32.const 1)) - ) - (func $unreachable-block (result i32) - (f64.abs - (block ;; note no type - valid in binaryen IR, in wasm must be i32 - (drop (i32.const 1)) - (return (i32.const 2)) - ) - ) - ) - (func $unreachable-block-toplevel (result i32) - (block ;; note no type - valid in binaryen IR, in wasm must be i32 - (drop (i32.const 1)) - (return (i32.const 2)) - ) - ) - (func $unreachable-block0 (result i32) - (f64.abs - (block ;; note no type - valid in binaryen IR, in wasm must be i32 - (return (i32.const 2)) - ) - ) - ) - (func $unreachable-block0-toplevel (result i32) - (block ;; note no type - valid in binaryen IR, in wasm must be i32 - (return (i32.const 2)) - ) - ) - (func $unreachable-block-with-br (result i32) - (block $block ;; unreachable type due to last element having that type, but the block is exitable - (drop (i32.const 1)) - (br $block) - ) - (i32.const 1) - ) - (func $unreachable-if (result i32) - (f64.abs - (if ;; note no type - valid in binaryen IR, in wasm must be i32 - (i32.const 3) - (return (i32.const 2)) - (return (i32.const 1)) - ) - ) - ) - (func $unreachable-if-toplevel (result i32) - (if ;; note no type - valid in binaryen IR, in wasm must be i32 - (i32.const 3) - (return (i32.const 2)) - (return (i32.const 1)) - ) - ) - (func $unreachable-loop (result i32) - (f64.abs - (loop ;; note no type - valid in binaryen IR, in wasm must be i32 - (nop) - (return (i32.const 1)) - ) - ) - ) - (func $unreachable-loop0 (result i32) - (f64.abs - (loop ;; note no type - valid in binaryen IR, in wasm must be i32 - (return (i32.const 1)) - ) - ) - ) - (func $unreachable-loop-toplevel (result i32) - (loop ;; note no type - valid in binaryen IR, in wasm must be i32 - (nop) - (return (i32.const 1)) - ) - ) - (func $unreachable-loop0-toplevel (result i32) - (loop ;; note no type - valid in binaryen IR, in wasm must be i32 - (return (i32.const 1)) - ) - ) - (func $unreachable-ifs - (if (unreachable) (nop)) - (if (unreachable) (unreachable)) - (if (unreachable) (nop) (nop)) - (if (unreachable) (unreachable) (nop)) - (if (unreachable) (nop) (unreachable)) - (if (unreachable) (unreachable) (unreachable)) - ;; - (if (i32.const 1) (unreachable) (nop)) - (if (i32.const 1) (nop) (unreachable)) - (if (i32.const 1) (unreachable) (unreachable)) - ) - (func $unreachable-if-arm - (if - (i32.const 1) - (block - (nop) - ) - (block - (unreachable) - (drop - (i32.const 1) - ) - ) - ) - ) -) diff --git a/test/unreachable-code.wast b/test/unreachable-code.wast deleted file mode 100644 index f67d10e52..000000000 --- a/test/unreachable-code.wast +++ /dev/null @@ -1,85 +0,0 @@ -(module - (func $a - (if (i32.const 1) - (unreachable) - ) - ) - (func $b - (if (i32.const 1) - (unreachable) - (unreachable) - ) - ) - (func $a-block - (block - (if (i32.const 1) - (unreachable) - ) - ) - ) - (func $b-block - (block - (if (i32.const 1) - (unreachable) - (unreachable) - ) - ) - ) - (func $a-prepost - (nop) - (if (i32.const 1) - (unreachable) - ) - (nop) - ) - (func $b-prepost - (nop) - (if (i32.const 1) - (unreachable) - (unreachable) - ) - (nop) - ) - (func $a-block-prepost - (nop) - (block - (if (i32.const 1) - (unreachable) - ) - ) - (nop) - ) - (func $b-block-prepost - (nop) - (block - (if (i32.const 1) - (unreachable) - (unreachable) - ) - ) - (nop) - ) - (func $recurse - (block $a - (nop) - (block $b - (nop) - (br $b) - (nop) - ) - (nop) - ) - ) - (func $recurse-b - (block $a - (nop) - (block $b - (nop) - (br $a) - (nop) - ) - (nop) - ) - ) -) - diff --git a/test/unreachable-code.wast.from-wast b/test/unreachable-code.wast.from-wast deleted file mode 100644 index ed789b1f8..000000000 --- a/test/unreachable-code.wast.from-wast +++ /dev/null @@ -1,89 +0,0 @@ -(module - (type $0 (func)) - (func $a (type $0) - (if - (i32.const 1) - (unreachable) - ) - ) - (func $b (type $0) - (if - (i32.const 1) - (unreachable) - (unreachable) - ) - ) - (func $a-block (type $0) - (if - (i32.const 1) - (unreachable) - ) - ) - (func $b-block (type $0) - (if - (i32.const 1) - (unreachable) - (unreachable) - ) - ) - (func $a-prepost (type $0) - (nop) - (if - (i32.const 1) - (unreachable) - ) - (nop) - ) - (func $b-prepost (type $0) - (nop) - (if - (i32.const 1) - (unreachable) - (unreachable) - ) - (nop) - ) - (func $a-block-prepost (type $0) - (nop) - (block - (if - (i32.const 1) - (unreachable) - ) - ) - (nop) - ) - (func $b-block-prepost (type $0) - (nop) - (block - (if - (i32.const 1) - (unreachable) - (unreachable) - ) - ) - (nop) - ) - (func $recurse (type $0) - (block $a - (nop) - (block $b - (nop) - (br $b) - (nop) - ) - (nop) - ) - ) - (func $recurse-b (type $0) - (block $a - (nop) - (block $b - (nop) - (br $a) - (nop) - ) - (nop) - ) - ) -) diff --git a/test/unreachable-code.wast.fromBinary b/test/unreachable-code.wast.fromBinary deleted file mode 100644 index dd0a1cec6..000000000 --- a/test/unreachable-code.wast.fromBinary +++ /dev/null @@ -1,79 +0,0 @@ -(module - (type $0 (func)) - (func $a (type $0) - (if - (i32.const 1) - (unreachable) - ) - ) - (func $b (type $0) - (if - (i32.const 1) - (unreachable) - (unreachable) - ) - ) - (func $a-block (type $0) - (if - (i32.const 1) - (unreachable) - ) - ) - (func $b-block (type $0) - (if - (i32.const 1) - (unreachable) - (unreachable) - ) - ) - (func $a-prepost (type $0) - (nop) - (if - (i32.const 1) - (unreachable) - ) - (nop) - ) - (func $b-prepost (type $0) - (nop) - (if - (i32.const 1) - (unreachable) - (unreachable) - ) - ) - (func $a-block-prepost (type $0) - (nop) - (if - (i32.const 1) - (unreachable) - ) - (nop) - ) - (func $b-block-prepost (type $0) - (nop) - (if - (i32.const 1) - (unreachable) - (unreachable) - ) - ) - (func $recurse (type $0) - (nop) - (block $label$1 - (nop) - (br $label$1) - ) - (nop) - ) - (func $recurse-b (type $0) - (block $label$1 - (nop) - (block $label$2 - (nop) - (br $label$1) - ) - ) - ) -) - diff --git a/test/unreachable-code.wast.fromBinary.noDebugInfo b/test/unreachable-code.wast.fromBinary.noDebugInfo deleted file mode 100644 index 01aedc451..000000000 --- a/test/unreachable-code.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,79 +0,0 @@ -(module - (type $0 (func)) - (func $0 (type $0) - (if - (i32.const 1) - (unreachable) - ) - ) - (func $1 (type $0) - (if - (i32.const 1) - (unreachable) - (unreachable) - ) - ) - (func $2 (type $0) - (if - (i32.const 1) - (unreachable) - ) - ) - (func $3 (type $0) - (if - (i32.const 1) - (unreachable) - (unreachable) - ) - ) - (func $4 (type $0) - (nop) - (if - (i32.const 1) - (unreachable) - ) - (nop) - ) - (func $5 (type $0) - (nop) - (if - (i32.const 1) - (unreachable) - (unreachable) - ) - ) - (func $6 (type $0) - (nop) - (if - (i32.const 1) - (unreachable) - ) - (nop) - ) - (func $7 (type $0) - (nop) - (if - (i32.const 1) - (unreachable) - (unreachable) - ) - ) - (func $8 (type $0) - (nop) - (block $label$1 - (nop) - (br $label$1) - ) - (nop) - ) - (func $9 (type $0) - (block $label$1 - (nop) - (block $label$2 - (nop) - (br $label$1) - ) - ) - ) -) - diff --git a/test/unreachable-instr-type.wast b/test/unreachable-instr-type.wast deleted file mode 100644 index b7c2078ab..000000000 --- a/test/unreachable-instr-type.wast +++ /dev/null @@ -1,28 +0,0 @@ -(module - (memory (shared 1 1)) - (func $test - (f32.load (unreachable)) - - (f32.store - (unreachable) - (f32.const 0) - ) - - (i64.atomic.rmw.add - (unreachable) - (i64.const 0) - ) - - (i64.atomic.rmw.cmpxchg - (unreachable) - (i64.const 0) - (i64.const 1) - ) - - (memory.atomic.wait64 - (unreachable) - (i64.const 0) - (i64.const 0) - ) - ) -) diff --git a/test/unreachable-instr-type.wast.from-wast b/test/unreachable-instr-type.wast.from-wast deleted file mode 100644 index 0c255902e..000000000 --- a/test/unreachable-instr-type.wast.from-wast +++ /dev/null @@ -1,27 +0,0 @@ -(module - (type $0 (func)) - (memory $0 (shared 1 1)) - (func $test (type $0) - (i32.load - (unreachable) - ) - (f32.store - (unreachable) - (f32.const 0) - ) - (i32.atomic.rmw.add - (unreachable) - (i64.const 0) - ) - (i32.atomic.rmw.cmpxchg - (unreachable) - (i64.const 0) - (i64.const 1) - ) - (memory.atomic.wait64 - (unreachable) - (i64.const 0) - (i64.const 0) - ) - ) -) diff --git a/test/unreachable-instr-type.wast.fromBinary b/test/unreachable-instr-type.wast.fromBinary deleted file mode 100644 index 602ae379c..000000000 --- a/test/unreachable-instr-type.wast.fromBinary +++ /dev/null @@ -1,8 +0,0 @@ -(module - (type $0 (func)) - (memory $0 (shared 1 1)) - (func $test (type $0) - (unreachable) - ) -) - diff --git a/test/unreachable-instr-type.wast.fromBinary.noDebugInfo b/test/unreachable-instr-type.wast.fromBinary.noDebugInfo deleted file mode 100644 index f74fdce2b..000000000 --- a/test/unreachable-instr-type.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,8 +0,0 @@ -(module - (type $0 (func)) - (memory $0 (shared 1 1)) - (func $0 (type $0) - (unreachable) - ) -) - diff --git a/test/untaken-br_if.wast b/test/untaken-br_if.wast deleted file mode 100644 index 92ed74c95..000000000 --- a/test/untaken-br_if.wast +++ /dev/null @@ -1,14 +0,0 @@ -(module - (func $binaryify-untaken-br_if (result f32) - (if (result f32) - (i32.const 1) - (unreachable) - (block $label$1 (result f32) - (br_if $label$1 - (f32.const 1) - (unreachable) - ) - ) - ) - ) -) diff --git a/test/untaken-br_if.wast.from-wast b/test/untaken-br_if.wast.from-wast deleted file mode 100644 index ba4d246d3..000000000 --- a/test/untaken-br_if.wast.from-wast +++ /dev/null @@ -1,15 +0,0 @@ -(module - (type $0 (func (result f32))) - (func $binaryify-untaken-br_if (type $0) (result f32) - (if (result f32) - (i32.const 1) - (unreachable) - (block $label$1 (result f32) - (br_if $label$1 - (f32.const 1) - (unreachable) - ) - ) - ) - ) -) diff --git a/test/untaken-br_if.wast.fromBinary b/test/untaken-br_if.wast.fromBinary deleted file mode 100644 index 73c0d586f..000000000 --- a/test/untaken-br_if.wast.fromBinary +++ /dev/null @@ -1,16 +0,0 @@ -(module - (type $0 (func (result f32))) - (func $binaryify-untaken-br_if (type $0) (result f32) - (if (result f32) - (i32.const 1) - (unreachable) - (block $label$3 (result f32) - (drop - (f32.const 1) - ) - (unreachable) - ) - ) - ) -) - diff --git a/test/untaken-br_if.wast.fromBinary.noDebugInfo b/test/untaken-br_if.wast.fromBinary.noDebugInfo deleted file mode 100644 index dd7d1197c..000000000 --- a/test/untaken-br_if.wast.fromBinary.noDebugInfo +++ /dev/null @@ -1,16 +0,0 @@ -(module - (type $0 (func (result f32))) - (func $0 (type $0) (result f32) - (if (result f32) - (i32.const 1) - (unreachable) - (block $label$3 (result f32) - (drop - (f32.const 1) - ) - (unreachable) - ) - ) - ) -) - |