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

     1  ;; Test all the boolean operators on major boundary values and all special values.
     2  
     3  (module
     4    (func (export "i8x16.any_true") (param $0 v128) (result i32) (v128.any_true (local.get $0)))
     5    (func (export "i8x16.all_true") (param $0 v128) (result i32) (i8x16.all_true (local.get $0)))
     6    (func (export "i8x16.bitmask") (param $0 v128) (result i32) (i8x16.bitmask (local.get $0)))
     7  
     8    (func (export "i16x8.any_true") (param $0 v128) (result i32) (v128.any_true (local.get $0)))
     9    (func (export "i16x8.all_true") (param $0 v128) (result i32) (i16x8.all_true (local.get $0)))
    10    (func (export "i16x8.bitmask") (param $0 v128) (result i32) (i16x8.bitmask (local.get $0)))
    11  
    12    (func (export "i32x4.any_true") (param $0 v128) (result i32) (v128.any_true (local.get $0)))
    13    (func (export "i32x4.all_true") (param $0 v128) (result i32) (i32x4.all_true (local.get $0)))
    14    (func (export "i32x4.bitmask") (param $0 v128) (result i32) (i32x4.bitmask (local.get $0)))
    15  
    16    (func (export "i64x2.all_true") (param $0 v128) (result i32) (i64x2.all_true (local.get $0)))
    17    (func (export "i64x2.bitmask") (param $0 v128) (result i32) (i64x2.bitmask (local.get $0)))
    18  )
    19  
    20  ;; i8x16
    21  (assert_return (invoke "i8x16.any_true" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
    22                                          (i32.const 0))
    23  (assert_return (invoke "i8x16.any_true" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0))
    24                                          (i32.const 1))
    25  (assert_return (invoke "i8x16.any_true" (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1))
    26                                          (i32.const 1))
    27  (assert_return (invoke "i8x16.any_true" (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1))
    28                                          (i32.const 1))
    29  (assert_return (invoke "i8x16.any_true" (v128.const i8x16 -1 0 1 2 3 4 5 6 7 8 9 0xA 0xB 0xC 0xD 0xF))
    30                                          (i32.const 1))
    31  (assert_return (invoke "i8x16.any_true" (v128.const i8x16 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00))
    32                                          (i32.const 0))
    33  (assert_return (invoke "i8x16.any_true" (v128.const i8x16 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF))
    34                                          (i32.const 1))
    35  (assert_return (invoke "i8x16.any_true" (v128.const i8x16 0xAB 0xAB 0xAB 0xAB 0xAB 0xAB 0xAB 0xAB 0xAB 0xAB 0xAB 0xAB 0xAB 0xAB 0xAB 0xAB))
    36                                          (i32.const 1))
    37  (assert_return (invoke "i8x16.any_true" (v128.const i8x16 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55))
    38                                          (i32.const 1))
    39  (assert_return (invoke "i8x16.all_true" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
    40                                          (i32.const 0))
    41  (assert_return (invoke "i8x16.all_true" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0))
    42                                          (i32.const 0))
    43  (assert_return (invoke "i8x16.all_true" (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1))
    44                                          (i32.const 0))
    45  (assert_return (invoke "i8x16.all_true" (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1))
    46                                          (i32.const 1))
    47  (assert_return (invoke "i8x16.all_true" (v128.const i8x16 -1 0 1 2 3 4 5 6 7 8 9 0xA 0xB 0xC 0xD 0xF))
    48                                          (i32.const 0))
    49  (assert_return (invoke "i8x16.all_true" (v128.const i8x16 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00))
    50                                          (i32.const 0))
    51  (assert_return (invoke "i8x16.all_true" (v128.const i8x16 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF))
    52                                          (i32.const 1))
    53  (assert_return (invoke "i8x16.all_true" (v128.const i8x16 0xAB 0xAB 0xAB 0xAB 0xAB 0xAB 0xAB 0xAB 0xAB 0xAB 0xAB 0xAB 0xAB 0xAB 0xAB 0xAB))
    54                                          (i32.const 1))
    55  (assert_return (invoke "i8x16.all_true" (v128.const i8x16 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55))
    56                                          (i32.const 1))
    57  (assert_return (invoke "i8x16.bitmask" (v128.const i8x16 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF))
    58                                          (i32.const 0x0000FFFF))
    59  (assert_return (invoke "i8x16.bitmask" (v128.const i8x16 -1 0 1 2 3 4 5 6 7 8 9 0xA 0xB 0xC 0xD 0xF))
    60                                          (i32.const 0x00000001))
    61  
    62  ;; i16x8
    63  (assert_return (invoke "i16x8.any_true" (v128.const i16x8 0 0 0 0 0 0 0 0))
    64                                          (i32.const 0))
    65  (assert_return (invoke "i16x8.any_true" (v128.const i16x8 0 0 0 0 0 0 1 0))
    66                                          (i32.const 1))
    67  (assert_return (invoke "i16x8.any_true" (v128.const i16x8 1 1 1 1 1 1 0 1))
    68                                          (i32.const 1))
    69  (assert_return (invoke "i16x8.any_true" (v128.const i16x8 1 1 1 1 1 1 1 1))
    70                                          (i32.const 1))
    71  (assert_return (invoke "i16x8.any_true" (v128.const i16x8 -1 0 1 2 0xB 0xC 0xD 0xF))
    72                                          (i32.const 1))
    73  (assert_return (invoke "i16x8.any_true" (v128.const i16x8 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00))
    74                                          (i32.const 0))
    75  (assert_return (invoke "i16x8.any_true" (v128.const i16x8 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF))
    76                                          (i32.const 1))
    77  (assert_return (invoke "i16x8.any_true" (v128.const i16x8 0xAB 0xAB 0xAB 0xAB 0xAB 0xAB 0xAB 0xAB))
    78                                          (i32.const 1))
    79  (assert_return (invoke "i16x8.any_true" (v128.const i16x8 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55))
    80                                          (i32.const 1))
    81  (assert_return (invoke "i16x8.any_true" (v128.const i16x8 012_345 012_345 012_345 012_345 012_345 012_345 012_345 012_345))
    82                                          (i32.const 1))
    83  (assert_return (invoke "i16x8.any_true" (v128.const i16x8 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234))
    84                                          (i32.const 1))
    85  (assert_return (invoke "i16x8.all_true" (v128.const i16x8 0 0 0 0 0 0 0 0))
    86                                          (i32.const 0))
    87  (assert_return (invoke "i16x8.all_true" (v128.const i16x8 0 0 0 0 0 0 1 0))
    88                                          (i32.const 0))
    89  (assert_return (invoke "i16x8.all_true" (v128.const i16x8 1 1 1 1 1 1 0 1))
    90                                          (i32.const 0))
    91  (assert_return (invoke "i16x8.all_true" (v128.const i16x8 1 1 1 1 1 1 1 1))
    92                                          (i32.const 1))
    93  (assert_return (invoke "i16x8.all_true" (v128.const i16x8 -1 0 1 2 0xB 0xC 0xD 0xF))
    94                                          (i32.const 0))
    95  (assert_return (invoke "i16x8.all_true" (v128.const i16x8 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00))
    96                                          (i32.const 0))
    97  (assert_return (invoke "i16x8.all_true" (v128.const i16x8 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF))
    98                                          (i32.const 1))
    99  (assert_return (invoke "i16x8.all_true" (v128.const i16x8 0xAB 0xAB 0xAB 0xAB 0xAB 0xAB 0xAB 0xAB))
   100                                          (i32.const 1))
   101  (assert_return (invoke "i16x8.all_true" (v128.const i16x8 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55))
   102                                          (i32.const 1))
   103  (assert_return (invoke "i16x8.all_true" (v128.const i16x8 012_345 012_345 012_345 012_345 012_345 012_345 012_345 012_345))
   104                                          (i32.const 1))
   105  (assert_return (invoke "i16x8.all_true" (v128.const i16x8 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234))
   106                                          (i32.const 1))
   107  (assert_return (invoke "i16x8.bitmask" (v128.const i16x8 0xFFFF 0xFFFF 0xFFFF 0xFFFF 0xFFFF 0xFFFF 0xFFFF 0xFFFF))
   108                                          (i32.const 0x000000FF))
   109  (assert_return (invoke "i16x8.bitmask" (v128.const i16x8 -1 0 1 2 0xB 0xC 0xD 0xF))
   110                                          (i32.const 0x00000001))
   111  
   112  ;; i32x4
   113  (assert_return (invoke "i32x4.any_true" (v128.const i32x4 0 0 0 0))
   114                                          (i32.const 0))
   115  (assert_return (invoke "i32x4.any_true" (v128.const i32x4 0 0 1 0))
   116                                          (i32.const 1))
   117  (assert_return (invoke "i32x4.any_true" (v128.const i32x4 1 1 0 1))
   118                                          (i32.const 1))
   119  (assert_return (invoke "i32x4.any_true" (v128.const i32x4 1 1 1 1))
   120                                          (i32.const 1))
   121  (assert_return (invoke "i32x4.any_true" (v128.const i32x4 -1 0 1 0xF))
   122                                          (i32.const 1))
   123  (assert_return (invoke "i32x4.any_true" (v128.const i32x4 0x00 0x00 0x00 0x00))
   124                                          (i32.const 0))
   125  (assert_return (invoke "i32x4.any_true" (v128.const i32x4 0xFF 0xFF 0xFF 0xFF))
   126                                          (i32.const 1))
   127  (assert_return (invoke "i32x4.any_true" (v128.const i32x4 0xAB 0xAB 0xAB 0xAB))
   128                                          (i32.const 1))
   129  (assert_return (invoke "i32x4.any_true" (v128.const i32x4 0x55 0x55 0x55 0x55))
   130                                          (i32.const 1))
   131  (assert_return (invoke "i32x4.any_true" (v128.const i32x4 01_234_567_890 01_234_567_890 01_234_567_890 01_234_567_890))
   132                                          (i32.const 1))
   133  (assert_return (invoke "i32x4.any_true" (v128.const i32x4 0x0_1234_5678 0x0_1234_5678 0x0_1234_5678 0x0_1234_5678))
   134                                          (i32.const 1))
   135  (assert_return (invoke "i32x4.all_true" (v128.const i32x4 0 0 0 0))
   136                                          (i32.const 0))
   137  (assert_return (invoke "i32x4.all_true" (v128.const i32x4 0 0 1 0))
   138                                          (i32.const 0))
   139  (assert_return (invoke "i32x4.all_true" (v128.const i32x4 1 1 0 1))
   140                                          (i32.const 0))
   141  (assert_return (invoke "i32x4.all_true" (v128.const i32x4 1 1 1 1))
   142                                          (i32.const 1))
   143  (assert_return (invoke "i32x4.all_true" (v128.const i32x4 -1 0 1 0xF))
   144                                          (i32.const 0))
   145  (assert_return (invoke "i32x4.all_true" (v128.const i32x4 0x00 0x00 0x00 0x00))
   146                                          (i32.const 0))
   147  (assert_return (invoke "i32x4.all_true" (v128.const i32x4 0xFF 0xFF 0xFF 0xFF))
   148                                          (i32.const 1))
   149  (assert_return (invoke "i32x4.all_true" (v128.const i32x4 0xAB 0xAB 0xAB 0xAB))
   150                                          (i32.const 1))
   151  (assert_return (invoke "i32x4.all_true" (v128.const i32x4 0x55 0x55 0x55 0x55))
   152                                          (i32.const 1))
   153  (assert_return (invoke "i32x4.all_true" (v128.const i32x4 01_234_567_890 01_234_567_890 01_234_567_890 01_234_567_890))
   154                                          (i32.const 1))
   155  (assert_return (invoke "i32x4.all_true" (v128.const i32x4 0x0_1234_5678 0x0_1234_5678 0x0_1234_5678 0x0_1234_5678))
   156                                          (i32.const 1))
   157  (assert_return (invoke "i32x4.bitmask" (v128.const i32x4 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF))
   158                                          (i32.const 0x0000000F))
   159  (assert_return (invoke "i32x4.bitmask" (v128.const i32x4 -1 0 1 0xF))
   160                                          (i32.const 0x00000001))
   161  
   162  ;; i64x2
   163  (assert_return (invoke "i64x2.all_true" (v128.const i64x2 0 0))
   164                                          (i32.const 0))
   165  (assert_return (invoke "i64x2.all_true" (v128.const i64x2 0 1))
   166                                          (i32.const 0))
   167  (assert_return (invoke "i64x2.all_true" (v128.const i64x2 1 0))
   168                                          (i32.const 0))
   169  (assert_return (invoke "i64x2.all_true" (v128.const i64x2 1 1))
   170                                          (i32.const 1))
   171  (assert_return (invoke "i64x2.all_true" (v128.const i64x2 -1 0))
   172                                          (i32.const 0))
   173  (assert_return (invoke "i64x2.all_true" (v128.const i64x2 0x00 0x00))
   174                                          (i32.const 0))
   175  (assert_return (invoke "i64x2.all_true" (v128.const i64x2 0xFF 0xFF))
   176                                          (i32.const 1))
   177  (assert_return (invoke "i64x2.all_true" (v128.const i64x2 0xAB 0xAB))
   178                                          (i32.const 1))
   179  (assert_return (invoke "i64x2.all_true" (v128.const i64x2 0x55 0x55))
   180                                          (i32.const 1))
   181  (assert_return (invoke "i64x2.bitmask" (v128.const i64x2 0xFFFFFFFF_FFFFFFFF 0xFFFFFFFF_FFFFFFFF))
   182                                          (i32.const 0x00000003))
   183  (assert_return (invoke "i64x2.bitmask" (v128.const i64x2 -1 0xF))
   184                                          (i32.const 0x00000001))
   185  
   186  ;; Combination
   187  
   188  (module (memory 1)
   189      ;; as if condition
   190      (func (export "i8x16_any_true_as_if_cond") (param v128) (result i32)
   191          (if (result i32) (v128.any_true (local.get 0))
   192              (then (i32.const 1))
   193              (else (i32.const 0))
   194          )
   195      )
   196      (func (export "i16x8_any_true_as_if_cond") (param v128) (result i32)
   197          (if (result i32) (v128.any_true (local.get 0))
   198              (then (i32.const 1))
   199              (else (i32.const 0))
   200          )
   201      )
   202      (func (export "i32x4_any_true_as_if_cond") (param v128) (result i32)
   203          (if (result i32) (v128.any_true (local.get 0))
   204              (then (i32.const 1))
   205              (else (i32.const 0))
   206          )
   207      )
   208      (func (export "i8x16_all_true_as_if_cond") (param v128) (result i32)
   209          (if (result i32) (i8x16.all_true (local.get 0))
   210              (then (i32.const 1))
   211              (else (i32.const 0))
   212          )
   213      )
   214      (func (export "i16x8_all_true_as_if_cond") (param v128) (result i32)
   215          (if (result i32) (i16x8.all_true (local.get 0))
   216              (then (i32.const 1))
   217              (else (i32.const 0))
   218          )
   219      )
   220      (func (export "i32x4_all_true_as_if_cond") (param v128) (result i32)
   221          (if (result i32) (i32x4.all_true (local.get 0))
   222              (then (i32.const 1))
   223              (else (i32.const 0))
   224          )
   225      )
   226      ;; any_true as select condition
   227      (func (export "i8x16_any_true_as_select_cond") (param v128) (result i32)
   228       (select (i32.const 1) (i32.const 0) (v128.any_true (local.get 0)))
   229      )
   230      (func (export "i16x8_any_true_as_select_cond") (param v128) (result i32)
   231       (select (i32.const 1) (i32.const 0) (v128.any_true (local.get 0)))
   232      )
   233      (func (export "i32x4_any_true_as_select_cond") (param v128) (result i32)
   234       (select (i32.const 1) (i32.const 0) (v128.any_true (local.get 0)))
   235      )
   236      ;; all_true as select condition
   237      (func (export "i8x16_all_true_as_select_cond") (param v128) (result i32)
   238       (select (i32.const 1) (i32.const 0) (i8x16.all_true (local.get 0)))
   239      )
   240      (func (export "i16x8_all_true_as_select_cond") (param v128) (result i32)
   241       (select (i32.const 1) (i32.const 0) (i16x8.all_true (local.get 0)))
   242      )
   243      (func (export "i32x4_all_true_as_select_cond") (param v128) (result i32)
   244       (select (i32.const 1) (i32.const 0) (i32x4.all_true (local.get 0)))
   245      )
   246      ;; any_true as br_if condition
   247      (func (export "i8x16_any_true_as_br_if_cond") (param $0 v128) (result i32)
   248        (local $1 i32)
   249        (local.set $1 (i32.const 2))
   250        (block
   251          (local.set $1 (i32.const 1))
   252          (br_if 0 (v128.any_true (local.get $0)))
   253          (local.set $1 (i32.const 0))
   254        )
   255        (local.get $1)
   256      )
   257      (func (export "i16x8_any_true_as_br_if_cond") (param $0 v128) (result i32)
   258        (local $1 i32)
   259        (local.set $1 (i32.const 2))
   260        (block
   261          (local.set $1 (i32.const 1))
   262          (br_if 0 (v128.any_true (local.get $0)))
   263          (local.set $1 (i32.const 0))
   264        )
   265        (local.get $1)
   266      )
   267      (func (export "i32x4_any_true_as_br_if_cond") (param $0 v128) (result i32)
   268        (local $1 i32)
   269        (local.set $1 (i32.const 2))
   270        (block
   271          (local.set $1 (i32.const 1))
   272          (br_if 0 (v128.any_true (local.get $0)))
   273          (local.set $1 (i32.const 0))
   274        )
   275        (local.get $1)
   276      )
   277      ;; all_true as br_if condition
   278      (func (export "i8x16_all_true_as_br_if_cond") (param $0 v128) (result i32)
   279        (local $1 i32)
   280        (local.set $1 (i32.const 2))
   281        (block
   282          (local.set $1 (i32.const 1))
   283          (br_if 0 (i8x16.all_true (local.get $0)))
   284          (local.set $1 (i32.const 0))
   285        )
   286        (local.get $1)
   287      )
   288      (func (export "i16x8_all_true_as_br_if_cond") (param $0 v128) (result i32)
   289        (local $1 i32)
   290        (local.set $1 (i32.const 2))
   291        (block
   292          (local.set $1 (i32.const 1))
   293          (br_if 0 (i16x8.all_true (local.get $0)))
   294          (local.set $1 (i32.const 0))
   295        )
   296        (local.get $1)
   297      )
   298      (func (export "i32x4_all_true_as_br_if_cond") (param $0 v128) (result i32)
   299        (local $1 i32)
   300        (local.set $1 (i32.const 2))
   301        (block
   302          (local.set $1 (i32.const 1))
   303          (br_if 0 (i32x4.all_true (local.get $0)))
   304          (local.set $1 (i32.const 0))
   305        )
   306        (local.get $1)
   307      )
   308      ;; any_true as i32.and operand
   309      (func (export "i8x16_any_true_as_i32.and_operand") (param $0 v128) (param $1 v128) (result i32)
   310        (i32.and (v128.any_true (local.get $0)) (v128.any_true (local.get $1)))
   311      )
   312      (func (export "i16x8_any_true_as_i32.and_operand") (param $0 v128) (param $1 v128) (result i32)
   313        (i32.and (v128.any_true (local.get $0)) (v128.any_true (local.get $1)))
   314      )
   315      (func (export "i32x4_any_true_as_i32.and_operand") (param $0 v128) (param $1 v128) (result i32)
   316        (i32.and (v128.any_true (local.get $0)) (v128.any_true (local.get $1)))
   317      )
   318       ;; any_true as i32.or operand
   319      (func (export "i8x16_any_true_as_i32.or_operand") (param $0 v128) (param $1 v128) (result i32)
   320        (i32.or (v128.any_true (local.get $0)) (v128.any_true (local.get $1)))
   321      )
   322      (func (export "i16x8_any_true_as_i32.or_operand") (param $0 v128) (param $1 v128) (result i32)
   323        (i32.or (v128.any_true (local.get $0)) (v128.any_true (local.get $1)))
   324      )
   325      (func (export "i32x4_any_true_as_i32.or_operand") (param $0 v128) (param $1 v128) (result i32)
   326        (i32.or (v128.any_true (local.get $0)) (v128.any_true (local.get $1)))
   327      )
   328       ;; any_true as i32.xor operand
   329      (func (export "i8x16_any_true_as_i32.xor_operand") (param $0 v128) (param $1 v128) (result i32)
   330        (i32.xor (v128.any_true (local.get $0)) (v128.any_true (local.get $1)))
   331      )
   332      (func (export "i16x8_any_true_as_i32.xor_operand") (param $0 v128) (param $1 v128) (result i32)
   333        (i32.xor (v128.any_true (local.get $0)) (v128.any_true (local.get $1)))
   334      )
   335      (func (export "i32x4_any_true_as_i32.xor_operand") (param $0 v128) (param $1 v128) (result i32)
   336        (i32.xor (v128.any_true (local.get $0)) (v128.any_true (local.get $1)))
   337      )
   338       ;; all_true as i32.and operand
   339      (func (export "i8x16_all_true_as_i32.and_operand") (param $0 v128) (param $1 v128) (result i32)
   340        (i32.and (i8x16.all_true (local.get $0)) (i8x16.all_true (local.get $1)))
   341      )
   342      (func (export "i16x8_all_true_as_i32.and_operand") (param $0 v128) (param $1 v128) (result i32)
   343        (i32.and (i16x8.all_true (local.get $0)) (i16x8.all_true (local.get $1)))
   344      )
   345      (func (export "i32x4_all_true_as_i32.and_operand") (param $0 v128) (param $1 v128) (result i32)
   346        (i32.and (i32x4.all_true (local.get $0)) (i32x4.all_true (local.get $1)))
   347      )
   348       ;; all_true as i32.or operand
   349      (func (export "i8x16_all_true_as_i32.or_operand") (param $0 v128) (param $1 v128) (result i32)
   350        (i32.or (i8x16.all_true (local.get $0)) (i8x16.all_true (local.get $1)))
   351      )
   352      (func (export "i16x8_all_true_as_i32.or_operand") (param $0 v128) (param $1 v128) (result i32)
   353        (i32.or (i16x8.all_true (local.get $0)) (i16x8.all_true (local.get $1)))
   354      )
   355      (func (export "i32x4_all_true_as_i32.or_operand") (param $0 v128) (param $1 v128) (result i32)
   356        (i32.or (i32x4.all_true (local.get $0)) (i32x4.all_true (local.get $1)))
   357      )
   358       ;; all_true as i32.xor operand
   359      (func (export "i8x16_all_true_as_i32.xor_operand") (param $0 v128) (param $1 v128) (result i32)
   360        (i32.xor (i8x16.all_true (local.get $0)) (i8x16.all_true (local.get $1)))
   361      )
   362      (func (export "i16x8_all_true_as_i32.xor_operand") (param $0 v128) (param $1 v128) (result i32)
   363        (i32.xor (i16x8.all_true (local.get $0)) (i16x8.all_true (local.get $1)))
   364      )
   365      (func (export "i32x4_all_true_as_i32.xor_operand") (param $0 v128) (param $1 v128) (result i32)
   366        (i32.xor (i32x4.all_true (local.get $0)) (i32x4.all_true (local.get $1)))
   367      )
   368      ;; any_true with v128.not
   369      (func (export "i8x16_any_true_with_v128.not") (param $0 v128) (result i32)
   370         (v128.any_true (v128.not (local.get $0)))
   371      )
   372      (func (export "i16x8_any_true_with_v128.not") (param $0 v128) (result i32)
   373         (v128.any_true (v128.not (local.get $0)))
   374      )
   375      (func (export "i32x4_any_true_with_v128.not") (param $0 v128) (result i32)
   376         (v128.any_true (v128.not (local.get $0)))
   377      )
   378      ;; any_true with v128.and
   379      (func (export "i8x16_any_true_with_v128.and") (param $0 v128) (param $1 v128) (result i32)
   380         (v128.any_true (v128.and (local.get $0) (local.get $1)))
   381      )
   382      (func (export "i16x8_any_true_with_v128.and") (param $0 v128) (param $1 v128) (result i32)
   383         (v128.any_true (v128.and (local.get $0) (local.get $1)))
   384      )
   385      (func (export "i32x4_any_true_with_v128.and") (param $0 v128) (param $1 v128) (result i32)
   386         (v128.any_true (v128.and (local.get $0) (local.get $1)))
   387      )
   388      ;; any_true with v128.or
   389      (func (export "i8x16_any_true_with_v128.or") (param $0 v128) (param $1 v128) (result i32)
   390         (v128.any_true (v128.or (local.get $0) (local.get $1)))
   391      )
   392      (func (export "i16x8_any_true_with_v128.or") (param $0 v128) (param $1 v128) (result i32)
   393         (v128.any_true (v128.or (local.get $0) (local.get $1)))
   394      )
   395      (func (export "i32x4_any_true_with_v128.or") (param $0 v128) (param $1 v128) (result i32)
   396         (v128.any_true (v128.or (local.get $0) (local.get $1)))
   397      )
   398      ;; any_true with v128.xor
   399      (func (export "i8x16_any_true_with_v128.xor") (param $0 v128) (param $1 v128) (result i32)
   400         (v128.any_true (v128.xor (local.get $0) (local.get $1)))
   401      )
   402      (func (export "i16x8_any_true_with_v128.xor") (param $0 v128) (param $1 v128) (result i32)
   403         (v128.any_true (v128.xor (local.get $0) (local.get $1)))
   404      )
   405      (func (export "i32x4_any_true_with_v128.xor") (param $0 v128) (param $1 v128) (result i32)
   406         (v128.any_true (v128.xor (local.get $0) (local.get $1)))
   407      )
   408      ;; any_true with v128.bitselect
   409      (func (export "i8x16_any_true_with_v128.bitselect") (param $0 v128) (param $1 v128) (param $2 v128) (result i32)
   410         (v128.any_true (v128.bitselect (local.get $0) (local.get $1) (local.get $2)))
   411      )
   412      (func (export "i16x8_any_true_with_v128.bitselect") (param $0 v128) (param $1 v128) (param $2 v128) (result i32)
   413         (v128.any_true (v128.bitselect (local.get $0) (local.get $1) (local.get $2)))
   414      )
   415      (func (export "i32x4_any_true_with_v128.bitselect") (param $0 v128) (param $1 v128) (param $2 v128) (result i32)
   416         (v128.any_true (v128.bitselect (local.get $0) (local.get $1) (local.get $2)))
   417      )
   418      ;; all_true with v128.not
   419      (func (export "i8x16_all_true_with_v128.not") (param $0 v128) (result i32)
   420         (i8x16.all_true (v128.not (local.get $0)))
   421      )
   422      (func (export "i16x8_all_true_with_v128.not") (param $0 v128) (result i32)
   423         (i16x8.all_true (v128.not (local.get $0)))
   424      )
   425      (func (export "i32x4_all_true_with_v128.not") (param $0 v128) (result i32)
   426         (i32x4.all_true (v128.not (local.get $0)))
   427      )
   428      ;; all_true with v128.and
   429      (func (export "i8x16_all_true_with_v128.and") (param $0 v128) (param $1 v128) (result i32)
   430         (i8x16.all_true (v128.and (local.get $0) (local.get $1)))
   431      )
   432      (func (export "i16x8_all_true_with_v128.and") (param $0 v128) (param $1 v128) (result i32)
   433         (i16x8.all_true (v128.and (local.get $0) (local.get $1)))
   434      )
   435      (func (export "i32x4_all_true_with_v128.and") (param $0 v128) (param $1 v128) (result i32)
   436         (i32x4.all_true (v128.and (local.get $0) (local.get $1)))
   437      )
   438      ;; all_true with v128.or
   439      (func (export "i8x16_all_true_with_v128.or") (param $0 v128) (param $1 v128) (result i32)
   440         (i8x16.all_true (v128.or (local.get $0) (local.get $1)))
   441      )
   442      (func (export "i16x8_all_true_with_v128.or") (param $0 v128) (param $1 v128) (result i32)
   443         (i16x8.all_true (v128.or (local.get $0) (local.get $1)))
   444      )
   445      (func (export "i32x4_all_true_with_v128.or") (param $0 v128) (param $1 v128) (result i32)
   446         (i32x4.all_true (v128.or (local.get $0) (local.get $1)))
   447      )
   448      ;; all_true with v128.xor
   449      (func (export "i8x16_all_true_with_v128.xor") (param $0 v128) (param $1 v128) (result i32)
   450         (i8x16.all_true (v128.xor (local.get $0) (local.get $1)))
   451      )
   452      (func (export "i16x8_all_true_with_v128.xor") (param $0 v128) (param $1 v128) (result i32)
   453         (i16x8.all_true (v128.xor (local.get $0) (local.get $1)))
   454      )
   455      (func (export "i32x4_all_true_with_v128.xor") (param $0 v128) (param $1 v128) (result i32)
   456         (i32x4.all_true (v128.xor (local.get $0) (local.get $1)))
   457      )
   458      ;; all_true with v128.bitselect
   459      (func (export "i8x16_all_true_with_v128.bitselect") (param $0 v128) (param $1 v128) (param $2 v128) (result i32)
   460         (i8x16.all_true (v128.bitselect (local.get $0) (local.get $1) (local.get $2)))
   461      )
   462      (func (export "i16x8_all_true_with_v128.bitselect") (param $0 v128) (param $1 v128) (param $2 v128) (result i32)
   463         (i16x8.all_true (v128.bitselect (local.get $0) (local.get $1) (local.get $2)))
   464      )
   465      (func (export "i32x4_all_true_with_v128.bitselect") (param $0 v128) (param $1 v128) (param $2 v128) (result i32)
   466         (i32x4.all_true (v128.bitselect (local.get $0) (local.get $1) (local.get $2)))
   467      )
   468  )
   469  
   470  ;; 'any_true' as 'if' condition
   471  ;; i8x16
   472  (assert_return (invoke "i8x16_any_true_as_if_cond" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   473                                                     (i32.const 0))
   474  (assert_return (invoke "i8x16_any_true_as_if_cond" (v128.const i8x16 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0))
   475                                                     (i32.const 1))
   476  (assert_return (invoke "i8x16_any_true_as_if_cond" (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1))
   477                                                     (i32.const 1))
   478  ;; i16x8
   479  (assert_return (invoke "i16x8_any_true_as_if_cond" (v128.const i16x8 0 0 0 0 0 0 0 0))
   480                                                     (i32.const 0))
   481  (assert_return (invoke "i16x8_any_true_as_if_cond" (v128.const i16x8 0 0 1 0 0 0 1 0))
   482                                                     (i32.const 1))
   483  (assert_return (invoke "i16x8_any_true_as_if_cond" (v128.const i16x8 1 1 1 1 1 1 1 1))
   484                                                     (i32.const 1))
   485  ;; i32x4
   486  (assert_return (invoke "i32x4_any_true_as_if_cond" (v128.const i32x4 0 0 0 0))
   487                                                     (i32.const 0))
   488  (assert_return (invoke "i32x4_any_true_as_if_cond" (v128.const i32x4 0 0 1 0))
   489                                                     (i32.const 1))
   490  (assert_return (invoke "i32x4_any_true_as_if_cond" (v128.const i32x4 1 1 1 1))
   491                                                     (i32.const 1))
   492  
   493  ;; 'all_true' as 'if' condition
   494  ;; i8x16
   495  (assert_return (invoke "i8x16_all_true_as_if_cond" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   496                                                     (i32.const 0))
   497  (assert_return (invoke "i8x16_all_true_as_if_cond" (v128.const i8x16 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0))
   498                                                     (i32.const 0))
   499  (assert_return (invoke "i8x16_all_true_as_if_cond" (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1))
   500                                                     (i32.const 1))
   501  ;; i16x8
   502  (assert_return (invoke "i16x8_all_true_as_if_cond" (v128.const i16x8 0 0 0 0 0 0 0 0))
   503                                                     (i32.const 0))
   504  (assert_return (invoke "i16x8_all_true_as_if_cond" (v128.const i16x8 1 1 1 0 1 1 1 0))
   505                                                     (i32.const 0))
   506  (assert_return (invoke "i16x8_all_true_as_if_cond" (v128.const i16x8 1 1 1 1 1 1 1 1))
   507                                                     (i32.const 1))
   508  ;; i32x4
   509  (assert_return (invoke "i32x4_all_true_as_if_cond" (v128.const i32x4 0 0 0 0))
   510                                                     (i32.const 0))
   511  (assert_return (invoke "i32x4_all_true_as_if_cond" (v128.const i32x4 1 1 1 0))
   512                                                     (i32.const 0))
   513  (assert_return (invoke "i32x4_all_true_as_if_cond" (v128.const i32x4 1 1 1 1))
   514                                                     (i32.const 1))
   515  
   516  ;; any_true as select condition
   517  (assert_return (invoke "i8x16_any_true_as_select_cond" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   518                                                         (i32.const 0))
   519  (assert_return (invoke "i8x16_any_true_as_select_cond" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0))
   520                                                         (i32.const 1))
   521  (assert_return (invoke "i16x8_any_true_as_select_cond" (v128.const i16x8 0 0 0 0 0 0 0 0))
   522                                                         (i32.const 0))
   523  (assert_return (invoke "i16x8_any_true_as_select_cond" (v128.const i16x8 0 0 0 0 0 0 1 0))
   524                                                         (i32.const 1))
   525  (assert_return (invoke "i32x4_any_true_as_select_cond" (v128.const i32x4 0 0 0 0))
   526                                                         (i32.const 0))
   527  (assert_return (invoke "i32x4_any_true_as_select_cond" (v128.const i32x4 0 0 1 0))
   528                                                         (i32.const 1))
   529  ;; all_true as select condition
   530  (assert_return (invoke "i8x16_all_true_as_select_cond" (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1))
   531                                                         (i32.const 1))
   532  (assert_return (invoke "i8x16_all_true_as_select_cond" (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1))
   533                                                         (i32.const 0))
   534  (assert_return (invoke "i16x8_all_true_as_select_cond" (v128.const i16x8 1 1 1 1 1 1 1 1))
   535                                                         (i32.const 1))
   536  (assert_return (invoke "i16x8_all_true_as_select_cond" (v128.const i16x8 1 1 1 1 1 1 0 1))
   537                                                         (i32.const 0))
   538  (assert_return (invoke "i32x4_all_true_as_select_cond" (v128.const i32x4 1 1 1 1))
   539                                                         (i32.const 1))
   540  (assert_return (invoke "i32x4_all_true_as_select_cond" (v128.const i32x4 1 1 0 1))
   541                                                         (i32.const 0))
   542  ;; any_true as br_if condition
   543  (assert_return (invoke "i8x16_any_true_as_br_if_cond" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   544                                                        (i32.const 0))
   545  (assert_return (invoke "i8x16_any_true_as_br_if_cond" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0))
   546                                                        (i32.const 1))
   547  (assert_return (invoke "i16x8_any_true_as_br_if_cond" (v128.const i16x8 0 0 0 0 0 0 0 0))
   548                                                        (i32.const 0))
   549  (assert_return (invoke "i16x8_any_true_as_br_if_cond" (v128.const i16x8 0 0 0 0 0 0 1 0))
   550                                                        (i32.const 1))
   551  (assert_return (invoke "i32x4_any_true_as_br_if_cond" (v128.const i32x4 0 0 0 0))
   552                                                        (i32.const 0))
   553  (assert_return (invoke "i32x4_any_true_as_br_if_cond" (v128.const i32x4 0 0 1 0))
   554                                                        (i32.const 1))
   555  ;; all_true as br_if condition
   556  (assert_return (invoke "i8x16_all_true_as_br_if_cond" (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1))
   557                                                        (i32.const 1))
   558  (assert_return (invoke "i8x16_all_true_as_br_if_cond" (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1))
   559                                                        (i32.const 0))
   560  (assert_return (invoke "i16x8_all_true_as_br_if_cond" (v128.const i16x8 1 1 1 1 1 1 1 1))
   561                                                        (i32.const 1))
   562  (assert_return (invoke "i16x8_all_true_as_br_if_cond" (v128.const i16x8 1 1 1 1 1 1 0 1))
   563                                                        (i32.const 0))
   564  (assert_return (invoke "i32x4_all_true_as_br_if_cond" (v128.const i32x4 1 1 1 1))
   565                                                        (i32.const 1))
   566  (assert_return (invoke "i32x4_all_true_as_br_if_cond" (v128.const i32x4 1 1 0 1))
   567                                                        (i32.const 0))
   568  ;; any_true as and operand
   569  (assert_return (invoke "i8x16_any_true_as_i32.and_operand" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
   570                                                             (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   571                                                             (i32.const 0))
   572  (assert_return (invoke "i8x16_any_true_as_i32.and_operand" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
   573                                                             (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0))
   574                                                             (i32.const 0))
   575  (assert_return (invoke "i8x16_any_true_as_i32.and_operand" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0)
   576                                                             (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0))
   577                                                             (i32.const 1))
   578  (assert_return (invoke "i16x8_any_true_as_i32.and_operand" (v128.const i16x8 0 0 0 0 0 0 0 0)
   579                                                             (v128.const i16x8 0 0 0 0 0 0 0 0))
   580                                                             (i32.const 0))
   581  (assert_return (invoke "i16x8_any_true_as_i32.and_operand" (v128.const i16x8 0 0 0 0 0 0 0 0)
   582                                                             (v128.const i16x8 0 0 0 0 0 0 1 0))
   583                                                             (i32.const 0))
   584  (assert_return (invoke "i16x8_any_true_as_i32.and_operand" (v128.const i16x8 0 0 0 0 0 0 1 0)
   585                                                             (v128.const i16x8 0 0 0 0 0 0 1 0))
   586                                                             (i32.const 1))
   587  (assert_return (invoke "i32x4_any_true_as_i32.and_operand" (v128.const i32x4 0 0 0 0)
   588                                                             (v128.const i32x4 0 0 0 0))
   589                                                             (i32.const 0))
   590  (assert_return (invoke "i32x4_any_true_as_i32.and_operand" (v128.const i32x4 0 0 0 0)
   591                                                             (v128.const i32x4 0 0 1 0))
   592                                                             (i32.const 0))
   593  (assert_return (invoke "i32x4_any_true_as_i32.and_operand" (v128.const i32x4 0 0 1 0)
   594                                                             (v128.const i32x4 0 0 1 0))
   595                                                             (i32.const 1))
   596  ;; any_true as or operand
   597  (assert_return (invoke "i8x16_any_true_as_i32.or_operand" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
   598                                                            (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   599                                                            (i32.const 0))
   600  (assert_return (invoke "i8x16_any_true_as_i32.or_operand" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
   601                                                            (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0))
   602                                                            (i32.const 1))
   603  (assert_return (invoke "i8x16_any_true_as_i32.or_operand" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0)
   604                                                            (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0))
   605                                                            (i32.const 1))
   606  (assert_return (invoke "i16x8_any_true_as_i32.or_operand" (v128.const i16x8 0 0 0 0 0 0 0 0)
   607                                                            (v128.const i16x8 0 0 0 0 0 0 0 0))
   608                                                            (i32.const 0))
   609  (assert_return (invoke "i16x8_any_true_as_i32.or_operand" (v128.const i16x8 0 0 0 0 0 0 0 0)
   610                                                            (v128.const i16x8 0 0 0 0 0 0 1 0))
   611                                                            (i32.const 1))
   612  (assert_return (invoke "i16x8_any_true_as_i32.or_operand" (v128.const i16x8 0 0 0 0 0 0 1 0)
   613                                                            (v128.const i16x8 0 0 0 0 0 0 1 0))
   614                                                            (i32.const 1))
   615  (assert_return (invoke "i32x4_any_true_as_i32.or_operand" (v128.const i32x4 0 0 0 0)
   616                                                            (v128.const i32x4 0 0 0 0))
   617                                                            (i32.const 0))
   618  (assert_return (invoke "i32x4_any_true_as_i32.or_operand" (v128.const i32x4 0 0 0 0)
   619                                                            (v128.const i32x4 0 0 1 0))
   620                                                            (i32.const 1))
   621  (assert_return (invoke "i32x4_any_true_as_i32.or_operand" (v128.const i32x4 0 0 1 0)
   622                                                            (v128.const i32x4 0 0 1 0))
   623                                                            (i32.const 1))
   624  ;; any_true as xor operand
   625  (assert_return (invoke "i8x16_any_true_as_i32.xor_operand" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
   626                                                             (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   627                                                             (i32.const 0))
   628  (assert_return (invoke "i8x16_any_true_as_i32.xor_operand" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
   629                                                             (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0))
   630                                                             (i32.const 1))
   631  (assert_return (invoke "i8x16_any_true_as_i32.xor_operand" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0)
   632                                                             (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0))
   633                                                             (i32.const 0))
   634  (assert_return (invoke "i16x8_any_true_as_i32.xor_operand" (v128.const i16x8 0 0 0 0 0 0 0 0)
   635                                                             (v128.const i16x8 0 0 0 0 0 0 0 0))
   636                                                             (i32.const 0))
   637  (assert_return (invoke "i16x8_any_true_as_i32.xor_operand" (v128.const i16x8 0 0 0 0 0 0 0 0)
   638                                                             (v128.const i16x8 0 0 0 0 0 0 1 0))
   639                                                             (i32.const 1))
   640  (assert_return (invoke "i16x8_any_true_as_i32.xor_operand" (v128.const i16x8 0 0 0 0 0 0 1 0)
   641                                                             (v128.const i16x8 0 0 0 0 0 0 1 0))
   642                                                             (i32.const 0))
   643  (assert_return (invoke "i32x4_any_true_as_i32.xor_operand" (v128.const i32x4 0 0 0 0)
   644                                                             (v128.const i32x4 0 0 0 0))
   645                                                             (i32.const 0))
   646  (assert_return (invoke "i32x4_any_true_as_i32.xor_operand" (v128.const i32x4 0 0 0 0)
   647                                                             (v128.const i32x4 0 0 1 0))
   648                                                             (i32.const 1))
   649  (assert_return (invoke "i32x4_any_true_as_i32.xor_operand" (v128.const i32x4 0 0 1 0)
   650                                                             (v128.const i32x4 0 0 1 0))
   651                                                             (i32.const 0))
   652  ;; all_true as and operand
   653  (assert_return (invoke "i8x16_all_true_as_i32.and_operand" (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)
   654                                                             (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1))
   655                                                             (i32.const 1))
   656  (assert_return (invoke "i8x16_all_true_as_i32.and_operand" (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)
   657                                                             (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1))
   658                                                             (i32.const 0))
   659  (assert_return (invoke "i8x16_all_true_as_i32.and_operand" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
   660                                                             (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   661                                                             (i32.const 0))
   662  (assert_return (invoke "i16x8_all_true_as_i32.and_operand" (v128.const i16x8 1 1 1 1 1 1 1 1)
   663                                                             (v128.const i16x8 1 1 1 1 1 1 1 1))
   664                                                             (i32.const 1))
   665  (assert_return (invoke "i16x8_all_true_as_i32.and_operand" (v128.const i16x8 1 1 1 1 1 1 1 1)
   666                                                             (v128.const i16x8 1 1 1 1 1 1 0 1))
   667                                                             (i32.const 0))
   668  (assert_return (invoke "i16x8_all_true_as_i32.and_operand" (v128.const i16x8 0 0 0 0 0 0 0 0)
   669                                                             (v128.const i16x8 0 0 0 0 0 0 1 0))
   670                                                             (i32.const 0))
   671  (assert_return (invoke "i32x4_all_true_as_i32.and_operand" (v128.const i32x4 1 1 1 1)
   672                                                             (v128.const i32x4 1 1 1 1))
   673                                                             (i32.const 1))
   674  (assert_return (invoke "i32x4_all_true_as_i32.and_operand" (v128.const i32x4 1 1 1 1)
   675                                                             (v128.const i32x4 1 1 0 1))
   676                                                             (i32.const 0))
   677  (assert_return (invoke "i32x4_all_true_as_i32.and_operand" (v128.const i32x4 0 0 0 0)
   678                                                             (v128.const i32x4 0 0 1 0))
   679                                                             (i32.const 0))
   680  ;; all_true as or operand
   681  (assert_return (invoke "i8x16_all_true_as_i32.or_operand" (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)
   682                                                            (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1))
   683                                                            (i32.const 1))
   684  (assert_return (invoke "i8x16_all_true_as_i32.or_operand" (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)
   685                                                            (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1))
   686                                                            (i32.const 1))
   687  (assert_return (invoke "i8x16_all_true_as_i32.or_operand" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
   688                                                            (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   689                                                            (i32.const 0))
   690  (assert_return (invoke "i16x8_all_true_as_i32.or_operand" (v128.const i16x8 1 1 1 1 1 1 1 1)
   691                                                            (v128.const i16x8 1 1 1 1 1 1 1 1))
   692                                                            (i32.const 1))
   693  (assert_return (invoke "i16x8_all_true_as_i32.or_operand" (v128.const i16x8 1 1 1 1 1 1 1 1)
   694                                                            (v128.const i16x8 1 1 1 1 1 1 0 1))
   695                                                            (i32.const 1))
   696  (assert_return (invoke "i16x8_all_true_as_i32.or_operand" (v128.const i16x8 0 0 0 0 0 0 0 0)
   697                                                            (v128.const i16x8 0 0 0 0 0 0 0 0))
   698                                                            (i32.const 0))
   699  (assert_return (invoke "i32x4_all_true_as_i32.or_operand" (v128.const i32x4 1 1 1 1)
   700                                                            (v128.const i32x4 1 1 1 1))
   701                                                            (i32.const 1))
   702  (assert_return (invoke "i32x4_all_true_as_i32.or_operand" (v128.const i32x4 1 1 1 1)
   703                                                            (v128.const i32x4 1 1 0 1))
   704                                                            (i32.const 1))
   705  (assert_return (invoke "i32x4_all_true_as_i32.or_operand" (v128.const i32x4 0 0 0 0)
   706                                                            (v128.const i32x4 0 0 0 0))
   707                                                            (i32.const 0))
   708  ;; all_true as xor operand
   709  (assert_return (invoke "i8x16_all_true_as_i32.xor_operand" (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)
   710                                                             (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1))
   711                                                             (i32.const 0))
   712  (assert_return (invoke "i8x16_all_true_as_i32.xor_operand" (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)
   713                                                             (v128.const i8x16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1))
   714                                                             (i32.const 1))
   715  (assert_return (invoke "i8x16_all_true_as_i32.xor_operand" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
   716                                                             (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   717                                                             (i32.const 0))
   718  (assert_return (invoke "i16x8_all_true_as_i32.xor_operand" (v128.const i16x8 1 1 1 1 1 1 1 1)
   719                                                             (v128.const i16x8 1 1 1 1 1 1 1 1))
   720                                                             (i32.const 0))
   721  (assert_return (invoke "i16x8_all_true_as_i32.xor_operand" (v128.const i16x8 1 1 1 1 1 1 1 1)
   722                                                             (v128.const i16x8 1 1 1 1 1 1 0 1))
   723                                                             (i32.const 1))
   724  (assert_return (invoke "i16x8_all_true_as_i32.xor_operand" (v128.const i16x8 0 0 0 0 0 0 0 0)
   725                                                             (v128.const i16x8 0 0 0 0 0 0 0 0))
   726                                                             (i32.const 0))
   727  (assert_return (invoke "i32x4_all_true_as_i32.xor_operand" (v128.const i32x4 1 1 1 1)
   728                                                             (v128.const i32x4 1 1 1 1))
   729                                                             (i32.const 0))
   730  (assert_return (invoke "i32x4_all_true_as_i32.xor_operand" (v128.const i32x4 1 1 1 1)
   731                                                             (v128.const i32x4 1 1 0 1))
   732                                                             (i32.const 1))
   733  (assert_return (invoke "i32x4_all_true_as_i32.xor_operand" (v128.const i32x4 0 0 0 0)
   734                                                             (v128.const i32x4 0 0 0 0))
   735                                                             (i32.const 0))
   736  ;; any_true with v128.not
   737  (assert_return (invoke "i8x16_any_true_with_v128.not" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   738                                                        (i32.const 1))
   739  (assert_return (invoke "i8x16_any_true_with_v128.not" (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
   740                                                        (i32.const 0))
   741  (assert_return (invoke "i8x16_any_true_with_v128.not" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0))
   742                                                        (i32.const 1))
   743  (assert_return (invoke "i16x8_any_true_with_v128.not" (v128.const i16x8 0 0 0 0 0 0 0 0))
   744                                                        (i32.const 1))
   745  (assert_return (invoke "i16x8_any_true_with_v128.not" (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1))
   746                                                        (i32.const 0))
   747  (assert_return (invoke "i16x8_any_true_with_v128.not" (v128.const i16x8 0 0 0 0 0 0 -1 0))
   748                                                        (i32.const 1))
   749  (assert_return (invoke "i32x4_any_true_with_v128.not" (v128.const i32x4 0 0 0 0))
   750                                                        (i32.const 1))
   751  (assert_return (invoke "i32x4_any_true_with_v128.not" (v128.const i32x4 -1 -1 -1 -1))
   752                                                        (i32.const 0))
   753  (assert_return (invoke "i32x4_any_true_with_v128.not" (v128.const i32x4 0 0 -1 0))
   754                                                        (i32.const 1))
   755  ;; any_true with v128.and
   756  (assert_return (invoke "i8x16_any_true_with_v128.and" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
   757                                                        (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   758                                                        (i32.const 0))
   759  (assert_return (invoke "i8x16_any_true_with_v128.and" (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1)
   760                                                        (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
   761                                                        (i32.const 1))
   762  (assert_return (invoke "i8x16_any_true_with_v128.and" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0)
   763                                                        (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0))
   764                                                        (i32.const 1))
   765  (assert_return (invoke "i16x8_any_true_with_v128.and" (v128.const i16x8 0 0 0 0 0 0 0 0)
   766                                                        (v128.const i16x8 0 0 0 0 0 0 0 0))
   767                                                        (i32.const 0))
   768  (assert_return (invoke "i16x8_any_true_with_v128.and" (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)
   769                                                        (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1))
   770                                                        (i32.const 1))
   771  (assert_return (invoke "i16x8_any_true_with_v128.and" (v128.const i16x8 0 0 0 0 0 0 -1 0)
   772                                                        (v128.const i16x8 0 0 0 0 0 0 -1 0))
   773                                                        (i32.const 1))
   774  (assert_return (invoke "i32x4_any_true_with_v128.and" (v128.const i32x4 0 0 0 0)
   775                                                        (v128.const i32x4 0 0 0 0))
   776                                                        (i32.const 0))
   777  (assert_return (invoke "i32x4_any_true_with_v128.and" (v128.const i32x4 -1 -1 -1 -1)
   778                                                        (v128.const i32x4 -1 -1 -1 -1))
   779                                                        (i32.const 1))
   780  (assert_return (invoke "i32x4_any_true_with_v128.and" (v128.const i32x4 0 0 -1 0)
   781                                                        (v128.const i32x4 0 0 -1 0))
   782                                                        (i32.const 1))
   783  ;; any_true with v128.or
   784  (assert_return (invoke "i8x16_any_true_with_v128.or" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
   785                                                       (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   786                                                       (i32.const 0))
   787  (assert_return (invoke "i8x16_any_true_with_v128.or" (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1)
   788                                                       (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
   789                                                       (i32.const 1))
   790  (assert_return (invoke "i8x16_any_true_with_v128.or" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0)
   791                                                       (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0))
   792                                                       (i32.const 1))
   793  (assert_return (invoke "i16x8_any_true_with_v128.or" (v128.const i16x8 0 0 0 0 0 0 0 0)
   794                                                       (v128.const i16x8 0 0 0 0 0 0 0 0))
   795                                                       (i32.const 0))
   796  (assert_return (invoke "i16x8_any_true_with_v128.or" (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)
   797                                                       (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1))
   798                                                       (i32.const 1))
   799  (assert_return (invoke "i16x8_any_true_with_v128.or" (v128.const i16x8 0 0 0 0 0 0 -1 0)
   800                                                       (v128.const i16x8 0 0 0 0 0 0 -1 0))
   801                                                       (i32.const 1))
   802  (assert_return (invoke "i32x4_any_true_with_v128.or" (v128.const i32x4 0 0 0 0)
   803                                                       (v128.const i32x4 0 0 0 0))
   804                                                       (i32.const 0))
   805  (assert_return (invoke "i32x4_any_true_with_v128.or" (v128.const i32x4 -1 -1 -1 -1)
   806                                                       (v128.const i32x4 -1 -1 -1 -1))
   807                                                       (i32.const 1))
   808  (assert_return (invoke "i32x4_any_true_with_v128.or" (v128.const i32x4 0 0 -1 0)
   809                                                       (v128.const i32x4 0 0 -1 0))
   810                                                       (i32.const 1))
   811  ;; any_true with v128.xor
   812  (assert_return (invoke "i8x16_any_true_with_v128.xor" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
   813                                                        (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   814                                                        (i32.const 0))
   815  (assert_return (invoke "i8x16_any_true_with_v128.xor" (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1)
   816                                                        (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
   817                                                        (i32.const 0))
   818  (assert_return (invoke "i8x16_any_true_with_v128.xor" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
   819                                                        (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0))
   820                                                        (i32.const 1))
   821  (assert_return (invoke "i16x8_any_true_with_v128.xor" (v128.const i16x8 0 0 0 0 0 0 0 0)
   822                                                        (v128.const i16x8 0 0 0 0 0 0 0 0))
   823                                                        (i32.const 0))
   824  (assert_return (invoke "i16x8_any_true_with_v128.xor" (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)
   825                                                        (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1))
   826                                                        (i32.const 0))
   827  (assert_return (invoke "i16x8_any_true_with_v128.xor" (v128.const i16x8 0 0 0 0 0 0 0 0)
   828                                                        (v128.const i16x8 0 0 0 0 0 0 -1 0))
   829                                                        (i32.const 1))
   830  (assert_return (invoke "i32x4_any_true_with_v128.xor" (v128.const i32x4 0 0 0 0)
   831                                                        (v128.const i32x4 0 0 0 0))
   832                                                        (i32.const 0))
   833  (assert_return (invoke "i32x4_any_true_with_v128.xor" (v128.const i32x4 -1 -1 -1 -1)
   834                                                        (v128.const i32x4 -1 -1 -1 -1))
   835                                                        (i32.const 0))
   836  (assert_return (invoke "i32x4_any_true_with_v128.xor" (v128.const i32x4 0 0 0 0)
   837                                                        (v128.const i32x4 0 0 -1 0))
   838                                                        (i32.const 1))
   839  ;; any_true with v128.bitselect
   840  (assert_return (invoke "i8x16_any_true_with_v128.bitselect" (v128.const i8x16 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA)
   841                                                              (v128.const i8x16 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55)
   842                                                              (v128.const i8x16 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55))
   843                                                              (i32.const 0))
   844  (assert_return (invoke "i8x16_any_true_with_v128.bitselect" (v128.const i8x16 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA)
   845                                                              (v128.const i8x16 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55)
   846                                                              (v128.const i8x16 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0xFF 0x55))
   847                                                              (i32.const 1))
   848  (assert_return (invoke "i16x8_any_true_with_v128.bitselect" (v128.const i16x8 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA)
   849                                                              (v128.const i16x8 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55)
   850                                                              (v128.const i16x8 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55))
   851                                                              (i32.const 0))
   852  (assert_return (invoke "i16x8_any_true_with_v128.bitselect" (v128.const i16x8 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA)
   853                                                              (v128.const i16x8 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55)
   854                                                              (v128.const i16x8 0x55 0x55 0x55 0x55 0x55 0x55 0xFF 0x55))
   855                                                              (i32.const 1))
   856  (assert_return (invoke "i32x4_any_true_with_v128.bitselect" (v128.const i32x4 0xAA 0xAA 0xAA 0xAA)
   857                                                              (v128.const i32x4 0x55 0x55 0x55 0x55)
   858                                                              (v128.const i32x4 0x55 0x55 0x55 0x55))
   859                                                              (i32.const 0))
   860  (assert_return (invoke "i32x4_any_true_with_v128.bitselect" (v128.const i32x4 0xAA 0xAA 0xAA 0xAA)
   861                                                              (v128.const i32x4 0x55 0x55 0x55 0x55)
   862                                                              (v128.const i32x4 0x55 0x55 0xFF 0x55))
   863                                                              (i32.const 1))
   864  ;; all_true with v128.not
   865  (assert_return (invoke "i8x16_all_true_with_v128.not" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   866                                                        (i32.const 1))
   867  (assert_return (invoke "i8x16_all_true_with_v128.not" (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
   868                                                        (i32.const 0))
   869  (assert_return (invoke "i8x16_all_true_with_v128.not" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0))
   870                                                        (i32.const 0))
   871  (assert_return (invoke "i16x8_all_true_with_v128.not" (v128.const i16x8 0 0 0 0 0 0 0 0))
   872                                                        (i32.const 1))
   873  (assert_return (invoke "i16x8_all_true_with_v128.not" (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1))
   874                                                        (i32.const 0))
   875  (assert_return (invoke "i16x8_all_true_with_v128.not" (v128.const i16x8 0 0 0 0 0 0 -1 0))
   876                                                        (i32.const 0))
   877  (assert_return (invoke "i32x4_all_true_with_v128.not" (v128.const i32x4 0 0 0 0))
   878                                                        (i32.const 1))
   879  (assert_return (invoke "i32x4_all_true_with_v128.not" (v128.const i32x4 -1 -1 -1 -1))
   880                                                        (i32.const 0))
   881  (assert_return (invoke "i32x4_all_true_with_v128.not" (v128.const i32x4 0 0 -1 0))
   882                                                        (i32.const 0))
   883  ;; all_true with v128.and
   884  (assert_return (invoke "i8x16_all_true_with_v128.and" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
   885                                                        (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   886                                                        (i32.const 0))
   887  (assert_return (invoke "i8x16_all_true_with_v128.and" (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1)
   888                                                        (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
   889                                                        (i32.const 1))
   890  (assert_return (invoke "i8x16_all_true_with_v128.and" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0)
   891                                                        (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0))
   892                                                        (i32.const 0))
   893  (assert_return (invoke "i16x8_all_true_with_v128.and" (v128.const i16x8 0 0 0 0 0 0 0 0)
   894                                                        (v128.const i16x8 0 0 0 0 0 0 0 0))
   895                                                        (i32.const 0))
   896  (assert_return (invoke "i16x8_all_true_with_v128.and" (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)
   897                                                        (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1))
   898                                                        (i32.const 1))
   899  (assert_return (invoke "i16x8_all_true_with_v128.and" (v128.const i16x8 0 0 0 0 0 0 -1 0)
   900                                                        (v128.const i16x8 0 0 0 0 0 0 -1 0))
   901                                                        (i32.const 0))
   902  (assert_return (invoke "i32x4_all_true_with_v128.and" (v128.const i32x4 0 0 0 0)
   903                                                        (v128.const i32x4 0 0 0 0))
   904                                                        (i32.const 0))
   905  (assert_return (invoke "i32x4_all_true_with_v128.and" (v128.const i32x4 -1 -1 -1 -1)
   906                                                        (v128.const i32x4 -1 -1 -1 -1))
   907                                                        (i32.const 1))
   908  (assert_return (invoke "i32x4_all_true_with_v128.and" (v128.const i32x4 0 0 -1 0)
   909                                                        (v128.const i32x4 0 0 -1 0))
   910                                                        (i32.const 0))
   911  ;; all_true with v128.or
   912  (assert_return (invoke "i8x16_all_true_with_v128.or" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
   913                                                       (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   914                                                       (i32.const 0))
   915  (assert_return (invoke "i8x16_all_true_with_v128.or" (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1)
   916                                                       (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
   917                                                       (i32.const 1))
   918  (assert_return (invoke "i8x16_all_true_with_v128.or" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0)
   919                                                       (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0))
   920                                                       (i32.const 0))
   921  (assert_return (invoke "i16x8_all_true_with_v128.or" (v128.const i16x8 0 0 0 0 0 0 0 0)
   922                                                       (v128.const i16x8 0 0 0 0 0 0 0 0))
   923                                                       (i32.const 0))
   924  (assert_return (invoke "i16x8_all_true_with_v128.or" (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)
   925                                                       (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1))
   926                                                       (i32.const 1))
   927  (assert_return (invoke "i16x8_all_true_with_v128.or" (v128.const i16x8 0 0 0 0 0 0 -1 0)
   928                                                       (v128.const i16x8 0 0 0 0 0 0 -1 0))
   929                                                       (i32.const 0))
   930  (assert_return (invoke "i32x4_all_true_with_v128.or" (v128.const i32x4 0 0 0 0)
   931                                                       (v128.const i32x4 0 0 0 0))
   932                                                       (i32.const 0))
   933  (assert_return (invoke "i32x4_all_true_with_v128.or" (v128.const i32x4 -1 -1 -1 -1)
   934                                                       (v128.const i32x4 -1 -1 -1 -1))
   935                                                       (i32.const 1))
   936  (assert_return (invoke "i32x4_all_true_with_v128.or" (v128.const i32x4 0 0 -1 0)
   937                                                       (v128.const i32x4 0 0 -1 0))
   938                                                       (i32.const 0))
   939  ;; all_true with v128.xor
   940  (assert_return (invoke "i8x16_all_true_with_v128.xor" (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
   941                                                        (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
   942                                                        (i32.const 0))
   943  (assert_return (invoke "i8x16_all_true_with_v128.xor" (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1)
   944                                                        (v128.const i8x16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1))
   945                                                        (i32.const 0))
   946  (assert_return (invoke "i8x16_all_true_with_v128.xor" (v128.const i8x16 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1)
   947                                                        (v128.const i8x16 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0))
   948                                                        (i32.const 1))
   949  (assert_return (invoke "i16x8_all_true_with_v128.xor" (v128.const i16x8 0 0 0 0 0 0 0 0)
   950                                                        (v128.const i16x8 0 0 0 0 0 0 0 0))
   951                                                        (i32.const 0))
   952  (assert_return (invoke "i16x8_all_true_with_v128.xor" (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)
   953                                                        (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1))
   954                                                        (i32.const 0))
   955  (assert_return (invoke "i16x8_all_true_with_v128.xor" (v128.const i16x8 0 -1 0 -1 0 -1 0 -1)
   956                                                        (v128.const i16x8 -1 0 -1 0 -1 0 -1 0))
   957                                                        (i32.const 1))
   958  (assert_return (invoke "i32x4_all_true_with_v128.xor" (v128.const i32x4 0 0 0 0)
   959                                                        (v128.const i32x4 0 0 0 0))
   960                                                        (i32.const 0))
   961  (assert_return (invoke "i32x4_all_true_with_v128.xor" (v128.const i32x4 -1 -1 -1 -1)
   962                                                        (v128.const i32x4 -1 -1 -1 -1))
   963                                                        (i32.const 0))
   964  (assert_return (invoke "i32x4_all_true_with_v128.xor" (v128.const i32x4 0 -1 0 -1)
   965                                                        (v128.const i32x4 -1 0 -1 0))
   966                                                        (i32.const 1))
   967  ;; all_true with v128.bitselect
   968  (assert_return (invoke "i8x16_all_true_with_v128.bitselect" (v128.const i8x16 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA)
   969                                                              (v128.const i8x16 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55)
   970                                                              (v128.const i8x16 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55))
   971                                                              (i32.const 0))
   972  (assert_return (invoke "i8x16_all_true_with_v128.bitselect" (v128.const i8x16 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA)
   973                                                              (v128.const i8x16 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55)
   974                                                              (v128.const i8x16 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA))
   975                                                              (i32.const 1))
   976  (assert_return (invoke "i16x8_all_true_with_v128.bitselect" (v128.const i16x8 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA)
   977                                                              (v128.const i16x8 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55)
   978                                                              (v128.const i16x8 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55))
   979                                                              (i32.const 0))
   980  (assert_return (invoke "i16x8_all_true_with_v128.bitselect" (v128.const i16x8 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA)
   981                                                              (v128.const i16x8 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55)
   982                                                              (v128.const i16x8 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA 0xAA))
   983                                                              (i32.const 1))
   984  (assert_return (invoke "i32x4_all_true_with_v128.bitselect" (v128.const i32x4 0xAA 0xAA 0xAA 0xAA)
   985                                                              (v128.const i32x4 0x55 0x55 0x55 0x55)
   986                                                              (v128.const i32x4 0x55 0x55 0x55 0x55))
   987                                                              (i32.const 0))
   988  (assert_return (invoke "i32x4_all_true_with_v128.bitselect" (v128.const i32x4 0xAA 0xAA 0xAA 0xAA)
   989                                                              (v128.const i32x4 0x55 0x55 0x55 0x55)
   990                                                              (v128.const i32x4 0xAA 0xAA 0xAA 0xAA))
   991                                                              (i32.const 1))
   992  
   993  ;; Type check
   994  
   995  (assert_invalid (module (func (result i32) (v128.any_true (i32.const 0)))) "type mismatch")
   996  (assert_invalid (module (func (result i32) (i8x16.all_true (i32.const 0)))) "type mismatch")
   997  (assert_invalid (module (func (result i32) (v128.any_true (i32.const 0)))) "type mismatch")
   998  (assert_invalid (module (func (result i32) (i16x8.all_true (i32.const 0)))) "type mismatch")
   999  (assert_invalid (module (func (result i32) (v128.any_true (i32.const 0)))) "type mismatch")
  1000  (assert_invalid (module (func (result i32) (i32x4.all_true (i32.const 0)))) "type mismatch")
  1001  
  1002  ;; Unknown operators
  1003  
  1004  (assert_malformed (module quote "(memory 1) (func (result i32) (f32x4.any_true (v128.const i32x4 0 0 0 0)))") "unknown operator")
  1005  (assert_malformed (module quote "(memory 1) (func (result i32) (f32x4.all_true (v128.const i32x4 0 0 0 0)))") "unknown operator")
  1006  (assert_malformed (module quote "(memory 1) (func (result i32) (f64x2.any_true (v128.const i32x4 0 0 0 0)))") "unknown operator")
  1007  (assert_malformed (module quote "(memory 1) (func (result i32) (f64x2.all_true (v128.const i32x4 0 0 0 0)))") "unknown operator")
  1008  
  1009  ;; Test operation with empty argument
  1010  
  1011  (assert_invalid
  1012    (module
  1013      (func $v128.any_true-arg-empty (result v128)
  1014        (v128.any_true)
  1015      )
  1016    )
  1017    "type mismatch"
  1018  )
  1019  (assert_invalid
  1020    (module
  1021      (func $i8x16.all_true-arg-empty (result v128)
  1022        (i8x16.all_true)
  1023      )
  1024    )
  1025    "type mismatch"
  1026  )
  1027  (assert_invalid
  1028    (module
  1029      (func $v128.any_true-arg-empty (result v128)
  1030        (v128.any_true)
  1031      )
  1032    )
  1033    "type mismatch"
  1034  )
  1035  (assert_invalid
  1036    (module
  1037      (func $i16x8.all_true-arg-empty (result v128)
  1038        (i16x8.all_true)
  1039      )
  1040    )
  1041    "type mismatch"
  1042  )
  1043  (assert_invalid
  1044    (module
  1045      (func $v128.any_true-arg-empty (result v128)
  1046        (v128.any_true)
  1047      )
  1048    )
  1049    "type mismatch"
  1050  )
  1051  (assert_invalid
  1052    (module
  1053      (func $i32x4.all_true-arg-empty (result v128)
  1054        (i32x4.all_true)
  1055      )
  1056    )
  1057    "type mismatch"
  1058  )