summaryrefslogtreecommitdiff
path: root/cross-project-tests/intrinsic-header-tests/wasm_simd128.c
blob: 27426adfa839d4dc5b68af9f77a7421f3c9672b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
// REQUIRES: webassembly-registered-target
// expected-no-diagnostics

// RUN: %clang %s -O2 -S -o - -target wasm32-unknown-unknown -msimd128 -Wcast-qual -Werror | FileCheck %s

#include <wasm_simd128.h>

// CHECK-LABEL: test_v128_load:
// CHECK: v128.load 0:p2align=0{{$}}
v128_t test_v128_load(const void *mem) { return wasm_v128_load(mem); }

// CHECK-LABEL: test_v128_load8_splat:
// CHECK: v128.load8_splat 0{{$}}
v128_t test_v128_load8_splat(const void *mem) {
  return wasm_v128_load8_splat(mem);
}

// CHECK-LABEL: test_v128_load16_splat:
// CHECK: v128.load16_splat 0:p2align=0{{$}}
v128_t test_v128_load16_splat(const void *mem) {
  return wasm_v128_load16_splat(mem);
}

// CHECK-LABEL: test_v128_load32_splat:
// CHECK: v128.load32_splat 0:p2align=0{{$}}
v128_t test_v128_load32_splat(const void *mem) {
  return wasm_v128_load32_splat(mem);
}

// CHECK-LABEL: test_v128_load64_splat:
// CHECK: v128.load64_splat 0:p2align=0{{$}}
v128_t test_v128_load64_splat(const void *mem) {
  return wasm_v128_load64_splat(mem);
}

// CHECK-LABEL: test_i16x8_load8x8:
// CHECK: i16x8.load8x8_s 0:p2align=0{{$}}
v128_t test_i16x8_load8x8(const void *mem) { return wasm_i16x8_load8x8(mem); }

// CHECK-LABEL: test_u16x8_load8x8:
// CHECK: i16x8.load8x8_u 0:p2align=0{{$}}
v128_t test_u16x8_load8x8(const void *mem) { return wasm_u16x8_load8x8(mem); }

// CHECK-LABEL: test_i32x4_load16x4:
// CHECK: i32x4.load16x4_s 0:p2align=0{{$}}
v128_t test_i32x4_load16x4(const void *mem) { return wasm_i32x4_load16x4(mem); }

// CHECK-LABEL: test_u32x4_load16x4:
// CHECK: i32x4.load16x4_u 0:p2align=0{{$}}
v128_t test_u32x4_load16x4(const void *mem) { return wasm_u32x4_load16x4(mem); }

// CHECK-LABEL: test_i64x2_load32x2:
// CHECK: i64x2.load32x2_s 0:p2align=0{{$}}
v128_t test_i64x2_load32x2(const void *mem) { return wasm_i64x2_load32x2(mem); }

// CHECK-LABEL: test_u64x2_load32x2:
// CHECK: i64x2.load32x2_u 0:p2align=0{{$}}
v128_t test_u64x2_load32x2(const void *mem) { return wasm_u64x2_load32x2(mem); }

// CHECK-LABEL: test_v128_load32_zero:
// CHECK: v128.load32_zero 0:p2align=0{{$}}
v128_t test_v128_load32_zero(const void *mem) {
  return wasm_v128_load32_zero(mem);
}

// CHECK-LABEL: test_v128_load64_zero:
// CHECK: v128.load64_zero 0:p2align=0{{$}}
v128_t test_v128_load64_zero(const void *mem) {
  return wasm_v128_load64_zero(mem);
}

// CHECK-LABEL: test_v128_load8_lane:
// CHECK: v128.load8_lane 0, 15{{$}}
v128_t test_v128_load8_lane(uint8_t *ptr, v128_t vec) {
  return wasm_v128_load8_lane(ptr, vec, 15);
}

// CHECK-LABEL: test_v128_load16_lane:
// CHECK: v128.load16_lane 0:p2align=0, 7{{$}}
v128_t test_v128_load16_lane(uint16_t *ptr, v128_t vec) {
  return wasm_v128_load16_lane(ptr, vec, 7);
}

// CHECK-LABEL: test_v128_load32_lane:
// CHECK: v128.load32_lane 0:p2align=0, 3{{$}}
v128_t test_v128_load32_lane(uint32_t *ptr, v128_t vec) {
  return wasm_v128_load32_lane(ptr, vec, 3);
}

// CHECK-LABEL: test_v128_load64_lane:
// CHECK: v128.load64_lane 0:p2align=0, 1{{$}}
v128_t test_v128_load64_lane(uint64_t *ptr, v128_t vec) {
  return wasm_v128_load64_lane(ptr, vec, 1);
}

// CHECK-LABEL: test_v128_store:
// CHECK: v128.store 0:p2align=0{{$}}
void test_v128_store(void *mem, v128_t a) { return wasm_v128_store(mem, a); }

// CHECK-LABEL: test_v128_store8_lane:
// CHECK: v128.store8_lane 0, 15{{$}}
void test_v128_store8_lane(uint8_t *ptr, v128_t vec) {
  return wasm_v128_store8_lane(ptr, vec, 15);
}

// CHECK-LABEL: test_v128_store16_lane:
// CHECK: v128.store16_lane 0:p2align=0, 7{{$}}
void test_v128_store16_lane(uint16_t *ptr, v128_t vec) {
  return wasm_v128_store16_lane(ptr, vec, 7);
}

// CHECK-LABEL: test_v128_store32_lane:
// CHECK: v128.store32_lane 0:p2align=0, 3{{$}}
void test_v128_store32_lane(uint32_t *ptr, v128_t vec) {
  return wasm_v128_store32_lane(ptr, vec, 3);
}

// CHECK-LABEL: test_v128_store64_lane:
// CHECK: v128.store64_lane 0:p2align=0, 1{{$}}
void test_v128_store64_lane(uint64_t *ptr, v128_t vec) {
  return wasm_v128_store64_lane(ptr, vec, 1);
}

// CHECK-LABEL: test_i8x16_make:
// CHECK:      local.get 0{{$}}
// CHECK-NEXT: i8x16.splat{{$}}
// CHECK-NEXT: local.get 1{{$}}
// CHECK-NEXT: i8x16.replace_lane 1{{$}}
// CHECK-NEXT: local.get 2{{$}}
// CHECK-NEXT: i8x16.replace_lane 2{{$}}
// CHECK-NEXT: local.get 3{{$}}
// CHECK-NEXT: i8x16.replace_lane 3{{$}}
// CHECK-NEXT: local.get 4{{$}}
// CHECK-NEXT: i8x16.replace_lane 4{{$}}
// CHECK-NEXT: local.get 5{{$}}
// CHECK-NEXT: i8x16.replace_lane 5{{$}}
// CHECK-NEXT: local.get 6{{$}}
// CHECK-NEXT: i8x16.replace_lane 6{{$}}
// CHECK-NEXT: local.get 7{{$}}
// CHECK-NEXT: i8x16.replace_lane 7{{$}}
// CHECK-NEXT: local.get 8{{$}}
// CHECK-NEXT: i8x16.replace_lane 8{{$}}
// CHECK-NEXT: local.get 9{{$}}
// CHECK-NEXT: i8x16.replace_lane 9{{$}}
// CHECK-NEXT: local.get 10{{$}}
// CHECK-NEXT: i8x16.replace_lane 10{{$}}
// CHECK-NEXT: local.get 11{{$}}
// CHECK-NEXT: i8x16.replace_lane 11{{$}}
// CHECK-NEXT: local.get 12{{$}}
// CHECK-NEXT: i8x16.replace_lane 12{{$}}
// CHECK-NEXT: local.get 13{{$}}
// CHECK-NEXT: i8x16.replace_lane 13{{$}}
// CHECK-NEXT: local.get 14{{$}}
// CHECK-NEXT: i8x16.replace_lane 14{{$}}
// CHECK-NEXT: local.get 15{{$}}
// CHECK-NEXT: i8x16.replace_lane 15{{$}}
v128_t test_i8x16_make(int8_t c0, int8_t c1, int8_t c2, int8_t c3, int8_t c4,
                       int8_t c5, int8_t c6, int8_t c7, int8_t c8, int8_t c9,
                       int8_t c10, int8_t c11, int8_t c12, int8_t c13,
                       int8_t c14, int8_t c15) {
  return wasm_i8x16_make(c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
                         c13, c14, c15);
}

// CHECK-LABEL: test_i16x8_make:
// CHECK:      local.get 0{{$}}
// CHECK-NEXT: i16x8.splat{{$}}
// CHECK-NEXT: local.get 1{{$}}
// CHECK-NEXT: i16x8.replace_lane 1{{$}}
// CHECK-NEXT: local.get 2{{$}}
// CHECK-NEXT: i16x8.replace_lane 2{{$}}
// CHECK-NEXT: local.get 3{{$}}
// CHECK-NEXT: i16x8.replace_lane 3{{$}}
// CHECK-NEXT: local.get 4{{$}}
// CHECK-NEXT: i16x8.replace_lane 4{{$}}
// CHECK-NEXT: local.get 5{{$}}
// CHECK-NEXT: i16x8.replace_lane 5{{$}}
// CHECK-NEXT: local.get 6{{$}}
// CHECK-NEXT: i16x8.replace_lane 6{{$}}
// CHECK-NEXT: local.get 7{{$}}
// CHECK-NEXT: i16x8.replace_lane 7{{$}}
v128_t test_i16x8_make(int16_t c0, int16_t c1, int16_t c2, int16_t c3,
                       int16_t c4, int16_t c5, int16_t c6, int16_t c7) {
  return wasm_i16x8_make(c0, c1, c2, c3, c4, c5, c6, c7);
}

// CHECK-LABEL: test_i32x4_make:
// CHECK:      local.get 0{{$}}
// CHECK-NEXT: i32x4.splat{{$}}
// CHECK-NEXT: local.get 1{{$}}
// CHECK-NEXT: i32x4.replace_lane 1{{$}}
// CHECK-NEXT: local.get 2{{$}}
// CHECK-NEXT: i32x4.replace_lane 2{{$}}
// CHECK-NEXT: local.get 3{{$}}
// CHECK-NEXT: i32x4.replace_lane 3{{$}}
v128_t test_i32x4_make(int32_t c0, int32_t c1, int32_t c2, int32_t c3) {
  return wasm_i32x4_make(c0, c1, c2, c3);
}

// CHECK-LABEL: test_i64x2_make:
// CHECK:      local.get 0{{$}}
// CHECK-NEXT: i64x2.splat{{$}}
// CHECK-NEXT: local.get 1{{$}}
// CHECK-NEXT: i64x2.replace_lane 1{{$}}
v128_t test_i64x2_make(int64_t c0, int64_t c1) {
  return wasm_i64x2_make(c0, c1);
}

// CHECK-LABEL: test_f32x4_make:
// CHECK:      local.get 0{{$}}
// CHECK-NEXT: f32x4.splat{{$}}
// CHECK-NEXT: local.get 1{{$}}
// CHECK-NEXT: f32x4.replace_lane 1{{$}}
// CHECK-NEXT: local.get 2{{$}}
// CHECK-NEXT: f32x4.replace_lane 2{{$}}
// CHECK-NEXT: local.get 3{{$}}
// CHECK-NEXT: f32x4.replace_lane 3{{$}}
v128_t test_f32x4_make(float c0, float c1, float c2, float c3) {
  return wasm_f32x4_make(c0, c1, c2, c3);
}

// CHECK-LABEL: test_f64x2_make:
// CHECK:      local.get 0{{$}}
// CHECK-NEXT: f64x2.splat{{$}}
// CHECK-NEXT: local.get 1{{$}}
// CHECK-NEXT: f64x2.replace_lane 1{{$}}
v128_t test_f64x2_make(double c0, double c1) { return wasm_f64x2_make(c0, c1); }

// CHECK-LABEL: test_i8x16_const:
// CHECK: v128.const 50462976, 117835012, 185207048, 252579084{{$}}
v128_t test_i8x16_const() {
  return wasm_i8x16_const(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
}

// CHECK-LABEL: test_i16x8_const:
// CHECK: v128.const 65536, 196610, 327684, 458758{{$}}
v128_t test_i16x8_const() { return wasm_i16x8_const(0, 1, 2, 3, 4, 5, 6, 7); }

// CHECK-LABEL: test_i32x4_const:
// CHECK: v128.const 0, 1, 2, 3{{$}}
v128_t test_i32x4_const() { return wasm_i32x4_const(0, 1, 2, 3); }

// CHECK-LABEL: test_i64x2_const:
// CHECK: v128.const 0, 0, 1, 0{{$}}
v128_t test_i64x2_const() { return wasm_i64x2_const(0, 1); }

// CHECK-LABEL: test_f32x4_const:
// CHECK: v128.const 0, 1065353216, 1073741824, 1077936128{{$}}
v128_t test_f32x4_const() { return wasm_f32x4_const(0, 1, 2, 3); }

// CHECK-LABEL: test_f64x2_const:
// CHECK: v128.const 0, 0, 0, 1072693248{{$}}
v128_t test_f64x2_const() { return wasm_f64x2_const(0, 1); }

// CHECK-LABEL: test_i8x16_splat:
// CHECK: i8x16.splat{{$}}
v128_t test_i8x16_splat(int8_t a) { return wasm_i8x16_splat(a); }

// CHECK-LABEL: test_i8x16_extract_lane:
// CHECK: i8x16.extract_lane_s 15{{$}}
int8_t test_i8x16_extract_lane(v128_t a) {
  return wasm_i8x16_extract_lane(a, 15);
}

// CHECK-LABEL: test_u8x16_extract_lane:
// CHECK: i8x16.extract_lane_u 15{{$}}
uint8_t test_u8x16_extract_lane(v128_t a) {
  return wasm_u8x16_extract_lane(a, 15);
}

// CHECK-LABEL: test_i8x16_replace_lane:
// CHECK: i8x16.replace_lane 15{{$}}
v128_t test_i8x16_replace_lane(v128_t a, int8_t b) {
  return wasm_i8x16_replace_lane(a, 15, b);
}

// CHECK-LABEL: test_i16x8_splat:
// CHECK: i16x8.splat{{$}}
v128_t test_i16x8_splat(int16_t a) { return wasm_i16x8_splat(a); }

// CHECK-LABEL: test_i16x8_extract_lane:
// CHECK: i16x8.extract_lane_s 7{{$}}
int16_t test_i16x8_extract_lane(v128_t a) {
  return wasm_i16x8_extract_lane(a, 7);
}

// CHECK-LABEL: test_u16x8_extract_lane:
// CHECK: i16x8.extract_lane_u 7{{$}}
uint16_t test_u16x8_extract_lane(v128_t a) {
  return wasm_u16x8_extract_lane(a, 7);
}

// CHECK-LABEL: test_i16x8_replace_lane:
// CHECK: i16x8.replace_lane 7{{$}}
v128_t test_i16x8_replace_lane(v128_t a, int16_t b) {
  return wasm_i16x8_replace_lane(a, 7, b);
}

// CHECK-LABEL: test_i32x4_splat:
// CHECK: i32x4.splat{{$}}
v128_t test_i32x4_splat(int32_t a) { return wasm_i32x4_splat(a); }

// CHECK-LABEL: test_i32x4_extract_lane:
// CHECK: i32x4.extract_lane 3{{$}}
int32_t test_i32x4_extract_lane(v128_t a) {
  return wasm_i32x4_extract_lane(a, 3);
}

// CHECK-LABEL: test_i32x4_replace_lane:
// CHECK: i32x4.replace_lane 3{{$}}
v128_t test_i32x4_replace_lane(v128_t a, int32_t b) {
  return wasm_i32x4_replace_lane(a, 3, b);
}

// CHECK-LABEL: test_i64x2_splat:
// CHECK: i64x2.splat{{$}}
v128_t test_i64x2_splat(int64_t a) { return wasm_i64x2_splat(a); }

// CHECK-LABEL: test_i64x2_extract_lane:
// CHECK: i64x2.extract_lane 1{{$}}
int64_t test_i64x2_extract_lane(v128_t a) {
  return wasm_i64x2_extract_lane(a, 1);
}

// CHECK-LABEL: test_i64x2_replace_lane:
// CHECK: i64x2.replace_lane 1{{$}}
v128_t test_i64x2_replace_lane(v128_t a, int64_t b) {
  return wasm_i64x2_replace_lane(a, 1, b);
}

// CHECK-LABEL: test_f32x4_splat:
// CHECK: f32x4.splat{{$}}
v128_t test_f32x4_splat(float a) { return wasm_f32x4_splat(a); }

// CHECK-LABEL: test_f32x4_extract_lane:
// CHECK: f32x4.extract_lane 3{{$}}
float test_f32x4_extract_lane(v128_t a) {
  return wasm_f32x4_extract_lane(a, 3);
}

// CHECK-LABEL: test_f32x4_replace_lane:
// CHECK: f32x4.replace_lane 3{{$}}
v128_t test_f32x4_replace_lane(v128_t a, float b) {
  return wasm_f32x4_replace_lane(a, 3, b);
}

// CHECK-LABEL: test_f64x2_splat:
// CHECK: f64x2.splat{{$}}
v128_t test_f64x2_splat(double a) { return wasm_f64x2_splat(a); }

// CHECK-LABEL: test_f64x2_extract_lane:
// CHECK: f64x2.extract_lane 1{{$}}
double test_f64x2_extract_lane(v128_t a) {
  return wasm_f64x2_extract_lane(a, 1);
}

// CHECK-LABEL: test_f64x2_replace_lane:
// CHECK: f64x2.replace_lane 1{{$}}
v128_t test_f64x2_replace_lane(v128_t a, double b) {
  return wasm_f64x2_replace_lane(a, 1, b);
}

// CHECK-LABEL: test_i8x16_eq:
// CHECK: i8x16.eq{{$}}
v128_t test_i8x16_eq(v128_t a, v128_t b) { return wasm_i8x16_eq(a, b); }

// CHECK-LABEL: test_i8x16_ne:
// CHECK: i8x16.ne{{$}}
v128_t test_i8x16_ne(v128_t a, v128_t b) { return wasm_i8x16_ne(a, b); }

// CHECK-LABEL: test_i8x16_lt:
// CHECK: i8x16.lt_s{{$}}
v128_t test_i8x16_lt(v128_t a, v128_t b) { return wasm_i8x16_lt(a, b); }

// CHECK-LABEL: test_u8x16_lt:
// CHECK: i8x16.lt_u{{$}}
v128_t test_u8x16_lt(v128_t a, v128_t b) { return wasm_u8x16_lt(a, b); }

// CHECK-LABEL: test_i8x16_gt:
// CHECK: i8x16.gt_s{{$}}
v128_t test_i8x16_gt(v128_t a, v128_t b) { return wasm_i8x16_gt(a, b); }

// CHECK-LABEL: test_u8x16_gt:
// CHECK: i8x16.gt_u{{$}}
v128_t test_u8x16_gt(v128_t a, v128_t b) { return wasm_u8x16_gt(a, b); }

// CHECK-LABEL: test_i8x16_le:
// CHECK: i8x16.le_s{{$}}
v128_t test_i8x16_le(v128_t a, v128_t b) { return wasm_i8x16_le(a, b); }

// CHECK-LABEL: test_u8x16_le:
// CHECK: i8x16.le_u{{$}}
v128_t test_u8x16_le(v128_t a, v128_t b) { return wasm_u8x16_le(a, b); }

// CHECK-LABEL: test_i8x16_ge:
// CHECK: i8x16.ge_s{{$}}
v128_t test_i8x16_ge(v128_t a, v128_t b) { return wasm_i8x16_ge(a, b); }

// CHECK-LABEL: test_u8x16_ge:
// CHECK: i8x16.ge_u{{$}}
v128_t test_u8x16_ge(v128_t a, v128_t b) { return wasm_u8x16_ge(a, b); }

// CHECK-LABEL: test_i16x8_eq:
// CHECK: i16x8.eq{{$}}
v128_t test_i16x8_eq(v128_t a, v128_t b) { return wasm_i16x8_eq(a, b); }

// CHECK-LABEL: test_i16x8_ne:
// CHECK: i16x8.ne{{$}}
v128_t test_i16x8_ne(v128_t a, v128_t b) { return wasm_i16x8_ne(a, b); }

// CHECK-LABEL: test_i16x8_lt:
// CHECK: i16x8.lt_s{{$}}
v128_t test_i16x8_lt(v128_t a, v128_t b) { return wasm_i16x8_lt(a, b); }

// CHECK-LABEL: test_u16x8_lt:
// CHECK: i16x8.lt_u{{$}}
v128_t test_u16x8_lt(v128_t a, v128_t b) { return wasm_u16x8_lt(a, b); }

// CHECK-LABEL: test_i16x8_gt:
// CHECK: i16x8.gt_s{{$}}
v128_t test_i16x8_gt(v128_t a, v128_t b) { return wasm_i16x8_gt(a, b); }

// CHECK-LABEL: test_u16x8_gt:
// CHECK: i16x8.gt_u{{$}}
v128_t test_u16x8_gt(v128_t a, v128_t b) { return wasm_u16x8_gt(a, b); }

// CHECK-LABEL: test_i16x8_le:
// CHECK: i16x8.le_s{{$}}
v128_t test_i16x8_le(v128_t a, v128_t b) { return wasm_i16x8_le(a, b); }

// CHECK-LABEL: test_u16x8_le:
// CHECK: i16x8.le_u{{$}}
v128_t test_u16x8_le(v128_t a, v128_t b) { return wasm_u16x8_le(a, b); }

// CHECK-LABEL: test_i16x8_ge:
// CHECK: i16x8.ge_s{{$}}
v128_t test_i16x8_ge(v128_t a, v128_t b) { return wasm_i16x8_ge(a, b); }

// CHECK-LABEL: test_u16x8_ge:
// CHECK: i16x8.ge_u{{$}}
v128_t test_u16x8_ge(v128_t a, v128_t b) { return wasm_u16x8_ge(a, b); }

// CHECK-LABEL: test_i32x4_eq:
// CHECK: i32x4.eq{{$}}
v128_t test_i32x4_eq(v128_t a, v128_t b) { return wasm_i32x4_eq(a, b); }

// CHECK-LABEL: test_i32x4_ne:
// CHECK: i32x4.ne{{$}}
v128_t test_i32x4_ne(v128_t a, v128_t b) { return wasm_i32x4_ne(a, b); }

// CHECK-LABEL: test_i32x4_lt:
// CHECK: i32x4.lt_s{{$}}
v128_t test_i32x4_lt(v128_t a, v128_t b) { return wasm_i32x4_lt(a, b); }

// CHECK-LABEL: test_u32x4_lt:
// CHECK: i32x4.lt_u{{$}}
v128_t test_u32x4_lt(v128_t a, v128_t b) { return wasm_u32x4_lt(a, b); }

// CHECK-LABEL: test_i32x4_gt:
// CHECK: i32x4.gt_s{{$}}
v128_t test_i32x4_gt(v128_t a, v128_t b) { return wasm_i32x4_gt(a, b); }

// CHECK-LABEL: test_u32x4_gt:
// CHECK: i32x4.gt_u{{$}}
v128_t test_u32x4_gt(v128_t a, v128_t b) { return wasm_u32x4_gt(a, b); }

// CHECK-LABEL: test_i32x4_le:
// CHECK: i32x4.le_s{{$}}
v128_t test_i32x4_le(v128_t a, v128_t b) { return wasm_i32x4_le(a, b); }

// CHECK-LABEL: test_u32x4_le:
// CHECK: i32x4.le_u{{$}}
v128_t test_u32x4_le(v128_t a, v128_t b) { return wasm_u32x4_le(a, b); }

// CHECK-LABEL: test_i32x4_ge:
// CHECK: i32x4.ge_s{{$}}
v128_t test_i32x4_ge(v128_t a, v128_t b) { return wasm_i32x4_ge(a, b); }

// CHECK-LABEL: test_u32x4_ge:
// CHECK: i32x4.ge_u{{$}}
v128_t test_u32x4_ge(v128_t a, v128_t b) { return wasm_u32x4_ge(a, b); }

// CHECK-LABEL: test_i64x2_eq:
// CHECK: i64x2.eq{{$}}
v128_t test_i64x2_eq(v128_t a, v128_t b) { return wasm_i64x2_eq(a, b); }

// CHECK-LABEL: test_i64x2_ne:
// CHECK: i64x2.ne{{$}}
v128_t test_i64x2_ne(v128_t a, v128_t b) { return wasm_i64x2_ne(a, b); }

// CHECK-LABEL: test_i64x2_lt:
// CHECK: i64x2.lt_s{{$}}
v128_t test_i64x2_lt(v128_t a, v128_t b) { return wasm_i64x2_lt(a, b); }

// CHECK-LABEL: test_i64x2_gt:
// CHECK: i64x2.gt_s{{$}}
v128_t test_i64x2_gt(v128_t a, v128_t b) { return wasm_i64x2_gt(a, b); }

// CHECK-LABEL: test_i64x2_le:
// CHECK: i64x2.le_s{{$}}
v128_t test_i64x2_le(v128_t a, v128_t b) { return wasm_i64x2_le(a, b); }

// CHECK-LABEL: test_i64x2_ge:
// CHECK: i64x2.ge_s{{$}}
v128_t test_i64x2_ge(v128_t a, v128_t b) { return wasm_i64x2_ge(a, b); }

// CHECK-LABEL: test_f32x4_eq:
// CHECK: f32x4.eq{{$}}
v128_t test_f32x4_eq(v128_t a, v128_t b) { return wasm_f32x4_eq(a, b); }

// CHECK-LABEL: test_f32x4_ne:
// CHECK: f32x4.ne{{$}}
v128_t test_f32x4_ne(v128_t a, v128_t b) { return wasm_f32x4_ne(a, b); }

// CHECK-LABEL: test_f32x4_lt:
// CHECK: f32x4.lt{{$}}
v128_t test_f32x4_lt(v128_t a, v128_t b) { return wasm_f32x4_lt(a, b); }

// CHECK-LABEL: test_f32x4_gt:
// CHECK: f32x4.gt{{$}}
v128_t test_f32x4_gt(v128_t a, v128_t b) { return wasm_f32x4_gt(a, b); }

// CHECK-LABEL: test_f32x4_le:
// CHECK: f32x4.le{{$}}
v128_t test_f32x4_le(v128_t a, v128_t b) { return wasm_f32x4_le(a, b); }

// CHECK-LABEL: test_f32x4_ge:
// CHECK: f32x4.ge{{$}}
v128_t test_f32x4_ge(v128_t a, v128_t b) { return wasm_f32x4_ge(a, b); }

// CHECK-LABEL: test_f64x2_eq:
// CHECK: f64x2.eq{{$}}
v128_t test_f64x2_eq(v128_t a, v128_t b) { return wasm_f64x2_eq(a, b); }

// CHECK-LABEL: test_f64x2_ne:
// CHECK: f64x2.ne{{$}}
v128_t test_f64x2_ne(v128_t a, v128_t b) { return wasm_f64x2_ne(a, b); }

// CHECK-LABEL: test_f64x2_lt:
// CHECK: f64x2.lt{{$}}
v128_t test_f64x2_lt(v128_t a, v128_t b) { return wasm_f64x2_lt(a, b); }

// CHECK-LABEL: test_f64x2_gt:
// CHECK: f64x2.gt{{$}}
v128_t test_f64x2_gt(v128_t a, v128_t b) { return wasm_f64x2_gt(a, b); }

// CHECK-LABEL: test_f64x2_le:
// CHECK: f64x2.le{{$}}
v128_t test_f64x2_le(v128_t a, v128_t b) { return wasm_f64x2_le(a, b); }

// CHECK-LABEL: test_f64x2_ge:
// CHECK: f64x2.ge{{$}}
v128_t test_f64x2_ge(v128_t a, v128_t b) { return wasm_f64x2_ge(a, b); }

// CHECK-LABEL: test_v128_not:
// CHECK: v128.not{{$}}
v128_t test_v128_not(v128_t a) { return wasm_v128_not(a); }

// CHECK-LABEL: test_v128_and:
// CHECK: v128.and{{$}}
v128_t test_v128_and(v128_t a, v128_t b) { return wasm_v128_and(a, b); }

// CHECK-LABEL: test_v128_or:
// CHECK: v128.or{{$}}
v128_t test_v128_or(v128_t a, v128_t b) { return wasm_v128_or(a, b); }

// CHECK-LABEL: test_v128_xor:
// CHECK: v128.xor{{$}}
v128_t test_v128_xor(v128_t a, v128_t b) { return wasm_v128_xor(a, b); }

// CHECK-LABEL: test_v128_andnot:
// CHECK: v128.andnot{{$}}
v128_t test_v128_andnot(v128_t a, v128_t b) { return wasm_v128_andnot(a, b); }

// CHECK-LABEL: test_v128_any_true:
// CHECK: v128.any_true{{$}}
bool test_v128_any_true(v128_t a) { return wasm_v128_any_true(a); }

// CHECK-LABEL: test_v128_bitselect:
// CHECK: v128.bitselect{{$}}
v128_t test_v128_bitselect(v128_t a, v128_t b, v128_t mask) {
  return wasm_v128_bitselect(a, b, mask);
}

// CHECK-LABEL: test_i8x16_abs:
// CHECK: i8x16.abs{{$}}
v128_t test_i8x16_abs(v128_t a) { return wasm_i8x16_abs(a); }

// CHECK-LABEL: test_i8x16_neg:
// CHECK: i8x16.neg{{$}}
v128_t test_i8x16_neg(v128_t a) { return wasm_i8x16_neg(a); }

// CHECK-LABEL: test_i8x16_all_true:
// CHECK: i8x16.all_true{{$}}
bool test_i8x16_all_true(v128_t a) { return wasm_i8x16_all_true(a); }

// CHECK-LABEL: test_i8x16_bitmask:
// CHECK: i8x16.bitmask{{$}}
int32_t test_i8x16_bitmask(v128_t a) { return wasm_i8x16_bitmask(a); }

// CHECK-LABEL: test_i8x16_popcnt:
// CHECK: i8x16.popcnt{{$}}
v128_t test_i8x16_popcnt(v128_t a) { return wasm_i8x16_popcnt(a); }

// CHECK-LABEL: test_i8x16_shl:
// CHECK: i8x16.shl{{$}}
v128_t test_i8x16_shl(v128_t a, int32_t b) { return wasm_i8x16_shl(a, b); }

// CHECK-LABEL: test_i8x16_shr:
// CHECK: i8x16.shr_s{{$}}
v128_t test_i8x16_shr(v128_t a, int32_t b) { return wasm_i8x16_shr(a, b); }

// CHECK-LABEL: test_u8x16_shr:
// CHECK: i8x16.shr_u{{$}}
v128_t test_u8x16_shr(v128_t a, int32_t b) { return wasm_u8x16_shr(a, b); }

// CHECK-LABEL: test_i8x16_add:
// CHECK: i8x16.add{{$}}
v128_t test_i8x16_add(v128_t a, v128_t b) { return wasm_i8x16_add(a, b); }

// CHECK-LABEL: test_i8x16_add_sat:
// CHECK: i8x16.add_sat_s{{$}}
v128_t test_i8x16_add_sat(v128_t a, v128_t b) {
  return wasm_i8x16_add_sat(a, b);
}

// CHECK-LABEL: test_u8x16_add_sat:
// CHECK: i8x16.add_sat_u{{$}}
v128_t test_u8x16_add_sat(v128_t a, v128_t b) {
  return wasm_u8x16_add_sat(a, b);
}

// CHECK-LABEL: test_i8x16_sub:
// CHECK: i8x16.sub{{$}}
v128_t test_i8x16_sub(v128_t a, v128_t b) { return wasm_i8x16_sub(a, b); }

// CHECK-LABEL: test_i8x16_sub_sat:
// CHECK: i8x16.sub_sat_s{{$}}
v128_t test_i8x16_sub_sat(v128_t a, v128_t b) {
  return wasm_i8x16_sub_sat(a, b);
}

// CHECK-LABEL: test_u8x16_sub_sat:
// CHECK: i8x16.sub_sat_u{{$}}
v128_t test_u8x16_sub_sat(v128_t a, v128_t b) {
  return wasm_u8x16_sub_sat(a, b);
}

// CHECK-LABEL: test_i8x16_min:
// CHECK: i8x16.min_s{{$}}
v128_t test_i8x16_min(v128_t a, v128_t b) { return wasm_i8x16_min(a, b); }

// CHECK-LABEL: test_u8x16_min:
// CHECK: i8x16.min_u{{$}}
v128_t test_u8x16_min(v128_t a, v128_t b) { return wasm_u8x16_min(a, b); }

// CHECK-LABEL: test_i8x16_max:
// CHECK: i8x16.max_s{{$}}
v128_t test_i8x16_max(v128_t a, v128_t b) { return wasm_i8x16_max(a, b); }

// CHECK-LABEL: test_u8x16_max:
// CHECK: i8x16.max_u{{$}}
v128_t test_u8x16_max(v128_t a, v128_t b) { return wasm_u8x16_max(a, b); }

// CHECK-LABEL: test_u8x16_avgr:
// CHECK: i8x16.avgr_u{{$}}
v128_t test_u8x16_avgr(v128_t a, v128_t b) { return wasm_u8x16_avgr(a, b); }

// CHECK-LABEL: test_i16x8_abs:
// CHECK: i16x8.abs{{$}}
v128_t test_i16x8_abs(v128_t a) { return wasm_i16x8_abs(a); }

// CHECK-LABEL: test_i16x8_neg:
// CHECK: i16x8.neg{{$}}
v128_t test_i16x8_neg(v128_t a) { return wasm_i16x8_neg(a); }

// CHECK-LABEL: test_i16x8_all_true:
// CHECK: i16x8.all_true{{$}}
bool test_i16x8_all_true(v128_t a) { return wasm_i16x8_all_true(a); }

// CHECK-LABEL: test_i16x8_bitmask:
// CHECK: i16x8.bitmask{{$}}
int32_t test_i16x8_bitmask(v128_t a) { return wasm_i16x8_bitmask(a); }

// CHECK-LABEL: test_i16x8_shl:
// CHECK: i16x8.shl{{$}}
v128_t test_i16x8_shl(v128_t a, int32_t b) { return wasm_i16x8_shl(a, b); }

// CHECK-LABEL: test_i16x8_shr:
// CHECK: i16x8.shr_s{{$}}
v128_t test_i16x8_shr(v128_t a, int32_t b) { return wasm_i16x8_shr(a, b); }

// CHECK-LABEL: test_u16x8_shr:
// CHECK: i16x8.shr_u{{$}}
v128_t test_u16x8_shr(v128_t a, int32_t b) { return wasm_u16x8_shr(a, b); }

// CHECK-LABEL: test_i16x8_add:
// CHECK: i16x8.add{{$}}
v128_t test_i16x8_add(v128_t a, v128_t b) { return wasm_i16x8_add(a, b); }

// CHECK-LABEL: test_i16x8_add_sat:
// CHECK: i16x8.add_sat_s{{$}}
v128_t test_i16x8_add_sat(v128_t a, v128_t b) {
  return wasm_i16x8_add_sat(a, b);
}

// CHECK-LABEL: test_u16x8_add_sat:
// CHECK: i16x8.add_sat_u{{$}}
v128_t test_u16x8_add_sat(v128_t a, v128_t b) {
  return wasm_u16x8_add_sat(a, b);
}

// CHECK-LABEL: test_i16x8_sub:
// CHECK: i16x8.sub{{$}}
v128_t test_i16x8_sub(v128_t a, v128_t b) { return wasm_i16x8_sub(a, b); }

// CHECK-LABEL: test_i16x8_sub_sat:
// CHECK: i16x8.sub_sat_s{{$}}
v128_t test_i16x8_sub_sat(v128_t a, v128_t b) {
  return wasm_i16x8_sub_sat(a, b);
}

// CHECK-LABEL: test_u16x8_sub_sat:
// CHECK: i16x8.sub_sat_u{{$}}
v128_t test_u16x8_sub_sat(v128_t a, v128_t b) {
  return wasm_u16x8_sub_sat(a, b);
}

// CHECK-LABEL: test_i16x8_mul:
// CHECK: i16x8.mul{{$}}
v128_t test_i16x8_mul(v128_t a, v128_t b) { return wasm_i16x8_mul(a, b); }

// CHECK-LABEL: test_i16x8_min:
// CHECK: i16x8.min_s{{$}}
v128_t test_i16x8_min(v128_t a, v128_t b) { return wasm_i16x8_min(a, b); }

// CHECK-LABEL: test_u16x8_min:
// CHECK: i16x8.min_u{{$}}
v128_t test_u16x8_min(v128_t a, v128_t b) { return wasm_u16x8_min(a, b); }

// CHECK-LABEL: test_i16x8_max:
// CHECK: i16x8.max_s{{$}}
v128_t test_i16x8_max(v128_t a, v128_t b) { return wasm_i16x8_max(a, b); }

// CHECK-LABEL: test_u16x8_max:
// CHECK: i16x8.max_u{{$}}
v128_t test_u16x8_max(v128_t a, v128_t b) { return wasm_u16x8_max(a, b); }

// CHECK-LABEL: test_u16x8_avgr:
// CHECK: i16x8.avgr_u{{$}}
v128_t test_u16x8_avgr(v128_t a, v128_t b) { return wasm_u16x8_avgr(a, b); }

// CHECK-LABEL: test_i32x4_abs:
// CHECK: i32x4.abs{{$}}
v128_t test_i32x4_abs(v128_t a) { return wasm_i32x4_abs(a); }

// CHECK-LABEL: test_i32x4_neg:
// CHECK: i32x4.neg{{$}}
v128_t test_i32x4_neg(v128_t a) { return wasm_i32x4_neg(a); }

// CHECK-LABEL: test_i32x4_all_true:
// CHECK: i32x4.all_true{{$}}
bool test_i32x4_all_true(v128_t a) { return wasm_i32x4_all_true(a); }

// CHECK-LABEL: test_i32x4_bitmask:
// CHECK: i32x4.bitmask{{$}}
int32_t test_i32x4_bitmask(v128_t a) { return wasm_i32x4_bitmask(a); }

// CHECK-LABEL: test_i32x4_shl:
// CHECK: i32x4.shl{{$}}
v128_t test_i32x4_shl(v128_t a, int32_t b) { return wasm_i32x4_shl(a, b); }

// CHECK-LABEL: test_i32x4_shr:
// CHECK: i32x4.shr_s{{$}}
v128_t test_i32x4_shr(v128_t a, int32_t b) { return wasm_i32x4_shr(a, b); }

// CHECK-LABEL: test_u32x4_shr:
// CHECK: i32x4.shr_u{{$}}
v128_t test_u32x4_shr(v128_t a, int32_t b) { return wasm_u32x4_shr(a, b); }

// CHECK-LABEL: test_i32x4_add:
// CHECK: i32x4.add{{$}}
v128_t test_i32x4_add(v128_t a, v128_t b) { return wasm_i32x4_add(a, b); }

// CHECK-LABEL: test_i32x4_sub:
// CHECK: i32x4.sub{{$}}
v128_t test_i32x4_sub(v128_t a, v128_t b) { return wasm_i32x4_sub(a, b); }

// CHECK-LABEL: test_i32x4_mul:
// CHECK: i32x4.mul{{$}}
v128_t test_i32x4_mul(v128_t a, v128_t b) { return wasm_i32x4_mul(a, b); }

// CHECK-LABEL: test_i32x4_min:
// CHECK: i32x4.min_s{{$}}
v128_t test_i32x4_min(v128_t a, v128_t b) { return wasm_i32x4_min(a, b); }

// CHECK-LABEL: test_u32x4_min:
// CHECK: i32x4.min_u{{$}}
v128_t test_u32x4_min(v128_t a, v128_t b) { return wasm_u32x4_min(a, b); }

// CHECK-LABEL: test_i32x4_max:
// CHECK: i32x4.max_s{{$}}
v128_t test_i32x4_max(v128_t a, v128_t b) { return wasm_i32x4_max(a, b); }

// CHECK-LABEL: test_u32x4_max:
// CHECK: i32x4.max_u{{$}}
v128_t test_u32x4_max(v128_t a, v128_t b) { return wasm_u32x4_max(a, b); }

// CHECK-LABEL: test_i32x4_dot_i16x8:
// CHECK: i32x4.dot_i16x8_s{{$}}
v128_t test_i32x4_dot_i16x8(v128_t a, v128_t b) {
  return wasm_i32x4_dot_i16x8(a, b);
}

// CHECK-LABEL: test_i64x2_abs:
// CHECK: i64x2.abs{{$}}
v128_t test_i64x2_abs(v128_t a) { return wasm_i64x2_abs(a); }

// CHECK-LABEL: test_i64x2_neg:
// CHECK: i64x2.neg{{$}}
v128_t test_i64x2_neg(v128_t a) { return wasm_i64x2_neg(a); }

// CHECK-LABEL: test_i64x2_all_true:
// CHECK: i64x2.all_true{{$}}
bool test_i64x2_all_true(v128_t a) { return wasm_i64x2_all_true(a); }

// CHECK-LABEL: test_i64x2_bitmask:
// CHECK: i64x2.bitmask{{$}}
int32_t test_i64x2_bitmask(v128_t a) { return wasm_i64x2_bitmask(a); }

// CHECK-LABEL: test_i64x2_shl:
// CHECK: i64x2.shl{{$}}
v128_t test_i64x2_shl(v128_t a, int32_t b) { return wasm_i64x2_shl(a, b); }

// CHECK-LABEL: test_i64x2_shr:
// CHECK: i64x2.shr_s{{$}}
v128_t test_i64x2_shr(v128_t a, int32_t b) { return wasm_i64x2_shr(a, b); }

// CHECK-LABEL: test_u64x2_shr:
// CHECK: i64x2.shr_u{{$}}
v128_t test_u64x2_shr(v128_t a, int32_t b) { return wasm_u64x2_shr(a, b); }

// CHECK-LABEL: test_i64x2_add:
// CHECK: i64x2.add{{$}}
v128_t test_i64x2_add(v128_t a, v128_t b) { return wasm_i64x2_add(a, b); }

// CHECK-LABEL: test_i64x2_sub:
// CHECK: i64x2.sub{{$}}
v128_t test_i64x2_sub(v128_t a, v128_t b) { return wasm_i64x2_sub(a, b); }

// CHECK-LABEL: test_i64x2_mul:
// CHECK: i64x2.mul{{$}}
v128_t test_i64x2_mul(v128_t a, v128_t b) { return wasm_i64x2_mul(a, b); }

// CHECK-LABEL: test_f32x4_abs:
// CHECK: f32x4.abs{{$}}
v128_t test_f32x4_abs(v128_t a) { return wasm_f32x4_abs(a); }

// CHECK-LABEL: test_f32x4_neg:
// CHECK: f32x4.neg{{$}}
v128_t test_f32x4_neg(v128_t a) { return wasm_f32x4_neg(a); }

// CHECK-LABEL: test_f32x4_sqrt:
// CHECK: f32x4.sqrt{{$}}
v128_t test_f32x4_sqrt(v128_t a) { return wasm_f32x4_sqrt(a); }

// CHECK-LABEL: test_f32x4_ceil:
// CHECK: f32x4.ceil{{$}}
v128_t test_f32x4_ceil(v128_t a) { return wasm_f32x4_ceil(a); }

// CHECK-LABEL: test_f32x4_floor:
// CHECK: f32x4.floor{{$}}
v128_t test_f32x4_floor(v128_t a) { return wasm_f32x4_floor(a); }

// CHECK-LABEL: test_f32x4_trunc:
// CHECK: f32x4.trunc{{$}}
v128_t test_f32x4_trunc(v128_t a) { return wasm_f32x4_trunc(a); }

// CHECK-LABEL: test_f32x4_nearest:
// CHECK: f32x4.nearest{{$}}
v128_t test_f32x4_nearest(v128_t a) { return wasm_f32x4_nearest(a); }

// CHECK-LABEL: test_f32x4_add:
// CHECK: f32x4.add{{$}}
v128_t test_f32x4_add(v128_t a, v128_t b) { return wasm_f32x4_add(a, b); }

// CHECK-LABEL: test_f32x4_sub:
// CHECK: f32x4.sub{{$}}
v128_t test_f32x4_sub(v128_t a, v128_t b) { return wasm_f32x4_sub(a, b); }

// CHECK-LABEL: test_f32x4_mul:
// CHECK: f32x4.mul{{$}}
v128_t test_f32x4_mul(v128_t a, v128_t b) { return wasm_f32x4_mul(a, b); }

// CHECK-LABEL: test_f32x4_div:
// CHECK: f32x4.div{{$}}
v128_t test_f32x4_div(v128_t a, v128_t b) { return wasm_f32x4_div(a, b); }

// CHECK-LABEL: test_f32x4_min:
// CHECK: f32x4.min{{$}}
v128_t test_f32x4_min(v128_t a, v128_t b) { return wasm_f32x4_min(a, b); }

// CHECK-LABEL: test_f32x4_max:
// CHECK: f32x4.max{{$}}
v128_t test_f32x4_max(v128_t a, v128_t b) { return wasm_f32x4_max(a, b); }

// CHECK-LABEL: test_f32x4_pmin:
// CHECK: f32x4.pmin{{$}}
v128_t test_f32x4_pmin(v128_t a, v128_t b) { return wasm_f32x4_pmin(a, b); }

// CHECK-LABEL: test_f32x4_pmax:
// CHECK: f32x4.pmax{{$}}
v128_t test_f32x4_pmax(v128_t a, v128_t b) { return wasm_f32x4_pmax(a, b); }

// CHECK-LABEL: test_f64x2_abs:
// CHECK: f64x2.abs{{$}}
v128_t test_f64x2_abs(v128_t a) { return wasm_f64x2_abs(a); }

// CHECK-LABEL: test_f64x2_neg:
// CHECK: f64x2.neg{{$}}
v128_t test_f64x2_neg(v128_t a) { return wasm_f64x2_neg(a); }

// CHECK-LABEL: test_f64x2_sqrt:
// CHECK: f64x2.sqrt{{$}}
v128_t test_f64x2_sqrt(v128_t a) { return wasm_f64x2_sqrt(a); }

// CHECK-LABEL: test_f64x2_ceil:
// CHECK: f64x2.ceil{{$}}
v128_t test_f64x2_ceil(v128_t a) { return wasm_f64x2_ceil(a); }

// CHECK-LABEL: test_f64x2_floor:
// CHECK: f64x2.floor{{$}}
v128_t test_f64x2_floor(v128_t a) { return wasm_f64x2_floor(a); }

// CHECK-LABEL: test_f64x2_trunc:
// CHECK: f64x2.trunc{{$}}
v128_t test_f64x2_trunc(v128_t a) { return wasm_f64x2_trunc(a); }

// CHECK-LABEL: test_f64x2_nearest:
// CHECK: f64x2.nearest{{$}}
v128_t test_f64x2_nearest(v128_t a) { return wasm_f64x2_nearest(a); }

// CHECK-LABEL: test_f64x2_add:
// CHECK: f64x2.add{{$}}
v128_t test_f64x2_add(v128_t a, v128_t b) { return wasm_f64x2_add(a, b); }

// CHECK-LABEL: test_f64x2_sub:
// CHECK: f64x2.sub{{$}}
v128_t test_f64x2_sub(v128_t a, v128_t b) { return wasm_f64x2_sub(a, b); }

// CHECK-LABEL: test_f64x2_mul:
// CHECK: f64x2.mul{{$}}
v128_t test_f64x2_mul(v128_t a, v128_t b) { return wasm_f64x2_mul(a, b); }

// CHECK-LABEL: test_f64x2_div:
// CHECK: f64x2.div{{$}}
v128_t test_f64x2_div(v128_t a, v128_t b) { return wasm_f64x2_div(a, b); }

// CHECK-LABEL: test_f64x2_min:
// CHECK: f64x2.min{{$}}
v128_t test_f64x2_min(v128_t a, v128_t b) { return wasm_f64x2_min(a, b); }

// CHECK-LABEL: test_f64x2_max:
// CHECK: f64x2.max{{$}}
v128_t test_f64x2_max(v128_t a, v128_t b) { return wasm_f64x2_max(a, b); }

// CHECK-LABEL: test_f64x2_pmin:
// CHECK: f64x2.pmin{{$}}
v128_t test_f64x2_pmin(v128_t a, v128_t b) { return wasm_f64x2_pmin(a, b); }

// CHECK-LABEL: test_f64x2_pmax:
// CHECK: f64x2.pmax{{$}}
v128_t test_f64x2_pmax(v128_t a, v128_t b) { return wasm_f64x2_pmax(a, b); }

// CHECK-LABEL: test_i32x4_trunc_sat_f32x4:
// CHECK: i32x4.trunc_sat_f32x4_s{{$}}
v128_t test_i32x4_trunc_sat_f32x4(v128_t a) {
  return wasm_i32x4_trunc_sat_f32x4(a);
}

// CHECK-LABEL: test_u32x4_trunc_sat_f32x4:
// CHECK: i32x4.trunc_sat_f32x4_u{{$}}
v128_t test_u32x4_trunc_sat_f32x4(v128_t a) {
  return wasm_u32x4_trunc_sat_f32x4(a);
}

// CHECK-LABEL: test_f32x4_convert_i32x4:
// CHECK: f32x4.convert_i32x4_s{{$}}
v128_t test_f32x4_convert_i32x4(v128_t a) {
  return wasm_f32x4_convert_i32x4(a);
}

// CHECK-LABEL: test_f32x4_convert_u32x4:
// CHECK: f32x4.convert_i32x4_u{{$}}
v128_t test_f32x4_convert_u32x4(v128_t a) {
  return wasm_f32x4_convert_u32x4(a);
}

// CHECK-LABEL: test_f64x2_convert_low_i32x4:
// CHECK: f64x2.convert_low_i32x4_s{{$}}
v128_t test_f64x2_convert_low_i32x4(v128_t a) {
  return wasm_f64x2_convert_low_i32x4(a);
}

// CHECK-LABEL: test_f64x2_convert_low_u32x4:
// CHECK: f64x2.convert_low_i32x4_u{{$}}
v128_t test_f64x2_convert_low_u32x4(v128_t a) {
  return wasm_f64x2_convert_low_u32x4(a);
}

// CHECK-LABEL: test_i32x4_trunc_sat_f64x2_zero:
// CHECK: i32x4.trunc_sat_f64x2_s_zero{{$}}
v128_t test_i32x4_trunc_sat_f64x2_zero(v128_t a) {
  return wasm_i32x4_trunc_sat_f64x2_zero(a);
}

// CHECK-LABEL: test_u32x4_trunc_sat_f64x2_zero:
// CHECK: i32x4.trunc_sat_f64x2_u_zero{{$}}
v128_t test_u32x4_trunc_sat_f64x2_zero(v128_t a) {
  return wasm_u32x4_trunc_sat_f64x2_zero(a);
}

// CHECK-LABEL: test_f32x4_demote_f64x2_zero:
// CHECK: f32x4.demote_f64x2_zero{{$}}
v128_t test_f32x4_demote_f64x2_zero(v128_t a) {
  return wasm_f32x4_demote_f64x2_zero(a);
}

// CHECK-LABEL: test_f64x2_promote_low_f32x4:
// CHECK: f64x2.promote_low_f32x4{{$}}
v128_t test_f64x2_promote_low_f32x4(v128_t a) {
  return wasm_f64x2_promote_low_f32x4(a);
}

// CHECK-LABEL: test_i8x16_shuffle:
// CHECK: i8x16.shuffle 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1,
// 0{{$}}
v128_t test_i8x16_shuffle(v128_t a, v128_t b) {
  return wasm_i8x16_shuffle(a, b, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3,
                            2, 1, 0);
}

// CHECK-LABEL: test_i16x8_shuffle:
// CHECK: i8x16.shuffle 14, 15, 12, 13, 10, 11, 8, 9, 6, 7, 4, 5, 2, 3, 0,
// 1{{$}}
v128_t test_i16x8_shuffle(v128_t a, v128_t b) {
  return wasm_i16x8_shuffle(a, b, 7, 6, 5, 4, 3, 2, 1, 0);
}

// CHECK-LABEL: test_i32x4_shuffle:
// CHECK: i8x16.shuffle 12, 13, 14, 15, 8, 9, 10, 11, 4, 5, 6, 7, 0, 1, 2,
// 3{{$}}
v128_t test_i32x4_shuffle(v128_t a, v128_t b) {
  return wasm_i32x4_shuffle(a, b, 3, 2, 1, 0);
}

// CHECK-LABEL: test_i64x2_shuffle:
// CHECK: i8x16.shuffle 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6,
// 7{{$}}
v128_t test_i64x2_shuffle(v128_t a, v128_t b) {
  return wasm_i64x2_shuffle(a, b, 1, 0);
}

// CHECK-LABEL: test_i8x16_swizzle:
// CHECK: i8x16.swizzle{{$}}
v128_t test_i8x16_swizzle(v128_t a, v128_t b) {
  return wasm_i8x16_swizzle(a, b);
}

// CHECK-LABEL: test_i8x16_narrow_i16x8:
// CHECK: i8x16.narrow_i16x8_s{{$}}
v128_t test_i8x16_narrow_i16x8(v128_t a, v128_t b) {
  return wasm_i8x16_narrow_i16x8(a, b);
}

// CHECK-LABEL: test_u8x16_narrow_i16x8:
// CHECK: i8x16.narrow_i16x8_u{{$}}
v128_t test_u8x16_narrow_i16x8(v128_t a, v128_t b) {
  return wasm_u8x16_narrow_i16x8(a, b);
}

// CHECK-LABEL: test_i16x8_narrow_i32x4:
// CHECK: i16x8.narrow_i32x4_s{{$}}
v128_t test_i16x8_narrow_i32x4(v128_t a, v128_t b) {
  return wasm_i16x8_narrow_i32x4(a, b);
}

// CHECK-LABEL: test_u16x8_narrow_i32x4:
// CHECK: i16x8.narrow_i32x4_u{{$}}
v128_t test_u16x8_narrow_i32x4(v128_t a, v128_t b) {
  return wasm_u16x8_narrow_i32x4(a, b);
}

// CHECK-LABEL: test_i16x8_extend_low_i8x16:
// CHECK: i16x8.extend_low_i8x16_s{{$}}
v128_t test_i16x8_extend_low_i8x16(v128_t a) {
  return wasm_i16x8_extend_low_i8x16(a);
}

// CHECK-LABEL: test_i16x8_extend_high_i8x16:
// CHECK: i16x8.extend_high_i8x16_s{{$}}
v128_t test_i16x8_extend_high_i8x16(v128_t a) {
  return wasm_i16x8_extend_high_i8x16(a);
}

// CHECK-LABEL: test_u16x8_extend_low_u8x16:
// CHECK: i16x8.extend_low_i8x16_u{{$}}
v128_t test_u16x8_extend_low_u8x16(v128_t a) {
  return wasm_u16x8_extend_low_u8x16(a);
}

// CHECK-LABEL: test_u16x8_extend_high_u8x16:
// CHECK: i16x8.extend_high_i8x16_u{{$}}
v128_t test_u16x8_extend_high_u8x16(v128_t a) {
  return wasm_u16x8_extend_high_u8x16(a);
}

// CHECK-LABEL: test_i32x4_extend_low_i16x8:
// CHECK: i32x4.extend_low_i16x8_s{{$}}
v128_t test_i32x4_extend_low_i16x8(v128_t a) {
  return wasm_i32x4_extend_low_i16x8(a);
}

// CHECK-LABEL: test_i32x4_extend_high_i16x8:
// CHECK: i32x4.extend_high_i16x8_s{{$}}
v128_t test_i32x4_extend_high_i16x8(v128_t a) {
  return wasm_i32x4_extend_high_i16x8(a);
}

// CHECK-LABEL: test_u32x4_extend_low_u16x8:
// CHECK: i32x4.extend_low_i16x8_u{{$}}
v128_t test_u32x4_extend_low_u16x8(v128_t a) {
  return wasm_u32x4_extend_low_u16x8(a);
}

// CHECK-LABEL: test_u32x4_extend_high_u16x8:
// CHECK: i32x4.extend_high_i16x8_u{{$}}
v128_t test_u32x4_extend_high_u16x8(v128_t a) {
  return wasm_u32x4_extend_high_u16x8(a);
}

// CHECK-LABEL: test_i64x2_extend_low_i32x4:
// CHECK: i64x2.extend_low_i32x4_s{{$}}
v128_t test_i64x2_extend_low_i32x4(v128_t a) {
  return wasm_i64x2_extend_low_i32x4(a);
}

// CHECK-LABEL: test_i64x2_extend_high_i32x4:
// CHECK: i64x2.extend_high_i32x4_s{{$}}
v128_t test_i64x2_extend_high_i32x4(v128_t a) {
  return wasm_i64x2_extend_high_i32x4(a);
}

// CHECK-LABEL: test_u64x2_extend_low_u32x4:
// CHECK: i64x2.extend_low_i32x4_u{{$}}
v128_t test_u64x2_extend_low_u32x4(v128_t a) {
  return wasm_u64x2_extend_low_u32x4(a);
}

// CHECK-LABEL: test_u64x2_extend_high_u32x4:
// CHECK: i64x2.extend_high_i32x4_u{{$}}
v128_t test_u64x2_extend_high_u32x4(v128_t a) {
  return wasm_u64x2_extend_high_u32x4(a);
}

// CHECK-LABEL: test_i16x8_extadd_pairwise_i8x16:
// CHECK: i16x8.extadd_pairwise_i8x16_s{{$}}
v128_t test_i16x8_extadd_pairwise_i8x16(v128_t a) {
  return wasm_i16x8_extadd_pairwise_i8x16(a);
}

// CHECK-LABEL: test_u16x8_extadd_pairwise_u8x16:
// CHECK: i16x8.extadd_pairwise_i8x16_u{{$}}
v128_t test_u16x8_extadd_pairwise_u8x16(v128_t a) {
  return wasm_u16x8_extadd_pairwise_u8x16(a);
}

// CHECK-LABEL: test_i32x4_extadd_pairwise_i16x8:
// CHECK: i32x4.extadd_pairwise_i16x8_s{{$}}
v128_t test_i32x4_extadd_pairwise_i16x8(v128_t a) {
  return wasm_i32x4_extadd_pairwise_i16x8(a);
}

// CHECK-LABEL: test_u32x4_extadd_pairwise_u16x8:
// CHECK: i32x4.extadd_pairwise_i16x8_u{{$}}
v128_t test_u32x4_extadd_pairwise_u16x8(v128_t a) {
  return wasm_u32x4_extadd_pairwise_u16x8(a);
}

// CHECK-LABEL: test_i16x8_extmul_low_i8x16:
// CHECK: i16x8.extmul_low_i8x16_s{{$}}
v128_t test_i16x8_extmul_low_i8x16(v128_t a, v128_t b) {
  return wasm_i16x8_extmul_low_i8x16(a, b);
}

// CHECK-LABEL: test_i16x8_extmul_high_i8x16:
// CHECK: i16x8.extmul_high_i8x16_s{{$}}
v128_t test_i16x8_extmul_high_i8x16(v128_t a, v128_t b) {
  return wasm_i16x8_extmul_high_i8x16(a, b);
}

// CHECK-LABEL: test_u16x8_extmul_low_u8x16:
// CHECK: i16x8.extmul_low_i8x16_u{{$}}
v128_t test_u16x8_extmul_low_u8x16(v128_t a, v128_t b) {
  return wasm_u16x8_extmul_low_u8x16(a, b);
}

// CHECK-LABEL: test_u16x8_extmul_high_u8x16:
// CHECK: i16x8.extmul_high_i8x16_u{{$}}
v128_t test_u16x8_extmul_high_u8x16(v128_t a, v128_t b) {
  return wasm_u16x8_extmul_high_u8x16(a, b);
}

// CHECK-LABEL: test_i32x4_extmul_low_i16x8:
// CHECK: i32x4.extmul_low_i16x8_s{{$}}
v128_t test_i32x4_extmul_low_i16x8(v128_t a, v128_t b) {
  return wasm_i32x4_extmul_low_i16x8(a, b);
}

// CHECK-LABEL: test_i32x4_extmul_high_i16x8:
// CHECK: i32x4.extmul_high_i16x8_s{{$}}
v128_t test_i32x4_extmul_high_i16x8(v128_t a, v128_t b) {
  return wasm_i32x4_extmul_high_i16x8(a, b);
}

// CHECK-LABEL: test_u32x4_extmul_low_u16x8:
// CHECK: i32x4.extmul_low_i16x8_u{{$}}
v128_t test_u32x4_extmul_low_u16x8(v128_t a, v128_t b) {
  return wasm_u32x4_extmul_low_u16x8(a, b);
}

// CHECK-LABEL: test_u32x4_extmul_high_u16x8:
// CHECK: i32x4.extmul_high_i16x8_u{{$}}
v128_t test_u32x4_extmul_high_u16x8(v128_t a, v128_t b) {
  return wasm_u32x4_extmul_high_u16x8(a, b);
}

// CHECK-LABEL: test_i64x2_extmul_low_i32x4:
// CHECK: i64x2.extmul_low_i32x4_s{{$}}
v128_t test_i64x2_extmul_low_i32x4(v128_t a, v128_t b) {
  return wasm_i64x2_extmul_low_i32x4(a, b);
}

// CHECK-LABEL: test_i64x2_extmul_high_i32x4:
// CHECK: i64x2.extmul_high_i32x4_s{{$}}
v128_t test_i64x2_extmul_high_i32x4(v128_t a, v128_t b) {
  return wasm_i64x2_extmul_high_i32x4(a, b);
}

// CHECK-LABEL: test_u64x2_extmul_low_u32x4:
// CHECK: i64x2.extmul_low_i32x4_u{{$}}
v128_t test_u64x2_extmul_low_u32x4(v128_t a, v128_t b) {
  return wasm_u64x2_extmul_low_u32x4(a, b);
}

// CHECK-LABEL: test_u64x2_extmul_high_u32x4:
// CHECK: i64x2.extmul_high_i32x4_u{{$}}
v128_t test_u64x2_extmul_high_u32x4(v128_t a, v128_t b) {
  return wasm_u64x2_extmul_high_u32x4(a, b);
}

// CHECK-LABEL: test_i16x8_q15mulr_sat:
// CHECK: i16x8.q15mulr_sat_s{{$}}
v128_t test_i16x8_q15mulr_sat(v128_t a, v128_t b) {
  return wasm_i16x8_q15mulr_sat(a, b);
}