wa-lang.org/wazero@v1.0.2/internal/integration_test/spectest/v2/testdata/simd_bitwise.wast (about)

     1  ;; Test all the bitwise operators on major boundary values and all special values.
     2  
     3  (module
     4    (func (export "not") (param $0 v128) (result v128) (v128.not (local.get $0)))
     5    (func (export "and") (param $0 v128) (param $1 v128) (result v128) (v128.and (local.get $0) (local.get $1)))
     6    (func (export "or") (param $0 v128) (param $1 v128) (result v128) (v128.or (local.get $0) (local.get $1)))
     7    (func (export "xor") (param $0 v128) (param $1 v128) (result v128) (v128.xor (local.get $0) (local.get $1)))
     8    (func (export "bitselect") (param $0 v128) (param $1 v128) (param $2 v128) (result v128)
     9      (v128.bitselect (local.get $0) (local.get $1) (local.get $2))
    10    )
    11    (func (export "andnot") (param $0 v128) (param $1 v128) (result v128) (v128.andnot (local.get $0) (local.get $1)))
    12  )
    13  
    14  ;; i32x4
    15  (assert_return (invoke "not" (v128.const i32x4 0 0 0 0))
    16                               (v128.const i32x4 -1 -1 -1 -1))
    17  (assert_return (invoke "not" (v128.const i32x4 -1 -1 -1 -1))
    18                               (v128.const i32x4 0 0 0 0))
    19  (assert_return (invoke "not" (v128.const i32x4 -1 0 -1 0))
    20                               (v128.const i32x4 0 -1 0 -1))
    21  (assert_return (invoke "not" (v128.const i32x4 0 -1 0 -1))
    22                               (v128.const i32x4 -1 0 -1 0))
    23  (assert_return (invoke "not" (v128.const i32x4 0x55555555 0x55555555 0x55555555 0x55555555))
    24                               (v128.const i32x4 0xAAAAAAAA 0xAAAAAAAA 0xAAAAAAAA 0xAAAAAAAA))
    25  (assert_return (invoke "not" (v128.const i32x4 3435973836 3435973836 3435973836 3435973836))
    26                               (v128.const i32x4 858993459 858993459 858993459 858993459))
    27  (assert_return (invoke "not" (v128.const i32x4 01_234_567_890 01_234_567_890 01_234_567_890 01_234_567_890))
    28                               (v128.const i32x4 3060399405 3060399405 3060399405 3060399405))
    29  (assert_return (invoke "not" (v128.const i32x4 0x0_1234_5678 0x0_1234_5678 0x0_1234_5678 0x0_1234_5678))
    30                               (v128.const i32x4 0xedcba987 0xedcba987 0xedcba987 0xedcba987))
    31  (assert_return (invoke "and" (v128.const i32x4 0 0 -1 -1)
    32                               (v128.const i32x4 0 -1 0 -1))
    33                               (v128.const i32x4 0 0 0 -1))
    34  (assert_return (invoke "and" (v128.const i32x4 0 0 0 0)
    35                               (v128.const i32x4 0 0 0 0))
    36                               (v128.const i32x4 0 0 0 0))
    37  (assert_return (invoke "and" (v128.const i32x4 0 0 0 0)
    38                               (v128.const i32x4 -1 -1 -1 -1))
    39                               (v128.const i32x4 0 0 0 0))
    40  (assert_return (invoke "and" (v128.const i32x4 0 0 0 0)
    41                               (v128.const i32x4 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF))
    42                               (v128.const i32x4 0 0 0 0))
    43  (assert_return (invoke "and" (v128.const i32x4 1 1 1 1)
    44                               (v128.const i32x4 1 1 1 1))
    45                               (v128.const i32x4 1 1 1 1))
    46  (assert_return (invoke "and" (v128.const i32x4 255 255 255 255)
    47                               (v128.const i32x4 85 85 85 85))
    48                               (v128.const i32x4 85 85 85 85))
    49  (assert_return (invoke "and" (v128.const i32x4 255 255 255 255)
    50                               (v128.const i32x4 128 128 128 128))
    51                               (v128.const i32x4 128 128 128 128))
    52  (assert_return (invoke "and" (v128.const i32x4 2863311530 2863311530 2863311530 2863311530)
    53                               (v128.const i32x4 10 128 5 165))
    54                               (v128.const i32x4 10 128 0 160))
    55  (assert_return (invoke "and" (v128.const i32x4 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF)
    56                               (v128.const i32x4 0x55555555 0x55555555 0x55555555 0x55555555))
    57                               (v128.const i32x4 0x55555555 0x55555555 0x55555555 0x55555555))
    58  (assert_return (invoke "and" (v128.const i32x4 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF)
    59                               (v128.const i32x4 0xAAAAAAAA 0xAAAAAAAA 0xAAAAAAAA 0xAAAAAAAA))
    60                               (v128.const i32x4 0xAAAAAAAA 0xAAAAAAAA 0xAAAAAAAA 0xAAAAAAAA))
    61  (assert_return (invoke "and" (v128.const i32x4 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF)
    62                               (v128.const i32x4 0x0 0x0 0x0 0x0))
    63                               (v128.const i32x4 0x0 0x0 0x0 0x0))
    64  (assert_return (invoke "and" (v128.const i32x4 0x55555555 0x55555555 0x55555555 0x55555555)
    65                               (v128.const i32x4 0x5555 0xFFFF 0x55FF 0x5FFF))
    66                               (v128.const i32x4 0x5555 0x5555 0x5555 0x5555))
    67  (assert_return (invoke "and" (v128.const i32x4 01_234_567_890 01_234_567_890 01_234_567_890 01_234_567_890)
    68                               (v128.const i32x4 01_234_567_890 01_234_567_890 01_234_567_890 01_234_567_890))
    69                               (v128.const i32x4 1234567890 1234567890 1234567890 1234567890))
    70  (assert_return (invoke "and" (v128.const i32x4 0x0_1234_5678 0x0_1234_5678 0x0_1234_5678 0x0_1234_5678)
    71                               (v128.const i32x4 0x0_90AB_cdef 0x0_90AB_cdef 0x0_90AB_cdef 0x0_90AB_cdef))
    72                               (v128.const i32x4 0x10204468 0x10204468 0x10204468 0x10204468))
    73  (assert_return (invoke "or" (v128.const i32x4 0 0 -1 -1)
    74                              (v128.const i32x4 0 -1 0 -1))
    75                              (v128.const i32x4 0 -1 -1 -1))
    76  (assert_return (invoke "or" (v128.const i32x4 0 0 0 0)
    77                              (v128.const i32x4 0 0 0 0))
    78                              (v128.const i32x4 0 0 0 0))
    79  (assert_return (invoke "or" (v128.const i32x4 0 0 0 0)
    80                              (v128.const i32x4 -1 -1 -1 -1))
    81                              (v128.const i32x4 -1 -1 -1 -1))
    82  (assert_return (invoke "or" (v128.const i32x4 0 0 0 0)
    83                              (v128.const i32x4 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF))
    84                              (v128.const i32x4 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF))
    85  (assert_return (invoke "or" (v128.const i32x4 1 1 1 1)
    86                              (v128.const i32x4 1 1 1 1))
    87                              (v128.const i32x4 1 1 1 1))
    88  (assert_return (invoke "or" (v128.const i32x4 255 255 255 255)
    89                              (v128.const i32x4 85 85 85 85))
    90                              (v128.const i32x4 255 255 255 255))
    91  (assert_return (invoke "or" (v128.const i32x4 255 255 255 255)
    92                              (v128.const i32x4 128 128 128 128))
    93                              (v128.const i32x4 255 255 255 255))
    94  (assert_return (invoke "or" (v128.const i32x4 2863311530 2863311530 2863311530 2863311530)
    95                              (v128.const i32x4 10 128 5 165))
    96                              (v128.const i32x4 2863311530 2863311530 2863311535 2863311535))
    97  (assert_return (invoke "or" (v128.const i32x4 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF)
    98                              (v128.const i32x4 0x55555555 0x55555555 0x55555555 0x55555555))
    99                              (v128.const i32x4 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF))
   100  (assert_return (invoke "or" (v128.const i32x4 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF)
   101                              (v128.const i32x4 0xAAAAAAAA 0xAAAAAAAA 0xAAAAAAAA 0xAAAAAAAA))
   102                              (v128.const i32x4 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF))
   103  (assert_return (invoke "or" (v128.const i32x4 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF)
   104                              (v128.const i32x4 0x0 0x0 0x0 0x0))
   105                              (v128.const i32x4 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF))
   106  (assert_return (invoke "or" (v128.const i32x4 0x55555555 0x55555555 0x55555555 0x55555555)
   107                              (v128.const i32x4 0x5555 0xFFFF 0x55FF 0x5FFF))
   108                              (v128.const i32x4 0x55555555 0x5555ffff 0x555555ff 0x55555fff))
   109  (assert_return (invoke "or" (v128.const i32x4 01_234_567_890 01_234_567_890 01_234_567_890 01_234_567_890)
   110                              (v128.const i32x4 01_234_567_890 01_234_567_890 01_234_567_890 01_234_567_890))
   111                              (v128.const i32x4 1234567890 1234567890 1234567890 1234567890))
   112  (assert_return (invoke "or" (v128.const i32x4 0x0_1234_5678 0x0_1234_5678 0x0_1234_5678 0x0_1234_5678)
   113                              (v128.const i32x4 0x0_90AB_cdef 0x0_90AB_cdef 0x0_90AB_cdef 0x0_90AB_cdef))
   114                              (v128.const i32x4 0x92bfdfff 0x92bfdfff 0x92bfdfff 0x92bfdfff))
   115  (assert_return (invoke "xor" (v128.const i32x4 0 0 -1 -1)
   116                               (v128.const i32x4 0 -1 0 -1))
   117                               (v128.const i32x4 0 -1 -1 0))
   118  (assert_return (invoke "xor" (v128.const i32x4 0 0 0 0)
   119                               (v128.const i32x4 0 0 0 0))
   120                               (v128.const i32x4 0 0 0 0))
   121  (assert_return (invoke "xor" (v128.const i32x4 0 0 0 0)
   122                               (v128.const i32x4 -1 -1 -1 -1))
   123                               (v128.const i32x4 -1 -1 -1 -1))
   124  (assert_return (invoke "xor" (v128.const i32x4 0 0 0 0)
   125                               (v128.const i32x4 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF))
   126                               (v128.const i32x4 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF))
   127  (assert_return (invoke "xor" (v128.const i32x4 1 1 1 1)
   128                               (v128.const i32x4 1 1 1 1))
   129                               (v128.const i32x4 0 0 0 0))
   130  (assert_return (invoke "xor" (v128.const i32x4 255 255 255 255)
   131                               (v128.const i32x4 85 85 85 85))
   132                               (v128.const i32x4 170 170 170 170))
   133  (assert_return (invoke "xor" (v128.const i32x4 255 255 255 255)
   134                               (v128.const i32x4 128 128 128 128))
   135                               (v128.const i32x4 127 127 127 127))
   136  (assert_return (invoke "xor" (v128.const i32x4 2863311530 2863311530 2863311530 2863311530)
   137                               (v128.const i32x4 10 128 5 165))
   138                               (v128.const i32x4 2863311520 2863311402 2863311535 2863311375))
   139  (assert_return (invoke "xor" (v128.const i32x4 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF)
   140                               (v128.const i32x4 0x55555555 0x55555555 0x55555555 0x55555555))
   141                               (v128.const i32x4 0xAAAAAAAA 0xAAAAAAAA 0xAAAAAAAA 0xAAAAAAAA))
   142  (assert_return (invoke "xor" (v128.const i32x4 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF)
   143                               (v128.const i32x4 0xAAAAAAAA 0xAAAAAAAA 0xAAAAAAAA 0xAAAAAAAA))
   144                               (v128.const i32x4 0x55555555 0x55555555 0x55555555 0x55555555))
   145  (assert_return (invoke "xor" (v128.const i32x4 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF)
   146                               (v128.const i32x4 0x0 0x0 0x0 0x0))
   147                               (v128.const i32x4 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF))
   148  (assert_return (invoke "xor" (v128.const i32x4 0x55555555 0x55555555 0x55555555 0x55555555)
   149                               (v128.const i32x4 0x5555 0xFFFF 0x55FF 0x5FFF))
   150                               (v128.const i32x4 0x55550000 0x5555AAAA 0x555500AA 0x55550AAA))
   151  (assert_return (invoke "xor" (v128.const i32x4 01_234_567_890 01_234_567_890 01_234_567_890 01_234_567_890)
   152                               (v128.const i32x4 01_234_567_890 01_234_567_890 01_234_567_890 01_234_567_890))
   153                               (v128.const i32x4 0 0 0 0))
   154  (assert_return (invoke "xor" (v128.const i32x4 0x0_1234_5678 0x0_1234_5678 0x0_1234_5678 0x0_1234_5678)
   155                               (v128.const i32x4 0x0_90AB_cdef 0x0_90AB_cdef 0x0_90AB_cdef 0x0_90AB_cdef))
   156                               (v128.const i32x4 0x829f9b97 0x829f9b97 0x829f9b97 0x829f9b97))
   157  (assert_return (invoke "bitselect" (v128.const i32x4 0xAAAAAAAA 0xAAAAAAAA 0xAAAAAAAA 0xAAAAAAAA)
   158                                     (v128.const i32x4 0xBBBBBBBB 0xBBBBBBBB 0xBBBBBBBB 0xBBBBBBBB)
   159                                     (v128.const i32x4 0x00112345 0xF00FFFFF 0x10112021 0xBBAABBAA))
   160                                     (v128.const i32x4 0xBBAABABA 0xABBAAAAA 0xABAABBBA 0xAABBAABB))
   161  (assert_return (invoke "bitselect" (v128.const i32x4 0xAAAAAAAA 0xAAAAAAAA 0xAAAAAAAA 0xAAAAAAAA)
   162                                     (v128.const i32x4 0xBBBBBBBB 0xBBBBBBBB 0xBBBBBBBB 0xBBBBBBBB)
   163                                     (v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000))
   164                                     (v128.const i32x4 0xBBBBBBBB 0xBBBBBBBB 0xBBBBBBBB 0xBBBBBBBB))
   165  (assert_return (invoke "bitselect" (v128.const i32x4 0xAAAAAAAA 0xAAAAAAAA 0xAAAAAAAA 0xAAAAAAAA)
   166                                     (v128.const i32x4 0xBBBBBBBB 0xBBBBBBBB 0xBBBBBBBB 0xBBBBBBBB)
   167                                     (v128.const i32x4 0x11111111 0x11111111 0x11111111 0x11111111))
   168                                     (v128.const i32x4 0xAAAAAAAA 0xAAAAAAAA 0xAAAAAAAA 0xAAAAAAAA))
   169  (assert_return (invoke "bitselect" (v128.const i32x4 0xAAAAAAAA 0xAAAAAAAA 0xAAAAAAAA 0xAAAAAAAA)
   170                                     (v128.const i32x4 0xBBBBBBBB 0xBBBBBBBB 0xBBBBBBBB 0xBBBBBBBB)
   171                                     (v128.const i32x4 0x01234567 0x89ABCDEF 0xFEDCBA98 0x76543210))
   172                                     (v128.const i32x4 0xBABABABA 0xBABABABA 0xABABABAB 0xABABABAB))
   173  (assert_return (invoke "bitselect" (v128.const i32x4 0xAAAAAAAA 0xAAAAAAAA 0xAAAAAAAA 0xAAAAAAAA)
   174                                     (v128.const i32x4 0x55555555 0x55555555 0x55555555 0x55555555)
   175                                     (v128.const i32x4 0x01234567 0x89ABCDEF 0xFEDCBA98 0x76543210))
   176                                     (v128.const i32x4 0x54761032 0xDCFE98BA 0xAB89EFCD 0x23016745))
   177  (assert_return (invoke "bitselect" (v128.const i32x4 0xAAAAAAAA 0xAAAAAAAA 0xAAAAAAAA 0xAAAAAAAA)
   178                                     (v128.const i32x4 0x55555555 0x55555555 0x55555555 0x55555555)
   179                                     (v128.const i32x4 0x55555555 0xAAAAAAAA 0x00000000 0xFFFFFFFF))
   180                                     (v128.const i32x4 0x00000000 0xFFFFFFFF 0x55555555 0xAAAAAAAA))
   181  (assert_return (invoke "bitselect" (v128.const i32x4 01_234_567_890 01_234_567_890 01_234_567_890 01_234_567_890)
   182                                     (v128.const i32x4 03_060_399_406 03_060_399_406 03_060_399_406 03_060_399_406)
   183                                     (v128.const i32x4 0xcdefcdef 0xcdefcdef 0xcdefcdef 0xcdefcdef))
   184                                     (v128.const i32x4 2072391874 2072391874 2072391874 2072391874))
   185  (assert_return (invoke "bitselect" (v128.const i32x4 0x0_1234_5678 0x0_1234_5678 0x0_1234_5678 0x0_1234_5678)
   186                                     (v128.const i32x4 0x0_90AB_cdef 0x0_90AB_cdef 0x0_90AB_cdef 0x0_90AB_cdef)
   187                                     (v128.const i32x4 0xcdefcdef 0xcdefcdef 0xcdefcdef 0xcdefcdef))
   188                                     (v128.const i32x4 0x10244468 0x10244468 0x10244468 0x10244468))
   189  (assert_return (invoke "andnot" (v128.const i32x4 0 0 -1 -1)
   190                                  (v128.const i32x4 0 -1 0 -1))
   191                                  (v128.const i32x4 0 0 -1 0))
   192  (assert_return (invoke "andnot" (v128.const i32x4 0 0 0 0)
   193                                  (v128.const i32x4 0 0 0 0))
   194                                  (v128.const i32x4 0 0 0 0))
   195  (assert_return (invoke "andnot" (v128.const i32x4 0 0 0 0)
   196                                  (v128.const i32x4 -1 -1 -1 -1))
   197                                  (v128.const i32x4 0 0 0 0))
   198  (assert_return (invoke "andnot" (v128.const i32x4 0 0 0 0)
   199                                  (v128.const i32x4 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF))
   200                                  (v128.const i32x4 0 0 0 0))
   201  (assert_return (invoke "andnot" (v128.const i32x4 1 1 1 1)
   202                                  (v128.const i32x4 1 1 1 1))
   203                                  (v128.const i32x4 0 0 0 0))
   204  (assert_return (invoke "andnot" (v128.const i32x4 255 255 255 255)
   205                                  (v128.const i32x4 85 85 85 85))
   206                                  (v128.const i32x4 170 170 170 170))
   207  (assert_return (invoke "andnot" (v128.const i32x4 255 255 255 255)
   208                                  (v128.const i32x4 128 128 128 128))
   209                                  (v128.const i32x4 127 127 127 127))
   210  (assert_return (invoke "andnot" (v128.const i32x4 2863311530 2863311530 2863311530 2863311530)
   211                                  (v128.const i32x4 10 128 5 165))
   212                                  (v128.const i32x4 2863311520 2863311402 2863311530 2863311370))
   213  (assert_return (invoke "andnot" (v128.const i32x4 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF)
   214                                  (v128.const i32x4 0x55555555 0x55555555 0x55555555 0x55555555))
   215                                  (v128.const i32x4 0xAAAAAAAA 0xAAAAAAAA 0xAAAAAAAA 0xAAAAAAAA))
   216  (assert_return (invoke "andnot" (v128.const i32x4 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF)
   217                                  (v128.const i32x4 0xAAAAAAAA 0xAAAAAAAA 0xAAAAAAAA 0xAAAAAAAA))
   218                                  (v128.const i32x4 0x55555555 0x55555555 0x55555555 0x55555555))
   219  (assert_return (invoke "andnot" (v128.const i32x4 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF)
   220                                  (v128.const i32x4 0x0 0x0 0x0 0x0))
   221                                  (v128.const i32x4 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF))
   222  (assert_return (invoke "andnot" (v128.const i32x4 0x55555555 0x55555555 0x55555555 0x55555555)
   223                                  (v128.const i32x4 0x5555 0xFFFF 0x55FF 0x5FFF))
   224                                  (v128.const i32x4 0x55550000 0x55550000 0x55550000 0x55550000))
   225  (assert_return (invoke "andnot" (v128.const i32x4 01_234_567_890 01_234_567_890 01_234_567_890 01_234_567_890)
   226                                  (v128.const i32x4 01_234_567_890 01_234_567_890 01_234_567_890 01_234_567_890))
   227                                  (v128.const i32x4 0 0 0 0))
   228  (assert_return (invoke "andnot" (v128.const i32x4 0x0_1234_5678 0x0_1234_5678 0x0_1234_5678 0x0_1234_5678)
   229                                  (v128.const i32x4 0x0_90AB_cdef 0x0_90AB_cdef 0x0_90AB_cdef 0x0_90AB_cdef))
   230                                  (v128.const i32x4 0x02141210 0x02141210 0x02141210 0x02141210))
   231  
   232  ;; for float special data [e.g. -nan nan -inf inf]
   233  (assert_return (invoke "not" (v128.const f32x4 -nan -nan -nan -nan))
   234                               (v128.const f32x4 5.87747e-39 5.87747e-39 5.87747e-39 5.87747e-39))
   235  (assert_return (invoke "not" (v128.const f32x4 nan nan nan nan))
   236                               (v128.const f32x4 -5.87747e-39 -5.87747e-39 -5.87747e-39 -5.87747e-39))
   237  (assert_return (invoke "not" (v128.const f32x4 -inf -inf -inf -inf))
   238                               (v128.const i32x4 0x007fffff 0x007fffff 0x007fffff 0x007fffff))
   239  (assert_return (invoke "not" (v128.const f32x4 inf inf inf inf))
   240                               (v128.const i32x4 0x807fffff 0x807fffff 0x807fffff 0x807fffff))
   241  (assert_return (invoke "and" (v128.const f32x4 -nan -nan -nan -nan)
   242                               (v128.const f32x4 -nan -nan -nan -nan))
   243                               (v128.const i32x4 0xffc00000 0xffc00000 0xffc00000 0xffc00000))
   244  (assert_return (invoke "and" (v128.const f32x4 -nan -nan -nan -nan)
   245                               (v128.const f32x4 nan nan nan nan))
   246                               (v128.const f32x4 nan nan nan nan))
   247  (assert_return (invoke "and" (v128.const f32x4 -nan -nan -nan -nan)
   248                               (v128.const f32x4 -inf -inf -inf -inf))
   249                               (v128.const f32x4 -inf -inf -inf -inf))
   250  (assert_return (invoke "and" (v128.const f32x4 -nan -nan -nan -nan)
   251                               (v128.const f32x4 inf inf inf inf))
   252                               (v128.const f32x4 inf inf inf inf))
   253  (assert_return (invoke "and" (v128.const f32x4 nan nan nan nan)
   254                               (v128.const f32x4 nan nan nan nan))
   255                               (v128.const f32x4 nan nan nan nan))
   256  (assert_return (invoke "and" (v128.const f32x4 nan nan nan nan)
   257                               (v128.const f32x4 -inf -inf -inf -inf))
   258                               (v128.const f32x4 inf inf inf inf))
   259  (assert_return (invoke "and" (v128.const f32x4 nan nan nan nan)
   260                               (v128.const f32x4 inf inf inf inf))
   261                               (v128.const f32x4 inf inf inf inf))
   262  (assert_return (invoke "and" (v128.const f32x4 -inf -inf -inf -inf)
   263                               (v128.const f32x4 -inf -inf -inf -inf))
   264                               (v128.const f32x4 -inf -inf -inf -inf))
   265  (assert_return (invoke "and" (v128.const f32x4 -inf -inf -inf -inf)
   266                               (v128.const f32x4 inf inf inf inf))
   267                               (v128.const f32x4 inf inf inf inf))
   268  (assert_return (invoke "and" (v128.const f32x4 inf inf inf inf)
   269                               (v128.const f32x4 inf inf inf inf))
   270                               (v128.const f32x4 inf inf inf inf))
   271  (assert_return (invoke "or" (v128.const f32x4 -nan -nan -nan -nan)
   272                              (v128.const f32x4 -nan -nan -nan -nan))
   273                              (v128.const i32x4 0xffc00000 0xffc00000 0xffc00000 0xffc00000))
   274  (assert_return (invoke "or" (v128.const f32x4 -nan -nan -nan -nan)
   275                              (v128.const f32x4 nan nan nan nan))
   276                              (v128.const i32x4 0xffc00000 0xffc00000 0xffc00000 0xffc00000))
   277  (assert_return (invoke "or" (v128.const f32x4 -nan -nan -nan -nan)
   278                              (v128.const f32x4 -inf -inf -inf -inf))
   279                              (v128.const i32x4 0xffc00000 0xffc00000 0xffc00000 0xffc00000))
   280  (assert_return (invoke "or" (v128.const f32x4 -nan -nan -nan -nan)
   281                              (v128.const f32x4 inf inf inf inf))
   282                              (v128.const i32x4 0xffc00000 0xffc00000 0xffc00000 0xffc00000))
   283  (assert_return (invoke "or" (v128.const f32x4 nan nan nan nan)
   284                              (v128.const f32x4 nan nan nan nan))
   285                              (v128.const f32x4 nan nan nan nan))
   286  (assert_return (invoke "or" (v128.const f32x4 nan nan nan nan)
   287                              (v128.const f32x4 -inf -inf -inf -inf))
   288                              (v128.const i32x4 0xffc00000 0xffc00000 0xffc00000 0xffc00000))
   289  (assert_return (invoke "or" (v128.const f32x4 nan nan nan nan)
   290                              (v128.const f32x4 inf inf inf inf))
   291                              (v128.const f32x4 nan nan nan nan))
   292  (assert_return (invoke "or" (v128.const f32x4 -inf -inf -inf -inf)
   293                              (v128.const f32x4 -inf -inf -inf -inf))
   294                              (v128.const f32x4 -inf -inf -inf -inf))
   295  (assert_return (invoke "or" (v128.const f32x4 -inf -inf -inf -inf)
   296                              (v128.const f32x4 inf inf inf inf))
   297                              (v128.const f32x4 -inf -inf -inf -inf))
   298  (assert_return (invoke "or" (v128.const f32x4 inf inf inf inf)
   299                              (v128.const f32x4 inf inf inf inf))
   300                              (v128.const f32x4 inf inf inf inf))
   301  (assert_return (invoke "xor" (v128.const f32x4 -nan -nan -nan -nan)
   302                               (v128.const f32x4 -nan -nan -nan -nan))
   303                               (v128.const f32x4 0 0 0 0))
   304  (assert_return (invoke "xor" (v128.const f32x4 -nan -nan -nan -nan)
   305                               (v128.const f32x4 nan nan nan nan))
   306                               (v128.const f32x4 -0 -0 -0 -0))
   307  (assert_return (invoke "xor" (v128.const f32x4 -nan -nan -nan -nan)
   308                               (v128.const f32x4 -inf -inf -inf -inf))
   309                               (v128.const i32x4 0x00400000 0x00400000 0x00400000 0x00400000))
   310  (assert_return (invoke "xor" (v128.const f32x4 -nan -nan -nan -nan)
   311                               (v128.const f32x4 inf inf inf inf))
   312                               (v128.const i32x4 0x80400000 0x80400000 0x80400000 0x80400000))
   313  (assert_return (invoke "xor" (v128.const f32x4 nan nan nan nan)
   314                               (v128.const f32x4 nan nan nan nan))
   315                               (v128.const f32x4 0 0 0 0))
   316  (assert_return (invoke "xor" (v128.const f32x4 nan nan nan nan)
   317                               (v128.const f32x4 -inf -inf -inf -inf))
   318                               (v128.const i32x4 0x80400000 0x80400000 0x80400000 0x80400000))
   319  (assert_return (invoke "xor" (v128.const f32x4 nan nan nan nan)
   320                               (v128.const f32x4 inf inf inf inf))
   321                               (v128.const i32x4 0x00400000 0x00400000 0x00400000 0x00400000))
   322  (assert_return (invoke "xor" (v128.const f32x4 -inf -inf -inf -inf)
   323                               (v128.const f32x4 -inf -inf -inf -inf))
   324                               (v128.const f32x4 0 0 0 0))
   325  (assert_return (invoke "xor" (v128.const f32x4 -inf -inf -inf -inf)
   326                               (v128.const f32x4 inf inf inf inf))
   327                               (v128.const i32x4 0x80000000 0x80000000 0x80000000 0x80000000))
   328  (assert_return (invoke "xor" (v128.const f32x4 inf inf inf inf)
   329                               (v128.const f32x4 inf inf inf inf))
   330                               (v128.const f32x4 0 0 0 0))
   331  (assert_return (invoke "bitselect" (v128.const f32x4 -nan -nan -nan -nan)
   332                                     (v128.const f32x4 -nan -nan -nan -nan)
   333                                     (v128.const f32x4 0xA5A5A5A5 0xA5A5A5A5 0xA5A5A5A5 0xA5A5A5A5))
   334                                     (v128.const i32x4 0xffc00000 0xffc00000 0xffc00000 0xffc00000))
   335  (assert_return (invoke "bitselect" (v128.const f32x4 -nan -nan -nan -nan)
   336                                     (v128.const f32x4 nan nan nan nan)
   337                                     (v128.const f32x4 0xA5A5A5A5 0xA5A5A5A5 0xA5A5A5A5 0xA5A5A5A5))
   338                                     (v128.const f32x4 nan nan nan nan))
   339  (assert_return (invoke "bitselect" (v128.const f32x4 -nan -nan -nan -nan)
   340                                     (v128.const f32x4 -inf -inf -inf -inf)
   341                                     (v128.const f32x4 0xA5A5A5A5 0xA5A5A5A5 0xA5A5A5A5 0xA5A5A5A5))
   342                                     (v128.const f32x4 -inf -inf -inf -inf))
   343  (assert_return (invoke "bitselect" (v128.const f32x4 -nan -nan -nan -nan)
   344                                     (v128.const f32x4 inf inf inf inf)
   345                                     (v128.const f32x4 0xA5A5A5A5 0xA5A5A5A5 0xA5A5A5A5 0xA5A5A5A5))
   346                                     (v128.const f32x4 inf inf inf inf))
   347  (assert_return (invoke "bitselect" (v128.const f32x4 nan nan nan nan)
   348                                     (v128.const f32x4 nan nan nan nan)
   349                                     (v128.const f32x4 0xA5A5A5A5 0xA5A5A5A5 0xA5A5A5A5 0xA5A5A5A5))
   350                                     (v128.const f32x4 nan nan nan nan))
   351  (assert_return (invoke "bitselect" (v128.const f32x4 nan nan nan nan)
   352                                     (v128.const f32x4 -inf -inf -inf -inf)
   353                                     (v128.const f32x4 0xA5A5A5A5 0xA5A5A5A5 0xA5A5A5A5 0xA5A5A5A5))
   354                                     (v128.const f32x4 -inf -inf -inf -inf))
   355  (assert_return (invoke "bitselect" (v128.const f32x4 nan nan nan nan)
   356                                     (v128.const f32x4 inf inf inf inf)
   357                                     (v128.const f32x4 0xA5A5A5A5 0xA5A5A5A5 0xA5A5A5A5 0xA5A5A5A5))
   358                                     (v128.const f32x4 inf inf inf inf))
   359  (assert_return (invoke "bitselect" (v128.const f32x4 -inf -inf -inf -inf)
   360                                     (v128.const f32x4 -inf -inf -inf -inf)
   361                                     (v128.const f32x4 0xA5A5A5A5 0xA5A5A5A5 0xA5A5A5A5 0xA5A5A5A5))
   362                                     (v128.const f32x4 -inf -inf -inf -inf))
   363  (assert_return (invoke "bitselect" (v128.const f32x4 -inf -inf -inf -inf)
   364                                     (v128.const f32x4 inf inf inf inf)
   365                                     (v128.const f32x4 0xA5A5A5A5 0xA5A5A5A5 0xA5A5A5A5 0xA5A5A5A5))
   366                                     (v128.const f32x4 inf inf inf inf))
   367  (assert_return (invoke "bitselect" (v128.const f32x4 inf inf inf inf)
   368                                     (v128.const f32x4 inf inf inf inf)
   369                                     (v128.const f32x4 0xA5A5A5A5 0xA5A5A5A5 0xA5A5A5A5 0xA5A5A5A5))
   370                                     (v128.const f32x4 inf inf inf inf))
   371  (assert_return (invoke "andnot" (v128.const f32x4 -nan -nan -nan -nan)
   372                                  (v128.const f32x4 -nan -nan -nan -nan))
   373                                  (v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000))
   374  (assert_return (invoke "andnot" (v128.const f32x4 -nan -nan -nan -nan)
   375                                  (v128.const f32x4 nan nan nan nan))
   376                                  (v128.const f32x4 -0 -0 -0 -0))
   377  (assert_return (invoke "andnot" (v128.const f32x4 -nan -nan -nan -nan)
   378                                  (v128.const f32x4 -inf -inf -inf -inf))
   379                                  (v128.const i32x4 0x00400000 0x00400000 0x00400000 0x00400000))
   380  (assert_return (invoke "andnot" (v128.const f32x4 -nan -nan -nan -nan)
   381                                  (v128.const f32x4 inf inf inf inf))
   382                                  (v128.const i32x4 0x80400000 0x80400000 0x80400000 0x80400000))
   383  (assert_return (invoke "andnot" (v128.const f32x4 nan nan nan nan)
   384                                  (v128.const f32x4 nan nan nan nan))
   385                                  (v128.const f32x4 0x00000000 0x00000000 0x00000000 0x00000000))
   386  (assert_return (invoke "andnot" (v128.const f32x4 nan nan nan nan)
   387                                  (v128.const f32x4 -inf -inf -inf -inf))
   388                                  (v128.const i32x4 0x00400000 0x00400000 0x00400000 0x00400000))
   389  (assert_return (invoke "andnot" (v128.const f32x4 nan nan nan nan)
   390                                  (v128.const f32x4 inf inf inf inf))
   391                                  (v128.const i32x4 0x00400000 0x00400000 0x00400000 0x00400000))
   392  (assert_return (invoke "andnot" (v128.const f32x4 -inf -inf -inf -inf)
   393                                  (v128.const f32x4 -inf -inf -inf -inf))
   394                                  (v128.const f32x4 0x00000000 0x00000000 0x00000000 0x00000000))
   395  (assert_return (invoke "andnot" (v128.const f32x4 -inf -inf -inf -inf)
   396                                  (v128.const f32x4 inf inf inf inf))
   397                                  (v128.const i32x4 0x80000000 0x80000000 0x80000000 0x80000000))
   398  (assert_return (invoke "andnot" (v128.const f32x4 inf inf inf inf)
   399                                  (v128.const f32x4 inf inf inf inf))
   400                                  (v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000))
   401  
   402  ;; Type check
   403  
   404  ;; not
   405  (assert_invalid (module (func (result v128) (v128.not (i32.const 0)))) "type mismatch")
   406  ;; and
   407  (assert_invalid (module (func (result v128) (v128.and (i32.const 0) (v128.const i32x4 0 0 0 0)))) "type mismatch")
   408  (assert_invalid (module (func (result v128) (v128.and (v128.const i32x4 0 0 0 0) (i32.const 0)))) "type mismatch")
   409  (assert_invalid (module (func (result v128) (v128.and (i32.const 0) (i32.const 0)))) "type mismatch")
   410  ;; or
   411  (assert_invalid (module (func (result v128) (v128.or (i32.const 0) (v128.const i32x4 0 0 0 0)))) "type mismatch")
   412  (assert_invalid (module (func (result v128) (v128.or (v128.const i32x4 0 0 0 0) (i32.const 0)))) "type mismatch")
   413  (assert_invalid (module (func (result v128) (v128.or (i32.const 0) (i32.const 0)))) "type mismatch")
   414  ;; xor
   415  (assert_invalid (module (func (result v128) (v128.xor (i32.const 0) (v128.const i32x4 0 0 0 0)))) "type mismatch")
   416  (assert_invalid (module (func (result v128) (v128.xor (v128.const i32x4 0 0 0 0) (i32.const 0)))) "type mismatch")
   417  (assert_invalid (module (func (result v128) (v128.xor (i32.const 0) (i32.const 0)))) "type mismatch")
   418  ;; bitselect
   419  (assert_invalid (module (func (result v128) (v128.bitselect (i32.const 0) (v128.const i32x4 0 0 0 0) (v128.const i32x4 0 0 0 0)))) "type mismatch")
   420  (assert_invalid (module (func (result v128) (v128.bitselect (v128.const i32x4 0 0 0 0) (v128.const i32x4 0 0 0 0) (i32.const 0)))) "type mismatch")
   421  (assert_invalid (module (func (result v128) (v128.bitselect (i32.const 0) (i32.const 0) (i32.const 0)))) "type mismatch")
   422  ;; andnot
   423  (assert_invalid (module (func (result v128) (v128.andnot (i32.const 0) (v128.const i32x4 0 0 0 0)))) "type mismatch")
   424  (assert_invalid (module (func (result v128) (v128.andnot (v128.const i32x4 0 0 0 0) (i32.const 0)))) "type mismatch")
   425  (assert_invalid (module (func (result v128) (v128.andnot (i32.const 0) (i32.const 0)))) "type mismatch")
   426  
   427  ;; Combination
   428  
   429  (module (memory 1)
   430    (func (export "v128.not-in-block")
   431      (block
   432        (drop
   433          (block (result v128)
   434            (v128.not
   435              (block (result v128) (v128.load (i32.const 0)))
   436            )
   437          )
   438        )
   439      )
   440    )
   441    (func (export "v128.and-in-block")
   442      (block
   443        (drop
   444          (block (result v128)
   445            (v128.and
   446              (block (result v128) (v128.load (i32.const 0)))
   447              (block (result v128) (v128.load (i32.const 1)))
   448            )
   449          )
   450        )
   451      )
   452    )
   453    (func (export "v128.or-in-block")
   454      (block
   455        (drop
   456          (block (result v128)
   457            (v128.or
   458              (block (result v128) (v128.load (i32.const 0)))
   459              (block (result v128) (v128.load (i32.const 1)))
   460            )
   461          )
   462        )
   463      )
   464    )
   465    (func (export "v128.xor-in-block")
   466      (block
   467        (drop
   468          (block (result v128)
   469            (v128.xor
   470              (block (result v128) (v128.load (i32.const 0)))
   471              (block (result v128) (v128.load (i32.const 1)))
   472            )
   473          )
   474        )
   475      )
   476    )
   477    (func (export "v128.bitselect-in-block")
   478      (block
   479        (drop
   480          (block (result v128)
   481            (v128.bitselect
   482              (block (result v128) (v128.load (i32.const 0)))
   483              (block (result v128) (v128.load (i32.const 1)))
   484              (block (result v128) (v128.load (i32.const 2)))
   485            )
   486          )
   487        )
   488      )
   489    )
   490    (func (export "v128.andnot-in-block")
   491      (block
   492        (drop
   493          (block (result v128)
   494            (v128.andnot
   495              (block (result v128) (v128.load (i32.const 0)))
   496              (block (result v128) (v128.load (i32.const 1)))
   497            )
   498          )
   499        )
   500      )
   501    )
   502    (func (export "nested-v128.not")
   503      (drop
   504        (v128.not
   505          (v128.not
   506            (v128.not
   507              (v128.load (i32.const 0))
   508            )
   509          )
   510        )
   511      )
   512    )
   513    (func (export "nested-v128.and")
   514      (drop
   515        (v128.and
   516          (v128.and
   517            (v128.and
   518              (v128.load (i32.const 0))
   519              (v128.load (i32.const 1))
   520            )
   521            (v128.and
   522              (v128.load (i32.const 0))
   523              (v128.load (i32.const 1))
   524            )
   525          )
   526          (v128.and
   527            (v128.and
   528              (v128.load (i32.const 0))
   529              (v128.load (i32.const 1))
   530            )
   531            (v128.and
   532              (v128.load (i32.const 0))
   533              (v128.load (i32.const 1))
   534            )
   535          )
   536        )
   537      )
   538    )
   539    (func (export "nested-v128.or")
   540      (drop
   541        (v128.or
   542          (v128.or
   543            (v128.or
   544              (v128.load (i32.const 0))
   545              (v128.load (i32.const 1))
   546            )
   547            (v128.or
   548              (v128.load (i32.const 0))
   549              (v128.load (i32.const 1))
   550            )
   551          )
   552          (v128.or
   553            (v128.or
   554              (v128.load (i32.const 0))
   555              (v128.load (i32.const 1))
   556            )
   557            (v128.or
   558              (v128.load (i32.const 0))
   559              (v128.load (i32.const 1))
   560            )
   561          )
   562        )
   563      )
   564    )
   565    (func (export "nested-v128.xor")
   566      (drop
   567        (v128.xor
   568          (v128.xor
   569            (v128.xor
   570              (v128.load (i32.const 0))
   571              (v128.load (i32.const 1))
   572            )
   573            (v128.xor
   574              (v128.load (i32.const 0))
   575              (v128.load (i32.const 1))
   576            )
   577          )
   578          (v128.xor
   579            (v128.xor
   580              (v128.load (i32.const 0))
   581              (v128.load (i32.const 1))
   582            )
   583            (v128.xor
   584              (v128.load (i32.const 0))
   585              (v128.load (i32.const 1))
   586            )
   587          )
   588        )
   589      )
   590    )
   591    (func (export "nested-v128.bitselect")
   592      (drop
   593        (v128.bitselect
   594          (v128.bitselect
   595            (v128.bitselect
   596              (v128.load (i32.const 0))
   597              (v128.load (i32.const 1))
   598              (v128.load (i32.const 2))
   599            )
   600            (v128.bitselect
   601              (v128.load (i32.const 0))
   602              (v128.load (i32.const 1))
   603              (v128.load (i32.const 2))
   604            )
   605            (v128.bitselect
   606              (v128.load (i32.const 0))
   607              (v128.load (i32.const 1))
   608              (v128.load (i32.const 2))
   609            )
   610          )
   611          (v128.bitselect
   612            (v128.bitselect
   613              (v128.load (i32.const 0))
   614              (v128.load (i32.const 1))
   615              (v128.load (i32.const 2))
   616            )
   617            (v128.bitselect
   618              (v128.load (i32.const 0))
   619              (v128.load (i32.const 1))
   620              (v128.load (i32.const 2))
   621            )
   622            (v128.bitselect
   623              (v128.load (i32.const 0))
   624              (v128.load (i32.const 1))
   625              (v128.load (i32.const 2))
   626            )
   627          )
   628          (v128.bitselect
   629            (v128.bitselect
   630              (v128.load (i32.const 0))
   631              (v128.load (i32.const 1))
   632              (v128.load (i32.const 2))
   633            )
   634            (v128.bitselect
   635              (v128.load (i32.const 0))
   636              (v128.load (i32.const 1))
   637              (v128.load (i32.const 2))
   638            )
   639            (v128.bitselect
   640              (v128.load (i32.const 0))
   641              (v128.load (i32.const 1))
   642              (v128.load (i32.const 2))
   643            )
   644          )
   645        )
   646      )
   647    )
   648    (func (export "nested-v128.andnot")
   649      (drop
   650        (v128.andnot
   651          (v128.andnot
   652            (v128.andnot
   653              (v128.load (i32.const 0))
   654              (v128.load (i32.const 1))
   655            )
   656            (v128.andnot
   657              (v128.load (i32.const 0))
   658              (v128.load (i32.const 1))
   659            )
   660          )
   661          (v128.andnot
   662            (v128.andnot
   663              (v128.load (i32.const 0))
   664              (v128.load (i32.const 1))
   665            )
   666            (v128.andnot
   667              (v128.load (i32.const 0))
   668              (v128.load (i32.const 1))
   669            )
   670          )
   671        )
   672      )
   673    )
   674    (func (export "as-param")
   675      (drop
   676        (v128.or
   677          (v128.and
   678            (v128.not
   679              (v128.load (i32.const 0))
   680            )
   681            (v128.not
   682              (v128.load (i32.const 1))
   683            )
   684          )
   685          (v128.xor
   686            (v128.bitselect
   687              (v128.load (i32.const 0))
   688              (v128.load (i32.const 1))
   689              (v128.load (i32.const 2))
   690            )
   691            (v128.andnot
   692              (v128.load (i32.const 0))
   693              (v128.load (i32.const 1))
   694            )
   695          )
   696        )
   697      )
   698    )
   699  )
   700  (assert_return (invoke "v128.not-in-block"))
   701  (assert_return (invoke "v128.and-in-block"))
   702  (assert_return (invoke "v128.or-in-block"))
   703  (assert_return (invoke "v128.xor-in-block"))
   704  (assert_return (invoke "v128.bitselect-in-block"))
   705  (assert_return (invoke "v128.andnot-in-block"))
   706  (assert_return (invoke "nested-v128.not"))
   707  (assert_return (invoke "nested-v128.and"))
   708  (assert_return (invoke "nested-v128.or"))
   709  (assert_return (invoke "nested-v128.xor"))
   710  (assert_return (invoke "nested-v128.bitselect"))
   711  (assert_return (invoke "nested-v128.andnot"))
   712  (assert_return (invoke "as-param"))
   713  
   714  
   715  ;; Test operation with empty argument
   716  
   717  (assert_invalid
   718    (module
   719      (func $v128.not-arg-empty (result v128)
   720        (v128.not)
   721      )
   722    )
   723    "type mismatch"
   724  )
   725  (assert_invalid
   726    (module
   727      (func $v128.and-1st-arg-empty (result v128)
   728        (v128.and (v128.const i32x4 0 0 0 0))
   729      )
   730    )
   731    "type mismatch"
   732  )
   733  (assert_invalid
   734    (module
   735      (func $v128.and-arg-empty (result v128)
   736        (v128.and)
   737      )
   738    )
   739    "type mismatch"
   740  )
   741  (assert_invalid
   742    (module
   743      (func $v128.or-1st-arg-empty (result v128)
   744        (v128.or (v128.const i32x4 0 0 0 0))
   745      )
   746    )
   747    "type mismatch"
   748  )
   749  (assert_invalid
   750    (module
   751      (func $v128.or-arg-empty (result v128)
   752        (v128.or)
   753      )
   754    )
   755    "type mismatch"
   756  )
   757  (assert_invalid
   758    (module
   759      (func $v128.xor-1st-arg-empty (result v128)
   760        (v128.xor (v128.const i32x4 0 0 0 0))
   761      )
   762    )
   763    "type mismatch"
   764  )
   765  (assert_invalid
   766    (module
   767      (func $v128.xor-arg-empty (result v128)
   768        (v128.xor)
   769      )
   770    )
   771    "type mismatch"
   772  )
   773  (assert_invalid
   774    (module
   775      (func $v128.andnot-1st-arg-empty (result v128)
   776        (v128.andnot (v128.const i32x4 0 0 0 0))
   777      )
   778    )
   779    "type mismatch"
   780  )
   781  (assert_invalid
   782    (module
   783      (func $v128.andnot-arg-empty (result v128)
   784        (v128.andnot)
   785      )
   786    )
   787    "type mismatch"
   788  )
   789  (assert_invalid
   790    (module
   791      (func $v128.bitselect-1st-arg-empty (result v128)
   792        (v128.bitselect (v128.const i32x4 0 0 0 0) (v128.const i32x4 0 0 0 0))
   793      )
   794    )
   795    "type mismatch"
   796  )
   797  (assert_invalid
   798    (module
   799      (func $v128.bitselect-two-args-empty (result v128)
   800        (v128.bitselect (v128.const i32x4 0 0 0 0))
   801      )
   802    )
   803    "type mismatch"
   804  )
   805  (assert_invalid
   806    (module
   807      (func $v128.bitselect-arg-empty (result v128)
   808        (v128.bitselect)
   809      )
   810    )
   811    "type mismatch"
   812  )