diff options
author | Ashley Nelson <nashley@google.com> | 2022-08-17 18:44:29 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-17 18:44:29 -0700 |
commit | 3aff4c6e85623c970280219c6699a66bc9de5f9b (patch) | |
tree | e5440bc966e523a7404ae2cec3458dacbe1281d1 /test/lit/multi-memories-simd.wast | |
parent | b70fe755aa4c90727edfd91dc0a9a51febf0239d (diff) | |
download | binaryen-3aff4c6e85623c970280219c6699a66bc9de5f9b.tar.gz binaryen-3aff4c6e85623c970280219c6699a66bc9de5f9b.tar.bz2 binaryen-3aff4c6e85623c970280219c6699a66bc9de5f9b.zip |
Mutli-Memories Support in IR (#4811)
This PR removes the single memory restriction in IR, adding support for a single module to reference multiple memories. To support this change, a new memory name field was added to 13 memory instructions in order to identify the memory for the instruction.
It is a goal of this PR to maintain backwards compatibility with existing text and binary wasm modules, so memory indexes remain optional for memory instructions. Similarly, the JS API makes assumptions about which memory is intended when only one memory is present in the module. Another goal of this PR is that existing tests behavior be unaffected. That said, tests must now explicitly define a memory before invoking memory instructions or exporting a memory, and memory names are now printed for each memory instruction in the text format.
There remain quite a few places where a hardcoded reference to the first memory persist (memory flattening, for example, will return early if more than one memory is present in the module). Many of these call-sites, particularly within passes, will require us to rethink how the optimization works in a multi-memories world. Other call-sites may necessitate more invasive code restructuring to fully convert away from relying on a globally available, single memory pointer.
Diffstat (limited to 'test/lit/multi-memories-simd.wast')
-rw-r--r-- | test/lit/multi-memories-simd.wast | 635 |
1 files changed, 635 insertions, 0 deletions
diff --git a/test/lit/multi-memories-simd.wast b/test/lit/multi-memories-simd.wast new file mode 100644 index 000000000..184d98876 --- /dev/null +++ b/test/lit/multi-memories-simd.wast @@ -0,0 +1,635 @@ +;; 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) + ) + ) +) + |