;; 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: )