github.com/tetratelabs/wazero@v1.7.3-0.20240513003603-48f702e154b5/internal/integration_test/spectest/v2/testdata/simd_i16x8_arith2.wast (about)

     1  ;; Tests for i16x8 [min_s, min_u, max_s, max_u, avgr_u, abs] operations.
     2  
     3  (module
     4    (func (export "i16x8.min_s") (param v128 v128) (result v128) (i16x8.min_s (local.get 0) (local.get 1)))
     5    (func (export "i16x8.min_u") (param v128 v128) (result v128) (i16x8.min_u (local.get 0) (local.get 1)))
     6    (func (export "i16x8.max_s") (param v128 v128) (result v128) (i16x8.max_s (local.get 0) (local.get 1)))
     7    (func (export "i16x8.max_u") (param v128 v128) (result v128) (i16x8.max_u (local.get 0) (local.get 1)))
     8    (func (export "i16x8.avgr_u") (param v128 v128) (result v128) (i16x8.avgr_u (local.get 0) (local.get 1)))
     9    (func (export "i16x8.abs") (param v128) (result v128) (i16x8.abs (local.get 0)))
    10    (func (export "i16x8.min_s_with_const_0") (result v128) (i16x8.min_s (v128.const i16x8 -32768 -32768 32767 32767 16384 16384 65535 65535) (v128.const i16x8 65535 65535 16384 16384 32767 32767 -32768 -32768)))
    11    (func (export "i16x8.min_s_with_const_1") (result v128) (i16x8.min_s (v128.const i16x8 0 0 1 1 2 2 3 3) (v128.const i16x8 3 3 2 2 1 1 0 0)))
    12    (func (export "i16x8.min_u_with_const_2") (result v128) (i16x8.min_u (v128.const i16x8 -32768 -32768 32767 32767 16384 16384 65535 65535) (v128.const i16x8 65535 65535 16384 16384 32767 32767 -32768 -32768)))
    13    (func (export "i16x8.min_u_with_const_3") (result v128) (i16x8.min_u (v128.const i16x8 0 0 1 1 2 2 3 3) (v128.const i16x8 3 3 2 2 1 1 0 0)))
    14    (func (export "i16x8.max_s_with_const_4") (result v128) (i16x8.max_s (v128.const i16x8 -32768 -32768 32767 32767 16384 16384 65535 65535) (v128.const i16x8 65535 65535 16384 16384 32767 32767 -32768 -32768)))
    15    (func (export "i16x8.max_s_with_const_5") (result v128) (i16x8.max_s (v128.const i16x8 0 0 1 1 2 2 3 3) (v128.const i16x8 3 3 2 2 1 1 0 0)))
    16    (func (export "i16x8.max_u_with_const_6") (result v128) (i16x8.max_u (v128.const i16x8 -32768 -32768 32767 32767 16384 16384 65535 65535) (v128.const i16x8 65535 65535 16384 16384 32767 32767 -32768 -32768)))
    17    (func (export "i16x8.max_u_with_const_7") (result v128) (i16x8.max_u (v128.const i16x8 0 0 1 1 2 2 3 3) (v128.const i16x8 3 3 2 2 1 1 0 0)))
    18    (func (export "i16x8.avgr_u_with_const_8") (result v128) (i16x8.avgr_u (v128.const i16x8 -32768 -32768 32767 32767 16384 16384 65535 65535) (v128.const i16x8 65535 65535 16384 16384 32767 32767 -32768 -32768)))
    19    (func (export "i16x8.avgr_u_with_const_9") (result v128) (i16x8.avgr_u (v128.const i16x8 0 0 1 1 2 2 3 3) (v128.const i16x8 3 3 2 2 1 1 0 0)))
    20    (func (export "i16x8.abs_with_const_10") (result v128) (i16x8.abs (v128.const i16x8 -32768 -32768 32767 32767 16384 16384 65535 65535)))
    21    (func (export "i16x8.min_s_with_const_11") (param v128) (result v128) (i16x8.min_s (local.get 0) (v128.const i16x8 -32768 -32768 32767 32767 16384 16384 65535 65535)))
    22    (func (export "i16x8.min_s_with_const_12") (param v128) (result v128) (i16x8.min_s (local.get 0) (v128.const i16x8 0 0 1 1 2 2 3 3)))
    23    (func (export "i16x8.min_u_with_const_13") (param v128) (result v128) (i16x8.min_u (local.get 0) (v128.const i16x8 -32768 -32768 32767 32767 16384 16384 65535 65535)))
    24    (func (export "i16x8.min_u_with_const_14") (param v128) (result v128) (i16x8.min_u (local.get 0) (v128.const i16x8 0 0 1 1 2 2 3 3)))
    25    (func (export "i16x8.max_s_with_const_15") (param v128) (result v128) (i16x8.max_s (local.get 0) (v128.const i16x8 -32768 -32768 32767 32767 16384 16384 65535 65535)))
    26    (func (export "i16x8.max_s_with_const_16") (param v128) (result v128) (i16x8.max_s (local.get 0) (v128.const i16x8 0 0 1 1 2 2 3 3)))
    27    (func (export "i16x8.max_u_with_const_17") (param v128) (result v128) (i16x8.max_u (local.get 0) (v128.const i16x8 -32768 -32768 32767 32767 16384 16384 65535 65535)))
    28    (func (export "i16x8.max_u_with_const_18") (param v128) (result v128) (i16x8.max_u (local.get 0) (v128.const i16x8 0 0 1 1 2 2 3 3)))
    29    (func (export "i16x8.avgr_u_with_const_19") (param v128) (result v128) (i16x8.avgr_u (local.get 0) (v128.const i16x8 -32768 -32768 32767 32767 16384 16384 65535 65535)))
    30    (func (export "i16x8.avgr_u_with_const_20") (param v128) (result v128) (i16x8.avgr_u (local.get 0) (v128.const i16x8 0 0 1 1 2 2 3 3)))
    31  )
    32  
    33  (assert_return (invoke "i16x8.min_s" (v128.const i16x8 0 0 0 0 0 0 0 0)
    34                                       (v128.const i16x8 0 0 0 0 0 0 0 0))
    35                                       (v128.const i16x8 0 0 0 0 0 0 0 0))
    36  (assert_return (invoke "i16x8.min_s" (v128.const i16x8 0 0 0 0 0 0 0 0)
    37                                       (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1))
    38                                       (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1))
    39  (assert_return (invoke "i16x8.min_s" (v128.const i16x8 0 0 0 0 -1 -1 -1 -1)
    40                                       (v128.const i16x8 0 0 -1 -1 0 0 -1 -1))
    41                                       (v128.const i16x8 0 0 -1 -1 -1 -1 -1 -1))
    42  (assert_return (invoke "i16x8.min_s" (v128.const i16x8 0 0 0 0 0 0 0 0)
    43                                       (v128.const i16x8 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff))
    44                                       (v128.const i16x8 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff))
    45  (assert_return (invoke "i16x8.min_s" (v128.const i16x8 1 1 1 1 1 1 1 1)
    46                                       (v128.const i16x8 1 1 1 1 1 1 1 1))
    47                                       (v128.const i16x8 1 1 1 1 1 1 1 1))
    48  (assert_return (invoke "i16x8.min_s" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)
    49                                       (v128.const i16x8 1 1 1 1 1 1 1 1))
    50                                       (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535))
    51  (assert_return (invoke "i16x8.min_s" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)
    52                                       (v128.const i16x8 128 128 128 128 128 128 128 128))
    53                                       (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535))
    54  (assert_return (invoke "i16x8.min_s" (v128.const i16x8 32768 32768 32768 32768 32768 32768 32768 32768)
    55                                       (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768))
    56                                       (v128.const i16x8 32768 32768 32768 32768 32768 32768 32768 32768))
    57  (assert_return (invoke "i16x8.min_s" (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000)
    58                                       (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768))
    59                                       (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000))
    60  (assert_return (invoke "i16x8.min_s" (v128.const i16x8 123 123 123 123 123 123 123 123)
    61                                       (v128.const i16x8 01_2_3 01_2_3 01_2_3 01_2_3 01_2_3 01_2_3 01_2_3 01_2_3))
    62                                       (v128.const i16x8 123 123 123 123 123 123 123 123))
    63  (assert_return (invoke "i16x8.min_s" (v128.const i16x8 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80)
    64                                       (v128.const i16x8 0x0_8_0 0x0_8_0 0x0_8_0 0x0_8_0 0x0_8_0 0x0_8_0 0x0_8_0 0x0_8_0))
    65                                       (v128.const i16x8 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80))
    66  (assert_return (invoke "i16x8.min_u" (v128.const i16x8 0 0 0 0 0 0 0 0)
    67                                       (v128.const i16x8 0 0 0 0 0 0 0 0))
    68                                       (v128.const i16x8 0 0 0 0 0 0 0 0))
    69  (assert_return (invoke "i16x8.min_u" (v128.const i16x8 0 0 0 0 0 0 0 0)
    70                                       (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1))
    71                                       (v128.const i16x8 0 0 0 0 0 0 0 0))
    72  (assert_return (invoke "i16x8.min_u" (v128.const i16x8 0 0 0 0 -1 -1 -1 -1)
    73                                       (v128.const i16x8 0 0 -1 -1 0 0 -1 -1))
    74                                       (v128.const i16x8 0 0 0 0 0 0 -1 -1))
    75  (assert_return (invoke "i16x8.min_u" (v128.const i16x8 0 0 0 0 0 0 0 0)
    76                                       (v128.const i16x8 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff))
    77                                       (v128.const i16x8 0 0 0 0 0 0 0 0))
    78  (assert_return (invoke "i16x8.min_u" (v128.const i16x8 1 1 1 1 1 1 1 1)
    79                                       (v128.const i16x8 1 1 1 1 1 1 1 1))
    80                                       (v128.const i16x8 1 1 1 1 1 1 1 1))
    81  (assert_return (invoke "i16x8.min_u" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)
    82                                       (v128.const i16x8 1 1 1 1 1 1 1 1))
    83                                       (v128.const i16x8 1 1 1 1 1 1 1 1))
    84  (assert_return (invoke "i16x8.min_u" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)
    85                                       (v128.const i16x8 128 128 128 128 128 128 128 128))
    86                                       (v128.const i16x8 128 128 128 128 128 128 128 128))
    87  (assert_return (invoke "i16x8.min_u" (v128.const i16x8 32768 32768 32768 32768 32768 32768 32768 32768)
    88                                       (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768))
    89                                       (v128.const i16x8 32768 32768 32768 32768 32768 32768 32768 32768))
    90  (assert_return (invoke "i16x8.min_u" (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000)
    91                                       (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768))
    92                                       (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000))
    93  (assert_return (invoke "i16x8.min_u" (v128.const i16x8 123 123 123 123 123 123 123 123)
    94                                       (v128.const i16x8 01_2_3 01_2_3 01_2_3 01_2_3 01_2_3 01_2_3 01_2_3 01_2_3))
    95                                       (v128.const i16x8 123 123 123 123 123 123 123 123))
    96  (assert_return (invoke "i16x8.min_u" (v128.const i16x8 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80)
    97                                       (v128.const i16x8 0x0_8_0 0x0_8_0 0x0_8_0 0x0_8_0 0x0_8_0 0x0_8_0 0x0_8_0 0x0_8_0))
    98                                       (v128.const i16x8 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80))
    99  (assert_return (invoke "i16x8.max_s" (v128.const i16x8 0 0 0 0 0 0 0 0)
   100                                       (v128.const i16x8 0 0 0 0 0 0 0 0))
   101                                       (v128.const i16x8 0 0 0 0 0 0 0 0))
   102  (assert_return (invoke "i16x8.max_s" (v128.const i16x8 0 0 0 0 0 0 0 0)
   103                                       (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1))
   104                                       (v128.const i16x8 0 0 0 0 0 0 0 0))
   105  (assert_return (invoke "i16x8.max_s" (v128.const i16x8 0 0 0 0 -1 -1 -1 -1)
   106                                       (v128.const i16x8 0 0 -1 -1 0 0 -1 -1))
   107                                       (v128.const i16x8 0 0 0 0 0 0 -1 -1))
   108  (assert_return (invoke "i16x8.max_s" (v128.const i16x8 0 0 0 0 0 0 0 0)
   109                                       (v128.const i16x8 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff))
   110                                       (v128.const i16x8 0 0 0 0 0 0 0 0))
   111  (assert_return (invoke "i16x8.max_s" (v128.const i16x8 1 1 1 1 1 1 1 1)
   112                                       (v128.const i16x8 1 1 1 1 1 1 1 1))
   113                                       (v128.const i16x8 1 1 1 1 1 1 1 1))
   114  (assert_return (invoke "i16x8.max_s" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)
   115                                       (v128.const i16x8 1 1 1 1 1 1 1 1))
   116                                       (v128.const i16x8 1 1 1 1 1 1 1 1))
   117  (assert_return (invoke "i16x8.max_s" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)
   118                                       (v128.const i16x8 128 128 128 128 128 128 128 128))
   119                                       (v128.const i16x8 128 128 128 128 128 128 128 128))
   120  (assert_return (invoke "i16x8.max_s" (v128.const i16x8 32768 32768 32768 32768 32768 32768 32768 32768)
   121                                       (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768))
   122                                       (v128.const i16x8 32768 32768 32768 32768 32768 32768 32768 32768))
   123  (assert_return (invoke "i16x8.max_s" (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000)
   124                                       (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768))
   125                                       (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000))
   126  (assert_return (invoke "i16x8.max_s" (v128.const i16x8 123 123 123 123 123 123 123 123)
   127                                       (v128.const i16x8 01_2_3 01_2_3 01_2_3 01_2_3 01_2_3 01_2_3 01_2_3 01_2_3))
   128                                       (v128.const i16x8 123 123 123 123 123 123 123 123))
   129  (assert_return (invoke "i16x8.max_s" (v128.const i16x8 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80)
   130                                       (v128.const i16x8 0x0_8_0 0x0_8_0 0x0_8_0 0x0_8_0 0x0_8_0 0x0_8_0 0x0_8_0 0x0_8_0))
   131                                       (v128.const i16x8 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80))
   132  (assert_return (invoke "i16x8.max_u" (v128.const i16x8 0 0 0 0 0 0 0 0)
   133                                       (v128.const i16x8 0 0 0 0 0 0 0 0))
   134                                       (v128.const i16x8 0 0 0 0 0 0 0 0))
   135  (assert_return (invoke "i16x8.max_u" (v128.const i16x8 0 0 0 0 0 0 0 0)
   136                                       (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1))
   137                                       (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1))
   138  (assert_return (invoke "i16x8.max_u" (v128.const i16x8 0 0 0 0 -1 -1 -1 -1)
   139                                       (v128.const i16x8 0 0 -1 -1 0 0 -1 -1))
   140                                       (v128.const i16x8 0 0 -1 -1 -1 -1 -1 -1))
   141  (assert_return (invoke "i16x8.max_u" (v128.const i16x8 0 0 0 0 0 0 0 0)
   142                                       (v128.const i16x8 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff))
   143                                       (v128.const i16x8 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff))
   144  (assert_return (invoke "i16x8.max_u" (v128.const i16x8 1 1 1 1 1 1 1 1)
   145                                       (v128.const i16x8 1 1 1 1 1 1 1 1))
   146                                       (v128.const i16x8 1 1 1 1 1 1 1 1))
   147  (assert_return (invoke "i16x8.max_u" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)
   148                                       (v128.const i16x8 1 1 1 1 1 1 1 1))
   149                                       (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535))
   150  (assert_return (invoke "i16x8.max_u" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)
   151                                       (v128.const i16x8 128 128 128 128 128 128 128 128))
   152                                       (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535))
   153  (assert_return (invoke "i16x8.max_u" (v128.const i16x8 32768 32768 32768 32768 32768 32768 32768 32768)
   154                                       (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768))
   155                                       (v128.const i16x8 32768 32768 32768 32768 32768 32768 32768 32768))
   156  (assert_return (invoke "i16x8.max_u" (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000)
   157                                       (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768))
   158                                       (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000))
   159  (assert_return (invoke "i16x8.max_u" (v128.const i16x8 123 123 123 123 123 123 123 123)
   160                                       (v128.const i16x8 01_2_3 01_2_3 01_2_3 01_2_3 01_2_3 01_2_3 01_2_3 01_2_3))
   161                                       (v128.const i16x8 123 123 123 123 123 123 123 123))
   162  (assert_return (invoke "i16x8.max_u" (v128.const i16x8 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80)
   163                                       (v128.const i16x8 0x0_8_0 0x0_8_0 0x0_8_0 0x0_8_0 0x0_8_0 0x0_8_0 0x0_8_0 0x0_8_0))
   164                                       (v128.const i16x8 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80))
   165  (assert_return (invoke "i16x8.avgr_u" (v128.const i16x8 0 0 0 0 0 0 0 0)
   166                                        (v128.const i16x8 0 0 0 0 0 0 0 0))
   167                                        (v128.const i16x8 0 0 0 0 0 0 0 0))
   168  (assert_return (invoke "i16x8.avgr_u" (v128.const i16x8 0 0 0 0 0 0 0 0)
   169                                        (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1))
   170                                        (v128.const i16x8 32768 32768 32768 32768 32768 32768 32768 32768))
   171  (assert_return (invoke "i16x8.avgr_u" (v128.const i16x8 0 0 0 0 -1 -1 -1 -1)
   172                                        (v128.const i16x8 0 0 -1 -1 0 0 -1 -1))
   173                                        (v128.const i16x8 0 0 32768 32768 32768 32768 65535 65535))
   174  (assert_return (invoke "i16x8.avgr_u" (v128.const i16x8 0 0 0 0 0 0 0 0)
   175                                        (v128.const i16x8 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff))
   176                                        (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000))
   177  (assert_return (invoke "i16x8.avgr_u" (v128.const i16x8 1 1 1 1 1 1 1 1)
   178                                        (v128.const i16x8 1 1 1 1 1 1 1 1))
   179                                        (v128.const i16x8 1 1 1 1 1 1 1 1))
   180  (assert_return (invoke "i16x8.avgr_u" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)
   181                                        (v128.const i16x8 1 1 1 1 1 1 1 1))
   182                                        (v128.const i16x8 32768 32768 32768 32768 32768 32768 32768 32768))
   183  (assert_return (invoke "i16x8.avgr_u" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)
   184                                        (v128.const i16x8 128 128 128 128 128 128 128 128))
   185                                        (v128.const i16x8 32832 32832 32832 32832 32832 32832 32832 32832))
   186  (assert_return (invoke "i16x8.avgr_u" (v128.const i16x8 32768 32768 32768 32768 32768 32768 32768 32768)
   187                                        (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768))
   188                                        (v128.const i16x8 32768 32768 32768 32768 32768 32768 32768 32768))
   189  (assert_return (invoke "i16x8.avgr_u" (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000)
   190                                        (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768))
   191                                        (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000))
   192  (assert_return (invoke "i16x8.avgr_u" (v128.const i16x8 123 123 123 123 123 123 123 123)
   193                                        (v128.const i16x8 01_2_3 01_2_3 01_2_3 01_2_3 01_2_3 01_2_3 01_2_3 01_2_3))
   194                                        (v128.const i16x8 123 123 123 123 123 123 123 123))
   195  (assert_return (invoke "i16x8.avgr_u" (v128.const i16x8 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80)
   196                                        (v128.const i16x8 0x0_8_0 0x0_8_0 0x0_8_0 0x0_8_0 0x0_8_0 0x0_8_0 0x0_8_0 0x0_8_0))
   197                                        (v128.const i16x8 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80))
   198  (assert_return (invoke "i16x8.abs" (v128.const i16x8 1 1 1 1 1 1 1 1))
   199                                     (v128.const i16x8 1 1 1 1 1 1 1 1))
   200  (assert_return (invoke "i16x8.abs" (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1))
   201                                     (v128.const i16x8 1 1 1 1 1 1 1 1))
   202  (assert_return (invoke "i16x8.abs" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535))
   203                                     (v128.const i16x8 1 1 1 1 1 1 1 1))
   204  (assert_return (invoke "i16x8.abs" (v128.const i16x8 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff))
   205                                     (v128.const i16x8 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1))
   206  (assert_return (invoke "i16x8.abs" (v128.const i16x8 32768 32768 32768 32768 32768 32768 32768 32768))
   207                                     (v128.const i16x8 32768 32768 32768 32768 32768 32768 32768 32768))
   208  (assert_return (invoke "i16x8.abs" (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768))
   209                                     (v128.const i16x8 32768 32768 32768 32768 32768 32768 32768 32768))
   210  (assert_return (invoke "i16x8.abs" (v128.const i16x8 -0x8000 -0x8000 -0x8000 -0x8000 -0x8000 -0x8000 -0x8000 -0x8000))
   211                                     (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000))
   212  (assert_return (invoke "i16x8.abs" (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000))
   213                                     (v128.const i16x8 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000 0x8000))
   214  (assert_return (invoke "i16x8.abs" (v128.const i16x8 01_2_3 01_2_3 01_2_3 01_2_3 01_2_3 01_2_3 01_2_3 01_2_3))
   215                                     (v128.const i16x8 01_2_3 01_2_3 01_2_3 01_2_3 01_2_3 01_2_3 01_2_3 01_2_3))
   216  (assert_return (invoke "i16x8.abs" (v128.const i16x8 -01_2_3 -01_2_3 -01_2_3 -01_2_3 -01_2_3 -01_2_3 -01_2_3 -01_2_3))
   217                                     (v128.const i16x8 123 123 123 123 123 123 123 123))
   218  (assert_return (invoke "i16x8.abs" (v128.const i16x8 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80))
   219                                     (v128.const i16x8 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80))
   220  (assert_return (invoke "i16x8.abs" (v128.const i16x8 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80))
   221                                     (v128.const i16x8 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80))
   222  (assert_return (invoke "i16x8.abs" (v128.const i16x8 0x0_8_0 0x0_8_0 0x0_8_0 0x0_8_0 0x0_8_0 0x0_8_0 0x0_8_0 0x0_8_0))
   223                                     (v128.const i16x8 0x0_8_0 0x0_8_0 0x0_8_0 0x0_8_0 0x0_8_0 0x0_8_0 0x0_8_0 0x0_8_0))
   224  (assert_return (invoke "i16x8.abs" (v128.const i16x8 -0x0_8_0 -0x0_8_0 -0x0_8_0 -0x0_8_0 -0x0_8_0 -0x0_8_0 -0x0_8_0 -0x0_8_0))
   225                                     (v128.const i16x8 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80))
   226  
   227  ;; Const vs const
   228  (assert_return (invoke "i16x8.min_s_with_const_0") (v128.const i16x8 -32768 -32768 16384 16384 16384 16384 -32768 -32768))
   229  (assert_return (invoke "i16x8.min_s_with_const_1") (v128.const i16x8 0 0 1 1 1 1 0 0))
   230  (assert_return (invoke "i16x8.min_u_with_const_2") (v128.const i16x8 -32768 -32768 16384 16384 16384 16384 -32768 -32768))
   231  (assert_return (invoke "i16x8.min_u_with_const_3") (v128.const i16x8 0 0 1 1 1 1 0 0))
   232  (assert_return (invoke "i16x8.max_s_with_const_4") (v128.const i16x8 65535 65535 32767 32767 32767 32767 65535 65535))
   233  (assert_return (invoke "i16x8.max_s_with_const_5") (v128.const i16x8 3 3 2 2 2 2 3 3))
   234  (assert_return (invoke "i16x8.max_u_with_const_6") (v128.const i16x8 65535 65535 32767 32767 32767 32767 65535 65535))
   235  (assert_return (invoke "i16x8.max_u_with_const_7") (v128.const i16x8 3 3 2 2 2 2 3 3))
   236  (assert_return (invoke "i16x8.avgr_u_with_const_8") (v128.const i16x8 49152 49152 24576 24576 24576 24576 49152 49152))
   237  (assert_return (invoke "i16x8.avgr_u_with_const_9") (v128.const i16x8 2 2 2 2 2 2 2 2))
   238  (assert_return (invoke "i16x8.abs_with_const_10") (v128.const i16x8 32768 32768 32767 32767 16384 16384 1 1))
   239  
   240  ;; Param vs const
   241  (assert_return (invoke "i16x8.min_s_with_const_11" (v128.const i16x8 65535 65535 16384 16384 32767 32767 -32768 -32768))
   242                                                     (v128.const i16x8 -32768 -32768 16384 16384 16384 16384 -32768 -32768))
   243  (assert_return (invoke "i16x8.min_s_with_const_12" (v128.const i16x8 3 3 2 2 1 1 0 0))
   244                                                     (v128.const i16x8 0 0 1 1 1 1 0 0))
   245  (assert_return (invoke "i16x8.min_u_with_const_13" (v128.const i16x8 65535 65535 16384 16384 32767 32767 -32768 -32768))
   246                                                     (v128.const i16x8 -32768 -32768 16384 16384 16384 16384 -32768 -32768))
   247  (assert_return (invoke "i16x8.min_u_with_const_14" (v128.const i16x8 3 3 2 2 1 1 0 0))
   248                                                     (v128.const i16x8 0 0 1 1 1 1 0 0))
   249  (assert_return (invoke "i16x8.max_s_with_const_15" (v128.const i16x8 65535 65535 16384 16384 32767 32767 -32768 -32768))
   250                                                     (v128.const i16x8 65535 65535 32767 32767 32767 32767 65535 65535))
   251  (assert_return (invoke "i16x8.max_s_with_const_16" (v128.const i16x8 3 3 2 2 1 1 0 0))
   252                                                     (v128.const i16x8 3 3 2 2 2 2 3 3))
   253  (assert_return (invoke "i16x8.max_u_with_const_17" (v128.const i16x8 65535 65535 16384 16384 32767 32767 -32768 -32768))
   254                                                     (v128.const i16x8 65535 65535 32767 32767 32767 32767 65535 65535))
   255  (assert_return (invoke "i16x8.max_u_with_const_18" (v128.const i16x8 3 3 2 2 1 1 0 0))
   256                                                     (v128.const i16x8 3 3 2 2 2 2 3 3))
   257  (assert_return (invoke "i16x8.avgr_u_with_const_19" (v128.const i16x8 65535 65535 16384 16384 32767 32767 -32768 -32768))
   258                                                      (v128.const i16x8 49152 49152 24576 24576 24576 24576 49152 49152))
   259  (assert_return (invoke "i16x8.avgr_u_with_const_20" (v128.const i16x8 3 3 2 2 1 1 0 0))
   260                                                      (v128.const i16x8 2 2 2 2 2 2 2 2))
   261  
   262  ;; Test different lanes go through different if-then clauses
   263  (assert_return (invoke "i16x8.min_s" (v128.const i16x8 -32768 -32768 32767 32767 16384 16384 65535 65535)
   264                                       (v128.const i16x8 65535 65535 16384 16384 32767 32767 -32768 -32768))
   265                                       (v128.const i16x8 -32768 -32768 16384 16384 16384 16384 -32768 -32768))
   266  (assert_return (invoke "i16x8.min_s" (v128.const i16x8 0 0 1 1 2 2 128 128)
   267                                       (v128.const i16x8 0 0 2 2 1 1 128 128))
   268                                       (v128.const i16x8 0 0 1 1 1 1 128 128))
   269  (assert_return (invoke "i16x8.min_u" (v128.const i16x8 -32768 -32768 32767 32767 16384 16384 65535 65535)
   270                                       (v128.const i16x8 65535 65535 16384 16384 32767 32767 -32768 -32768))
   271                                       (v128.const i16x8 -32768 -32768 16384 16384 16384 16384 -32768 -32768))
   272  (assert_return (invoke "i16x8.min_u" (v128.const i16x8 0 0 1 1 2 2 128 128)
   273                                       (v128.const i16x8 0 0 2 2 1 1 128 128))
   274                                       (v128.const i16x8 0 0 1 1 1 1 128 128))
   275  (assert_return (invoke "i16x8.max_s" (v128.const i16x8 -32768 -32768 32767 32767 16384 16384 65535 65535)
   276                                       (v128.const i16x8 65535 65535 16384 16384 32767 32767 -32768 -32768))
   277                                       (v128.const i16x8 65535 65535 32767 32767 32767 32767 65535 65535))
   278  (assert_return (invoke "i16x8.max_s" (v128.const i16x8 0 0 1 1 2 2 128 128)
   279                                       (v128.const i16x8 0 0 2 2 1 1 128 128))
   280                                       (v128.const i16x8 0 0 2 2 2 2 128 128))
   281  (assert_return (invoke "i16x8.max_u" (v128.const i16x8 -32768 -32768 32767 32767 16384 16384 65535 65535)
   282                                       (v128.const i16x8 65535 65535 16384 16384 32767 32767 -32768 -32768))
   283                                       (v128.const i16x8 65535 65535 32767 32767 32767 32767 65535 65535))
   284  (assert_return (invoke "i16x8.max_u" (v128.const i16x8 0 0 1 1 2 2 128 128)
   285                                       (v128.const i16x8 0 0 2 2 1 1 128 128))
   286                                       (v128.const i16x8 0 0 2 2 2 2 128 128))
   287  (assert_return (invoke "i16x8.avgr_u" (v128.const i16x8 -32768 -32768 32767 32767 16384 16384 65535 65535)
   288                                        (v128.const i16x8 65535 65535 16384 16384 32767 32767 -32768 -32768))
   289                                        (v128.const i16x8 49152 49152 24576 24576 24576 24576 49152 49152))
   290  (assert_return (invoke "i16x8.avgr_u" (v128.const i16x8 0 0 1 1 2 2 128 128)
   291                                        (v128.const i16x8 0 0 2 2 1 1 128 128))
   292                                        (v128.const i16x8 0 0 2 2 2 2 128 128))
   293  (assert_return (invoke "i16x8.abs" (v128.const i16x8 -32768 -32768 32767 32767 16384 16384 65535 65535))
   294                                     (v128.const i16x8 32768 32768 32767 32767 16384 16384 1 1))
   295  
   296  ;; Test opposite signs of zero
   297  (assert_return (invoke "i16x8.min_s" (v128.const i16x8 -0 -0 -0 -0 +0 +0 +0 +0)
   298                                       (v128.const i16x8 +0 +0 0 0 -0 -0 0 0))
   299                                       (v128.const i16x8 -0 -0 -0 -0 +0 +0 +0 +0))
   300  (assert_return (invoke "i16x8.min_s" (v128.const i16x8 -0 -0 -0 -0 -0 -0 -0 -0)
   301                                       (v128.const i16x8 +0 +0 +0 +0 +0 +0 +0 +0))
   302                                       (v128.const i16x8 -0 -0 -0 -0 -0 -0 -0 -0))
   303  (assert_return (invoke "i16x8.min_u" (v128.const i16x8 -0 -0 -0 -0 +0 +0 +0 +0)
   304                                       (v128.const i16x8 +0 +0 0 0 -0 -0 0 0))
   305                                       (v128.const i16x8 -0 -0 -0 -0 +0 +0 +0 +0))
   306  (assert_return (invoke "i16x8.min_u" (v128.const i16x8 -0 -0 -0 -0 -0 -0 -0 -0)
   307                                       (v128.const i16x8 +0 +0 +0 +0 +0 +0 +0 +0))
   308                                       (v128.const i16x8 -0 -0 -0 -0 -0 -0 -0 -0))
   309  (assert_return (invoke "i16x8.max_s" (v128.const i16x8 -0 -0 -0 -0 +0 +0 +0 +0)
   310                                       (v128.const i16x8 +0 +0 0 0 -0 -0 0 0))
   311                                       (v128.const i16x8 -0 -0 -0 -0 +0 +0 +0 +0))
   312  (assert_return (invoke "i16x8.max_s" (v128.const i16x8 -0 -0 -0 -0 -0 -0 -0 -0)
   313                                       (v128.const i16x8 +0 +0 +0 +0 +0 +0 +0 +0))
   314                                       (v128.const i16x8 -0 -0 -0 -0 -0 -0 -0 -0))
   315  (assert_return (invoke "i16x8.max_u" (v128.const i16x8 -0 -0 -0 -0 +0 +0 +0 +0)
   316                                       (v128.const i16x8 +0 +0 0 0 -0 -0 0 0))
   317                                       (v128.const i16x8 -0 -0 -0 -0 +0 +0 +0 +0))
   318  (assert_return (invoke "i16x8.max_u" (v128.const i16x8 -0 -0 -0 -0 -0 -0 -0 -0)
   319                                       (v128.const i16x8 +0 +0 +0 +0 +0 +0 +0 +0))
   320                                       (v128.const i16x8 -0 -0 -0 -0 -0 -0 -0 -0))
   321  (assert_return (invoke "i16x8.avgr_u" (v128.const i16x8 -0 -0 -0 -0 +0 +0 +0 +0)
   322                                        (v128.const i16x8 +0 +0 0 0 -0 -0 0 0))
   323                                        (v128.const i16x8 0 0 0 0 0 0 0 0))
   324  (assert_return (invoke "i16x8.avgr_u" (v128.const i16x8 -0 -0 -0 -0 -0 -0 -0 -0)
   325                                        (v128.const i16x8 +0 +0 +0 +0 +0 +0 +0 +0))
   326                                        (v128.const i16x8 0 0 0 0 0 0 0 0))
   327  (assert_return (invoke "i16x8.abs" (v128.const i16x8 -0 -0 -0 -0 +0 +0 +0 +0))
   328                                     (v128.const i16x8 -0 -0 -0 -0 +0 +0 +0 +0))
   329  (assert_return (invoke "i16x8.abs" (v128.const i16x8 +0 +0 0 0 -0 -0 0 0))
   330                                     (v128.const i16x8 +0 +0 0 0 -0 -0 0 0))
   331  (assert_return (invoke "i16x8.abs" (v128.const i16x8 -0 -0 -0 -0 -0 -0 -0 -0))
   332                                     (v128.const i16x8 -0 -0 -0 -0 -0 -0 -0 -0))
   333  (assert_return (invoke "i16x8.abs" (v128.const i16x8 +0 +0 +0 +0 +0 +0 +0 +0))
   334                                     (v128.const i16x8 +0 +0 +0 +0 +0 +0 +0 +0))
   335  
   336  ;; Unknown operators
   337  (assert_malformed (module quote "(memory 1) (func (result v128) (i16x8.avgr (v128.const i16x8 0 0 0 0 0 0 0 0) (v128.const i16x8 1 1 1 1 1 1 1 1)))") "unknown operator")
   338  (assert_malformed (module quote "(memory 1) (func (result v128) (i16x8.avgr_s (v128.const i16x8 0 0 0 0 0 0 0 0) (v128.const i16x8 1 1 1 1 1 1 1 1)))") "unknown operator")
   339  
   340  ;; Type check
   341  (assert_invalid (module (func (result v128) (i16x8.min_s (i32.const 0) (f32.const 0.0)))) "type mismatch")
   342  (assert_invalid (module (func (result v128) (i16x8.min_u (i32.const 0) (f32.const 0.0)))) "type mismatch")
   343  (assert_invalid (module (func (result v128) (i16x8.max_s (i32.const 0) (f32.const 0.0)))) "type mismatch")
   344  (assert_invalid (module (func (result v128) (i16x8.max_u (i32.const 0) (f32.const 0.0)))) "type mismatch")
   345  (assert_invalid (module (func (result v128) (i16x8.avgr_u (i32.const 0) (f32.const 0.0)))) "type mismatch")
   346  (assert_invalid (module (func (result v128) (i16x8.abs (f32.const 0.0)))) "type mismatch")
   347  
   348  ;; Test operation with empty argument
   349  
   350  (assert_invalid
   351    (module
   352      (func $i16x8.min_s-1st-arg-empty (result v128)
   353        (i16x8.min_s (v128.const i16x8 0 0 0 0 0 0 0 0))
   354      )
   355    )
   356    "type mismatch"
   357  )
   358  (assert_invalid
   359    (module
   360      (func $i16x8.min_s-arg-empty (result v128)
   361        (i16x8.min_s)
   362      )
   363    )
   364    "type mismatch"
   365  )
   366  (assert_invalid
   367    (module
   368      (func $i16x8.min_u-1st-arg-empty (result v128)
   369        (i16x8.min_u (v128.const i16x8 0 0 0 0 0 0 0 0))
   370      )
   371    )
   372    "type mismatch"
   373  )
   374  (assert_invalid
   375    (module
   376      (func $i16x8.min_u-arg-empty (result v128)
   377        (i16x8.min_u)
   378      )
   379    )
   380    "type mismatch"
   381  )
   382  (assert_invalid
   383    (module
   384      (func $i16x8.max_s-1st-arg-empty (result v128)
   385        (i16x8.max_s (v128.const i16x8 0 0 0 0 0 0 0 0))
   386      )
   387    )
   388    "type mismatch"
   389  )
   390  (assert_invalid
   391    (module
   392      (func $i16x8.max_s-arg-empty (result v128)
   393        (i16x8.max_s)
   394      )
   395    )
   396    "type mismatch"
   397  )
   398  (assert_invalid
   399    (module
   400      (func $i16x8.max_u-1st-arg-empty (result v128)
   401        (i16x8.max_u (v128.const i16x8 0 0 0 0 0 0 0 0))
   402      )
   403    )
   404    "type mismatch"
   405  )
   406  (assert_invalid
   407    (module
   408      (func $i16x8.max_u-arg-empty (result v128)
   409        (i16x8.max_u)
   410      )
   411    )
   412    "type mismatch"
   413  )
   414  (assert_invalid
   415    (module
   416      (func $i16x8.avgr_u-1st-arg-empty (result v128)
   417        (i16x8.avgr_u (v128.const i16x8 0 0 0 0 0 0 0 0))
   418      )
   419    )
   420    "type mismatch"
   421  )
   422  (assert_invalid
   423    (module
   424      (func $i16x8.avgr_u-arg-empty (result v128)
   425        (i16x8.avgr_u)
   426      )
   427    )
   428    "type mismatch"
   429  )
   430  (assert_invalid
   431    (module
   432      (func $i16x8.abs-arg-empty (result v128)
   433        (i16x8.abs)
   434      )
   435    )
   436    "type mismatch"
   437  )
   438  
   439  ;; Combination
   440  (module
   441    (func (export "i16x8.min_s-i16x8.avgr_u") (param v128 v128 v128) (result v128) (i16x8.min_s (i16x8.avgr_u (local.get 0) (local.get 1))(local.get 2)))
   442    (func (export "i16x8.min_s-i16x8.max_u") (param v128 v128 v128) (result v128) (i16x8.min_s (i16x8.max_u (local.get 0) (local.get 1))(local.get 2)))
   443    (func (export "i16x8.min_s-i16x8.max_s") (param v128 v128 v128) (result v128) (i16x8.min_s (i16x8.max_s (local.get 0) (local.get 1))(local.get 2)))
   444    (func (export "i16x8.min_s-i16x8.min_u") (param v128 v128 v128) (result v128) (i16x8.min_s (i16x8.min_u (local.get 0) (local.get 1))(local.get 2)))
   445    (func (export "i16x8.min_s-i16x8.min_s") (param v128 v128 v128) (result v128) (i16x8.min_s (i16x8.min_s (local.get 0) (local.get 1))(local.get 2)))
   446    (func (export "i16x8.min_s-i16x8.abs") (param v128 v128) (result v128) (i16x8.min_s (i16x8.abs (local.get 0))(local.get 1)))
   447    (func (export "i16x8.abs-i16x8.min_s") (param v128 v128) (result v128) (i16x8.abs (i16x8.min_s (local.get 0) (local.get 1))))
   448    (func (export "i16x8.min_u-i16x8.avgr_u") (param v128 v128 v128) (result v128) (i16x8.min_u (i16x8.avgr_u (local.get 0) (local.get 1))(local.get 2)))
   449    (func (export "i16x8.min_u-i16x8.max_u") (param v128 v128 v128) (result v128) (i16x8.min_u (i16x8.max_u (local.get 0) (local.get 1))(local.get 2)))
   450    (func (export "i16x8.min_u-i16x8.max_s") (param v128 v128 v128) (result v128) (i16x8.min_u (i16x8.max_s (local.get 0) (local.get 1))(local.get 2)))
   451    (func (export "i16x8.min_u-i16x8.min_u") (param v128 v128 v128) (result v128) (i16x8.min_u (i16x8.min_u (local.get 0) (local.get 1))(local.get 2)))
   452    (func (export "i16x8.min_u-i16x8.min_s") (param v128 v128 v128) (result v128) (i16x8.min_u (i16x8.min_s (local.get 0) (local.get 1))(local.get 2)))
   453    (func (export "i16x8.min_u-i16x8.abs") (param v128 v128) (result v128) (i16x8.min_u (i16x8.abs (local.get 0))(local.get 1)))
   454    (func (export "i16x8.abs-i16x8.min_u") (param v128 v128) (result v128) (i16x8.abs (i16x8.min_u (local.get 0) (local.get 1))))
   455    (func (export "i16x8.max_s-i16x8.avgr_u") (param v128 v128 v128) (result v128) (i16x8.max_s (i16x8.avgr_u (local.get 0) (local.get 1))(local.get 2)))
   456    (func (export "i16x8.max_s-i16x8.max_u") (param v128 v128 v128) (result v128) (i16x8.max_s (i16x8.max_u (local.get 0) (local.get 1))(local.get 2)))
   457    (func (export "i16x8.max_s-i16x8.max_s") (param v128 v128 v128) (result v128) (i16x8.max_s (i16x8.max_s (local.get 0) (local.get 1))(local.get 2)))
   458    (func (export "i16x8.max_s-i16x8.min_u") (param v128 v128 v128) (result v128) (i16x8.max_s (i16x8.min_u (local.get 0) (local.get 1))(local.get 2)))
   459    (func (export "i16x8.max_s-i16x8.min_s") (param v128 v128 v128) (result v128) (i16x8.max_s (i16x8.min_s (local.get 0) (local.get 1))(local.get 2)))
   460    (func (export "i16x8.max_s-i16x8.abs") (param v128 v128) (result v128) (i16x8.max_s (i16x8.abs (local.get 0))(local.get 1)))
   461    (func (export "i16x8.abs-i16x8.max_s") (param v128 v128) (result v128) (i16x8.abs (i16x8.max_s (local.get 0) (local.get 1))))
   462    (func (export "i16x8.max_u-i16x8.avgr_u") (param v128 v128 v128) (result v128) (i16x8.max_u (i16x8.avgr_u (local.get 0) (local.get 1))(local.get 2)))
   463    (func (export "i16x8.max_u-i16x8.max_u") (param v128 v128 v128) (result v128) (i16x8.max_u (i16x8.max_u (local.get 0) (local.get 1))(local.get 2)))
   464    (func (export "i16x8.max_u-i16x8.max_s") (param v128 v128 v128) (result v128) (i16x8.max_u (i16x8.max_s (local.get 0) (local.get 1))(local.get 2)))
   465    (func (export "i16x8.max_u-i16x8.min_u") (param v128 v128 v128) (result v128) (i16x8.max_u (i16x8.min_u (local.get 0) (local.get 1))(local.get 2)))
   466    (func (export "i16x8.max_u-i16x8.min_s") (param v128 v128 v128) (result v128) (i16x8.max_u (i16x8.min_s (local.get 0) (local.get 1))(local.get 2)))
   467    (func (export "i16x8.max_u-i16x8.abs") (param v128 v128) (result v128) (i16x8.max_u (i16x8.abs (local.get 0))(local.get 1)))
   468    (func (export "i16x8.abs-i16x8.max_u") (param v128 v128) (result v128) (i16x8.abs (i16x8.max_u (local.get 0) (local.get 1))))
   469    (func (export "i16x8.avgr_u-i16x8.avgr_u") (param v128 v128 v128) (result v128) (i16x8.avgr_u (i16x8.avgr_u (local.get 0) (local.get 1))(local.get 2)))
   470    (func (export "i16x8.avgr_u-i16x8.max_u") (param v128 v128 v128) (result v128) (i16x8.avgr_u (i16x8.max_u (local.get 0) (local.get 1))(local.get 2)))
   471    (func (export "i16x8.avgr_u-i16x8.max_s") (param v128 v128 v128) (result v128) (i16x8.avgr_u (i16x8.max_s (local.get 0) (local.get 1))(local.get 2)))
   472    (func (export "i16x8.avgr_u-i16x8.min_u") (param v128 v128 v128) (result v128) (i16x8.avgr_u (i16x8.min_u (local.get 0) (local.get 1))(local.get 2)))
   473    (func (export "i16x8.avgr_u-i16x8.min_s") (param v128 v128 v128) (result v128) (i16x8.avgr_u (i16x8.min_s (local.get 0) (local.get 1))(local.get 2)))
   474    (func (export "i16x8.avgr_u-i16x8.abs") (param v128 v128) (result v128) (i16x8.avgr_u (i16x8.abs (local.get 0))(local.get 1)))
   475    (func (export "i16x8.abs-i16x8.avgr_u") (param v128 v128) (result v128) (i16x8.abs (i16x8.avgr_u (local.get 0) (local.get 1))))
   476    (func (export "i16x8.abs-i16x8.abs") (param v128) (result v128) (i16x8.abs (i16x8.abs (local.get 0))))
   477  )
   478  
   479  (assert_return (invoke "i16x8.min_s-i16x8.avgr_u" (v128.const i16x8 0 0 0 0 0 0 0 0)
   480                                                    (v128.const i16x8 1 1 1 1 1 1 1 1)
   481                                                    (v128.const i16x8 2 2 2 2 2 2 2 2))
   482                                                    (v128.const i16x8 1 1 1 1 1 1 1 1))
   483  (assert_return (invoke "i16x8.min_s-i16x8.max_u" (v128.const i16x8 0 0 0 0 0 0 0 0)
   484                                                   (v128.const i16x8 1 1 1 1 1 1 1 1)
   485                                                   (v128.const i16x8 2 2 2 2 2 2 2 2))
   486                                                   (v128.const i16x8 1 1 1 1 1 1 1 1))
   487  (assert_return (invoke "i16x8.min_s-i16x8.max_s" (v128.const i16x8 0 0 0 0 0 0 0 0)
   488                                                   (v128.const i16x8 1 1 1 1 1 1 1 1)
   489                                                   (v128.const i16x8 2 2 2 2 2 2 2 2))
   490                                                   (v128.const i16x8 1 1 1 1 1 1 1 1))
   491  (assert_return (invoke "i16x8.min_s-i16x8.min_u" (v128.const i16x8 0 0 0 0 0 0 0 0)
   492                                                   (v128.const i16x8 1 1 1 1 1 1 1 1)
   493                                                   (v128.const i16x8 2 2 2 2 2 2 2 2))
   494                                                   (v128.const i16x8 0 0 0 0 0 0 0 0))
   495  (assert_return (invoke "i16x8.min_s-i16x8.min_s" (v128.const i16x8 0 0 0 0 0 0 0 0)
   496                                                   (v128.const i16x8 1 1 1 1 1 1 1 1)
   497                                                   (v128.const i16x8 2 2 2 2 2 2 2 2))
   498                                                   (v128.const i16x8 0 0 0 0 0 0 0 0))
   499  (assert_return (invoke "i16x8.min_s-i16x8.abs" (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)
   500                                                 (v128.const i16x8 0 0 0 0 0 0 0 0))
   501                                                 (v128.const i16x8 0 0 0 0 0 0 0 0))
   502  (assert_return (invoke "i16x8.abs-i16x8.min_s" (v128.const i16x8 0 0 0 0 0 0 0 0)
   503                                                 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1))
   504                                                 (v128.const i16x8 1 1 1 1 1 1 1 1))
   505  (assert_return (invoke "i16x8.min_u-i16x8.avgr_u" (v128.const i16x8 0 0 0 0 0 0 0 0)
   506                                                    (v128.const i16x8 1 1 1 1 1 1 1 1)
   507                                                    (v128.const i16x8 2 2 2 2 2 2 2 2))
   508                                                    (v128.const i16x8 1 1 1 1 1 1 1 1))
   509  (assert_return (invoke "i16x8.min_u-i16x8.max_u" (v128.const i16x8 0 0 0 0 0 0 0 0)
   510                                                   (v128.const i16x8 1 1 1 1 1 1 1 1)
   511                                                   (v128.const i16x8 2 2 2 2 2 2 2 2))
   512                                                   (v128.const i16x8 1 1 1 1 1 1 1 1))
   513  (assert_return (invoke "i16x8.min_u-i16x8.max_s" (v128.const i16x8 0 0 0 0 0 0 0 0)
   514                                                   (v128.const i16x8 1 1 1 1 1 1 1 1)
   515                                                   (v128.const i16x8 2 2 2 2 2 2 2 2))
   516                                                   (v128.const i16x8 1 1 1 1 1 1 1 1))
   517  (assert_return (invoke "i16x8.min_u-i16x8.min_u" (v128.const i16x8 0 0 0 0 0 0 0 0)
   518                                                   (v128.const i16x8 1 1 1 1 1 1 1 1)
   519                                                   (v128.const i16x8 2 2 2 2 2 2 2 2))
   520                                                   (v128.const i16x8 0 0 0 0 0 0 0 0))
   521  (assert_return (invoke "i16x8.min_u-i16x8.min_s" (v128.const i16x8 0 0 0 0 0 0 0 0)
   522                                                   (v128.const i16x8 1 1 1 1 1 1 1 1)
   523                                                   (v128.const i16x8 2 2 2 2 2 2 2 2))
   524                                                   (v128.const i16x8 0 0 0 0 0 0 0 0))
   525  (assert_return (invoke "i16x8.min_u-i16x8.abs" (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)
   526                                                 (v128.const i16x8 0 0 0 0 0 0 0 0))
   527                                                 (v128.const i16x8 0 0 0 0 0 0 0 0))
   528  (assert_return (invoke "i16x8.abs-i16x8.min_u" (v128.const i16x8 0 0 0 0 0 0 0 0)
   529                                                 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1))
   530                                                 (v128.const i16x8 0 0 0 0 0 0 0 0))
   531  (assert_return (invoke "i16x8.max_s-i16x8.avgr_u" (v128.const i16x8 0 0 0 0 0 0 0 0)
   532                                                    (v128.const i16x8 1 1 1 1 1 1 1 1)
   533                                                    (v128.const i16x8 2 2 2 2 2 2 2 2))
   534                                                    (v128.const i16x8 2 2 2 2 2 2 2 2))
   535  (assert_return (invoke "i16x8.max_s-i16x8.max_u" (v128.const i16x8 0 0 0 0 0 0 0 0)
   536                                                   (v128.const i16x8 1 1 1 1 1 1 1 1)
   537                                                   (v128.const i16x8 2 2 2 2 2 2 2 2))
   538                                                   (v128.const i16x8 2 2 2 2 2 2 2 2))
   539  (assert_return (invoke "i16x8.max_s-i16x8.max_s" (v128.const i16x8 0 0 0 0 0 0 0 0)
   540                                                   (v128.const i16x8 1 1 1 1 1 1 1 1)
   541                                                   (v128.const i16x8 2 2 2 2 2 2 2 2))
   542                                                   (v128.const i16x8 2 2 2 2 2 2 2 2))
   543  (assert_return (invoke "i16x8.max_s-i16x8.min_u" (v128.const i16x8 0 0 0 0 0 0 0 0)
   544                                                   (v128.const i16x8 1 1 1 1 1 1 1 1)
   545                                                   (v128.const i16x8 2 2 2 2 2 2 2 2))
   546                                                   (v128.const i16x8 2 2 2 2 2 2 2 2))
   547  (assert_return (invoke "i16x8.max_s-i16x8.min_s" (v128.const i16x8 0 0 0 0 0 0 0 0)
   548                                                   (v128.const i16x8 1 1 1 1 1 1 1 1)
   549                                                   (v128.const i16x8 2 2 2 2 2 2 2 2))
   550                                                   (v128.const i16x8 2 2 2 2 2 2 2 2))
   551  (assert_return (invoke "i16x8.max_s-i16x8.abs" (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)
   552                                                 (v128.const i16x8 0 0 0 0 0 0 0 0))
   553                                                 (v128.const i16x8 1 1 1 1 1 1 1 1))
   554  (assert_return (invoke "i16x8.abs-i16x8.max_s" (v128.const i16x8 0 0 0 0 0 0 0 0)
   555                                                 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1))
   556                                                 (v128.const i16x8 0 0 0 0 0 0 0 0))
   557  (assert_return (invoke "i16x8.max_u-i16x8.avgr_u" (v128.const i16x8 0 0 0 0 0 0 0 0)
   558                                                    (v128.const i16x8 1 1 1 1 1 1 1 1)
   559                                                    (v128.const i16x8 2 2 2 2 2 2 2 2))
   560                                                    (v128.const i16x8 2 2 2 2 2 2 2 2))
   561  (assert_return (invoke "i16x8.max_u-i16x8.max_u" (v128.const i16x8 0 0 0 0 0 0 0 0)
   562                                                   (v128.const i16x8 1 1 1 1 1 1 1 1)
   563                                                   (v128.const i16x8 2 2 2 2 2 2 2 2))
   564                                                   (v128.const i16x8 2 2 2 2 2 2 2 2))
   565  (assert_return (invoke "i16x8.max_u-i16x8.max_s" (v128.const i16x8 0 0 0 0 0 0 0 0)
   566                                                   (v128.const i16x8 1 1 1 1 1 1 1 1)
   567                                                   (v128.const i16x8 2 2 2 2 2 2 2 2))
   568                                                   (v128.const i16x8 2 2 2 2 2 2 2 2))
   569  (assert_return (invoke "i16x8.max_u-i16x8.min_u" (v128.const i16x8 0 0 0 0 0 0 0 0)
   570                                                   (v128.const i16x8 1 1 1 1 1 1 1 1)
   571                                                   (v128.const i16x8 2 2 2 2 2 2 2 2))
   572                                                   (v128.const i16x8 2 2 2 2 2 2 2 2))
   573  (assert_return (invoke "i16x8.max_u-i16x8.min_s" (v128.const i16x8 0 0 0 0 0 0 0 0)
   574                                                   (v128.const i16x8 1 1 1 1 1 1 1 1)
   575                                                   (v128.const i16x8 2 2 2 2 2 2 2 2))
   576                                                   (v128.const i16x8 2 2 2 2 2 2 2 2))
   577  (assert_return (invoke "i16x8.max_u-i16x8.abs" (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)
   578                                                 (v128.const i16x8 0 0 0 0 0 0 0 0))
   579                                                 (v128.const i16x8 1 1 1 1 1 1 1 1))
   580  (assert_return (invoke "i16x8.abs-i16x8.max_u" (v128.const i16x8 0 0 0 0 0 0 0 0)
   581                                                 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1))
   582                                                 (v128.const i16x8 1 1 1 1 1 1 1 1))
   583  (assert_return (invoke "i16x8.avgr_u-i16x8.avgr_u" (v128.const i16x8 0 0 0 0 0 0 0 0)
   584                                                     (v128.const i16x8 1 1 1 1 1 1 1 1)
   585                                                     (v128.const i16x8 2 2 2 2 2 2 2 2))
   586                                                     (v128.const i16x8 2 2 2 2 2 2 2 2))
   587  (assert_return (invoke "i16x8.avgr_u-i16x8.max_u" (v128.const i16x8 0 0 0 0 0 0 0 0)
   588                                                    (v128.const i16x8 1 1 1 1 1 1 1 1)
   589                                                    (v128.const i16x8 2 2 2 2 2 2 2 2))
   590                                                    (v128.const i16x8 2 2 2 2 2 2 2 2))
   591  (assert_return (invoke "i16x8.avgr_u-i16x8.max_s" (v128.const i16x8 0 0 0 0 0 0 0 0)
   592                                                    (v128.const i16x8 1 1 1 1 1 1 1 1)
   593                                                    (v128.const i16x8 2 2 2 2 2 2 2 2))
   594                                                    (v128.const i16x8 2 2 2 2 2 2 2 2))
   595  (assert_return (invoke "i16x8.avgr_u-i16x8.min_u" (v128.const i16x8 0 0 0 0 0 0 0 0)
   596                                                    (v128.const i16x8 1 1 1 1 1 1 1 1)
   597                                                    (v128.const i16x8 2 2 2 2 2 2 2 2))
   598                                                    (v128.const i16x8 1 1 1 1 1 1 1 1))
   599  (assert_return (invoke "i16x8.avgr_u-i16x8.min_s" (v128.const i16x8 0 0 0 0 0 0 0 0)
   600                                                    (v128.const i16x8 1 1 1 1 1 1 1 1)
   601                                                    (v128.const i16x8 2 2 2 2 2 2 2 2))
   602                                                    (v128.const i16x8 1 1 1 1 1 1 1 1))
   603  (assert_return (invoke "i16x8.avgr_u-i16x8.abs" (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)
   604                                                  (v128.const i16x8 0 0 0 0 0 0 0 0))
   605                                                  (v128.const i16x8 1 1 1 1 1 1 1 1))
   606  (assert_return (invoke "i16x8.abs-i16x8.avgr_u" (v128.const i16x8 0 0 0 0 0 0 0 0)
   607                                                  (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1))
   608                                                  (v128.const i16x8 32768 32768 32768 32768 32768 32768 32768 32768))
   609  (assert_return (invoke "i16x8.abs-i16x8.abs" (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1))
   610                                               (v128.const i16x8 1 1 1 1 1 1 1 1))