]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/clang/lib/Headers/vecintrin.h
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / clang / lib / Headers / vecintrin.h
1 /*===---- vecintrin.h - Vector intrinsics ----------------------------------===
2  *
3  * Permission is hereby granted, free of charge, to any person obtaining a copy
4  * of this software and associated documentation files (the "Software"), to deal
5  * in the Software without restriction, including without limitation the rights
6  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7  * copies of the Software, and to permit persons to whom the Software is
8  * furnished to do so, subject to the following conditions:
9  *
10  * The above copyright notice and this permission notice shall be included in
11  * all copies or substantial portions of the Software.
12  *
13  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19  * THE SOFTWARE.
20  *
21  *===-----------------------------------------------------------------------===
22  */
23
24 #if defined(__s390x__) && defined(__VEC__)
25
26 #define __ATTRS_ai __attribute__((__always_inline__))
27 #define __ATTRS_o __attribute__((__overloadable__))
28 #define __ATTRS_o_ai __attribute__((__overloadable__, __always_inline__))
29
30 #define __constant(PARM) \
31   __attribute__((__enable_if__ ((PARM) == (PARM), \
32      "argument must be a constant integer")))
33 #define __constant_range(PARM, LOW, HIGH) \
34   __attribute__((__enable_if__ ((PARM) >= (LOW) && (PARM) <= (HIGH), \
35      "argument must be a constant integer from " #LOW " to " #HIGH)))
36 #define __constant_pow2_range(PARM, LOW, HIGH) \
37   __attribute__((__enable_if__ ((PARM) >= (LOW) && (PARM) <= (HIGH) && \
38                                 ((PARM) & ((PARM) - 1)) == 0, \
39      "argument must be a constant power of 2 from " #LOW " to " #HIGH)))
40
41 /*-- __lcbb -----------------------------------------------------------------*/
42
43 extern __ATTRS_o unsigned int
44 __lcbb(const void *__ptr, unsigned short __len)
45   __constant_pow2_range(__len, 64, 4096);
46
47 #define __lcbb(X, Y) ((__typeof__((__lcbb)((X), (Y)))) \
48   __builtin_s390_lcbb((X), __builtin_constant_p((Y))? \
49                            ((Y) == 64 ? 0 : \
50                             (Y) == 128 ? 1 : \
51                             (Y) == 256 ? 2 : \
52                             (Y) == 512 ? 3 : \
53                             (Y) == 1024 ? 4 : \
54                             (Y) == 2048 ? 5 : \
55                             (Y) == 4096 ? 6 : 0) : 0))
56
57 /*-- vec_extract ------------------------------------------------------------*/
58
59 static inline __ATTRS_o_ai signed char
60 vec_extract(vector signed char __vec, int __index) {
61   return __vec[__index & 15];
62 }
63
64 static inline __ATTRS_o_ai unsigned char
65 vec_extract(vector bool char __vec, int __index) {
66   return __vec[__index & 15];
67 }
68
69 static inline __ATTRS_o_ai unsigned char
70 vec_extract(vector unsigned char __vec, int __index) {
71   return __vec[__index & 15];
72 }
73
74 static inline __ATTRS_o_ai signed short
75 vec_extract(vector signed short __vec, int __index) {
76   return __vec[__index & 7];
77 }
78
79 static inline __ATTRS_o_ai unsigned short
80 vec_extract(vector bool short __vec, int __index) {
81   return __vec[__index & 7];
82 }
83
84 static inline __ATTRS_o_ai unsigned short
85 vec_extract(vector unsigned short __vec, int __index) {
86   return __vec[__index & 7];
87 }
88
89 static inline __ATTRS_o_ai signed int
90 vec_extract(vector signed int __vec, int __index) {
91   return __vec[__index & 3];
92 }
93
94 static inline __ATTRS_o_ai unsigned int
95 vec_extract(vector bool int __vec, int __index) {
96   return __vec[__index & 3];
97 }
98
99 static inline __ATTRS_o_ai unsigned int
100 vec_extract(vector unsigned int __vec, int __index) {
101   return __vec[__index & 3];
102 }
103
104 static inline __ATTRS_o_ai signed long long
105 vec_extract(vector signed long long __vec, int __index) {
106   return __vec[__index & 1];
107 }
108
109 static inline __ATTRS_o_ai unsigned long long
110 vec_extract(vector bool long long __vec, int __index) {
111   return __vec[__index & 1];
112 }
113
114 static inline __ATTRS_o_ai unsigned long long
115 vec_extract(vector unsigned long long __vec, int __index) {
116   return __vec[__index & 1];
117 }
118
119 #if __ARCH__ >= 12
120 static inline __ATTRS_o_ai float
121 vec_extract(vector float __vec, int __index) {
122   return __vec[__index & 3];
123 }
124 #endif
125
126 static inline __ATTRS_o_ai double
127 vec_extract(vector double __vec, int __index) {
128   return __vec[__index & 1];
129 }
130
131 /*-- vec_insert -------------------------------------------------------------*/
132
133 static inline __ATTRS_o_ai vector signed char
134 vec_insert(signed char __scalar, vector signed char __vec, int __index) {
135   __vec[__index & 15] = __scalar;
136   return __vec;
137 }
138
139 // This prototype is deprecated.
140 static inline __ATTRS_o_ai vector unsigned char
141 vec_insert(unsigned char __scalar, vector bool char __vec, int __index) {
142   vector unsigned char __newvec = (vector unsigned char)__vec;
143   __newvec[__index & 15] = (unsigned char)__scalar;
144   return __newvec;
145 }
146
147 static inline __ATTRS_o_ai vector unsigned char
148 vec_insert(unsigned char __scalar, vector unsigned char __vec, int __index) {
149   __vec[__index & 15] = __scalar;
150   return __vec;
151 }
152
153 static inline __ATTRS_o_ai vector signed short
154 vec_insert(signed short __scalar, vector signed short __vec, int __index) {
155   __vec[__index & 7] = __scalar;
156   return __vec;
157 }
158
159 // This prototype is deprecated.
160 static inline __ATTRS_o_ai vector unsigned short
161 vec_insert(unsigned short __scalar, vector bool short __vec, int __index) {
162   vector unsigned short __newvec = (vector unsigned short)__vec;
163   __newvec[__index & 7] = (unsigned short)__scalar;
164   return __newvec;
165 }
166
167 static inline __ATTRS_o_ai vector unsigned short
168 vec_insert(unsigned short __scalar, vector unsigned short __vec, int __index) {
169   __vec[__index & 7] = __scalar;
170   return __vec;
171 }
172
173 static inline __ATTRS_o_ai vector signed int
174 vec_insert(signed int __scalar, vector signed int __vec, int __index) {
175   __vec[__index & 3] = __scalar;
176   return __vec;
177 }
178
179 // This prototype is deprecated.
180 static inline __ATTRS_o_ai vector unsigned int
181 vec_insert(unsigned int __scalar, vector bool int __vec, int __index) {
182   vector unsigned int __newvec = (vector unsigned int)__vec;
183   __newvec[__index & 3] = __scalar;
184   return __newvec;
185 }
186
187 static inline __ATTRS_o_ai vector unsigned int
188 vec_insert(unsigned int __scalar, vector unsigned int __vec, int __index) {
189   __vec[__index & 3] = __scalar;
190   return __vec;
191 }
192
193 static inline __ATTRS_o_ai vector signed long long
194 vec_insert(signed long long __scalar, vector signed long long __vec,
195            int __index) {
196   __vec[__index & 1] = __scalar;
197   return __vec;
198 }
199
200 // This prototype is deprecated.
201 static inline __ATTRS_o_ai vector unsigned long long
202 vec_insert(unsigned long long __scalar, vector bool long long __vec,
203            int __index) {
204   vector unsigned long long __newvec = (vector unsigned long long)__vec;
205   __newvec[__index & 1] = __scalar;
206   return __newvec;
207 }
208
209 static inline __ATTRS_o_ai vector unsigned long long
210 vec_insert(unsigned long long __scalar, vector unsigned long long __vec,
211            int __index) {
212   __vec[__index & 1] = __scalar;
213   return __vec;
214 }
215
216 #if __ARCH__ >= 12
217 static inline __ATTRS_o_ai vector float
218 vec_insert(float __scalar, vector float __vec, int __index) {
219   __vec[__index & 1] = __scalar;
220   return __vec;
221 }
222 #endif
223
224 static inline __ATTRS_o_ai vector double
225 vec_insert(double __scalar, vector double __vec, int __index) {
226   __vec[__index & 1] = __scalar;
227   return __vec;
228 }
229
230 /*-- vec_promote ------------------------------------------------------------*/
231
232 static inline __ATTRS_o_ai vector signed char
233 vec_promote(signed char __scalar, int __index) {
234   const vector signed char __zero = (vector signed char)0;
235   vector signed char __vec = __builtin_shufflevector(__zero, __zero,
236     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1);
237   __vec[__index & 15] = __scalar;
238   return __vec;
239 }
240
241 static inline __ATTRS_o_ai vector unsigned char
242 vec_promote(unsigned char __scalar, int __index) {
243   const vector unsigned char __zero = (vector unsigned char)0;
244   vector unsigned char __vec = __builtin_shufflevector(__zero, __zero,
245     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1);
246   __vec[__index & 15] = __scalar;
247   return __vec;
248 }
249
250 static inline __ATTRS_o_ai vector signed short
251 vec_promote(signed short __scalar, int __index) {
252   const vector signed short __zero = (vector signed short)0;
253   vector signed short __vec = __builtin_shufflevector(__zero, __zero,
254                                 -1, -1, -1, -1, -1, -1, -1, -1);
255   __vec[__index & 7] = __scalar;
256   return __vec;
257 }
258
259 static inline __ATTRS_o_ai vector unsigned short
260 vec_promote(unsigned short __scalar, int __index) {
261   const vector unsigned short __zero = (vector unsigned short)0;
262   vector unsigned short __vec = __builtin_shufflevector(__zero, __zero,
263                                   -1, -1, -1, -1, -1, -1, -1, -1);
264   __vec[__index & 7] = __scalar;
265   return __vec;
266 }
267
268 static inline __ATTRS_o_ai vector signed int
269 vec_promote(signed int __scalar, int __index) {
270   const vector signed int __zero = (vector signed int)0;
271   vector signed int __vec = __builtin_shufflevector(__zero, __zero,
272                                                     -1, -1, -1, -1);
273   __vec[__index & 3] = __scalar;
274   return __vec;
275 }
276
277 static inline __ATTRS_o_ai vector unsigned int
278 vec_promote(unsigned int __scalar, int __index) {
279   const vector unsigned int __zero = (vector unsigned int)0;
280   vector unsigned int __vec = __builtin_shufflevector(__zero, __zero,
281                                                       -1, -1, -1, -1);
282   __vec[__index & 3] = __scalar;
283   return __vec;
284 }
285
286 static inline __ATTRS_o_ai vector signed long long
287 vec_promote(signed long long __scalar, int __index) {
288   const vector signed long long __zero = (vector signed long long)0;
289   vector signed long long __vec = __builtin_shufflevector(__zero, __zero,
290                                                           -1, -1);
291   __vec[__index & 1] = __scalar;
292   return __vec;
293 }
294
295 static inline __ATTRS_o_ai vector unsigned long long
296 vec_promote(unsigned long long __scalar, int __index) {
297   const vector unsigned long long __zero = (vector unsigned long long)0;
298   vector unsigned long long __vec = __builtin_shufflevector(__zero, __zero,
299                                                             -1, -1);
300   __vec[__index & 1] = __scalar;
301   return __vec;
302 }
303
304 #if __ARCH__ >= 12
305 static inline __ATTRS_o_ai vector float
306 vec_promote(float __scalar, int __index) {
307   const vector float __zero = (vector float)0;
308   vector float __vec = __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1);
309   __vec[__index & 3] = __scalar;
310   return __vec;
311 }
312 #endif
313
314 static inline __ATTRS_o_ai vector double
315 vec_promote(double __scalar, int __index) {
316   const vector double __zero = (vector double)0;
317   vector double __vec = __builtin_shufflevector(__zero, __zero, -1, -1);
318   __vec[__index & 1] = __scalar;
319   return __vec;
320 }
321
322 /*-- vec_insert_and_zero ----------------------------------------------------*/
323
324 static inline __ATTRS_o_ai vector signed char
325 vec_insert_and_zero(const signed char *__ptr) {
326   vector signed char __vec = (vector signed char)0;
327   __vec[7] = *__ptr;
328   return __vec;
329 }
330
331 static inline __ATTRS_o_ai vector unsigned char
332 vec_insert_and_zero(const unsigned char *__ptr) {
333   vector unsigned char __vec = (vector unsigned char)0;
334   __vec[7] = *__ptr;
335   return __vec;
336 }
337
338 static inline __ATTRS_o_ai vector signed short
339 vec_insert_and_zero(const signed short *__ptr) {
340   vector signed short __vec = (vector signed short)0;
341   __vec[3] = *__ptr;
342   return __vec;
343 }
344
345 static inline __ATTRS_o_ai vector unsigned short
346 vec_insert_and_zero(const unsigned short *__ptr) {
347   vector unsigned short __vec = (vector unsigned short)0;
348   __vec[3] = *__ptr;
349   return __vec;
350 }
351
352 static inline __ATTRS_o_ai vector signed int
353 vec_insert_and_zero(const signed int *__ptr) {
354   vector signed int __vec = (vector signed int)0;
355   __vec[1] = *__ptr;
356   return __vec;
357 }
358
359 static inline __ATTRS_o_ai vector unsigned int
360 vec_insert_and_zero(const unsigned int *__ptr) {
361   vector unsigned int __vec = (vector unsigned int)0;
362   __vec[1] = *__ptr;
363   return __vec;
364 }
365
366 static inline __ATTRS_o_ai vector signed long long
367 vec_insert_and_zero(const signed long long *__ptr) {
368   vector signed long long __vec = (vector signed long long)0;
369   __vec[0] = *__ptr;
370   return __vec;
371 }
372
373 static inline __ATTRS_o_ai vector unsigned long long
374 vec_insert_and_zero(const unsigned long long *__ptr) {
375   vector unsigned long long __vec = (vector unsigned long long)0;
376   __vec[0] = *__ptr;
377   return __vec;
378 }
379
380 #if __ARCH__ >= 12
381 static inline __ATTRS_o_ai vector float
382 vec_insert_and_zero(const float *__ptr) {
383   vector float __vec = (vector float)0;
384   __vec[1] = *__ptr;
385   return __vec;
386 }
387 #endif
388
389 static inline __ATTRS_o_ai vector double
390 vec_insert_and_zero(const double *__ptr) {
391   vector double __vec = (vector double)0;
392   __vec[0] = *__ptr;
393   return __vec;
394 }
395
396 /*-- vec_perm ---------------------------------------------------------------*/
397
398 static inline __ATTRS_o_ai vector signed char
399 vec_perm(vector signed char __a, vector signed char __b,
400          vector unsigned char __c) {
401   return (vector signed char)__builtin_s390_vperm(
402            (vector unsigned char)__a, (vector unsigned char)__b, __c);
403 }
404
405 static inline __ATTRS_o_ai vector unsigned char
406 vec_perm(vector unsigned char __a, vector unsigned char __b,
407          vector unsigned char __c) {
408   return (vector unsigned char)__builtin_s390_vperm(
409            (vector unsigned char)__a, (vector unsigned char)__b, __c);
410 }
411
412 static inline __ATTRS_o_ai vector bool char
413 vec_perm(vector bool char __a, vector bool char __b,
414          vector unsigned char __c) {
415   return (vector bool char)__builtin_s390_vperm(
416            (vector unsigned char)__a, (vector unsigned char)__b, __c);
417 }
418
419 static inline __ATTRS_o_ai vector signed short
420 vec_perm(vector signed short __a, vector signed short __b,
421          vector unsigned char __c) {
422   return (vector signed short)__builtin_s390_vperm(
423            (vector unsigned char)__a, (vector unsigned char)__b, __c);
424 }
425
426 static inline __ATTRS_o_ai vector unsigned short
427 vec_perm(vector unsigned short __a, vector unsigned short __b,
428          vector unsigned char __c) {
429   return (vector unsigned short)__builtin_s390_vperm(
430            (vector unsigned char)__a, (vector unsigned char)__b, __c);
431 }
432
433 static inline __ATTRS_o_ai vector bool short
434 vec_perm(vector bool short __a, vector bool short __b,
435          vector unsigned char __c) {
436   return (vector bool short)__builtin_s390_vperm(
437            (vector unsigned char)__a, (vector unsigned char)__b, __c);
438 }
439
440 static inline __ATTRS_o_ai vector signed int
441 vec_perm(vector signed int __a, vector signed int __b,
442          vector unsigned char __c) {
443   return (vector signed int)__builtin_s390_vperm(
444            (vector unsigned char)__a, (vector unsigned char)__b, __c);
445 }
446
447 static inline __ATTRS_o_ai vector unsigned int
448 vec_perm(vector unsigned int __a, vector unsigned int __b,
449          vector unsigned char __c) {
450   return (vector unsigned int)__builtin_s390_vperm(
451            (vector unsigned char)__a, (vector unsigned char)__b, __c);
452 }
453
454 static inline __ATTRS_o_ai vector bool int
455 vec_perm(vector bool int __a, vector bool int __b,
456          vector unsigned char __c) {
457   return (vector bool int)__builtin_s390_vperm(
458            (vector unsigned char)__a, (vector unsigned char)__b, __c);
459 }
460
461 static inline __ATTRS_o_ai vector signed long long
462 vec_perm(vector signed long long __a, vector signed long long __b,
463          vector unsigned char __c) {
464   return (vector signed long long)__builtin_s390_vperm(
465            (vector unsigned char)__a, (vector unsigned char)__b, __c);
466 }
467
468 static inline __ATTRS_o_ai vector unsigned long long
469 vec_perm(vector unsigned long long __a, vector unsigned long long __b,
470          vector unsigned char __c) {
471   return (vector unsigned long long)__builtin_s390_vperm(
472            (vector unsigned char)__a, (vector unsigned char)__b, __c);
473 }
474
475 static inline __ATTRS_o_ai vector bool long long
476 vec_perm(vector bool long long __a, vector bool long long __b,
477          vector unsigned char __c) {
478   return (vector bool long long)__builtin_s390_vperm(
479            (vector unsigned char)__a, (vector unsigned char)__b, __c);
480 }
481
482 #if __ARCH__ >= 12
483 static inline __ATTRS_o_ai vector float
484 vec_perm(vector float __a, vector float __b,
485          vector unsigned char __c) {
486   return (vector float)__builtin_s390_vperm(
487            (vector unsigned char)__a, (vector unsigned char)__b, __c);
488 }
489 #endif
490
491 static inline __ATTRS_o_ai vector double
492 vec_perm(vector double __a, vector double __b,
493          vector unsigned char __c) {
494   return (vector double)__builtin_s390_vperm(
495            (vector unsigned char)__a, (vector unsigned char)__b, __c);
496 }
497
498 /*-- vec_permi --------------------------------------------------------------*/
499
500 // This prototype is deprecated.
501 extern __ATTRS_o vector signed long long
502 vec_permi(vector signed long long __a, vector signed long long __b, int __c)
503   __constant_range(__c, 0, 3);
504
505 // This prototype is deprecated.
506 extern __ATTRS_o vector unsigned long long
507 vec_permi(vector unsigned long long __a, vector unsigned long long __b, int __c)
508   __constant_range(__c, 0, 3);
509
510 // This prototype is deprecated.
511 extern __ATTRS_o vector bool long long
512 vec_permi(vector bool long long __a, vector bool long long __b, int __c)
513   __constant_range(__c, 0, 3);
514
515 // This prototype is deprecated.
516 extern __ATTRS_o vector double
517 vec_permi(vector double __a, vector double __b, int __c)
518   __constant_range(__c, 0, 3);
519
520 #define vec_permi(X, Y, Z) ((__typeof__((vec_permi)((X), (Y), (Z)))) \
521   __builtin_s390_vpdi((vector unsigned long long)(X), \
522                       (vector unsigned long long)(Y), \
523                       (((Z) & 2) << 1) | ((Z) & 1)))
524
525 /*-- vec_bperm_u128 ---------------------------------------------------------*/
526
527 #if __ARCH__ >= 12
528 static inline __ATTRS_ai vector unsigned long long
529 vec_bperm_u128(vector unsigned char __a, vector unsigned char __b) {
530   return __builtin_s390_vbperm(__a, __b);
531 }
532 #endif
533
534 /*-- vec_sel ----------------------------------------------------------------*/
535
536 static inline __ATTRS_o_ai vector signed char
537 vec_sel(vector signed char __a, vector signed char __b,
538         vector unsigned char __c) {
539   return ((vector signed char)__c & __b) | (~(vector signed char)__c & __a);
540 }
541
542 static inline __ATTRS_o_ai vector signed char
543 vec_sel(vector signed char __a, vector signed char __b, vector bool char __c) {
544   return ((vector signed char)__c & __b) | (~(vector signed char)__c & __a);
545 }
546
547 static inline __ATTRS_o_ai vector bool char
548 vec_sel(vector bool char __a, vector bool char __b, vector unsigned char __c) {
549   return ((vector bool char)__c & __b) | (~(vector bool char)__c & __a);
550 }
551
552 static inline __ATTRS_o_ai vector bool char
553 vec_sel(vector bool char __a, vector bool char __b, vector bool char __c) {
554   return (__c & __b) | (~__c & __a);
555 }
556
557 static inline __ATTRS_o_ai vector unsigned char
558 vec_sel(vector unsigned char __a, vector unsigned char __b,
559         vector unsigned char __c) {
560   return (__c & __b) | (~__c & __a);
561 }
562
563 static inline __ATTRS_o_ai vector unsigned char
564 vec_sel(vector unsigned char __a, vector unsigned char __b,
565         vector bool char __c) {
566   return ((vector unsigned char)__c & __b) | (~(vector unsigned char)__c & __a);
567 }
568
569 static inline __ATTRS_o_ai vector signed short
570 vec_sel(vector signed short __a, vector signed short __b,
571         vector unsigned short __c) {
572   return ((vector signed short)__c & __b) | (~(vector signed short)__c & __a);
573 }
574
575 static inline __ATTRS_o_ai vector signed short
576 vec_sel(vector signed short __a, vector signed short __b,
577         vector bool short __c) {
578   return ((vector signed short)__c & __b) | (~(vector signed short)__c & __a);
579 }
580
581 static inline __ATTRS_o_ai vector bool short
582 vec_sel(vector bool short __a, vector bool short __b,
583         vector unsigned short __c) {
584   return ((vector bool short)__c & __b) | (~(vector bool short)__c & __a);
585 }
586
587 static inline __ATTRS_o_ai vector bool short
588 vec_sel(vector bool short __a, vector bool short __b, vector bool short __c) {
589   return (__c & __b) | (~__c & __a);
590 }
591
592 static inline __ATTRS_o_ai vector unsigned short
593 vec_sel(vector unsigned short __a, vector unsigned short __b,
594         vector unsigned short __c) {
595   return (__c & __b) | (~__c & __a);
596 }
597
598 static inline __ATTRS_o_ai vector unsigned short
599 vec_sel(vector unsigned short __a, vector unsigned short __b,
600         vector bool short __c) {
601   return (((vector unsigned short)__c & __b) |
602           (~(vector unsigned short)__c & __a));
603 }
604
605 static inline __ATTRS_o_ai vector signed int
606 vec_sel(vector signed int __a, vector signed int __b,
607         vector unsigned int __c) {
608   return ((vector signed int)__c & __b) | (~(vector signed int)__c & __a);
609 }
610
611 static inline __ATTRS_o_ai vector signed int
612 vec_sel(vector signed int __a, vector signed int __b, vector bool int __c) {
613   return ((vector signed int)__c & __b) | (~(vector signed int)__c & __a);
614 }
615
616 static inline __ATTRS_o_ai vector bool int
617 vec_sel(vector bool int __a, vector bool int __b, vector unsigned int __c) {
618   return ((vector bool int)__c & __b) | (~(vector bool int)__c & __a);
619 }
620
621 static inline __ATTRS_o_ai vector bool int
622 vec_sel(vector bool int __a, vector bool int __b, vector bool int __c) {
623   return (__c & __b) | (~__c & __a);
624 }
625
626 static inline __ATTRS_o_ai vector unsigned int
627 vec_sel(vector unsigned int __a, vector unsigned int __b,
628         vector unsigned int __c) {
629   return (__c & __b) | (~__c & __a);
630 }
631
632 static inline __ATTRS_o_ai vector unsigned int
633 vec_sel(vector unsigned int __a, vector unsigned int __b, vector bool int __c) {
634   return ((vector unsigned int)__c & __b) | (~(vector unsigned int)__c & __a);
635 }
636
637 static inline __ATTRS_o_ai vector signed long long
638 vec_sel(vector signed long long __a, vector signed long long __b,
639         vector unsigned long long __c) {
640   return (((vector signed long long)__c & __b) |
641           (~(vector signed long long)__c & __a));
642 }
643
644 static inline __ATTRS_o_ai vector signed long long
645 vec_sel(vector signed long long __a, vector signed long long __b,
646         vector bool long long __c) {
647   return (((vector signed long long)__c & __b) |
648           (~(vector signed long long)__c & __a));
649 }
650
651 static inline __ATTRS_o_ai vector bool long long
652 vec_sel(vector bool long long __a, vector bool long long __b,
653         vector unsigned long long __c) {
654   return (((vector bool long long)__c & __b) |
655           (~(vector bool long long)__c & __a));
656 }
657
658 static inline __ATTRS_o_ai vector bool long long
659 vec_sel(vector bool long long __a, vector bool long long __b,
660         vector bool long long __c) {
661   return (__c & __b) | (~__c & __a);
662 }
663
664 static inline __ATTRS_o_ai vector unsigned long long
665 vec_sel(vector unsigned long long __a, vector unsigned long long __b,
666         vector unsigned long long __c) {
667   return (__c & __b) | (~__c & __a);
668 }
669
670 static inline __ATTRS_o_ai vector unsigned long long
671 vec_sel(vector unsigned long long __a, vector unsigned long long __b,
672         vector bool long long __c) {
673   return (((vector unsigned long long)__c & __b) |
674           (~(vector unsigned long long)__c & __a));
675 }
676
677 #if __ARCH__ >= 12
678 static inline __ATTRS_o_ai vector float
679 vec_sel(vector float __a, vector float __b, vector unsigned int __c) {
680   return (vector float)((__c & (vector unsigned int)__b) |
681                         (~__c & (vector unsigned int)__a));
682 }
683
684 static inline __ATTRS_o_ai vector float
685 vec_sel(vector float __a, vector float __b, vector bool int __c) {
686   vector unsigned int __ac = (vector unsigned int)__a;
687   vector unsigned int __bc = (vector unsigned int)__b;
688   vector unsigned int __cc = (vector unsigned int)__c;
689   return (vector float)((__cc & __bc) | (~__cc & __ac));
690 }
691 #endif
692
693 static inline __ATTRS_o_ai vector double
694 vec_sel(vector double __a, vector double __b, vector unsigned long long __c) {
695   return (vector double)((__c & (vector unsigned long long)__b) |
696                          (~__c & (vector unsigned long long)__a));
697 }
698
699 static inline __ATTRS_o_ai vector double
700 vec_sel(vector double __a, vector double __b, vector bool long long __c) {
701   vector unsigned long long __ac = (vector unsigned long long)__a;
702   vector unsigned long long __bc = (vector unsigned long long)__b;
703   vector unsigned long long __cc = (vector unsigned long long)__c;
704   return (vector double)((__cc & __bc) | (~__cc & __ac));
705 }
706
707 /*-- vec_gather_element -----------------------------------------------------*/
708
709 static inline __ATTRS_o_ai vector signed int
710 vec_gather_element(vector signed int __vec, vector unsigned int __offset,
711                    const signed int *__ptr, int __index)
712   __constant_range(__index, 0, 3) {
713   __vec[__index] = *(const signed int *)(
714     (__INTPTR_TYPE__)__ptr + (__INTPTR_TYPE__)__offset[__index]);
715   return __vec;
716 }
717
718 static inline __ATTRS_o_ai vector bool int
719 vec_gather_element(vector bool int __vec, vector unsigned int __offset,
720                    const unsigned int *__ptr, int __index)
721   __constant_range(__index, 0, 3) {
722   __vec[__index] = *(const unsigned int *)(
723     (__INTPTR_TYPE__)__ptr + (__INTPTR_TYPE__)__offset[__index]);
724   return __vec;
725 }
726
727 static inline __ATTRS_o_ai vector unsigned int
728 vec_gather_element(vector unsigned int __vec, vector unsigned int __offset,
729                    const unsigned int *__ptr, int __index)
730   __constant_range(__index, 0, 3) {
731   __vec[__index] = *(const unsigned int *)(
732     (__INTPTR_TYPE__)__ptr + (__INTPTR_TYPE__)__offset[__index]);
733   return __vec;
734 }
735
736 static inline __ATTRS_o_ai vector signed long long
737 vec_gather_element(vector signed long long __vec,
738                    vector unsigned long long __offset,
739                    const signed long long *__ptr, int __index)
740   __constant_range(__index, 0, 1) {
741   __vec[__index] = *(const signed long long *)(
742     (__INTPTR_TYPE__)__ptr + (__INTPTR_TYPE__)__offset[__index]);
743   return __vec;
744 }
745
746 static inline __ATTRS_o_ai vector bool long long
747 vec_gather_element(vector bool long long __vec,
748                    vector unsigned long long __offset,
749                    const unsigned long long *__ptr, int __index)
750   __constant_range(__index, 0, 1) {
751   __vec[__index] = *(const unsigned long long *)(
752     (__INTPTR_TYPE__)__ptr + (__INTPTR_TYPE__)__offset[__index]);
753   return __vec;
754 }
755
756 static inline __ATTRS_o_ai vector unsigned long long
757 vec_gather_element(vector unsigned long long __vec,
758                    vector unsigned long long __offset,
759                    const unsigned long long *__ptr, int __index)
760   __constant_range(__index, 0, 1) {
761   __vec[__index] = *(const unsigned long long *)(
762     (__INTPTR_TYPE__)__ptr + (__INTPTR_TYPE__)__offset[__index]);
763   return __vec;
764 }
765
766 #if __ARCH__ >= 12
767 static inline __ATTRS_o_ai vector float
768 vec_gather_element(vector float __vec, vector unsigned int __offset,
769                    const float *__ptr, int __index)
770   __constant_range(__index, 0, 3) {
771   __vec[__index] = *(const float *)(
772     (__INTPTR_TYPE__)__ptr + (__INTPTR_TYPE__)__offset[__index]);
773   return __vec;
774 }
775 #endif
776
777 static inline __ATTRS_o_ai vector double
778 vec_gather_element(vector double __vec, vector unsigned long long __offset,
779                    const double *__ptr, int __index)
780   __constant_range(__index, 0, 1) {
781   __vec[__index] = *(const double *)(
782     (__INTPTR_TYPE__)__ptr + (__INTPTR_TYPE__)__offset[__index]);
783   return __vec;
784 }
785
786 /*-- vec_scatter_element ----------------------------------------------------*/
787
788 static inline __ATTRS_o_ai void
789 vec_scatter_element(vector signed int __vec, vector unsigned int __offset,
790                     signed int *__ptr, int __index)
791   __constant_range(__index, 0, 3) {
792   *(signed int *)((__INTPTR_TYPE__)__ptr + __offset[__index]) =
793     __vec[__index];
794 }
795
796 static inline __ATTRS_o_ai void
797 vec_scatter_element(vector bool int __vec, vector unsigned int __offset,
798                     unsigned int *__ptr, int __index)
799   __constant_range(__index, 0, 3) {
800   *(unsigned int *)((__INTPTR_TYPE__)__ptr + __offset[__index]) =
801     __vec[__index];
802 }
803
804 static inline __ATTRS_o_ai void
805 vec_scatter_element(vector unsigned int __vec, vector unsigned int __offset,
806                     unsigned int *__ptr, int __index)
807   __constant_range(__index, 0, 3) {
808   *(unsigned int *)((__INTPTR_TYPE__)__ptr + __offset[__index]) =
809     __vec[__index];
810 }
811
812 static inline __ATTRS_o_ai void
813 vec_scatter_element(vector signed long long __vec,
814                     vector unsigned long long __offset,
815                     signed long long *__ptr, int __index)
816   __constant_range(__index, 0, 1) {
817   *(signed long long *)((__INTPTR_TYPE__)__ptr + __offset[__index]) =
818     __vec[__index];
819 }
820
821 static inline __ATTRS_o_ai void
822 vec_scatter_element(vector bool long long __vec,
823                     vector unsigned long long __offset,
824                     unsigned long long *__ptr, int __index)
825   __constant_range(__index, 0, 1) {
826   *(unsigned long long *)((__INTPTR_TYPE__)__ptr + __offset[__index]) =
827     __vec[__index];
828 }
829
830 static inline __ATTRS_o_ai void
831 vec_scatter_element(vector unsigned long long __vec,
832                     vector unsigned long long __offset,
833                     unsigned long long *__ptr, int __index)
834   __constant_range(__index, 0, 1) {
835   *(unsigned long long *)((__INTPTR_TYPE__)__ptr + __offset[__index]) =
836     __vec[__index];
837 }
838
839 #if __ARCH__ >= 12
840 static inline __ATTRS_o_ai void
841 vec_scatter_element(vector float __vec, vector unsigned int __offset,
842                     float *__ptr, int __index)
843   __constant_range(__index, 0, 3) {
844   *(float *)((__INTPTR_TYPE__)__ptr + __offset[__index]) =
845     __vec[__index];
846 }
847 #endif
848
849 static inline __ATTRS_o_ai void
850 vec_scatter_element(vector double __vec, vector unsigned long long __offset,
851                     double *__ptr, int __index)
852   __constant_range(__index, 0, 1) {
853   *(double *)((__INTPTR_TYPE__)__ptr + __offset[__index]) =
854     __vec[__index];
855 }
856
857 /*-- vec_xl -----------------------------------------------------------------*/
858
859 static inline __ATTRS_o_ai vector signed char
860 vec_xl(long __offset, const signed char *__ptr) {
861   return *(const vector signed char *)((__INTPTR_TYPE__)__ptr + __offset);
862 }
863
864 static inline __ATTRS_o_ai vector unsigned char
865 vec_xl(long __offset, const unsigned char *__ptr) {
866   return *(const vector unsigned char *)((__INTPTR_TYPE__)__ptr + __offset);
867 }
868
869 static inline __ATTRS_o_ai vector signed short
870 vec_xl(long __offset, const signed short *__ptr) {
871   return *(const vector signed short *)((__INTPTR_TYPE__)__ptr + __offset);
872 }
873
874 static inline __ATTRS_o_ai vector unsigned short
875 vec_xl(long __offset, const unsigned short *__ptr) {
876   return *(const vector unsigned short *)((__INTPTR_TYPE__)__ptr + __offset);
877 }
878
879 static inline __ATTRS_o_ai vector signed int
880 vec_xl(long __offset, const signed int *__ptr) {
881   return *(const vector signed int *)((__INTPTR_TYPE__)__ptr + __offset);
882 }
883
884 static inline __ATTRS_o_ai vector unsigned int
885 vec_xl(long __offset, const unsigned int *__ptr) {
886   return *(const vector unsigned int *)((__INTPTR_TYPE__)__ptr + __offset);
887 }
888
889 static inline __ATTRS_o_ai vector signed long long
890 vec_xl(long __offset, const signed long long *__ptr) {
891   return *(const vector signed long long *)((__INTPTR_TYPE__)__ptr + __offset);
892 }
893
894 static inline __ATTRS_o_ai vector unsigned long long
895 vec_xl(long __offset, const unsigned long long *__ptr) {
896   return *(const vector unsigned long long *)((__INTPTR_TYPE__)__ptr + __offset);
897 }
898
899 #if __ARCH__ >= 12
900 static inline __ATTRS_o_ai vector float
901 vec_xl(long __offset, const float *__ptr) {
902   return *(const vector float *)((__INTPTR_TYPE__)__ptr + __offset);
903 }
904 #endif
905
906 static inline __ATTRS_o_ai vector double
907 vec_xl(long __offset, const double *__ptr) {
908   return *(const vector double *)((__INTPTR_TYPE__)__ptr + __offset);
909 }
910
911 /*-- vec_xld2 ---------------------------------------------------------------*/
912
913 // This prototype is deprecated.
914 static inline __ATTRS_o_ai vector signed char
915 vec_xld2(long __offset, const signed char *__ptr) {
916   return *(const vector signed char *)((__INTPTR_TYPE__)__ptr + __offset);
917 }
918
919 // This prototype is deprecated.
920 static inline __ATTRS_o_ai vector unsigned char
921 vec_xld2(long __offset, const unsigned char *__ptr) {
922   return *(const vector unsigned char *)((__INTPTR_TYPE__)__ptr + __offset);
923 }
924
925 // This prototype is deprecated.
926 static inline __ATTRS_o_ai vector signed short
927 vec_xld2(long __offset, const signed short *__ptr) {
928   return *(const vector signed short *)((__INTPTR_TYPE__)__ptr + __offset);
929 }
930
931 // This prototype is deprecated.
932 static inline __ATTRS_o_ai vector unsigned short
933 vec_xld2(long __offset, const unsigned short *__ptr) {
934   return *(const vector unsigned short *)((__INTPTR_TYPE__)__ptr + __offset);
935 }
936
937 // This prototype is deprecated.
938 static inline __ATTRS_o_ai vector signed int
939 vec_xld2(long __offset, const signed int *__ptr) {
940   return *(const vector signed int *)((__INTPTR_TYPE__)__ptr + __offset);
941 }
942
943 // This prototype is deprecated.
944 static inline __ATTRS_o_ai vector unsigned int
945 vec_xld2(long __offset, const unsigned int *__ptr) {
946   return *(const vector unsigned int *)((__INTPTR_TYPE__)__ptr + __offset);
947 }
948
949 // This prototype is deprecated.
950 static inline __ATTRS_o_ai vector signed long long
951 vec_xld2(long __offset, const signed long long *__ptr) {
952   return *(const vector signed long long *)((__INTPTR_TYPE__)__ptr + __offset);
953 }
954
955 // This prototype is deprecated.
956 static inline __ATTRS_o_ai vector unsigned long long
957 vec_xld2(long __offset, const unsigned long long *__ptr) {
958   return *(const vector unsigned long long *)((__INTPTR_TYPE__)__ptr + __offset);
959 }
960
961 // This prototype is deprecated.
962 static inline __ATTRS_o_ai vector double
963 vec_xld2(long __offset, const double *__ptr) {
964   return *(const vector double *)((__INTPTR_TYPE__)__ptr + __offset);
965 }
966
967 /*-- vec_xlw4 ---------------------------------------------------------------*/
968
969 // This prototype is deprecated.
970 static inline __ATTRS_o_ai vector signed char
971 vec_xlw4(long __offset, const signed char *__ptr) {
972   return *(const vector signed char *)((__INTPTR_TYPE__)__ptr + __offset);
973 }
974
975 // This prototype is deprecated.
976 static inline __ATTRS_o_ai vector unsigned char
977 vec_xlw4(long __offset, const unsigned char *__ptr) {
978   return *(const vector unsigned char *)((__INTPTR_TYPE__)__ptr + __offset);
979 }
980
981 // This prototype is deprecated.
982 static inline __ATTRS_o_ai vector signed short
983 vec_xlw4(long __offset, const signed short *__ptr) {
984   return *(const vector signed short *)((__INTPTR_TYPE__)__ptr + __offset);
985 }
986
987 // This prototype is deprecated.
988 static inline __ATTRS_o_ai vector unsigned short
989 vec_xlw4(long __offset, const unsigned short *__ptr) {
990   return *(const vector unsigned short *)((__INTPTR_TYPE__)__ptr + __offset);
991 }
992
993 // This prototype is deprecated.
994 static inline __ATTRS_o_ai vector signed int
995 vec_xlw4(long __offset, const signed int *__ptr) {
996   return *(const vector signed int *)((__INTPTR_TYPE__)__ptr + __offset);
997 }
998
999 // This prototype is deprecated.
1000 static inline __ATTRS_o_ai vector unsigned int
1001 vec_xlw4(long __offset, const unsigned int *__ptr) {
1002   return *(const vector unsigned int *)((__INTPTR_TYPE__)__ptr + __offset);
1003 }
1004
1005 /*-- vec_xst ----------------------------------------------------------------*/
1006
1007 static inline __ATTRS_o_ai void
1008 vec_xst(vector signed char __vec, long __offset, signed char *__ptr) {
1009   *(vector signed char *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
1010 }
1011
1012 static inline __ATTRS_o_ai void
1013 vec_xst(vector unsigned char __vec, long __offset, unsigned char *__ptr) {
1014   *(vector unsigned char *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
1015 }
1016
1017 static inline __ATTRS_o_ai void
1018 vec_xst(vector signed short __vec, long __offset, signed short *__ptr) {
1019   *(vector signed short *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
1020 }
1021
1022 static inline __ATTRS_o_ai void
1023 vec_xst(vector unsigned short __vec, long __offset, unsigned short *__ptr) {
1024   *(vector unsigned short *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
1025 }
1026
1027 static inline __ATTRS_o_ai void
1028 vec_xst(vector signed int __vec, long __offset, signed int *__ptr) {
1029   *(vector signed int *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
1030 }
1031
1032 static inline __ATTRS_o_ai void
1033 vec_xst(vector unsigned int __vec, long __offset, unsigned int *__ptr) {
1034   *(vector unsigned int *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
1035 }
1036
1037 static inline __ATTRS_o_ai void
1038 vec_xst(vector signed long long __vec, long __offset,
1039           signed long long *__ptr) {
1040   *(vector signed long long *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
1041 }
1042
1043 static inline __ATTRS_o_ai void
1044 vec_xst(vector unsigned long long __vec, long __offset,
1045           unsigned long long *__ptr) {
1046   *(vector unsigned long long *)((__INTPTR_TYPE__)__ptr + __offset) =
1047     __vec;
1048 }
1049
1050 #if __ARCH__ >= 12
1051 static inline __ATTRS_o_ai void
1052 vec_xst(vector float __vec, long __offset, float *__ptr) {
1053   *(vector float *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
1054 }
1055 #endif
1056
1057 static inline __ATTRS_o_ai void
1058 vec_xst(vector double __vec, long __offset, double *__ptr) {
1059   *(vector double *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
1060 }
1061
1062 /*-- vec_xstd2 --------------------------------------------------------------*/
1063
1064 // This prototype is deprecated.
1065 static inline __ATTRS_o_ai void
1066 vec_xstd2(vector signed char __vec, long __offset, signed char *__ptr) {
1067   *(vector signed char *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
1068 }
1069
1070 // This prototype is deprecated.
1071 static inline __ATTRS_o_ai void
1072 vec_xstd2(vector unsigned char __vec, long __offset, unsigned char *__ptr) {
1073   *(vector unsigned char *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
1074 }
1075
1076 // This prototype is deprecated.
1077 static inline __ATTRS_o_ai void
1078 vec_xstd2(vector signed short __vec, long __offset, signed short *__ptr) {
1079   *(vector signed short *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
1080 }
1081
1082 // This prototype is deprecated.
1083 static inline __ATTRS_o_ai void
1084 vec_xstd2(vector unsigned short __vec, long __offset, unsigned short *__ptr) {
1085   *(vector unsigned short *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
1086 }
1087
1088 // This prototype is deprecated.
1089 static inline __ATTRS_o_ai void
1090 vec_xstd2(vector signed int __vec, long __offset, signed int *__ptr) {
1091   *(vector signed int *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
1092 }
1093
1094 // This prototype is deprecated.
1095 static inline __ATTRS_o_ai void
1096 vec_xstd2(vector unsigned int __vec, long __offset, unsigned int *__ptr) {
1097   *(vector unsigned int *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
1098 }
1099
1100 // This prototype is deprecated.
1101 static inline __ATTRS_o_ai void
1102 vec_xstd2(vector signed long long __vec, long __offset,
1103           signed long long *__ptr) {
1104   *(vector signed long long *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
1105 }
1106
1107 // This prototype is deprecated.
1108 static inline __ATTRS_o_ai void
1109 vec_xstd2(vector unsigned long long __vec, long __offset,
1110           unsigned long long *__ptr) {
1111   *(vector unsigned long long *)((__INTPTR_TYPE__)__ptr + __offset) =
1112     __vec;
1113 }
1114
1115 // This prototype is deprecated.
1116 static inline __ATTRS_o_ai void
1117 vec_xstd2(vector double __vec, long __offset, double *__ptr) {
1118   *(vector double *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
1119 }
1120
1121 /*-- vec_xstw4 --------------------------------------------------------------*/
1122
1123 // This prototype is deprecated.
1124 static inline __ATTRS_o_ai void
1125 vec_xstw4(vector signed char __vec, long __offset, signed char *__ptr) {
1126   *(vector signed char *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
1127 }
1128
1129 // This prototype is deprecated.
1130 static inline __ATTRS_o_ai void
1131 vec_xstw4(vector unsigned char __vec, long __offset, unsigned char *__ptr) {
1132   *(vector unsigned char *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
1133 }
1134
1135 // This prototype is deprecated.
1136 static inline __ATTRS_o_ai void
1137 vec_xstw4(vector signed short __vec, long __offset, signed short *__ptr) {
1138   *(vector signed short *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
1139 }
1140
1141 // This prototype is deprecated.
1142 static inline __ATTRS_o_ai void
1143 vec_xstw4(vector unsigned short __vec, long __offset, unsigned short *__ptr) {
1144   *(vector unsigned short *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
1145 }
1146
1147 // This prototype is deprecated.
1148 static inline __ATTRS_o_ai void
1149 vec_xstw4(vector signed int __vec, long __offset, signed int *__ptr) {
1150   *(vector signed int *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
1151 }
1152
1153 // This prototype is deprecated.
1154 static inline __ATTRS_o_ai void
1155 vec_xstw4(vector unsigned int __vec, long __offset, unsigned int *__ptr) {
1156   *(vector unsigned int *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
1157 }
1158
1159 /*-- vec_load_bndry ---------------------------------------------------------*/
1160
1161 extern __ATTRS_o vector signed char
1162 vec_load_bndry(const signed char *__ptr, unsigned short __len)
1163   __constant_pow2_range(__len, 64, 4096);
1164
1165 extern __ATTRS_o vector unsigned char
1166 vec_load_bndry(const unsigned char *__ptr, unsigned short __len)
1167   __constant_pow2_range(__len, 64, 4096);
1168
1169 extern __ATTRS_o vector signed short
1170 vec_load_bndry(const signed short *__ptr, unsigned short __len)
1171   __constant_pow2_range(__len, 64, 4096);
1172
1173 extern __ATTRS_o vector unsigned short
1174 vec_load_bndry(const unsigned short *__ptr, unsigned short __len)
1175   __constant_pow2_range(__len, 64, 4096);
1176
1177 extern __ATTRS_o vector signed int
1178 vec_load_bndry(const signed int *__ptr, unsigned short __len)
1179   __constant_pow2_range(__len, 64, 4096);
1180
1181 extern __ATTRS_o vector unsigned int
1182 vec_load_bndry(const unsigned int *__ptr, unsigned short __len)
1183   __constant_pow2_range(__len, 64, 4096);
1184
1185 extern __ATTRS_o vector signed long long
1186 vec_load_bndry(const signed long long *__ptr, unsigned short __len)
1187   __constant_pow2_range(__len, 64, 4096);
1188
1189 extern __ATTRS_o vector unsigned long long
1190 vec_load_bndry(const unsigned long long *__ptr, unsigned short __len)
1191   __constant_pow2_range(__len, 64, 4096);
1192
1193 #if __ARCH__ >= 12
1194 extern __ATTRS_o vector float
1195 vec_load_bndry(const float *__ptr, unsigned short __len)
1196   __constant_pow2_range(__len, 64, 4096);
1197 #endif
1198
1199 extern __ATTRS_o vector double
1200 vec_load_bndry(const double *__ptr, unsigned short __len)
1201   __constant_pow2_range(__len, 64, 4096);
1202
1203 #define vec_load_bndry(X, Y) ((__typeof__((vec_load_bndry)((X), (Y)))) \
1204   __builtin_s390_vlbb((X), ((Y) == 64 ? 0 : \
1205                             (Y) == 128 ? 1 : \
1206                             (Y) == 256 ? 2 : \
1207                             (Y) == 512 ? 3 : \
1208                             (Y) == 1024 ? 4 : \
1209                             (Y) == 2048 ? 5 : \
1210                             (Y) == 4096 ? 6 : -1)))
1211
1212 /*-- vec_load_len -----------------------------------------------------------*/
1213
1214 static inline __ATTRS_o_ai vector signed char
1215 vec_load_len(const signed char *__ptr, unsigned int __len) {
1216   return (vector signed char)__builtin_s390_vll(__len, __ptr);
1217 }
1218
1219 static inline __ATTRS_o_ai vector unsigned char
1220 vec_load_len(const unsigned char *__ptr, unsigned int __len) {
1221   return (vector unsigned char)__builtin_s390_vll(__len, __ptr);
1222 }
1223
1224 static inline __ATTRS_o_ai vector signed short
1225 vec_load_len(const signed short *__ptr, unsigned int __len) {
1226   return (vector signed short)__builtin_s390_vll(__len, __ptr);
1227 }
1228
1229 static inline __ATTRS_o_ai vector unsigned short
1230 vec_load_len(const unsigned short *__ptr, unsigned int __len) {
1231   return (vector unsigned short)__builtin_s390_vll(__len, __ptr);
1232 }
1233
1234 static inline __ATTRS_o_ai vector signed int
1235 vec_load_len(const signed int *__ptr, unsigned int __len) {
1236   return (vector signed int)__builtin_s390_vll(__len, __ptr);
1237 }
1238
1239 static inline __ATTRS_o_ai vector unsigned int
1240 vec_load_len(const unsigned int *__ptr, unsigned int __len) {
1241   return (vector unsigned int)__builtin_s390_vll(__len, __ptr);
1242 }
1243
1244 static inline __ATTRS_o_ai vector signed long long
1245 vec_load_len(const signed long long *__ptr, unsigned int __len) {
1246   return (vector signed long long)__builtin_s390_vll(__len, __ptr);
1247 }
1248
1249 static inline __ATTRS_o_ai vector unsigned long long
1250 vec_load_len(const unsigned long long *__ptr, unsigned int __len) {
1251   return (vector unsigned long long)__builtin_s390_vll(__len, __ptr);
1252 }
1253
1254 #if __ARCH__ >= 12
1255 static inline __ATTRS_o_ai vector float
1256 vec_load_len(const float *__ptr, unsigned int __len) {
1257   return (vector float)__builtin_s390_vll(__len, __ptr);
1258 }
1259 #endif
1260
1261 static inline __ATTRS_o_ai vector double
1262 vec_load_len(const double *__ptr, unsigned int __len) {
1263   return (vector double)__builtin_s390_vll(__len, __ptr);
1264 }
1265
1266 /*-- vec_load_len_r ---------------------------------------------------------*/
1267
1268 #if __ARCH__ >= 12
1269 static inline __ATTRS_ai vector unsigned char
1270 vec_load_len_r(const unsigned char *__ptr, unsigned int __len) {
1271   return (vector unsigned char)__builtin_s390_vlrl(__len, __ptr);
1272 }
1273 #endif
1274
1275 /*-- vec_store_len ----------------------------------------------------------*/
1276
1277 static inline __ATTRS_o_ai void
1278 vec_store_len(vector signed char __vec, signed char *__ptr,
1279               unsigned int __len) {
1280   __builtin_s390_vstl((vector signed char)__vec, __len, __ptr);
1281 }
1282
1283 static inline __ATTRS_o_ai void
1284 vec_store_len(vector unsigned char __vec, unsigned char *__ptr,
1285               unsigned int __len) {
1286   __builtin_s390_vstl((vector signed char)__vec, __len, __ptr);
1287 }
1288
1289 static inline __ATTRS_o_ai void
1290 vec_store_len(vector signed short __vec, signed short *__ptr,
1291               unsigned int __len) {
1292   __builtin_s390_vstl((vector signed char)__vec, __len, __ptr);
1293 }
1294
1295 static inline __ATTRS_o_ai void
1296 vec_store_len(vector unsigned short __vec, unsigned short *__ptr,
1297               unsigned int __len) {
1298   __builtin_s390_vstl((vector signed char)__vec, __len, __ptr);
1299 }
1300
1301 static inline __ATTRS_o_ai void
1302 vec_store_len(vector signed int __vec, signed int *__ptr,
1303               unsigned int __len) {
1304   __builtin_s390_vstl((vector signed char)__vec, __len, __ptr);
1305 }
1306
1307 static inline __ATTRS_o_ai void
1308 vec_store_len(vector unsigned int __vec, unsigned int *__ptr,
1309               unsigned int __len) {
1310   __builtin_s390_vstl((vector signed char)__vec, __len, __ptr);
1311 }
1312
1313 static inline __ATTRS_o_ai void
1314 vec_store_len(vector signed long long __vec, signed long long *__ptr,
1315               unsigned int __len) {
1316   __builtin_s390_vstl((vector signed char)__vec, __len, __ptr);
1317 }
1318
1319 static inline __ATTRS_o_ai void
1320 vec_store_len(vector unsigned long long __vec, unsigned long long *__ptr,
1321               unsigned int __len) {
1322   __builtin_s390_vstl((vector signed char)__vec, __len, __ptr);
1323 }
1324
1325 #if __ARCH__ >= 12
1326 static inline __ATTRS_o_ai void
1327 vec_store_len(vector float __vec, float *__ptr,
1328               unsigned int __len) {
1329   __builtin_s390_vstl((vector signed char)__vec, __len, __ptr);
1330 }
1331 #endif
1332
1333 static inline __ATTRS_o_ai void
1334 vec_store_len(vector double __vec, double *__ptr,
1335               unsigned int __len) {
1336   __builtin_s390_vstl((vector signed char)__vec, __len, __ptr);
1337 }
1338
1339 /*-- vec_store_len_r --------------------------------------------------------*/
1340
1341 #if __ARCH__ >= 12
1342 static inline __ATTRS_ai void
1343 vec_store_len_r(vector unsigned char __vec, unsigned char *__ptr,
1344                 unsigned int __len) {
1345   __builtin_s390_vstrl((vector signed char)__vec, __len, __ptr);
1346 }
1347 #endif
1348
1349 /*-- vec_load_pair ----------------------------------------------------------*/
1350
1351 static inline __ATTRS_o_ai vector signed long long
1352 vec_load_pair(signed long long __a, signed long long __b) {
1353   return (vector signed long long)(__a, __b);
1354 }
1355
1356 static inline __ATTRS_o_ai vector unsigned long long
1357 vec_load_pair(unsigned long long __a, unsigned long long __b) {
1358   return (vector unsigned long long)(__a, __b);
1359 }
1360
1361 /*-- vec_genmask ------------------------------------------------------------*/
1362
1363 static inline __ATTRS_o_ai vector unsigned char
1364 vec_genmask(unsigned short __mask)
1365   __constant(__mask) {
1366   return (vector unsigned char)(
1367     __mask & 0x8000 ? 0xff : 0,
1368     __mask & 0x4000 ? 0xff : 0,
1369     __mask & 0x2000 ? 0xff : 0,
1370     __mask & 0x1000 ? 0xff : 0,
1371     __mask & 0x0800 ? 0xff : 0,
1372     __mask & 0x0400 ? 0xff : 0,
1373     __mask & 0x0200 ? 0xff : 0,
1374     __mask & 0x0100 ? 0xff : 0,
1375     __mask & 0x0080 ? 0xff : 0,
1376     __mask & 0x0040 ? 0xff : 0,
1377     __mask & 0x0020 ? 0xff : 0,
1378     __mask & 0x0010 ? 0xff : 0,
1379     __mask & 0x0008 ? 0xff : 0,
1380     __mask & 0x0004 ? 0xff : 0,
1381     __mask & 0x0002 ? 0xff : 0,
1382     __mask & 0x0001 ? 0xff : 0);
1383 }
1384
1385 /*-- vec_genmasks_* ---------------------------------------------------------*/
1386
1387 static inline __ATTRS_o_ai vector unsigned char
1388 vec_genmasks_8(unsigned char __first, unsigned char __last)
1389   __constant(__first) __constant(__last) {
1390   unsigned char __bit1 = __first & 7;
1391   unsigned char __bit2 = __last & 7;
1392   unsigned char __mask1 = (unsigned char)(1U << (7 - __bit1) << 1) - 1;
1393   unsigned char __mask2 = (unsigned char)(1U << (7 - __bit2)) - 1;
1394   unsigned char __value = (__bit1 <= __bit2 ?
1395                            __mask1 & ~__mask2 :
1396                            __mask1 | ~__mask2);
1397   return (vector unsigned char)__value;
1398 }
1399
1400 static inline __ATTRS_o_ai vector unsigned short
1401 vec_genmasks_16(unsigned char __first, unsigned char __last)
1402   __constant(__first) __constant(__last) {
1403   unsigned char __bit1 = __first & 15;
1404   unsigned char __bit2 = __last & 15;
1405   unsigned short __mask1 = (unsigned short)(1U << (15 - __bit1) << 1) - 1;
1406   unsigned short __mask2 = (unsigned short)(1U << (15 - __bit2)) - 1;
1407   unsigned short __value = (__bit1 <= __bit2 ?
1408                             __mask1 & ~__mask2 :
1409                             __mask1 | ~__mask2);
1410   return (vector unsigned short)__value;
1411 }
1412
1413 static inline __ATTRS_o_ai vector unsigned int
1414 vec_genmasks_32(unsigned char __first, unsigned char __last)
1415   __constant(__first) __constant(__last) {
1416   unsigned char __bit1 = __first & 31;
1417   unsigned char __bit2 = __last & 31;
1418   unsigned int __mask1 = (1U << (31 - __bit1) << 1) - 1;
1419   unsigned int __mask2 = (1U << (31 - __bit2)) - 1;
1420   unsigned int __value = (__bit1 <= __bit2 ?
1421                           __mask1 & ~__mask2 :
1422                           __mask1 | ~__mask2);
1423   return (vector unsigned int)__value;
1424 }
1425
1426 static inline __ATTRS_o_ai vector unsigned long long
1427 vec_genmasks_64(unsigned char __first, unsigned char __last)
1428   __constant(__first) __constant(__last) {
1429   unsigned char __bit1 = __first & 63;
1430   unsigned char __bit2 = __last & 63;
1431   unsigned long long __mask1 = (1ULL << (63 - __bit1) << 1) - 1;
1432   unsigned long long __mask2 = (1ULL << (63 - __bit2)) - 1;
1433   unsigned long long __value = (__bit1 <= __bit2 ?
1434                                 __mask1 & ~__mask2 :
1435                                 __mask1 | ~__mask2);
1436   return (vector unsigned long long)__value;
1437 }
1438
1439 /*-- vec_splat --------------------------------------------------------------*/
1440
1441 static inline __ATTRS_o_ai vector signed char
1442 vec_splat(vector signed char __vec, int __index)
1443   __constant_range(__index, 0, 15) {
1444   return (vector signed char)__vec[__index];
1445 }
1446
1447 static inline __ATTRS_o_ai vector bool char
1448 vec_splat(vector bool char __vec, int __index)
1449   __constant_range(__index, 0, 15) {
1450   return (vector bool char)(vector unsigned char)__vec[__index];
1451 }
1452
1453 static inline __ATTRS_o_ai vector unsigned char
1454 vec_splat(vector unsigned char __vec, int __index)
1455   __constant_range(__index, 0, 15) {
1456   return (vector unsigned char)__vec[__index];
1457 }
1458
1459 static inline __ATTRS_o_ai vector signed short
1460 vec_splat(vector signed short __vec, int __index)
1461   __constant_range(__index, 0, 7) {
1462   return (vector signed short)__vec[__index];
1463 }
1464
1465 static inline __ATTRS_o_ai vector bool short
1466 vec_splat(vector bool short __vec, int __index)
1467   __constant_range(__index, 0, 7) {
1468   return (vector bool short)(vector unsigned short)__vec[__index];
1469 }
1470
1471 static inline __ATTRS_o_ai vector unsigned short
1472 vec_splat(vector unsigned short __vec, int __index)
1473   __constant_range(__index, 0, 7) {
1474   return (vector unsigned short)__vec[__index];
1475 }
1476
1477 static inline __ATTRS_o_ai vector signed int
1478 vec_splat(vector signed int __vec, int __index)
1479   __constant_range(__index, 0, 3) {
1480   return (vector signed int)__vec[__index];
1481 }
1482
1483 static inline __ATTRS_o_ai vector bool int
1484 vec_splat(vector bool int __vec, int __index)
1485   __constant_range(__index, 0, 3) {
1486   return (vector bool int)(vector unsigned int)__vec[__index];
1487 }
1488
1489 static inline __ATTRS_o_ai vector unsigned int
1490 vec_splat(vector unsigned int __vec, int __index)
1491   __constant_range(__index, 0, 3) {
1492   return (vector unsigned int)__vec[__index];
1493 }
1494
1495 static inline __ATTRS_o_ai vector signed long long
1496 vec_splat(vector signed long long __vec, int __index)
1497   __constant_range(__index, 0, 1) {
1498   return (vector signed long long)__vec[__index];
1499 }
1500
1501 static inline __ATTRS_o_ai vector bool long long
1502 vec_splat(vector bool long long __vec, int __index)
1503   __constant_range(__index, 0, 1) {
1504   return (vector bool long long)(vector unsigned long long)__vec[__index];
1505 }
1506
1507 static inline __ATTRS_o_ai vector unsigned long long
1508 vec_splat(vector unsigned long long __vec, int __index)
1509   __constant_range(__index, 0, 1) {
1510   return (vector unsigned long long)__vec[__index];
1511 }
1512
1513 #if __ARCH__ >= 12
1514 static inline __ATTRS_o_ai vector float
1515 vec_splat(vector float __vec, int __index)
1516   __constant_range(__index, 0, 3) {
1517   return (vector float)__vec[__index];
1518 }
1519 #endif
1520
1521 static inline __ATTRS_o_ai vector double
1522 vec_splat(vector double __vec, int __index)
1523   __constant_range(__index, 0, 1) {
1524   return (vector double)__vec[__index];
1525 }
1526
1527 /*-- vec_splat_s* -----------------------------------------------------------*/
1528
1529 static inline __ATTRS_ai vector signed char
1530 vec_splat_s8(signed char __scalar)
1531   __constant(__scalar) {
1532   return (vector signed char)__scalar;
1533 }
1534
1535 static inline __ATTRS_ai vector signed short
1536 vec_splat_s16(signed short __scalar)
1537   __constant(__scalar) {
1538   return (vector signed short)__scalar;
1539 }
1540
1541 static inline __ATTRS_ai vector signed int
1542 vec_splat_s32(signed short __scalar)
1543   __constant(__scalar) {
1544   return (vector signed int)(signed int)__scalar;
1545 }
1546
1547 static inline __ATTRS_ai vector signed long long
1548 vec_splat_s64(signed short __scalar)
1549   __constant(__scalar) {
1550   return (vector signed long long)(signed long)__scalar;
1551 }
1552
1553 /*-- vec_splat_u* -----------------------------------------------------------*/
1554
1555 static inline __ATTRS_ai vector unsigned char
1556 vec_splat_u8(unsigned char __scalar)
1557   __constant(__scalar) {
1558   return (vector unsigned char)__scalar;
1559 }
1560
1561 static inline __ATTRS_ai vector unsigned short
1562 vec_splat_u16(unsigned short __scalar)
1563   __constant(__scalar) {
1564   return (vector unsigned short)__scalar;
1565 }
1566
1567 static inline __ATTRS_ai vector unsigned int
1568 vec_splat_u32(signed short __scalar)
1569   __constant(__scalar) {
1570   return (vector unsigned int)(signed int)__scalar;
1571 }
1572
1573 static inline __ATTRS_ai vector unsigned long long
1574 vec_splat_u64(signed short __scalar)
1575   __constant(__scalar) {
1576   return (vector unsigned long long)(signed long long)__scalar;
1577 }
1578
1579 /*-- vec_splats -------------------------------------------------------------*/
1580
1581 static inline __ATTRS_o_ai vector signed char
1582 vec_splats(signed char __scalar) {
1583   return (vector signed char)__scalar;
1584 }
1585
1586 static inline __ATTRS_o_ai vector unsigned char
1587 vec_splats(unsigned char __scalar) {
1588   return (vector unsigned char)__scalar;
1589 }
1590
1591 static inline __ATTRS_o_ai vector signed short
1592 vec_splats(signed short __scalar) {
1593   return (vector signed short)__scalar;
1594 }
1595
1596 static inline __ATTRS_o_ai vector unsigned short
1597 vec_splats(unsigned short __scalar) {
1598   return (vector unsigned short)__scalar;
1599 }
1600
1601 static inline __ATTRS_o_ai vector signed int
1602 vec_splats(signed int __scalar) {
1603   return (vector signed int)__scalar;
1604 }
1605
1606 static inline __ATTRS_o_ai vector unsigned int
1607 vec_splats(unsigned int __scalar) {
1608   return (vector unsigned int)__scalar;
1609 }
1610
1611 static inline __ATTRS_o_ai vector signed long long
1612 vec_splats(signed long long __scalar) {
1613   return (vector signed long long)__scalar;
1614 }
1615
1616 static inline __ATTRS_o_ai vector unsigned long long
1617 vec_splats(unsigned long long __scalar) {
1618   return (vector unsigned long long)__scalar;
1619 }
1620
1621 #if __ARCH__ >= 12
1622 static inline __ATTRS_o_ai vector float
1623 vec_splats(float __scalar) {
1624   return (vector float)__scalar;
1625 }
1626 #endif
1627
1628 static inline __ATTRS_o_ai vector double
1629 vec_splats(double __scalar) {
1630   return (vector double)__scalar;
1631 }
1632
1633 /*-- vec_extend_s64 ---------------------------------------------------------*/
1634
1635 static inline __ATTRS_o_ai vector signed long long
1636 vec_extend_s64(vector signed char __a) {
1637   return (vector signed long long)(__a[7], __a[15]);
1638 }
1639
1640 static inline __ATTRS_o_ai vector signed long long
1641 vec_extend_s64(vector signed short __a) {
1642   return (vector signed long long)(__a[3], __a[7]);
1643 }
1644
1645 static inline __ATTRS_o_ai vector signed long long
1646 vec_extend_s64(vector signed int __a) {
1647   return (vector signed long long)(__a[1], __a[3]);
1648 }
1649
1650 /*-- vec_mergeh -------------------------------------------------------------*/
1651
1652 static inline __ATTRS_o_ai vector signed char
1653 vec_mergeh(vector signed char __a, vector signed char __b) {
1654   return (vector signed char)(
1655     __a[0], __b[0], __a[1], __b[1], __a[2], __b[2], __a[3], __b[3],
1656     __a[4], __b[4], __a[5], __b[5], __a[6], __b[6], __a[7], __b[7]);
1657 }
1658
1659 static inline __ATTRS_o_ai vector bool char
1660 vec_mergeh(vector bool char __a, vector bool char __b) {
1661   return (vector bool char)(
1662     __a[0], __b[0], __a[1], __b[1], __a[2], __b[2], __a[3], __b[3],
1663     __a[4], __b[4], __a[5], __b[5], __a[6], __b[6], __a[7], __b[7]);
1664 }
1665
1666 static inline __ATTRS_o_ai vector unsigned char
1667 vec_mergeh(vector unsigned char __a, vector unsigned char __b) {
1668   return (vector unsigned char)(
1669     __a[0], __b[0], __a[1], __b[1], __a[2], __b[2], __a[3], __b[3],
1670     __a[4], __b[4], __a[5], __b[5], __a[6], __b[6], __a[7], __b[7]);
1671 }
1672
1673 static inline __ATTRS_o_ai vector signed short
1674 vec_mergeh(vector signed short __a, vector signed short __b) {
1675   return (vector signed short)(
1676     __a[0], __b[0], __a[1], __b[1], __a[2], __b[2], __a[3], __b[3]);
1677 }
1678
1679 static inline __ATTRS_o_ai vector bool short
1680 vec_mergeh(vector bool short __a, vector bool short __b) {
1681   return (vector bool short)(
1682     __a[0], __b[0], __a[1], __b[1], __a[2], __b[2], __a[3], __b[3]);
1683 }
1684
1685 static inline __ATTRS_o_ai vector unsigned short
1686 vec_mergeh(vector unsigned short __a, vector unsigned short __b) {
1687   return (vector unsigned short)(
1688     __a[0], __b[0], __a[1], __b[1], __a[2], __b[2], __a[3], __b[3]);
1689 }
1690
1691 static inline __ATTRS_o_ai vector signed int
1692 vec_mergeh(vector signed int __a, vector signed int __b) {
1693   return (vector signed int)(__a[0], __b[0], __a[1], __b[1]);
1694 }
1695
1696 static inline __ATTRS_o_ai vector bool int
1697 vec_mergeh(vector bool int __a, vector bool int __b) {
1698   return (vector bool int)(__a[0], __b[0], __a[1], __b[1]);
1699 }
1700
1701 static inline __ATTRS_o_ai vector unsigned int
1702 vec_mergeh(vector unsigned int __a, vector unsigned int __b) {
1703   return (vector unsigned int)(__a[0], __b[0], __a[1], __b[1]);
1704 }
1705
1706 static inline __ATTRS_o_ai vector signed long long
1707 vec_mergeh(vector signed long long __a, vector signed long long __b) {
1708   return (vector signed long long)(__a[0], __b[0]);
1709 }
1710
1711 static inline __ATTRS_o_ai vector bool long long
1712 vec_mergeh(vector bool long long __a, vector bool long long __b) {
1713   return (vector bool long long)(__a[0], __b[0]);
1714 }
1715
1716 static inline __ATTRS_o_ai vector unsigned long long
1717 vec_mergeh(vector unsigned long long __a, vector unsigned long long __b) {
1718   return (vector unsigned long long)(__a[0], __b[0]);
1719 }
1720
1721 #if __ARCH__ >= 12
1722 static inline __ATTRS_o_ai vector float
1723 vec_mergeh(vector float __a, vector float __b) {
1724   return (vector float)(__a[0], __b[0], __a[1], __b[1]);
1725 }
1726 #endif
1727
1728 static inline __ATTRS_o_ai vector double
1729 vec_mergeh(vector double __a, vector double __b) {
1730   return (vector double)(__a[0], __b[0]);
1731 }
1732
1733 /*-- vec_mergel -------------------------------------------------------------*/
1734
1735 static inline __ATTRS_o_ai vector signed char
1736 vec_mergel(vector signed char __a, vector signed char __b) {
1737   return (vector signed char)(
1738     __a[8], __b[8], __a[9], __b[9], __a[10], __b[10], __a[11], __b[11],
1739     __a[12], __b[12], __a[13], __b[13], __a[14], __b[14], __a[15], __b[15]);
1740 }
1741
1742 static inline __ATTRS_o_ai vector bool char
1743 vec_mergel(vector bool char __a, vector bool char __b) {
1744   return (vector bool char)(
1745     __a[8], __b[8], __a[9], __b[9], __a[10], __b[10], __a[11], __b[11],
1746     __a[12], __b[12], __a[13], __b[13], __a[14], __b[14], __a[15], __b[15]);
1747 }
1748
1749 static inline __ATTRS_o_ai vector unsigned char
1750 vec_mergel(vector unsigned char __a, vector unsigned char __b) {
1751   return (vector unsigned char)(
1752     __a[8], __b[8], __a[9], __b[9], __a[10], __b[10], __a[11], __b[11],
1753     __a[12], __b[12], __a[13], __b[13], __a[14], __b[14], __a[15], __b[15]);
1754 }
1755
1756 static inline __ATTRS_o_ai vector signed short
1757 vec_mergel(vector signed short __a, vector signed short __b) {
1758   return (vector signed short)(
1759     __a[4], __b[4], __a[5], __b[5], __a[6], __b[6], __a[7], __b[7]);
1760 }
1761
1762 static inline __ATTRS_o_ai vector bool short
1763 vec_mergel(vector bool short __a, vector bool short __b) {
1764   return (vector bool short)(
1765     __a[4], __b[4], __a[5], __b[5], __a[6], __b[6], __a[7], __b[7]);
1766 }
1767
1768 static inline __ATTRS_o_ai vector unsigned short
1769 vec_mergel(vector unsigned short __a, vector unsigned short __b) {
1770   return (vector unsigned short)(
1771     __a[4], __b[4], __a[5], __b[5], __a[6], __b[6], __a[7], __b[7]);
1772 }
1773
1774 static inline __ATTRS_o_ai vector signed int
1775 vec_mergel(vector signed int __a, vector signed int __b) {
1776   return (vector signed int)(__a[2], __b[2], __a[3], __b[3]);
1777 }
1778
1779 static inline __ATTRS_o_ai vector bool int
1780 vec_mergel(vector bool int __a, vector bool int __b) {
1781   return (vector bool int)(__a[2], __b[2], __a[3], __b[3]);
1782 }
1783
1784 static inline __ATTRS_o_ai vector unsigned int
1785 vec_mergel(vector unsigned int __a, vector unsigned int __b) {
1786   return (vector unsigned int)(__a[2], __b[2], __a[3], __b[3]);
1787 }
1788
1789 static inline __ATTRS_o_ai vector signed long long
1790 vec_mergel(vector signed long long __a, vector signed long long __b) {
1791   return (vector signed long long)(__a[1], __b[1]);
1792 }
1793
1794 static inline __ATTRS_o_ai vector bool long long
1795 vec_mergel(vector bool long long __a, vector bool long long __b) {
1796   return (vector bool long long)(__a[1], __b[1]);
1797 }
1798
1799 static inline __ATTRS_o_ai vector unsigned long long
1800 vec_mergel(vector unsigned long long __a, vector unsigned long long __b) {
1801   return (vector unsigned long long)(__a[1], __b[1]);
1802 }
1803
1804 #if __ARCH__ >= 12
1805 static inline __ATTRS_o_ai vector float
1806 vec_mergel(vector float __a, vector float __b) {
1807   return (vector float)(__a[2], __b[2], __a[3], __b[3]);
1808 }
1809 #endif
1810
1811 static inline __ATTRS_o_ai vector double
1812 vec_mergel(vector double __a, vector double __b) {
1813   return (vector double)(__a[1], __b[1]);
1814 }
1815
1816 /*-- vec_pack ---------------------------------------------------------------*/
1817
1818 static inline __ATTRS_o_ai vector signed char
1819 vec_pack(vector signed short __a, vector signed short __b) {
1820   vector signed char __ac = (vector signed char)__a;
1821   vector signed char __bc = (vector signed char)__b;
1822   return (vector signed char)(
1823     __ac[1], __ac[3], __ac[5], __ac[7], __ac[9], __ac[11], __ac[13], __ac[15],
1824     __bc[1], __bc[3], __bc[5], __bc[7], __bc[9], __bc[11], __bc[13], __bc[15]);
1825 }
1826
1827 static inline __ATTRS_o_ai vector bool char
1828 vec_pack(vector bool short __a, vector bool short __b) {
1829   vector bool char __ac = (vector bool char)__a;
1830   vector bool char __bc = (vector bool char)__b;
1831   return (vector bool char)(
1832     __ac[1], __ac[3], __ac[5], __ac[7], __ac[9], __ac[11], __ac[13], __ac[15],
1833     __bc[1], __bc[3], __bc[5], __bc[7], __bc[9], __bc[11], __bc[13], __bc[15]);
1834 }
1835
1836 static inline __ATTRS_o_ai vector unsigned char
1837 vec_pack(vector unsigned short __a, vector unsigned short __b) {
1838   vector unsigned char __ac = (vector unsigned char)__a;
1839   vector unsigned char __bc = (vector unsigned char)__b;
1840   return (vector unsigned char)(
1841     __ac[1], __ac[3], __ac[5], __ac[7], __ac[9], __ac[11], __ac[13], __ac[15],
1842     __bc[1], __bc[3], __bc[5], __bc[7], __bc[9], __bc[11], __bc[13], __bc[15]);
1843 }
1844
1845 static inline __ATTRS_o_ai vector signed short
1846 vec_pack(vector signed int __a, vector signed int __b) {
1847   vector signed short __ac = (vector signed short)__a;
1848   vector signed short __bc = (vector signed short)__b;
1849   return (vector signed short)(
1850     __ac[1], __ac[3], __ac[5], __ac[7],
1851     __bc[1], __bc[3], __bc[5], __bc[7]);
1852 }
1853
1854 static inline __ATTRS_o_ai vector bool short
1855 vec_pack(vector bool int __a, vector bool int __b) {
1856   vector bool short __ac = (vector bool short)__a;
1857   vector bool short __bc = (vector bool short)__b;
1858   return (vector bool short)(
1859     __ac[1], __ac[3], __ac[5], __ac[7],
1860     __bc[1], __bc[3], __bc[5], __bc[7]);
1861 }
1862
1863 static inline __ATTRS_o_ai vector unsigned short
1864 vec_pack(vector unsigned int __a, vector unsigned int __b) {
1865   vector unsigned short __ac = (vector unsigned short)__a;
1866   vector unsigned short __bc = (vector unsigned short)__b;
1867   return (vector unsigned short)(
1868     __ac[1], __ac[3], __ac[5], __ac[7],
1869     __bc[1], __bc[3], __bc[5], __bc[7]);
1870 }
1871
1872 static inline __ATTRS_o_ai vector signed int
1873 vec_pack(vector signed long long __a, vector signed long long __b) {
1874   vector signed int __ac = (vector signed int)__a;
1875   vector signed int __bc = (vector signed int)__b;
1876   return (vector signed int)(__ac[1], __ac[3], __bc[1], __bc[3]);
1877 }
1878
1879 static inline __ATTRS_o_ai vector bool int
1880 vec_pack(vector bool long long __a, vector bool long long __b) {
1881   vector bool int __ac = (vector bool int)__a;
1882   vector bool int __bc = (vector bool int)__b;
1883   return (vector bool int)(__ac[1], __ac[3], __bc[1], __bc[3]);
1884 }
1885
1886 static inline __ATTRS_o_ai vector unsigned int
1887 vec_pack(vector unsigned long long __a, vector unsigned long long __b) {
1888   vector unsigned int __ac = (vector unsigned int)__a;
1889   vector unsigned int __bc = (vector unsigned int)__b;
1890   return (vector unsigned int)(__ac[1], __ac[3], __bc[1], __bc[3]);
1891 }
1892
1893 /*-- vec_packs --------------------------------------------------------------*/
1894
1895 static inline __ATTRS_o_ai vector signed char
1896 vec_packs(vector signed short __a, vector signed short __b) {
1897   return __builtin_s390_vpksh(__a, __b);
1898 }
1899
1900 static inline __ATTRS_o_ai vector unsigned char
1901 vec_packs(vector unsigned short __a, vector unsigned short __b) {
1902   return __builtin_s390_vpklsh(__a, __b);
1903 }
1904
1905 static inline __ATTRS_o_ai vector signed short
1906 vec_packs(vector signed int __a, vector signed int __b) {
1907   return __builtin_s390_vpksf(__a, __b);
1908 }
1909
1910 static inline __ATTRS_o_ai vector unsigned short
1911 vec_packs(vector unsigned int __a, vector unsigned int __b) {
1912   return __builtin_s390_vpklsf(__a, __b);
1913 }
1914
1915 static inline __ATTRS_o_ai vector signed int
1916 vec_packs(vector signed long long __a, vector signed long long __b) {
1917   return __builtin_s390_vpksg(__a, __b);
1918 }
1919
1920 static inline __ATTRS_o_ai vector unsigned int
1921 vec_packs(vector unsigned long long __a, vector unsigned long long __b) {
1922   return __builtin_s390_vpklsg(__a, __b);
1923 }
1924
1925 /*-- vec_packs_cc -----------------------------------------------------------*/
1926
1927 static inline __ATTRS_o_ai vector signed char
1928 vec_packs_cc(vector signed short __a, vector signed short __b, int *__cc) {
1929   return __builtin_s390_vpkshs(__a, __b, __cc);
1930 }
1931
1932 static inline __ATTRS_o_ai vector unsigned char
1933 vec_packs_cc(vector unsigned short __a, vector unsigned short __b, int *__cc) {
1934   return __builtin_s390_vpklshs(__a, __b, __cc);
1935 }
1936
1937 static inline __ATTRS_o_ai vector signed short
1938 vec_packs_cc(vector signed int __a, vector signed int __b, int *__cc) {
1939   return __builtin_s390_vpksfs(__a, __b, __cc);
1940 }
1941
1942 static inline __ATTRS_o_ai vector unsigned short
1943 vec_packs_cc(vector unsigned int __a, vector unsigned int __b, int *__cc) {
1944   return __builtin_s390_vpklsfs(__a, __b, __cc);
1945 }
1946
1947 static inline __ATTRS_o_ai vector signed int
1948 vec_packs_cc(vector signed long long __a, vector signed long long __b,
1949              int *__cc) {
1950   return __builtin_s390_vpksgs(__a, __b, __cc);
1951 }
1952
1953 static inline __ATTRS_o_ai vector unsigned int
1954 vec_packs_cc(vector unsigned long long __a, vector unsigned long long __b,
1955              int *__cc) {
1956   return __builtin_s390_vpklsgs(__a, __b, __cc);
1957 }
1958
1959 /*-- vec_packsu -------------------------------------------------------------*/
1960
1961 static inline __ATTRS_o_ai vector unsigned char
1962 vec_packsu(vector signed short __a, vector signed short __b) {
1963   const vector signed short __zero = (vector signed short)0;
1964   return __builtin_s390_vpklsh(
1965     (vector unsigned short)(__a >= __zero) & (vector unsigned short)__a,
1966     (vector unsigned short)(__b >= __zero) & (vector unsigned short)__b);
1967 }
1968
1969 static inline __ATTRS_o_ai vector unsigned char
1970 vec_packsu(vector unsigned short __a, vector unsigned short __b) {
1971   return __builtin_s390_vpklsh(__a, __b);
1972 }
1973
1974 static inline __ATTRS_o_ai vector unsigned short
1975 vec_packsu(vector signed int __a, vector signed int __b) {
1976   const vector signed int __zero = (vector signed int)0;
1977   return __builtin_s390_vpklsf(
1978     (vector unsigned int)(__a >= __zero) & (vector unsigned int)__a,
1979     (vector unsigned int)(__b >= __zero) & (vector unsigned int)__b);
1980 }
1981
1982 static inline __ATTRS_o_ai vector unsigned short
1983 vec_packsu(vector unsigned int __a, vector unsigned int __b) {
1984   return __builtin_s390_vpklsf(__a, __b);
1985 }
1986
1987 static inline __ATTRS_o_ai vector unsigned int
1988 vec_packsu(vector signed long long __a, vector signed long long __b) {
1989   const vector signed long long __zero = (vector signed long long)0;
1990   return __builtin_s390_vpklsg(
1991     (vector unsigned long long)(__a >= __zero) &
1992     (vector unsigned long long)__a,
1993     (vector unsigned long long)(__b >= __zero) &
1994     (vector unsigned long long)__b);
1995 }
1996
1997 static inline __ATTRS_o_ai vector unsigned int
1998 vec_packsu(vector unsigned long long __a, vector unsigned long long __b) {
1999   return __builtin_s390_vpklsg(__a, __b);
2000 }
2001
2002 /*-- vec_packsu_cc ----------------------------------------------------------*/
2003
2004 static inline __ATTRS_o_ai vector unsigned char
2005 vec_packsu_cc(vector unsigned short __a, vector unsigned short __b, int *__cc) {
2006   return __builtin_s390_vpklshs(__a, __b, __cc);
2007 }
2008
2009 static inline __ATTRS_o_ai vector unsigned short
2010 vec_packsu_cc(vector unsigned int __a, vector unsigned int __b, int *__cc) {
2011   return __builtin_s390_vpklsfs(__a, __b, __cc);
2012 }
2013
2014 static inline __ATTRS_o_ai vector unsigned int
2015 vec_packsu_cc(vector unsigned long long __a, vector unsigned long long __b,
2016               int *__cc) {
2017   return __builtin_s390_vpklsgs(__a, __b, __cc);
2018 }
2019
2020 /*-- vec_unpackh ------------------------------------------------------------*/
2021
2022 static inline __ATTRS_o_ai vector signed short
2023 vec_unpackh(vector signed char __a) {
2024   return __builtin_s390_vuphb(__a);
2025 }
2026
2027 static inline __ATTRS_o_ai vector bool short
2028 vec_unpackh(vector bool char __a) {
2029   return (vector bool short)__builtin_s390_vuphb((vector signed char)__a);
2030 }
2031
2032 static inline __ATTRS_o_ai vector unsigned short
2033 vec_unpackh(vector unsigned char __a) {
2034   return __builtin_s390_vuplhb(__a);
2035 }
2036
2037 static inline __ATTRS_o_ai vector signed int
2038 vec_unpackh(vector signed short __a) {
2039   return __builtin_s390_vuphh(__a);
2040 }
2041
2042 static inline __ATTRS_o_ai vector bool int
2043 vec_unpackh(vector bool short __a) {
2044   return (vector bool int)__builtin_s390_vuphh((vector signed short)__a);
2045 }
2046
2047 static inline __ATTRS_o_ai vector unsigned int
2048 vec_unpackh(vector unsigned short __a) {
2049   return __builtin_s390_vuplhh(__a);
2050 }
2051
2052 static inline __ATTRS_o_ai vector signed long long
2053 vec_unpackh(vector signed int __a) {
2054   return __builtin_s390_vuphf(__a);
2055 }
2056
2057 static inline __ATTRS_o_ai vector bool long long
2058 vec_unpackh(vector bool int __a) {
2059   return (vector bool long long)__builtin_s390_vuphf((vector signed int)__a);
2060 }
2061
2062 static inline __ATTRS_o_ai vector unsigned long long
2063 vec_unpackh(vector unsigned int __a) {
2064   return __builtin_s390_vuplhf(__a);
2065 }
2066
2067 /*-- vec_unpackl ------------------------------------------------------------*/
2068
2069 static inline __ATTRS_o_ai vector signed short
2070 vec_unpackl(vector signed char __a) {
2071   return __builtin_s390_vuplb(__a);
2072 }
2073
2074 static inline __ATTRS_o_ai vector bool short
2075 vec_unpackl(vector bool char __a) {
2076   return (vector bool short)__builtin_s390_vuplb((vector signed char)__a);
2077 }
2078
2079 static inline __ATTRS_o_ai vector unsigned short
2080 vec_unpackl(vector unsigned char __a) {
2081   return __builtin_s390_vupllb(__a);
2082 }
2083
2084 static inline __ATTRS_o_ai vector signed int
2085 vec_unpackl(vector signed short __a) {
2086   return __builtin_s390_vuplhw(__a);
2087 }
2088
2089 static inline __ATTRS_o_ai vector bool int
2090 vec_unpackl(vector bool short __a) {
2091   return (vector bool int)__builtin_s390_vuplhw((vector signed short)__a);
2092 }
2093
2094 static inline __ATTRS_o_ai vector unsigned int
2095 vec_unpackl(vector unsigned short __a) {
2096   return __builtin_s390_vupllh(__a);
2097 }
2098
2099 static inline __ATTRS_o_ai vector signed long long
2100 vec_unpackl(vector signed int __a) {
2101   return __builtin_s390_vuplf(__a);
2102 }
2103
2104 static inline __ATTRS_o_ai vector bool long long
2105 vec_unpackl(vector bool int __a) {
2106   return (vector bool long long)__builtin_s390_vuplf((vector signed int)__a);
2107 }
2108
2109 static inline __ATTRS_o_ai vector unsigned long long
2110 vec_unpackl(vector unsigned int __a) {
2111   return __builtin_s390_vupllf(__a);
2112 }
2113
2114 /*-- vec_cmpeq --------------------------------------------------------------*/
2115
2116 static inline __ATTRS_o_ai vector bool char
2117 vec_cmpeq(vector bool char __a, vector bool char __b) {
2118   return (vector bool char)(__a == __b);
2119 }
2120
2121 static inline __ATTRS_o_ai vector bool char
2122 vec_cmpeq(vector signed char __a, vector signed char __b) {
2123   return (vector bool char)(__a == __b);
2124 }
2125
2126 static inline __ATTRS_o_ai vector bool char
2127 vec_cmpeq(vector unsigned char __a, vector unsigned char __b) {
2128   return (vector bool char)(__a == __b);
2129 }
2130
2131 static inline __ATTRS_o_ai vector bool short
2132 vec_cmpeq(vector bool short __a, vector bool short __b) {
2133   return (vector bool short)(__a == __b);
2134 }
2135
2136 static inline __ATTRS_o_ai vector bool short
2137 vec_cmpeq(vector signed short __a, vector signed short __b) {
2138   return (vector bool short)(__a == __b);
2139 }
2140
2141 static inline __ATTRS_o_ai vector bool short
2142 vec_cmpeq(vector unsigned short __a, vector unsigned short __b) {
2143   return (vector bool short)(__a == __b);
2144 }
2145
2146 static inline __ATTRS_o_ai vector bool int
2147 vec_cmpeq(vector bool int __a, vector bool int __b) {
2148   return (vector bool int)(__a == __b);
2149 }
2150
2151 static inline __ATTRS_o_ai vector bool int
2152 vec_cmpeq(vector signed int __a, vector signed int __b) {
2153   return (vector bool int)(__a == __b);
2154 }
2155
2156 static inline __ATTRS_o_ai vector bool int
2157 vec_cmpeq(vector unsigned int __a, vector unsigned int __b) {
2158   return (vector bool int)(__a == __b);
2159 }
2160
2161 static inline __ATTRS_o_ai vector bool long long
2162 vec_cmpeq(vector bool long long __a, vector bool long long __b) {
2163   return (vector bool long long)(__a == __b);
2164 }
2165
2166 static inline __ATTRS_o_ai vector bool long long
2167 vec_cmpeq(vector signed long long __a, vector signed long long __b) {
2168   return (vector bool long long)(__a == __b);
2169 }
2170
2171 static inline __ATTRS_o_ai vector bool long long
2172 vec_cmpeq(vector unsigned long long __a, vector unsigned long long __b) {
2173   return (vector bool long long)(__a == __b);
2174 }
2175
2176 #if __ARCH__ >= 12
2177 static inline __ATTRS_o_ai vector bool int
2178 vec_cmpeq(vector float __a, vector float __b) {
2179   return (vector bool int)(__a == __b);
2180 }
2181 #endif
2182
2183 static inline __ATTRS_o_ai vector bool long long
2184 vec_cmpeq(vector double __a, vector double __b) {
2185   return (vector bool long long)(__a == __b);
2186 }
2187
2188 /*-- vec_cmpge --------------------------------------------------------------*/
2189
2190 static inline __ATTRS_o_ai vector bool char
2191 vec_cmpge(vector signed char __a, vector signed char __b) {
2192   return (vector bool char)(__a >= __b);
2193 }
2194
2195 static inline __ATTRS_o_ai vector bool char
2196 vec_cmpge(vector unsigned char __a, vector unsigned char __b) {
2197   return (vector bool char)(__a >= __b);
2198 }
2199
2200 static inline __ATTRS_o_ai vector bool short
2201 vec_cmpge(vector signed short __a, vector signed short __b) {
2202   return (vector bool short)(__a >= __b);
2203 }
2204
2205 static inline __ATTRS_o_ai vector bool short
2206 vec_cmpge(vector unsigned short __a, vector unsigned short __b) {
2207   return (vector bool short)(__a >= __b);
2208 }
2209
2210 static inline __ATTRS_o_ai vector bool int
2211 vec_cmpge(vector signed int __a, vector signed int __b) {
2212   return (vector bool int)(__a >= __b);
2213 }
2214
2215 static inline __ATTRS_o_ai vector bool int
2216 vec_cmpge(vector unsigned int __a, vector unsigned int __b) {
2217   return (vector bool int)(__a >= __b);
2218 }
2219
2220 static inline __ATTRS_o_ai vector bool long long
2221 vec_cmpge(vector signed long long __a, vector signed long long __b) {
2222   return (vector bool long long)(__a >= __b);
2223 }
2224
2225 static inline __ATTRS_o_ai vector bool long long
2226 vec_cmpge(vector unsigned long long __a, vector unsigned long long __b) {
2227   return (vector bool long long)(__a >= __b);
2228 }
2229
2230 #if __ARCH__ >= 12
2231 static inline __ATTRS_o_ai vector bool int
2232 vec_cmpge(vector float __a, vector float __b) {
2233   return (vector bool int)(__a >= __b);
2234 }
2235 #endif
2236
2237 static inline __ATTRS_o_ai vector bool long long
2238 vec_cmpge(vector double __a, vector double __b) {
2239   return (vector bool long long)(__a >= __b);
2240 }
2241
2242 /*-- vec_cmpgt --------------------------------------------------------------*/
2243
2244 static inline __ATTRS_o_ai vector bool char
2245 vec_cmpgt(vector signed char __a, vector signed char __b) {
2246   return (vector bool char)(__a > __b);
2247 }
2248
2249 static inline __ATTRS_o_ai vector bool char
2250 vec_cmpgt(vector unsigned char __a, vector unsigned char __b) {
2251   return (vector bool char)(__a > __b);
2252 }
2253
2254 static inline __ATTRS_o_ai vector bool short
2255 vec_cmpgt(vector signed short __a, vector signed short __b) {
2256   return (vector bool short)(__a > __b);
2257 }
2258
2259 static inline __ATTRS_o_ai vector bool short
2260 vec_cmpgt(vector unsigned short __a, vector unsigned short __b) {
2261   return (vector bool short)(__a > __b);
2262 }
2263
2264 static inline __ATTRS_o_ai vector bool int
2265 vec_cmpgt(vector signed int __a, vector signed int __b) {
2266   return (vector bool int)(__a > __b);
2267 }
2268
2269 static inline __ATTRS_o_ai vector bool int
2270 vec_cmpgt(vector unsigned int __a, vector unsigned int __b) {
2271   return (vector bool int)(__a > __b);
2272 }
2273
2274 static inline __ATTRS_o_ai vector bool long long
2275 vec_cmpgt(vector signed long long __a, vector signed long long __b) {
2276   return (vector bool long long)(__a > __b);
2277 }
2278
2279 static inline __ATTRS_o_ai vector bool long long
2280 vec_cmpgt(vector unsigned long long __a, vector unsigned long long __b) {
2281   return (vector bool long long)(__a > __b);
2282 }
2283
2284 #if __ARCH__ >= 12
2285 static inline __ATTRS_o_ai vector bool int
2286 vec_cmpgt(vector float __a, vector float __b) {
2287   return (vector bool int)(__a > __b);
2288 }
2289 #endif
2290
2291 static inline __ATTRS_o_ai vector bool long long
2292 vec_cmpgt(vector double __a, vector double __b) {
2293   return (vector bool long long)(__a > __b);
2294 }
2295
2296 /*-- vec_cmple --------------------------------------------------------------*/
2297
2298 static inline __ATTRS_o_ai vector bool char
2299 vec_cmple(vector signed char __a, vector signed char __b) {
2300   return (vector bool char)(__a <= __b);
2301 }
2302
2303 static inline __ATTRS_o_ai vector bool char
2304 vec_cmple(vector unsigned char __a, vector unsigned char __b) {
2305   return (vector bool char)(__a <= __b);
2306 }
2307
2308 static inline __ATTRS_o_ai vector bool short
2309 vec_cmple(vector signed short __a, vector signed short __b) {
2310   return (vector bool short)(__a <= __b);
2311 }
2312
2313 static inline __ATTRS_o_ai vector bool short
2314 vec_cmple(vector unsigned short __a, vector unsigned short __b) {
2315   return (vector bool short)(__a <= __b);
2316 }
2317
2318 static inline __ATTRS_o_ai vector bool int
2319 vec_cmple(vector signed int __a, vector signed int __b) {
2320   return (vector bool int)(__a <= __b);
2321 }
2322
2323 static inline __ATTRS_o_ai vector bool int
2324 vec_cmple(vector unsigned int __a, vector unsigned int __b) {
2325   return (vector bool int)(__a <= __b);
2326 }
2327
2328 static inline __ATTRS_o_ai vector bool long long
2329 vec_cmple(vector signed long long __a, vector signed long long __b) {
2330   return (vector bool long long)(__a <= __b);
2331 }
2332
2333 static inline __ATTRS_o_ai vector bool long long
2334 vec_cmple(vector unsigned long long __a, vector unsigned long long __b) {
2335   return (vector bool long long)(__a <= __b);
2336 }
2337
2338 #if __ARCH__ >= 12
2339 static inline __ATTRS_o_ai vector bool int
2340 vec_cmple(vector float __a, vector float __b) {
2341   return (vector bool int)(__a <= __b);
2342 }
2343 #endif
2344
2345 static inline __ATTRS_o_ai vector bool long long
2346 vec_cmple(vector double __a, vector double __b) {
2347   return (vector bool long long)(__a <= __b);
2348 }
2349
2350 /*-- vec_cmplt --------------------------------------------------------------*/
2351
2352 static inline __ATTRS_o_ai vector bool char
2353 vec_cmplt(vector signed char __a, vector signed char __b) {
2354   return (vector bool char)(__a < __b);
2355 }
2356
2357 static inline __ATTRS_o_ai vector bool char
2358 vec_cmplt(vector unsigned char __a, vector unsigned char __b) {
2359   return (vector bool char)(__a < __b);
2360 }
2361
2362 static inline __ATTRS_o_ai vector bool short
2363 vec_cmplt(vector signed short __a, vector signed short __b) {
2364   return (vector bool short)(__a < __b);
2365 }
2366
2367 static inline __ATTRS_o_ai vector bool short
2368 vec_cmplt(vector unsigned short __a, vector unsigned short __b) {
2369   return (vector bool short)(__a < __b);
2370 }
2371
2372 static inline __ATTRS_o_ai vector bool int
2373 vec_cmplt(vector signed int __a, vector signed int __b) {
2374   return (vector bool int)(__a < __b);
2375 }
2376
2377 static inline __ATTRS_o_ai vector bool int
2378 vec_cmplt(vector unsigned int __a, vector unsigned int __b) {
2379   return (vector bool int)(__a < __b);
2380 }
2381
2382 static inline __ATTRS_o_ai vector bool long long
2383 vec_cmplt(vector signed long long __a, vector signed long long __b) {
2384   return (vector bool long long)(__a < __b);
2385 }
2386
2387 static inline __ATTRS_o_ai vector bool long long
2388 vec_cmplt(vector unsigned long long __a, vector unsigned long long __b) {
2389   return (vector bool long long)(__a < __b);
2390 }
2391
2392 #if __ARCH__ >= 12
2393 static inline __ATTRS_o_ai vector bool int
2394 vec_cmplt(vector float __a, vector float __b) {
2395   return (vector bool int)(__a < __b);
2396 }
2397 #endif
2398
2399 static inline __ATTRS_o_ai vector bool long long
2400 vec_cmplt(vector double __a, vector double __b) {
2401   return (vector bool long long)(__a < __b);
2402 }
2403
2404 /*-- vec_all_eq -------------------------------------------------------------*/
2405
2406 static inline __ATTRS_o_ai int
2407 vec_all_eq(vector signed char __a, vector signed char __b) {
2408   int __cc;
2409   __builtin_s390_vceqbs(__a, __b, &__cc);
2410   return __cc == 0;
2411 }
2412
2413 // This prototype is deprecated.
2414 static inline __ATTRS_o_ai int
2415 vec_all_eq(vector signed char __a, vector bool char __b) {
2416   int __cc;
2417   __builtin_s390_vceqbs(__a, (vector signed char)__b, &__cc);
2418   return __cc == 0;
2419 }
2420
2421 // This prototype is deprecated.
2422 static inline __ATTRS_o_ai int
2423 vec_all_eq(vector bool char __a, vector signed char __b) {
2424   int __cc;
2425   __builtin_s390_vceqbs((vector signed char)__a, __b, &__cc);
2426   return __cc == 0;
2427 }
2428
2429 static inline __ATTRS_o_ai int
2430 vec_all_eq(vector unsigned char __a, vector unsigned char __b) {
2431   int __cc;
2432   __builtin_s390_vceqbs((vector signed char)__a,
2433                         (vector signed char)__b, &__cc);
2434   return __cc == 0;
2435 }
2436
2437 // This prototype is deprecated.
2438 static inline __ATTRS_o_ai int
2439 vec_all_eq(vector unsigned char __a, vector bool char __b) {
2440   int __cc;
2441   __builtin_s390_vceqbs((vector signed char)__a,
2442                         (vector signed char)__b, &__cc);
2443   return __cc == 0;
2444 }
2445
2446 // This prototype is deprecated.
2447 static inline __ATTRS_o_ai int
2448 vec_all_eq(vector bool char __a, vector unsigned char __b) {
2449   int __cc;
2450   __builtin_s390_vceqbs((vector signed char)__a,
2451                         (vector signed char)__b, &__cc);
2452   return __cc == 0;
2453 }
2454
2455 static inline __ATTRS_o_ai int
2456 vec_all_eq(vector bool char __a, vector bool char __b) {
2457   int __cc;
2458   __builtin_s390_vceqbs((vector signed char)__a,
2459                         (vector signed char)__b, &__cc);
2460   return __cc == 0;
2461 }
2462
2463 static inline __ATTRS_o_ai int
2464 vec_all_eq(vector signed short __a, vector signed short __b) {
2465   int __cc;
2466   __builtin_s390_vceqhs(__a, __b, &__cc);
2467   return __cc == 0;
2468 }
2469
2470 // This prototype is deprecated.
2471 static inline __ATTRS_o_ai int
2472 vec_all_eq(vector signed short __a, vector bool short __b) {
2473   int __cc;
2474   __builtin_s390_vceqhs(__a, (vector signed short)__b, &__cc);
2475   return __cc == 0;
2476 }
2477
2478 // This prototype is deprecated.
2479 static inline __ATTRS_o_ai int
2480 vec_all_eq(vector bool short __a, vector signed short __b) {
2481   int __cc;
2482   __builtin_s390_vceqhs((vector signed short)__a, __b, &__cc);
2483   return __cc == 0;
2484 }
2485
2486 static inline __ATTRS_o_ai int
2487 vec_all_eq(vector unsigned short __a, vector unsigned short __b) {
2488   int __cc;
2489   __builtin_s390_vceqhs((vector signed short)__a,
2490                         (vector signed short)__b, &__cc);
2491   return __cc == 0;
2492 }
2493
2494 // This prototype is deprecated.
2495 static inline __ATTRS_o_ai int
2496 vec_all_eq(vector unsigned short __a, vector bool short __b) {
2497   int __cc;
2498   __builtin_s390_vceqhs((vector signed short)__a,
2499                         (vector signed short)__b, &__cc);
2500   return __cc == 0;
2501 }
2502
2503 // This prototype is deprecated.
2504 static inline __ATTRS_o_ai int
2505 vec_all_eq(vector bool short __a, vector unsigned short __b) {
2506   int __cc;
2507   __builtin_s390_vceqhs((vector signed short)__a,
2508                         (vector signed short)__b, &__cc);
2509   return __cc == 0;
2510 }
2511
2512 static inline __ATTRS_o_ai int
2513 vec_all_eq(vector bool short __a, vector bool short __b) {
2514   int __cc;
2515   __builtin_s390_vceqhs((vector signed short)__a,
2516                         (vector signed short)__b, &__cc);
2517   return __cc == 0;
2518 }
2519
2520 static inline __ATTRS_o_ai int
2521 vec_all_eq(vector signed int __a, vector signed int __b) {
2522   int __cc;
2523   __builtin_s390_vceqfs(__a, __b, &__cc);
2524   return __cc == 0;
2525 }
2526
2527 // This prototype is deprecated.
2528 static inline __ATTRS_o_ai int
2529 vec_all_eq(vector signed int __a, vector bool int __b) {
2530   int __cc;
2531   __builtin_s390_vceqfs(__a, (vector signed int)__b, &__cc);
2532   return __cc == 0;
2533 }
2534
2535 // This prototype is deprecated.
2536 static inline __ATTRS_o_ai int
2537 vec_all_eq(vector bool int __a, vector signed int __b) {
2538   int __cc;
2539   __builtin_s390_vceqfs((vector signed int)__a, __b, &__cc);
2540   return __cc == 0;
2541 }
2542
2543 static inline __ATTRS_o_ai int
2544 vec_all_eq(vector unsigned int __a, vector unsigned int __b) {
2545   int __cc;
2546   __builtin_s390_vceqfs((vector signed int)__a,
2547                         (vector signed int)__b, &__cc);
2548   return __cc == 0;
2549 }
2550
2551 // This prototype is deprecated.
2552 static inline __ATTRS_o_ai int
2553 vec_all_eq(vector unsigned int __a, vector bool int __b) {
2554   int __cc;
2555   __builtin_s390_vceqfs((vector signed int)__a,
2556                         (vector signed int)__b, &__cc);
2557   return __cc == 0;
2558 }
2559
2560 // This prototype is deprecated.
2561 static inline __ATTRS_o_ai int
2562 vec_all_eq(vector bool int __a, vector unsigned int __b) {
2563   int __cc;
2564   __builtin_s390_vceqfs((vector signed int)__a,
2565                         (vector signed int)__b, &__cc);
2566   return __cc == 0;
2567 }
2568
2569 static inline __ATTRS_o_ai int
2570 vec_all_eq(vector bool int __a, vector bool int __b) {
2571   int __cc;
2572   __builtin_s390_vceqfs((vector signed int)__a,
2573                         (vector signed int)__b, &__cc);
2574   return __cc == 0;
2575 }
2576
2577 static inline __ATTRS_o_ai int
2578 vec_all_eq(vector signed long long __a, vector signed long long __b) {
2579   int __cc;
2580   __builtin_s390_vceqgs(__a, __b, &__cc);
2581   return __cc == 0;
2582 }
2583
2584 // This prototype is deprecated.
2585 static inline __ATTRS_o_ai int
2586 vec_all_eq(vector signed long long __a, vector bool long long __b) {
2587   int __cc;
2588   __builtin_s390_vceqgs(__a, (vector signed long long)__b, &__cc);
2589   return __cc == 0;
2590 }
2591
2592 // This prototype is deprecated.
2593 static inline __ATTRS_o_ai int
2594 vec_all_eq(vector bool long long __a, vector signed long long __b) {
2595   int __cc;
2596   __builtin_s390_vceqgs((vector signed long long)__a, __b, &__cc);
2597   return __cc == 0;
2598 }
2599
2600 static inline __ATTRS_o_ai int
2601 vec_all_eq(vector unsigned long long __a, vector unsigned long long __b) {
2602   int __cc;
2603   __builtin_s390_vceqgs((vector signed long long)__a,
2604                         (vector signed long long)__b, &__cc);
2605   return __cc == 0;
2606 }
2607
2608 // This prototype is deprecated.
2609 static inline __ATTRS_o_ai int
2610 vec_all_eq(vector unsigned long long __a, vector bool long long __b) {
2611   int __cc;
2612   __builtin_s390_vceqgs((vector signed long long)__a,
2613                         (vector signed long long)__b, &__cc);
2614   return __cc == 0;
2615 }
2616
2617 // This prototype is deprecated.
2618 static inline __ATTRS_o_ai int
2619 vec_all_eq(vector bool long long __a, vector unsigned long long __b) {
2620   int __cc;
2621   __builtin_s390_vceqgs((vector signed long long)__a,
2622                         (vector signed long long)__b, &__cc);
2623   return __cc == 0;
2624 }
2625
2626 static inline __ATTRS_o_ai int
2627 vec_all_eq(vector bool long long __a, vector bool long long __b) {
2628   int __cc;
2629   __builtin_s390_vceqgs((vector signed long long)__a,
2630                         (vector signed long long)__b, &__cc);
2631   return __cc == 0;
2632 }
2633
2634 #if __ARCH__ >= 12
2635 static inline __ATTRS_o_ai int
2636 vec_all_eq(vector float __a, vector float __b) {
2637   int __cc;
2638   __builtin_s390_vfcesbs(__a, __b, &__cc);
2639   return __cc == 0;
2640 }
2641 #endif
2642
2643 static inline __ATTRS_o_ai int
2644 vec_all_eq(vector double __a, vector double __b) {
2645   int __cc;
2646   __builtin_s390_vfcedbs(__a, __b, &__cc);
2647   return __cc == 0;
2648 }
2649
2650 /*-- vec_all_ne -------------------------------------------------------------*/
2651
2652 static inline __ATTRS_o_ai int
2653 vec_all_ne(vector signed char __a, vector signed char __b) {
2654   int __cc;
2655   __builtin_s390_vceqbs(__a, __b, &__cc);
2656   return __cc == 3;
2657 }
2658
2659 // This prototype is deprecated.
2660 static inline __ATTRS_o_ai int
2661 vec_all_ne(vector signed char __a, vector bool char __b) {
2662   int __cc;
2663   __builtin_s390_vceqbs(__a, (vector signed char)__b, &__cc);
2664   return __cc == 3;
2665 }
2666
2667 // This prototype is deprecated.
2668 static inline __ATTRS_o_ai int
2669 vec_all_ne(vector bool char __a, vector signed char __b) {
2670   int __cc;
2671   __builtin_s390_vceqbs((vector signed char)__a, __b, &__cc);
2672   return __cc == 3;
2673 }
2674
2675 static inline __ATTRS_o_ai int
2676 vec_all_ne(vector unsigned char __a, vector unsigned char __b) {
2677   int __cc;
2678   __builtin_s390_vceqbs((vector signed char)__a,
2679                         (vector signed char)__b, &__cc);
2680   return __cc == 3;
2681 }
2682
2683 // This prototype is deprecated.
2684 static inline __ATTRS_o_ai int
2685 vec_all_ne(vector unsigned char __a, vector bool char __b) {
2686   int __cc;
2687   __builtin_s390_vceqbs((vector signed char)__a,
2688                         (vector signed char)__b, &__cc);
2689   return __cc == 3;
2690 }
2691
2692 // This prototype is deprecated.
2693 static inline __ATTRS_o_ai int
2694 vec_all_ne(vector bool char __a, vector unsigned char __b) {
2695   int __cc;
2696   __builtin_s390_vceqbs((vector signed char)__a,
2697                         (vector signed char)__b, &__cc);
2698   return __cc == 3;
2699 }
2700
2701 static inline __ATTRS_o_ai int
2702 vec_all_ne(vector bool char __a, vector bool char __b) {
2703   int __cc;
2704   __builtin_s390_vceqbs((vector signed char)__a,
2705                         (vector signed char)__b, &__cc);
2706   return __cc == 3;
2707 }
2708
2709 static inline __ATTRS_o_ai int
2710 vec_all_ne(vector signed short __a, vector signed short __b) {
2711   int __cc;
2712   __builtin_s390_vceqhs(__a, __b, &__cc);
2713   return __cc == 3;
2714 }
2715
2716 // This prototype is deprecated.
2717 static inline __ATTRS_o_ai int
2718 vec_all_ne(vector signed short __a, vector bool short __b) {
2719   int __cc;
2720   __builtin_s390_vceqhs(__a, (vector signed short)__b, &__cc);
2721   return __cc == 3;
2722 }
2723
2724 // This prototype is deprecated.
2725 static inline __ATTRS_o_ai int
2726 vec_all_ne(vector bool short __a, vector signed short __b) {
2727   int __cc;
2728   __builtin_s390_vceqhs((vector signed short)__a, __b, &__cc);
2729   return __cc == 3;
2730 }
2731
2732 static inline __ATTRS_o_ai int
2733 vec_all_ne(vector unsigned short __a, vector unsigned short __b) {
2734   int __cc;
2735   __builtin_s390_vceqhs((vector signed short)__a,
2736                         (vector signed short)__b, &__cc);
2737   return __cc == 3;
2738 }
2739
2740 // This prototype is deprecated.
2741 static inline __ATTRS_o_ai int
2742 vec_all_ne(vector unsigned short __a, vector bool short __b) {
2743   int __cc;
2744   __builtin_s390_vceqhs((vector signed short)__a,
2745                         (vector signed short)__b, &__cc);
2746   return __cc == 3;
2747 }
2748
2749 // This prototype is deprecated.
2750 static inline __ATTRS_o_ai int
2751 vec_all_ne(vector bool short __a, vector unsigned short __b) {
2752   int __cc;
2753   __builtin_s390_vceqhs((vector signed short)__a,
2754                         (vector signed short)__b, &__cc);
2755   return __cc == 3;
2756 }
2757
2758 static inline __ATTRS_o_ai int
2759 vec_all_ne(vector bool short __a, vector bool short __b) {
2760   int __cc;
2761   __builtin_s390_vceqhs((vector signed short)__a,
2762                         (vector signed short)__b, &__cc);
2763   return __cc == 3;
2764 }
2765
2766 static inline __ATTRS_o_ai int
2767 vec_all_ne(vector signed int __a, vector signed int __b) {
2768   int __cc;
2769   __builtin_s390_vceqfs(__a, __b, &__cc);
2770   return __cc == 3;
2771 }
2772
2773 // This prototype is deprecated.
2774 static inline __ATTRS_o_ai int
2775 vec_all_ne(vector signed int __a, vector bool int __b) {
2776   int __cc;
2777   __builtin_s390_vceqfs(__a, (vector signed int)__b, &__cc);
2778   return __cc == 3;
2779 }
2780
2781 // This prototype is deprecated.
2782 static inline __ATTRS_o_ai int
2783 vec_all_ne(vector bool int __a, vector signed int __b) {
2784   int __cc;
2785   __builtin_s390_vceqfs((vector signed int)__a, __b, &__cc);
2786   return __cc == 3;
2787 }
2788
2789 static inline __ATTRS_o_ai int
2790 vec_all_ne(vector unsigned int __a, vector unsigned int __b) {
2791   int __cc;
2792   __builtin_s390_vceqfs((vector signed int)__a,
2793                         (vector signed int)__b, &__cc);
2794   return __cc == 3;
2795 }
2796
2797 // This prototype is deprecated.
2798 static inline __ATTRS_o_ai int
2799 vec_all_ne(vector unsigned int __a, vector bool int __b) {
2800   int __cc;
2801   __builtin_s390_vceqfs((vector signed int)__a,
2802                         (vector signed int)__b, &__cc);
2803   return __cc == 3;
2804 }
2805
2806 // This prototype is deprecated.
2807 static inline __ATTRS_o_ai int
2808 vec_all_ne(vector bool int __a, vector unsigned int __b) {
2809   int __cc;
2810   __builtin_s390_vceqfs((vector signed int)__a,
2811                         (vector signed int)__b, &__cc);
2812   return __cc == 3;
2813 }
2814
2815 static inline __ATTRS_o_ai int
2816 vec_all_ne(vector bool int __a, vector bool int __b) {
2817   int __cc;
2818   __builtin_s390_vceqfs((vector signed int)__a,
2819                         (vector signed int)__b, &__cc);
2820   return __cc == 3;
2821 }
2822
2823 static inline __ATTRS_o_ai int
2824 vec_all_ne(vector signed long long __a, vector signed long long __b) {
2825   int __cc;
2826   __builtin_s390_vceqgs(__a, __b, &__cc);
2827   return __cc == 3;
2828 }
2829
2830 // This prototype is deprecated.
2831 static inline __ATTRS_o_ai int
2832 vec_all_ne(vector signed long long __a, vector bool long long __b) {
2833   int __cc;
2834   __builtin_s390_vceqgs(__a, (vector signed long long)__b, &__cc);
2835   return __cc == 3;
2836 }
2837
2838 // This prototype is deprecated.
2839 static inline __ATTRS_o_ai int
2840 vec_all_ne(vector bool long long __a, vector signed long long __b) {
2841   int __cc;
2842   __builtin_s390_vceqgs((vector signed long long)__a, __b, &__cc);
2843   return __cc == 3;
2844 }
2845
2846 static inline __ATTRS_o_ai int
2847 vec_all_ne(vector unsigned long long __a, vector unsigned long long __b) {
2848   int __cc;
2849   __builtin_s390_vceqgs((vector signed long long)__a,
2850                         (vector signed long long)__b, &__cc);
2851   return __cc == 3;
2852 }
2853
2854 // This prototype is deprecated.
2855 static inline __ATTRS_o_ai int
2856 vec_all_ne(vector unsigned long long __a, vector bool long long __b) {
2857   int __cc;
2858   __builtin_s390_vceqgs((vector signed long long)__a,
2859                         (vector signed long long)__b, &__cc);
2860   return __cc == 3;
2861 }
2862
2863 // This prototype is deprecated.
2864 static inline __ATTRS_o_ai int
2865 vec_all_ne(vector bool long long __a, vector unsigned long long __b) {
2866   int __cc;
2867   __builtin_s390_vceqgs((vector signed long long)__a,
2868                         (vector signed long long)__b, &__cc);
2869   return __cc == 3;
2870 }
2871
2872 static inline __ATTRS_o_ai int
2873 vec_all_ne(vector bool long long __a, vector bool long long __b) {
2874   int __cc;
2875   __builtin_s390_vceqgs((vector signed long long)__a,
2876                         (vector signed long long)__b, &__cc);
2877   return __cc == 3;
2878 }
2879
2880 #if __ARCH__ >= 12
2881 static inline __ATTRS_o_ai int
2882 vec_all_ne(vector float __a, vector float __b) {
2883   int __cc;
2884   __builtin_s390_vfcesbs(__a, __b, &__cc);
2885   return __cc == 3;
2886 }
2887 #endif
2888
2889 static inline __ATTRS_o_ai int
2890 vec_all_ne(vector double __a, vector double __b) {
2891   int __cc;
2892   __builtin_s390_vfcedbs(__a, __b, &__cc);
2893   return __cc == 3;
2894 }
2895
2896 /*-- vec_all_ge -------------------------------------------------------------*/
2897
2898 static inline __ATTRS_o_ai int
2899 vec_all_ge(vector signed char __a, vector signed char __b) {
2900   int __cc;
2901   __builtin_s390_vchbs(__b, __a, &__cc);
2902   return __cc == 3;
2903 }
2904
2905 // This prototype is deprecated.
2906 static inline __ATTRS_o_ai int
2907 vec_all_ge(vector signed char __a, vector bool char __b) {
2908   int __cc;
2909   __builtin_s390_vchbs((vector signed char)__b, __a, &__cc);
2910   return __cc == 3;
2911 }
2912
2913 // This prototype is deprecated.
2914 static inline __ATTRS_o_ai int
2915 vec_all_ge(vector bool char __a, vector signed char __b) {
2916   int __cc;
2917   __builtin_s390_vchbs(__b, (vector signed char)__a, &__cc);
2918   return __cc == 3;
2919 }
2920
2921 static inline __ATTRS_o_ai int
2922 vec_all_ge(vector unsigned char __a, vector unsigned char __b) {
2923   int __cc;
2924   __builtin_s390_vchlbs(__b, __a, &__cc);
2925   return __cc == 3;
2926 }
2927
2928 // This prototype is deprecated.
2929 static inline __ATTRS_o_ai int
2930 vec_all_ge(vector unsigned char __a, vector bool char __b) {
2931   int __cc;
2932   __builtin_s390_vchlbs((vector unsigned char)__b, __a, &__cc);
2933   return __cc == 3;
2934 }
2935
2936 // This prototype is deprecated.
2937 static inline __ATTRS_o_ai int
2938 vec_all_ge(vector bool char __a, vector unsigned char __b) {
2939   int __cc;
2940   __builtin_s390_vchlbs(__b, (vector unsigned char)__a, &__cc);
2941   return __cc == 3;
2942 }
2943
2944 // This prototype is deprecated.
2945 static inline __ATTRS_o_ai int
2946 vec_all_ge(vector bool char __a, vector bool char __b) {
2947   int __cc;
2948   __builtin_s390_vchlbs((vector unsigned char)__b,
2949                         (vector unsigned char)__a, &__cc);
2950   return __cc == 3;
2951 }
2952
2953 static inline __ATTRS_o_ai int
2954 vec_all_ge(vector signed short __a, vector signed short __b) {
2955   int __cc;
2956   __builtin_s390_vchhs(__b, __a, &__cc);
2957   return __cc == 3;
2958 }
2959
2960 // This prototype is deprecated.
2961 static inline __ATTRS_o_ai int
2962 vec_all_ge(vector signed short __a, vector bool short __b) {
2963   int __cc;
2964   __builtin_s390_vchhs((vector signed short)__b, __a, &__cc);
2965   return __cc == 3;
2966 }
2967
2968 // This prototype is deprecated.
2969 static inline __ATTRS_o_ai int
2970 vec_all_ge(vector bool short __a, vector signed short __b) {
2971   int __cc;
2972   __builtin_s390_vchhs(__b, (vector signed short)__a, &__cc);
2973   return __cc == 3;
2974 }
2975
2976 static inline __ATTRS_o_ai int
2977 vec_all_ge(vector unsigned short __a, vector unsigned short __b) {
2978   int __cc;
2979   __builtin_s390_vchlhs(__b, __a, &__cc);
2980   return __cc == 3;
2981 }
2982
2983 // This prototype is deprecated.
2984 static inline __ATTRS_o_ai int
2985 vec_all_ge(vector unsigned short __a, vector bool short __b) {
2986   int __cc;
2987   __builtin_s390_vchlhs((vector unsigned short)__b, __a, &__cc);
2988   return __cc == 3;
2989 }
2990
2991 // This prototype is deprecated.
2992 static inline __ATTRS_o_ai int
2993 vec_all_ge(vector bool short __a, vector unsigned short __b) {
2994   int __cc;
2995   __builtin_s390_vchlhs(__b, (vector unsigned short)__a, &__cc);
2996   return __cc == 3;
2997 }
2998
2999 // This prototype is deprecated.
3000 static inline __ATTRS_o_ai int
3001 vec_all_ge(vector bool short __a, vector bool short __b) {
3002   int __cc;
3003   __builtin_s390_vchlhs((vector unsigned short)__b,
3004                         (vector unsigned short)__a, &__cc);
3005   return __cc == 3;
3006 }
3007
3008 static inline __ATTRS_o_ai int
3009 vec_all_ge(vector signed int __a, vector signed int __b) {
3010   int __cc;
3011   __builtin_s390_vchfs(__b, __a, &__cc);
3012   return __cc == 3;
3013 }
3014
3015 // This prototype is deprecated.
3016 static inline __ATTRS_o_ai int
3017 vec_all_ge(vector signed int __a, vector bool int __b) {
3018   int __cc;
3019   __builtin_s390_vchfs((vector signed int)__b, __a, &__cc);
3020   return __cc == 3;
3021 }
3022
3023 // This prototype is deprecated.
3024 static inline __ATTRS_o_ai int
3025 vec_all_ge(vector bool int __a, vector signed int __b) {
3026   int __cc;
3027   __builtin_s390_vchfs(__b, (vector signed int)__a, &__cc);
3028   return __cc == 3;
3029 }
3030
3031 static inline __ATTRS_o_ai int
3032 vec_all_ge(vector unsigned int __a, vector unsigned int __b) {
3033   int __cc;
3034   __builtin_s390_vchlfs(__b, __a, &__cc);
3035   return __cc == 3;
3036 }
3037
3038 // This prototype is deprecated.
3039 static inline __ATTRS_o_ai int
3040 vec_all_ge(vector unsigned int __a, vector bool int __b) {
3041   int __cc;
3042   __builtin_s390_vchlfs((vector unsigned int)__b, __a, &__cc);
3043   return __cc == 3;
3044 }
3045
3046 // This prototype is deprecated.
3047 static inline __ATTRS_o_ai int
3048 vec_all_ge(vector bool int __a, vector unsigned int __b) {
3049   int __cc;
3050   __builtin_s390_vchlfs(__b, (vector unsigned int)__a, &__cc);
3051   return __cc == 3;
3052 }
3053
3054 // This prototype is deprecated.
3055 static inline __ATTRS_o_ai int
3056 vec_all_ge(vector bool int __a, vector bool int __b) {
3057   int __cc;
3058   __builtin_s390_vchlfs((vector unsigned int)__b,
3059                         (vector unsigned int)__a, &__cc);
3060   return __cc == 3;
3061 }
3062
3063 static inline __ATTRS_o_ai int
3064 vec_all_ge(vector signed long long __a, vector signed long long __b) {
3065   int __cc;
3066   __builtin_s390_vchgs(__b, __a, &__cc);
3067   return __cc == 3;
3068 }
3069
3070 // This prototype is deprecated.
3071 static inline __ATTRS_o_ai int
3072 vec_all_ge(vector signed long long __a, vector bool long long __b) {
3073   int __cc;
3074   __builtin_s390_vchgs((vector signed long long)__b, __a, &__cc);
3075   return __cc == 3;
3076 }
3077
3078 // This prototype is deprecated.
3079 static inline __ATTRS_o_ai int
3080 vec_all_ge(vector bool long long __a, vector signed long long __b) {
3081   int __cc;
3082   __builtin_s390_vchgs(__b, (vector signed long long)__a, &__cc);
3083   return __cc == 3;
3084 }
3085
3086 static inline __ATTRS_o_ai int
3087 vec_all_ge(vector unsigned long long __a, vector unsigned long long __b) {
3088   int __cc;
3089   __builtin_s390_vchlgs(__b, __a, &__cc);
3090   return __cc == 3;
3091 }
3092
3093 // This prototype is deprecated.
3094 static inline __ATTRS_o_ai int
3095 vec_all_ge(vector unsigned long long __a, vector bool long long __b) {
3096   int __cc;
3097   __builtin_s390_vchlgs((vector unsigned long long)__b, __a, &__cc);
3098   return __cc == 3;
3099 }
3100
3101 // This prototype is deprecated.
3102 static inline __ATTRS_o_ai int
3103 vec_all_ge(vector bool long long __a, vector unsigned long long __b) {
3104   int __cc;
3105   __builtin_s390_vchlgs(__b, (vector unsigned long long)__a, &__cc);
3106   return __cc == 3;
3107 }
3108
3109 // This prototype is deprecated.
3110 static inline __ATTRS_o_ai int
3111 vec_all_ge(vector bool long long __a, vector bool long long __b) {
3112   int __cc;
3113   __builtin_s390_vchlgs((vector unsigned long long)__b,
3114                         (vector unsigned long long)__a, &__cc);
3115   return __cc == 3;
3116 }
3117
3118 #if __ARCH__ >= 12
3119 static inline __ATTRS_o_ai int
3120 vec_all_ge(vector float __a, vector float __b) {
3121   int __cc;
3122   __builtin_s390_vfchesbs(__a, __b, &__cc);
3123   return __cc == 0;
3124 }
3125 #endif
3126
3127 static inline __ATTRS_o_ai int
3128 vec_all_ge(vector double __a, vector double __b) {
3129   int __cc;
3130   __builtin_s390_vfchedbs(__a, __b, &__cc);
3131   return __cc == 0;
3132 }
3133
3134 /*-- vec_all_gt -------------------------------------------------------------*/
3135
3136 static inline __ATTRS_o_ai int
3137 vec_all_gt(vector signed char __a, vector signed char __b) {
3138   int __cc;
3139   __builtin_s390_vchbs(__a, __b, &__cc);
3140   return __cc == 0;
3141 }
3142
3143 // This prototype is deprecated.
3144 static inline __ATTRS_o_ai int
3145 vec_all_gt(vector signed char __a, vector bool char __b) {
3146   int __cc;
3147   __builtin_s390_vchbs(__a, (vector signed char)__b, &__cc);
3148   return __cc == 0;
3149 }
3150
3151 // This prototype is deprecated.
3152 static inline __ATTRS_o_ai int
3153 vec_all_gt(vector bool char __a, vector signed char __b) {
3154   int __cc;
3155   __builtin_s390_vchbs((vector signed char)__a, __b, &__cc);
3156   return __cc == 0;
3157 }
3158
3159 static inline __ATTRS_o_ai int
3160 vec_all_gt(vector unsigned char __a, vector unsigned char __b) {
3161   int __cc;
3162   __builtin_s390_vchlbs(__a, __b, &__cc);
3163   return __cc == 0;
3164 }
3165
3166 // This prototype is deprecated.
3167 static inline __ATTRS_o_ai int
3168 vec_all_gt(vector unsigned char __a, vector bool char __b) {
3169   int __cc;
3170   __builtin_s390_vchlbs(__a, (vector unsigned char)__b, &__cc);
3171   return __cc == 0;
3172 }
3173
3174 // This prototype is deprecated.
3175 static inline __ATTRS_o_ai int
3176 vec_all_gt(vector bool char __a, vector unsigned char __b) {
3177   int __cc;
3178   __builtin_s390_vchlbs((vector unsigned char)__a, __b, &__cc);
3179   return __cc == 0;
3180 }
3181
3182 // This prototype is deprecated.
3183 static inline __ATTRS_o_ai int
3184 vec_all_gt(vector bool char __a, vector bool char __b) {
3185   int __cc;
3186   __builtin_s390_vchlbs((vector unsigned char)__a,
3187                         (vector unsigned char)__b, &__cc);
3188   return __cc == 0;
3189 }
3190
3191 static inline __ATTRS_o_ai int
3192 vec_all_gt(vector signed short __a, vector signed short __b) {
3193   int __cc;
3194   __builtin_s390_vchhs(__a, __b, &__cc);
3195   return __cc == 0;
3196 }
3197
3198 // This prototype is deprecated.
3199 static inline __ATTRS_o_ai int
3200 vec_all_gt(vector signed short __a, vector bool short __b) {
3201   int __cc;
3202   __builtin_s390_vchhs(__a, (vector signed short)__b, &__cc);
3203   return __cc == 0;
3204 }
3205
3206 // This prototype is deprecated.
3207 static inline __ATTRS_o_ai int
3208 vec_all_gt(vector bool short __a, vector signed short __b) {
3209   int __cc;
3210   __builtin_s390_vchhs((vector signed short)__a, __b, &__cc);
3211   return __cc == 0;
3212 }
3213
3214 static inline __ATTRS_o_ai int
3215 vec_all_gt(vector unsigned short __a, vector unsigned short __b) {
3216   int __cc;
3217   __builtin_s390_vchlhs(__a, __b, &__cc);
3218   return __cc == 0;
3219 }
3220
3221 // This prototype is deprecated.
3222 static inline __ATTRS_o_ai int
3223 vec_all_gt(vector unsigned short __a, vector bool short __b) {
3224   int __cc;
3225   __builtin_s390_vchlhs(__a, (vector unsigned short)__b, &__cc);
3226   return __cc == 0;
3227 }
3228
3229 // This prototype is deprecated.
3230 static inline __ATTRS_o_ai int
3231 vec_all_gt(vector bool short __a, vector unsigned short __b) {
3232   int __cc;
3233   __builtin_s390_vchlhs((vector unsigned short)__a, __b, &__cc);
3234   return __cc == 0;
3235 }
3236
3237 // This prototype is deprecated.
3238 static inline __ATTRS_o_ai int
3239 vec_all_gt(vector bool short __a, vector bool short __b) {
3240   int __cc;
3241   __builtin_s390_vchlhs((vector unsigned short)__a,
3242                         (vector unsigned short)__b, &__cc);
3243   return __cc == 0;
3244 }
3245
3246 static inline __ATTRS_o_ai int
3247 vec_all_gt(vector signed int __a, vector signed int __b) {
3248   int __cc;
3249   __builtin_s390_vchfs(__a, __b, &__cc);
3250   return __cc == 0;
3251 }
3252
3253 // This prototype is deprecated.
3254 static inline __ATTRS_o_ai int
3255 vec_all_gt(vector signed int __a, vector bool int __b) {
3256   int __cc;
3257   __builtin_s390_vchfs(__a, (vector signed int)__b, &__cc);
3258   return __cc == 0;
3259 }
3260
3261 // This prototype is deprecated.
3262 static inline __ATTRS_o_ai int
3263 vec_all_gt(vector bool int __a, vector signed int __b) {
3264   int __cc;
3265   __builtin_s390_vchfs((vector signed int)__a, __b, &__cc);
3266   return __cc == 0;
3267 }
3268
3269 static inline __ATTRS_o_ai int
3270 vec_all_gt(vector unsigned int __a, vector unsigned int __b) {
3271   int __cc;
3272   __builtin_s390_vchlfs(__a, __b, &__cc);
3273   return __cc == 0;
3274 }
3275
3276 // This prototype is deprecated.
3277 static inline __ATTRS_o_ai int
3278 vec_all_gt(vector unsigned int __a, vector bool int __b) {
3279   int __cc;
3280   __builtin_s390_vchlfs(__a, (vector unsigned int)__b, &__cc);
3281   return __cc == 0;
3282 }
3283
3284 // This prototype is deprecated.
3285 static inline __ATTRS_o_ai int
3286 vec_all_gt(vector bool int __a, vector unsigned int __b) {
3287   int __cc;
3288   __builtin_s390_vchlfs((vector unsigned int)__a, __b, &__cc);
3289   return __cc == 0;
3290 }
3291
3292 // This prototype is deprecated.
3293 static inline __ATTRS_o_ai int
3294 vec_all_gt(vector bool int __a, vector bool int __b) {
3295   int __cc;
3296   __builtin_s390_vchlfs((vector unsigned int)__a,
3297                         (vector unsigned int)__b, &__cc);
3298   return __cc == 0;
3299 }
3300
3301 static inline __ATTRS_o_ai int
3302 vec_all_gt(vector signed long long __a, vector signed long long __b) {
3303   int __cc;
3304   __builtin_s390_vchgs(__a, __b, &__cc);
3305   return __cc == 0;
3306 }
3307
3308 // This prototype is deprecated.
3309 static inline __ATTRS_o_ai int
3310 vec_all_gt(vector signed long long __a, vector bool long long __b) {
3311   int __cc;
3312   __builtin_s390_vchgs(__a, (vector signed long long)__b, &__cc);
3313   return __cc == 0;
3314 }
3315
3316 // This prototype is deprecated.
3317 static inline __ATTRS_o_ai int
3318 vec_all_gt(vector bool long long __a, vector signed long long __b) {
3319   int __cc;
3320   __builtin_s390_vchgs((vector signed long long)__a, __b, &__cc);
3321   return __cc == 0;
3322 }
3323
3324 static inline __ATTRS_o_ai int
3325 vec_all_gt(vector unsigned long long __a, vector unsigned long long __b) {
3326   int __cc;
3327   __builtin_s390_vchlgs(__a, __b, &__cc);
3328   return __cc == 0;
3329 }
3330
3331 // This prototype is deprecated.
3332 static inline __ATTRS_o_ai int
3333 vec_all_gt(vector unsigned long long __a, vector bool long long __b) {
3334   int __cc;
3335   __builtin_s390_vchlgs(__a, (vector unsigned long long)__b, &__cc);
3336   return __cc == 0;
3337 }
3338
3339 // This prototype is deprecated.
3340 static inline __ATTRS_o_ai int
3341 vec_all_gt(vector bool long long __a, vector unsigned long long __b) {
3342   int __cc;
3343   __builtin_s390_vchlgs((vector unsigned long long)__a, __b, &__cc);
3344   return __cc == 0;
3345 }
3346
3347 // This prototype is deprecated.
3348 static inline __ATTRS_o_ai int
3349 vec_all_gt(vector bool long long __a, vector bool long long __b) {
3350   int __cc;
3351   __builtin_s390_vchlgs((vector unsigned long long)__a,
3352                         (vector unsigned long long)__b, &__cc);
3353   return __cc == 0;
3354 }
3355
3356 #if __ARCH__ >= 12
3357 static inline __ATTRS_o_ai int
3358 vec_all_gt(vector float __a, vector float __b) {
3359   int __cc;
3360   __builtin_s390_vfchsbs(__a, __b, &__cc);
3361   return __cc == 0;
3362 }
3363 #endif
3364
3365 static inline __ATTRS_o_ai int
3366 vec_all_gt(vector double __a, vector double __b) {
3367   int __cc;
3368   __builtin_s390_vfchdbs(__a, __b, &__cc);
3369   return __cc == 0;
3370 }
3371
3372 /*-- vec_all_le -------------------------------------------------------------*/
3373
3374 static inline __ATTRS_o_ai int
3375 vec_all_le(vector signed char __a, vector signed char __b) {
3376   int __cc;
3377   __builtin_s390_vchbs(__a, __b, &__cc);
3378   return __cc == 3;
3379 }
3380
3381 // This prototype is deprecated.
3382 static inline __ATTRS_o_ai int
3383 vec_all_le(vector signed char __a, vector bool char __b) {
3384   int __cc;
3385   __builtin_s390_vchbs(__a, (vector signed char)__b, &__cc);
3386   return __cc == 3;
3387 }
3388
3389 // This prototype is deprecated.
3390 static inline __ATTRS_o_ai int
3391 vec_all_le(vector bool char __a, vector signed char __b) {
3392   int __cc;
3393   __builtin_s390_vchbs((vector signed char)__a, __b, &__cc);
3394   return __cc == 3;
3395 }
3396
3397 static inline __ATTRS_o_ai int
3398 vec_all_le(vector unsigned char __a, vector unsigned char __b) {
3399   int __cc;
3400   __builtin_s390_vchlbs(__a, __b, &__cc);
3401   return __cc == 3;
3402 }
3403
3404 // This prototype is deprecated.
3405 static inline __ATTRS_o_ai int
3406 vec_all_le(vector unsigned char __a, vector bool char __b) {
3407   int __cc;
3408   __builtin_s390_vchlbs(__a, (vector unsigned char)__b, &__cc);
3409   return __cc == 3;
3410 }
3411
3412 // This prototype is deprecated.
3413 static inline __ATTRS_o_ai int
3414 vec_all_le(vector bool char __a, vector unsigned char __b) {
3415   int __cc;
3416   __builtin_s390_vchlbs((vector unsigned char)__a, __b, &__cc);
3417   return __cc == 3;
3418 }
3419
3420 // This prototype is deprecated.
3421 static inline __ATTRS_o_ai int
3422 vec_all_le(vector bool char __a, vector bool char __b) {
3423   int __cc;
3424   __builtin_s390_vchlbs((vector unsigned char)__a,
3425                         (vector unsigned char)__b, &__cc);
3426   return __cc == 3;
3427 }
3428
3429 static inline __ATTRS_o_ai int
3430 vec_all_le(vector signed short __a, vector signed short __b) {
3431   int __cc;
3432   __builtin_s390_vchhs(__a, __b, &__cc);
3433   return __cc == 3;
3434 }
3435
3436 // This prototype is deprecated.
3437 static inline __ATTRS_o_ai int
3438 vec_all_le(vector signed short __a, vector bool short __b) {
3439   int __cc;
3440   __builtin_s390_vchhs(__a, (vector signed short)__b, &__cc);
3441   return __cc == 3;
3442 }
3443
3444 // This prototype is deprecated.
3445 static inline __ATTRS_o_ai int
3446 vec_all_le(vector bool short __a, vector signed short __b) {
3447   int __cc;
3448   __builtin_s390_vchhs((vector signed short)__a, __b, &__cc);
3449   return __cc == 3;
3450 }
3451
3452 static inline __ATTRS_o_ai int
3453 vec_all_le(vector unsigned short __a, vector unsigned short __b) {
3454   int __cc;
3455   __builtin_s390_vchlhs(__a, __b, &__cc);
3456   return __cc == 3;
3457 }
3458
3459 // This prototype is deprecated.
3460 static inline __ATTRS_o_ai int
3461 vec_all_le(vector unsigned short __a, vector bool short __b) {
3462   int __cc;
3463   __builtin_s390_vchlhs(__a, (vector unsigned short)__b, &__cc);
3464   return __cc == 3;
3465 }
3466
3467 // This prototype is deprecated.
3468 static inline __ATTRS_o_ai int
3469 vec_all_le(vector bool short __a, vector unsigned short __b) {
3470   int __cc;
3471   __builtin_s390_vchlhs((vector unsigned short)__a, __b, &__cc);
3472   return __cc == 3;
3473 }
3474
3475 // This prototype is deprecated.
3476 static inline __ATTRS_o_ai int
3477 vec_all_le(vector bool short __a, vector bool short __b) {
3478   int __cc;
3479   __builtin_s390_vchlhs((vector unsigned short)__a,
3480                         (vector unsigned short)__b, &__cc);
3481   return __cc == 3;
3482 }
3483
3484 static inline __ATTRS_o_ai int
3485 vec_all_le(vector signed int __a, vector signed int __b) {
3486   int __cc;
3487   __builtin_s390_vchfs(__a, __b, &__cc);
3488   return __cc == 3;
3489 }
3490
3491 // This prototype is deprecated.
3492 static inline __ATTRS_o_ai int
3493 vec_all_le(vector signed int __a, vector bool int __b) {
3494   int __cc;
3495   __builtin_s390_vchfs(__a, (vector signed int)__b, &__cc);
3496   return __cc == 3;
3497 }
3498
3499 // This prototype is deprecated.
3500 static inline __ATTRS_o_ai int
3501 vec_all_le(vector bool int __a, vector signed int __b) {
3502   int __cc;
3503   __builtin_s390_vchfs((vector signed int)__a, __b, &__cc);
3504   return __cc == 3;
3505 }
3506
3507 static inline __ATTRS_o_ai int
3508 vec_all_le(vector unsigned int __a, vector unsigned int __b) {
3509   int __cc;
3510   __builtin_s390_vchlfs(__a, __b, &__cc);
3511   return __cc == 3;
3512 }
3513
3514 // This prototype is deprecated.
3515 static inline __ATTRS_o_ai int
3516 vec_all_le(vector unsigned int __a, vector bool int __b) {
3517   int __cc;
3518   __builtin_s390_vchlfs(__a, (vector unsigned int)__b, &__cc);
3519   return __cc == 3;
3520 }
3521
3522 // This prototype is deprecated.
3523 static inline __ATTRS_o_ai int
3524 vec_all_le(vector bool int __a, vector unsigned int __b) {
3525   int __cc;
3526   __builtin_s390_vchlfs((vector unsigned int)__a, __b, &__cc);
3527   return __cc == 3;
3528 }
3529
3530 // This prototype is deprecated.
3531 static inline __ATTRS_o_ai int
3532 vec_all_le(vector bool int __a, vector bool int __b) {
3533   int __cc;
3534   __builtin_s390_vchlfs((vector unsigned int)__a,
3535                         (vector unsigned int)__b, &__cc);
3536   return __cc == 3;
3537 }
3538
3539 static inline __ATTRS_o_ai int
3540 vec_all_le(vector signed long long __a, vector signed long long __b) {
3541   int __cc;
3542   __builtin_s390_vchgs(__a, __b, &__cc);
3543   return __cc == 3;
3544 }
3545
3546 // This prototype is deprecated.
3547 static inline __ATTRS_o_ai int
3548 vec_all_le(vector signed long long __a, vector bool long long __b) {
3549   int __cc;
3550   __builtin_s390_vchgs(__a, (vector signed long long)__b, &__cc);
3551   return __cc == 3;
3552 }
3553
3554 // This prototype is deprecated.
3555 static inline __ATTRS_o_ai int
3556 vec_all_le(vector bool long long __a, vector signed long long __b) {
3557   int __cc;
3558   __builtin_s390_vchgs((vector signed long long)__a, __b, &__cc);
3559   return __cc == 3;
3560 }
3561
3562 static inline __ATTRS_o_ai int
3563 vec_all_le(vector unsigned long long __a, vector unsigned long long __b) {
3564   int __cc;
3565   __builtin_s390_vchlgs(__a, __b, &__cc);
3566   return __cc == 3;
3567 }
3568
3569 // This prototype is deprecated.
3570 static inline __ATTRS_o_ai int
3571 vec_all_le(vector unsigned long long __a, vector bool long long __b) {
3572   int __cc;
3573   __builtin_s390_vchlgs(__a, (vector unsigned long long)__b, &__cc);
3574   return __cc == 3;
3575 }
3576
3577 // This prototype is deprecated.
3578 static inline __ATTRS_o_ai int
3579 vec_all_le(vector bool long long __a, vector unsigned long long __b) {
3580   int __cc;
3581   __builtin_s390_vchlgs((vector unsigned long long)__a, __b, &__cc);
3582   return __cc == 3;
3583 }
3584
3585 // This prototype is deprecated.
3586 static inline __ATTRS_o_ai int
3587 vec_all_le(vector bool long long __a, vector bool long long __b) {
3588   int __cc;
3589   __builtin_s390_vchlgs((vector unsigned long long)__a,
3590                         (vector unsigned long long)__b, &__cc);
3591   return __cc == 3;
3592 }
3593
3594 #if __ARCH__ >= 12
3595 static inline __ATTRS_o_ai int
3596 vec_all_le(vector float __a, vector float __b) {
3597   int __cc;
3598   __builtin_s390_vfchesbs(__b, __a, &__cc);
3599   return __cc == 0;
3600 }
3601 #endif
3602
3603 static inline __ATTRS_o_ai int
3604 vec_all_le(vector double __a, vector double __b) {
3605   int __cc;
3606   __builtin_s390_vfchedbs(__b, __a, &__cc);
3607   return __cc == 0;
3608 }
3609
3610 /*-- vec_all_lt -------------------------------------------------------------*/
3611
3612 static inline __ATTRS_o_ai int
3613 vec_all_lt(vector signed char __a, vector signed char __b) {
3614   int __cc;
3615   __builtin_s390_vchbs(__b, __a, &__cc);
3616   return __cc == 0;
3617 }
3618
3619 // This prototype is deprecated.
3620 static inline __ATTRS_o_ai int
3621 vec_all_lt(vector signed char __a, vector bool char __b) {
3622   int __cc;
3623   __builtin_s390_vchbs((vector signed char)__b, __a, &__cc);
3624   return __cc == 0;
3625 }
3626
3627 // This prototype is deprecated.
3628 static inline __ATTRS_o_ai int
3629 vec_all_lt(vector bool char __a, vector signed char __b) {
3630   int __cc;
3631   __builtin_s390_vchbs(__b, (vector signed char)__a, &__cc);
3632   return __cc == 0;
3633 }
3634
3635 static inline __ATTRS_o_ai int
3636 vec_all_lt(vector unsigned char __a, vector unsigned char __b) {
3637   int __cc;
3638   __builtin_s390_vchlbs(__b, __a, &__cc);
3639   return __cc == 0;
3640 }
3641
3642 // This prototype is deprecated.
3643 static inline __ATTRS_o_ai int
3644 vec_all_lt(vector unsigned char __a, vector bool char __b) {
3645   int __cc;
3646   __builtin_s390_vchlbs((vector unsigned char)__b, __a, &__cc);
3647   return __cc == 0;
3648 }
3649
3650 // This prototype is deprecated.
3651 static inline __ATTRS_o_ai int
3652 vec_all_lt(vector bool char __a, vector unsigned char __b) {
3653   int __cc;
3654   __builtin_s390_vchlbs(__b, (vector unsigned char)__a, &__cc);
3655   return __cc == 0;
3656 }
3657
3658 // This prototype is deprecated.
3659 static inline __ATTRS_o_ai int
3660 vec_all_lt(vector bool char __a, vector bool char __b) {
3661   int __cc;
3662   __builtin_s390_vchlbs((vector unsigned char)__b,
3663                         (vector unsigned char)__a, &__cc);
3664   return __cc == 0;
3665 }
3666
3667 static inline __ATTRS_o_ai int
3668 vec_all_lt(vector signed short __a, vector signed short __b) {
3669   int __cc;
3670   __builtin_s390_vchhs(__b, __a, &__cc);
3671   return __cc == 0;
3672 }
3673
3674 // This prototype is deprecated.
3675 static inline __ATTRS_o_ai int
3676 vec_all_lt(vector signed short __a, vector bool short __b) {
3677   int __cc;
3678   __builtin_s390_vchhs((vector signed short)__b, __a, &__cc);
3679   return __cc == 0;
3680 }
3681
3682 // This prototype is deprecated.
3683 static inline __ATTRS_o_ai int
3684 vec_all_lt(vector bool short __a, vector signed short __b) {
3685   int __cc;
3686   __builtin_s390_vchhs(__b, (vector signed short)__a, &__cc);
3687   return __cc == 0;
3688 }
3689
3690 static inline __ATTRS_o_ai int
3691 vec_all_lt(vector unsigned short __a, vector unsigned short __b) {
3692   int __cc;
3693   __builtin_s390_vchlhs(__b, __a, &__cc);
3694   return __cc == 0;
3695 }
3696
3697 // This prototype is deprecated.
3698 static inline __ATTRS_o_ai int
3699 vec_all_lt(vector unsigned short __a, vector bool short __b) {
3700   int __cc;
3701   __builtin_s390_vchlhs((vector unsigned short)__b, __a, &__cc);
3702   return __cc == 0;
3703 }
3704
3705 // This prototype is deprecated.
3706 static inline __ATTRS_o_ai int
3707 vec_all_lt(vector bool short __a, vector unsigned short __b) {
3708   int __cc;
3709   __builtin_s390_vchlhs(__b, (vector unsigned short)__a, &__cc);
3710   return __cc == 0;
3711 }
3712
3713 // This prototype is deprecated.
3714 static inline __ATTRS_o_ai int
3715 vec_all_lt(vector bool short __a, vector bool short __b) {
3716   int __cc;
3717   __builtin_s390_vchlhs((vector unsigned short)__b,
3718                         (vector unsigned short)__a, &__cc);
3719   return __cc == 0;
3720 }
3721
3722 static inline __ATTRS_o_ai int
3723 vec_all_lt(vector signed int __a, vector signed int __b) {
3724   int __cc;
3725   __builtin_s390_vchfs(__b, __a, &__cc);
3726   return __cc == 0;
3727 }
3728
3729 // This prototype is deprecated.
3730 static inline __ATTRS_o_ai int
3731 vec_all_lt(vector signed int __a, vector bool int __b) {
3732   int __cc;
3733   __builtin_s390_vchfs((vector signed int)__b, __a, &__cc);
3734   return __cc == 0;
3735 }
3736
3737 // This prototype is deprecated.
3738 static inline __ATTRS_o_ai int
3739 vec_all_lt(vector bool int __a, vector signed int __b) {
3740   int __cc;
3741   __builtin_s390_vchfs(__b, (vector signed int)__a, &__cc);
3742   return __cc == 0;
3743 }
3744
3745 static inline __ATTRS_o_ai int
3746 vec_all_lt(vector unsigned int __a, vector unsigned int __b) {
3747   int __cc;
3748   __builtin_s390_vchlfs(__b, __a, &__cc);
3749   return __cc == 0;
3750 }
3751
3752 // This prototype is deprecated.
3753 static inline __ATTRS_o_ai int
3754 vec_all_lt(vector unsigned int __a, vector bool int __b) {
3755   int __cc;
3756   __builtin_s390_vchlfs((vector unsigned int)__b, __a, &__cc);
3757   return __cc == 0;
3758 }
3759
3760 // This prototype is deprecated.
3761 static inline __ATTRS_o_ai int
3762 vec_all_lt(vector bool int __a, vector unsigned int __b) {
3763   int __cc;
3764   __builtin_s390_vchlfs(__b, (vector unsigned int)__a, &__cc);
3765   return __cc == 0;
3766 }
3767
3768 // This prototype is deprecated.
3769 static inline __ATTRS_o_ai int
3770 vec_all_lt(vector bool int __a, vector bool int __b) {
3771   int __cc;
3772   __builtin_s390_vchlfs((vector unsigned int)__b,
3773                         (vector unsigned int)__a, &__cc);
3774   return __cc == 0;
3775 }
3776
3777 static inline __ATTRS_o_ai int
3778 vec_all_lt(vector signed long long __a, vector signed long long __b) {
3779   int __cc;
3780   __builtin_s390_vchgs(__b, __a, &__cc);
3781   return __cc == 0;
3782 }
3783
3784 // This prototype is deprecated.
3785 static inline __ATTRS_o_ai int
3786 vec_all_lt(vector signed long long __a, vector bool long long __b) {
3787   int __cc;
3788   __builtin_s390_vchgs((vector signed long long)__b, __a, &__cc);
3789   return __cc == 0;
3790 }
3791
3792 // This prototype is deprecated.
3793 static inline __ATTRS_o_ai int
3794 vec_all_lt(vector bool long long __a, vector signed long long __b) {
3795   int __cc;
3796   __builtin_s390_vchgs(__b, (vector signed long long)__a, &__cc);
3797   return __cc == 0;
3798 }
3799
3800 static inline __ATTRS_o_ai int
3801 vec_all_lt(vector unsigned long long __a, vector unsigned long long __b) {
3802   int __cc;
3803   __builtin_s390_vchlgs(__b, __a, &__cc);
3804   return __cc == 0;
3805 }
3806
3807 // This prototype is deprecated.
3808 static inline __ATTRS_o_ai int
3809 vec_all_lt(vector unsigned long long __a, vector bool long long __b) {
3810   int __cc;
3811   __builtin_s390_vchlgs((vector unsigned long long)__b, __a, &__cc);
3812   return __cc == 0;
3813 }
3814
3815 // This prototype is deprecated.
3816 static inline __ATTRS_o_ai int
3817 vec_all_lt(vector bool long long __a, vector unsigned long long __b) {
3818   int __cc;
3819   __builtin_s390_vchlgs(__b, (vector unsigned long long)__a, &__cc);
3820   return __cc == 0;
3821 }
3822
3823 // This prototype is deprecated.
3824 static inline __ATTRS_o_ai int
3825 vec_all_lt(vector bool long long __a, vector bool long long __b) {
3826   int __cc;
3827   __builtin_s390_vchlgs((vector unsigned long long)__b,
3828                         (vector unsigned long long)__a, &__cc);
3829   return __cc == 0;
3830 }
3831
3832 #if __ARCH__ >= 12
3833 static inline __ATTRS_o_ai int
3834 vec_all_lt(vector float __a, vector float __b) {
3835   int __cc;
3836   __builtin_s390_vfchsbs(__b, __a, &__cc);
3837   return __cc == 0;
3838 }
3839 #endif
3840
3841 static inline __ATTRS_o_ai int
3842 vec_all_lt(vector double __a, vector double __b) {
3843   int __cc;
3844   __builtin_s390_vfchdbs(__b, __a, &__cc);
3845   return __cc == 0;
3846 }
3847
3848 /*-- vec_all_nge ------------------------------------------------------------*/
3849
3850 #if __ARCH__ >= 12
3851 static inline __ATTRS_o_ai int
3852 vec_all_nge(vector float __a, vector float __b) {
3853   int __cc;
3854   __builtin_s390_vfchesbs(__a, __b, &__cc);
3855   return __cc == 3;
3856 }
3857 #endif
3858
3859 static inline __ATTRS_o_ai int
3860 vec_all_nge(vector double __a, vector double __b) {
3861   int __cc;
3862   __builtin_s390_vfchedbs(__a, __b, &__cc);
3863   return __cc == 3;
3864 }
3865
3866 /*-- vec_all_ngt ------------------------------------------------------------*/
3867
3868 #if __ARCH__ >= 12
3869 static inline __ATTRS_o_ai int
3870 vec_all_ngt(vector float __a, vector float __b) {
3871   int __cc;
3872   __builtin_s390_vfchsbs(__a, __b, &__cc);
3873   return __cc == 3;
3874 }
3875 #endif
3876
3877 static inline __ATTRS_o_ai int
3878 vec_all_ngt(vector double __a, vector double __b) {
3879   int __cc;
3880   __builtin_s390_vfchdbs(__a, __b, &__cc);
3881   return __cc == 3;
3882 }
3883
3884 /*-- vec_all_nle ------------------------------------------------------------*/
3885
3886 #if __ARCH__ >= 12
3887 static inline __ATTRS_o_ai int
3888 vec_all_nle(vector float __a, vector float __b) {
3889   int __cc;
3890   __builtin_s390_vfchesbs(__b, __a, &__cc);
3891   return __cc == 3;
3892 }
3893 #endif
3894
3895 static inline __ATTRS_o_ai int
3896 vec_all_nle(vector double __a, vector double __b) {
3897   int __cc;
3898   __builtin_s390_vfchedbs(__b, __a, &__cc);
3899   return __cc == 3;
3900 }
3901
3902 /*-- vec_all_nlt ------------------------------------------------------------*/
3903
3904 #if __ARCH__ >= 12
3905 static inline __ATTRS_o_ai int
3906 vec_all_nlt(vector float __a, vector float __b) {
3907   int __cc;
3908   __builtin_s390_vfchsbs(__b, __a, &__cc);
3909   return __cc == 3;
3910 }
3911 #endif
3912
3913 static inline __ATTRS_o_ai int
3914 vec_all_nlt(vector double __a, vector double __b) {
3915   int __cc;
3916   __builtin_s390_vfchdbs(__b, __a, &__cc);
3917   return __cc == 3;
3918 }
3919
3920 /*-- vec_all_nan ------------------------------------------------------------*/
3921
3922 #if __ARCH__ >= 12
3923 static inline __ATTRS_o_ai int
3924 vec_all_nan(vector float __a) {
3925   int __cc;
3926   __builtin_s390_vftcisb(__a, 15, &__cc);
3927   return __cc == 0;
3928 }
3929 #endif
3930
3931 static inline __ATTRS_o_ai int
3932 vec_all_nan(vector double __a) {
3933   int __cc;
3934   __builtin_s390_vftcidb(__a, 15, &__cc);
3935   return __cc == 0;
3936 }
3937
3938 /*-- vec_all_numeric --------------------------------------------------------*/
3939
3940 #if __ARCH__ >= 12
3941 static inline __ATTRS_o_ai int
3942 vec_all_numeric(vector float __a) {
3943   int __cc;
3944   __builtin_s390_vftcisb(__a, 15, &__cc);
3945   return __cc == 3;
3946 }
3947 #endif
3948
3949 static inline __ATTRS_o_ai int
3950 vec_all_numeric(vector double __a) {
3951   int __cc;
3952   __builtin_s390_vftcidb(__a, 15, &__cc);
3953   return __cc == 3;
3954 }
3955
3956 /*-- vec_any_eq -------------------------------------------------------------*/
3957
3958 static inline __ATTRS_o_ai int
3959 vec_any_eq(vector signed char __a, vector signed char __b) {
3960   int __cc;
3961   __builtin_s390_vceqbs(__a, __b, &__cc);
3962   return __cc <= 1;
3963 }
3964
3965 // This prototype is deprecated.
3966 static inline __ATTRS_o_ai int
3967 vec_any_eq(vector signed char __a, vector bool char __b) {
3968   int __cc;
3969   __builtin_s390_vceqbs(__a, (vector signed char)__b, &__cc);
3970   return __cc <= 1;
3971 }
3972
3973 // This prototype is deprecated.
3974 static inline __ATTRS_o_ai int
3975 vec_any_eq(vector bool char __a, vector signed char __b) {
3976   int __cc;
3977   __builtin_s390_vceqbs((vector signed char)__a, __b, &__cc);
3978   return __cc <= 1;
3979 }
3980
3981 static inline __ATTRS_o_ai int
3982 vec_any_eq(vector unsigned char __a, vector unsigned char __b) {
3983   int __cc;
3984   __builtin_s390_vceqbs((vector signed char)__a,
3985                         (vector signed char)__b, &__cc);
3986   return __cc <= 1;
3987 }
3988
3989 // This prototype is deprecated.
3990 static inline __ATTRS_o_ai int
3991 vec_any_eq(vector unsigned char __a, vector bool char __b) {
3992   int __cc;
3993   __builtin_s390_vceqbs((vector signed char)__a,
3994                         (vector signed char)__b, &__cc);
3995   return __cc <= 1;
3996 }
3997
3998 // This prototype is deprecated.
3999 static inline __ATTRS_o_ai int
4000 vec_any_eq(vector bool char __a, vector unsigned char __b) {
4001   int __cc;
4002   __builtin_s390_vceqbs((vector signed char)__a,
4003                         (vector signed char)__b, &__cc);
4004   return __cc <= 1;
4005 }
4006
4007 static inline __ATTRS_o_ai int
4008 vec_any_eq(vector bool char __a, vector bool char __b) {
4009   int __cc;
4010   __builtin_s390_vceqbs((vector signed char)__a,
4011                         (vector signed char)__b, &__cc);
4012   return __cc <= 1;
4013 }
4014
4015 static inline __ATTRS_o_ai int
4016 vec_any_eq(vector signed short __a, vector signed short __b) {
4017   int __cc;
4018   __builtin_s390_vceqhs(__a, __b, &__cc);
4019   return __cc <= 1;
4020 }
4021
4022 // This prototype is deprecated.
4023 static inline __ATTRS_o_ai int
4024 vec_any_eq(vector signed short __a, vector bool short __b) {
4025   int __cc;
4026   __builtin_s390_vceqhs(__a, (vector signed short)__b, &__cc);
4027   return __cc <= 1;
4028 }
4029
4030 // This prototype is deprecated.
4031 static inline __ATTRS_o_ai int
4032 vec_any_eq(vector bool short __a, vector signed short __b) {
4033   int __cc;
4034   __builtin_s390_vceqhs((vector signed short)__a, __b, &__cc);
4035   return __cc <= 1;
4036 }
4037
4038 static inline __ATTRS_o_ai int
4039 vec_any_eq(vector unsigned short __a, vector unsigned short __b) {
4040   int __cc;
4041   __builtin_s390_vceqhs((vector signed short)__a,
4042                         (vector signed short)__b, &__cc);
4043   return __cc <= 1;
4044 }
4045
4046 // This prototype is deprecated.
4047 static inline __ATTRS_o_ai int
4048 vec_any_eq(vector unsigned short __a, vector bool short __b) {
4049   int __cc;
4050   __builtin_s390_vceqhs((vector signed short)__a,
4051                         (vector signed short)__b, &__cc);
4052   return __cc <= 1;
4053 }
4054
4055 // This prototype is deprecated.
4056 static inline __ATTRS_o_ai int
4057 vec_any_eq(vector bool short __a, vector unsigned short __b) {
4058   int __cc;
4059   __builtin_s390_vceqhs((vector signed short)__a,
4060                         (vector signed short)__b, &__cc);
4061   return __cc <= 1;
4062 }
4063
4064 static inline __ATTRS_o_ai int
4065 vec_any_eq(vector bool short __a, vector bool short __b) {
4066   int __cc;
4067   __builtin_s390_vceqhs((vector signed short)__a,
4068                         (vector signed short)__b, &__cc);
4069   return __cc <= 1;
4070 }
4071
4072 static inline __ATTRS_o_ai int
4073 vec_any_eq(vector signed int __a, vector signed int __b) {
4074   int __cc;
4075   __builtin_s390_vceqfs(__a, __b, &__cc);
4076   return __cc <= 1;
4077 }
4078
4079 // This prototype is deprecated.
4080 static inline __ATTRS_o_ai int
4081 vec_any_eq(vector signed int __a, vector bool int __b) {
4082   int __cc;
4083   __builtin_s390_vceqfs(__a, (vector signed int)__b, &__cc);
4084   return __cc <= 1;
4085 }
4086
4087 // This prototype is deprecated.
4088 static inline __ATTRS_o_ai int
4089 vec_any_eq(vector bool int __a, vector signed int __b) {
4090   int __cc;
4091   __builtin_s390_vceqfs((vector signed int)__a, __b, &__cc);
4092   return __cc <= 1;
4093 }
4094
4095 static inline __ATTRS_o_ai int
4096 vec_any_eq(vector unsigned int __a, vector unsigned int __b) {
4097   int __cc;
4098   __builtin_s390_vceqfs((vector signed int)__a,
4099                         (vector signed int)__b, &__cc);
4100   return __cc <= 1;
4101 }
4102
4103 // This prototype is deprecated.
4104 static inline __ATTRS_o_ai int
4105 vec_any_eq(vector unsigned int __a, vector bool int __b) {
4106   int __cc;
4107   __builtin_s390_vceqfs((vector signed int)__a,
4108                         (vector signed int)__b, &__cc);
4109   return __cc <= 1;
4110 }
4111
4112 // This prototype is deprecated.
4113 static inline __ATTRS_o_ai int
4114 vec_any_eq(vector bool int __a, vector unsigned int __b) {
4115   int __cc;
4116   __builtin_s390_vceqfs((vector signed int)__a,
4117                         (vector signed int)__b, &__cc);
4118   return __cc <= 1;
4119 }
4120
4121 static inline __ATTRS_o_ai int
4122 vec_any_eq(vector bool int __a, vector bool int __b) {
4123   int __cc;
4124   __builtin_s390_vceqfs((vector signed int)__a,
4125                         (vector signed int)__b, &__cc);
4126   return __cc <= 1;
4127 }
4128
4129 static inline __ATTRS_o_ai int
4130 vec_any_eq(vector signed long long __a, vector signed long long __b) {
4131   int __cc;
4132   __builtin_s390_vceqgs(__a, __b, &__cc);
4133   return __cc <= 1;
4134 }
4135
4136 // This prototype is deprecated.
4137 static inline __ATTRS_o_ai int
4138 vec_any_eq(vector signed long long __a, vector bool long long __b) {
4139   int __cc;
4140   __builtin_s390_vceqgs(__a, (vector signed long long)__b, &__cc);
4141   return __cc <= 1;
4142 }
4143
4144 // This prototype is deprecated.
4145 static inline __ATTRS_o_ai int
4146 vec_any_eq(vector bool long long __a, vector signed long long __b) {
4147   int __cc;
4148   __builtin_s390_vceqgs((vector signed long long)__a, __b, &__cc);
4149   return __cc <= 1;
4150 }
4151
4152 static inline __ATTRS_o_ai int
4153 vec_any_eq(vector unsigned long long __a, vector unsigned long long __b) {
4154   int __cc;
4155   __builtin_s390_vceqgs((vector signed long long)__a,
4156                         (vector signed long long)__b, &__cc);
4157   return __cc <= 1;
4158 }
4159
4160 // This prototype is deprecated.
4161 static inline __ATTRS_o_ai int
4162 vec_any_eq(vector unsigned long long __a, vector bool long long __b) {
4163   int __cc;
4164   __builtin_s390_vceqgs((vector signed long long)__a,
4165                         (vector signed long long)__b, &__cc);
4166   return __cc <= 1;
4167 }
4168
4169 // This prototype is deprecated.
4170 static inline __ATTRS_o_ai int
4171 vec_any_eq(vector bool long long __a, vector unsigned long long __b) {
4172   int __cc;
4173   __builtin_s390_vceqgs((vector signed long long)__a,
4174                         (vector signed long long)__b, &__cc);
4175   return __cc <= 1;
4176 }
4177
4178 static inline __ATTRS_o_ai int
4179 vec_any_eq(vector bool long long __a, vector bool long long __b) {
4180   int __cc;
4181   __builtin_s390_vceqgs((vector signed long long)__a,
4182                         (vector signed long long)__b, &__cc);
4183   return __cc <= 1;
4184 }
4185
4186 #if __ARCH__ >= 12
4187 static inline __ATTRS_o_ai int
4188 vec_any_eq(vector float __a, vector float __b) {
4189   int __cc;
4190   __builtin_s390_vfcesbs(__a, __b, &__cc);
4191   return __cc <= 1;
4192 }
4193 #endif
4194
4195 static inline __ATTRS_o_ai int
4196 vec_any_eq(vector double __a, vector double __b) {
4197   int __cc;
4198   __builtin_s390_vfcedbs(__a, __b, &__cc);
4199   return __cc <= 1;
4200 }
4201
4202 /*-- vec_any_ne -------------------------------------------------------------*/
4203
4204 static inline __ATTRS_o_ai int
4205 vec_any_ne(vector signed char __a, vector signed char __b) {
4206   int __cc;
4207   __builtin_s390_vceqbs(__a, __b, &__cc);
4208   return __cc != 0;
4209 }
4210
4211 // This prototype is deprecated.
4212 static inline __ATTRS_o_ai int
4213 vec_any_ne(vector signed char __a, vector bool char __b) {
4214   int __cc;
4215   __builtin_s390_vceqbs(__a, (vector signed char)__b, &__cc);
4216   return __cc != 0;
4217 }
4218
4219 // This prototype is deprecated.
4220 static inline __ATTRS_o_ai int
4221 vec_any_ne(vector bool char __a, vector signed char __b) {
4222   int __cc;
4223   __builtin_s390_vceqbs((vector signed char)__a, __b, &__cc);
4224   return __cc != 0;
4225 }
4226
4227 static inline __ATTRS_o_ai int
4228 vec_any_ne(vector unsigned char __a, vector unsigned char __b) {
4229   int __cc;
4230   __builtin_s390_vceqbs((vector signed char)__a,
4231                         (vector signed char)__b, &__cc);
4232   return __cc != 0;
4233 }
4234
4235 // This prototype is deprecated.
4236 static inline __ATTRS_o_ai int
4237 vec_any_ne(vector unsigned char __a, vector bool char __b) {
4238   int __cc;
4239   __builtin_s390_vceqbs((vector signed char)__a,
4240                         (vector signed char)__b, &__cc);
4241   return __cc != 0;
4242 }
4243
4244 // This prototype is deprecated.
4245 static inline __ATTRS_o_ai int
4246 vec_any_ne(vector bool char __a, vector unsigned char __b) {
4247   int __cc;
4248   __builtin_s390_vceqbs((vector signed char)__a,
4249                         (vector signed char)__b, &__cc);
4250   return __cc != 0;
4251 }
4252
4253 static inline __ATTRS_o_ai int
4254 vec_any_ne(vector bool char __a, vector bool char __b) {
4255   int __cc;
4256   __builtin_s390_vceqbs((vector signed char)__a,
4257                         (vector signed char)__b, &__cc);
4258   return __cc != 0;
4259 }
4260
4261 static inline __ATTRS_o_ai int
4262 vec_any_ne(vector signed short __a, vector signed short __b) {
4263   int __cc;
4264   __builtin_s390_vceqhs(__a, __b, &__cc);
4265   return __cc != 0;
4266 }
4267
4268 // This prototype is deprecated.
4269 static inline __ATTRS_o_ai int
4270 vec_any_ne(vector signed short __a, vector bool short __b) {
4271   int __cc;
4272   __builtin_s390_vceqhs(__a, (vector signed short)__b, &__cc);
4273   return __cc != 0;
4274 }
4275
4276 // This prototype is deprecated.
4277 static inline __ATTRS_o_ai int
4278 vec_any_ne(vector bool short __a, vector signed short __b) {
4279   int __cc;
4280   __builtin_s390_vceqhs((vector signed short)__a, __b, &__cc);
4281   return __cc != 0;
4282 }
4283
4284 static inline __ATTRS_o_ai int
4285 vec_any_ne(vector unsigned short __a, vector unsigned short __b) {
4286   int __cc;
4287   __builtin_s390_vceqhs((vector signed short)__a,
4288                         (vector signed short)__b, &__cc);
4289   return __cc != 0;
4290 }
4291
4292 // This prototype is deprecated.
4293 static inline __ATTRS_o_ai int
4294 vec_any_ne(vector unsigned short __a, vector bool short __b) {
4295   int __cc;
4296   __builtin_s390_vceqhs((vector signed short)__a,
4297                         (vector signed short)__b, &__cc);
4298   return __cc != 0;
4299 }
4300
4301 // This prototype is deprecated.
4302 static inline __ATTRS_o_ai int
4303 vec_any_ne(vector bool short __a, vector unsigned short __b) {
4304   int __cc;
4305   __builtin_s390_vceqhs((vector signed short)__a,
4306                         (vector signed short)__b, &__cc);
4307   return __cc != 0;
4308 }
4309
4310 static inline __ATTRS_o_ai int
4311 vec_any_ne(vector bool short __a, vector bool short __b) {
4312   int __cc;
4313   __builtin_s390_vceqhs((vector signed short)__a,
4314                         (vector signed short)__b, &__cc);
4315   return __cc != 0;
4316 }
4317
4318 static inline __ATTRS_o_ai int
4319 vec_any_ne(vector signed int __a, vector signed int __b) {
4320   int __cc;
4321   __builtin_s390_vceqfs(__a, __b, &__cc);
4322   return __cc != 0;
4323 }
4324
4325 // This prototype is deprecated.
4326 static inline __ATTRS_o_ai int
4327 vec_any_ne(vector signed int __a, vector bool int __b) {
4328   int __cc;
4329   __builtin_s390_vceqfs(__a, (vector signed int)__b, &__cc);
4330   return __cc != 0;
4331 }
4332
4333 // This prototype is deprecated.
4334 static inline __ATTRS_o_ai int
4335 vec_any_ne(vector bool int __a, vector signed int __b) {
4336   int __cc;
4337   __builtin_s390_vceqfs((vector signed int)__a, __b, &__cc);
4338   return __cc != 0;
4339 }
4340
4341 static inline __ATTRS_o_ai int
4342 vec_any_ne(vector unsigned int __a, vector unsigned int __b) {
4343   int __cc;
4344   __builtin_s390_vceqfs((vector signed int)__a,
4345                         (vector signed int)__b, &__cc);
4346   return __cc != 0;
4347 }
4348
4349 // This prototype is deprecated.
4350 static inline __ATTRS_o_ai int
4351 vec_any_ne(vector unsigned int __a, vector bool int __b) {
4352   int __cc;
4353   __builtin_s390_vceqfs((vector signed int)__a,
4354                         (vector signed int)__b, &__cc);
4355   return __cc != 0;
4356 }
4357
4358 // This prototype is deprecated.
4359 static inline __ATTRS_o_ai int
4360 vec_any_ne(vector bool int __a, vector unsigned int __b) {
4361   int __cc;
4362   __builtin_s390_vceqfs((vector signed int)__a,
4363                         (vector signed int)__b, &__cc);
4364   return __cc != 0;
4365 }
4366
4367 static inline __ATTRS_o_ai int
4368 vec_any_ne(vector bool int __a, vector bool int __b) {
4369   int __cc;
4370   __builtin_s390_vceqfs((vector signed int)__a,
4371                         (vector signed int)__b, &__cc);
4372   return __cc != 0;
4373 }
4374
4375 static inline __ATTRS_o_ai int
4376 vec_any_ne(vector signed long long __a, vector signed long long __b) {
4377   int __cc;
4378   __builtin_s390_vceqgs(__a, __b, &__cc);
4379   return __cc != 0;
4380 }
4381
4382 // This prototype is deprecated.
4383 static inline __ATTRS_o_ai int
4384 vec_any_ne(vector signed long long __a, vector bool long long __b) {
4385   int __cc;
4386   __builtin_s390_vceqgs(__a, (vector signed long long)__b, &__cc);
4387   return __cc != 0;
4388 }
4389
4390 // This prototype is deprecated.
4391 static inline __ATTRS_o_ai int
4392 vec_any_ne(vector bool long long __a, vector signed long long __b) {
4393   int __cc;
4394   __builtin_s390_vceqgs((vector signed long long)__a, __b, &__cc);
4395   return __cc != 0;
4396 }
4397
4398 static inline __ATTRS_o_ai int
4399 vec_any_ne(vector unsigned long long __a, vector unsigned long long __b) {
4400   int __cc;
4401   __builtin_s390_vceqgs((vector signed long long)__a,
4402                         (vector signed long long)__b, &__cc);
4403   return __cc != 0;
4404 }
4405
4406 // This prototype is deprecated.
4407 static inline __ATTRS_o_ai int
4408 vec_any_ne(vector unsigned long long __a, vector bool long long __b) {
4409   int __cc;
4410   __builtin_s390_vceqgs((vector signed long long)__a,
4411                         (vector signed long long)__b, &__cc);
4412   return __cc != 0;
4413 }
4414
4415 // This prototype is deprecated.
4416 static inline __ATTRS_o_ai int
4417 vec_any_ne(vector bool long long __a, vector unsigned long long __b) {
4418   int __cc;
4419   __builtin_s390_vceqgs((vector signed long long)__a,
4420                         (vector signed long long)__b, &__cc);
4421   return __cc != 0;
4422 }
4423
4424 static inline __ATTRS_o_ai int
4425 vec_any_ne(vector bool long long __a, vector bool long long __b) {
4426   int __cc;
4427   __builtin_s390_vceqgs((vector signed long long)__a,
4428                         (vector signed long long)__b, &__cc);
4429   return __cc != 0;
4430 }
4431
4432 #if __ARCH__ >= 12
4433 static inline __ATTRS_o_ai int
4434 vec_any_ne(vector float __a, vector float __b) {
4435   int __cc;
4436   __builtin_s390_vfcesbs(__a, __b, &__cc);
4437   return __cc != 0;
4438 }
4439 #endif
4440
4441 static inline __ATTRS_o_ai int
4442 vec_any_ne(vector double __a, vector double __b) {
4443   int __cc;
4444   __builtin_s390_vfcedbs(__a, __b, &__cc);
4445   return __cc != 0;
4446 }
4447
4448 /*-- vec_any_ge -------------------------------------------------------------*/
4449
4450 static inline __ATTRS_o_ai int
4451 vec_any_ge(vector signed char __a, vector signed char __b) {
4452   int __cc;
4453   __builtin_s390_vchbs(__b, __a, &__cc);
4454   return __cc != 0;
4455 }
4456
4457 // This prototype is deprecated.
4458 static inline __ATTRS_o_ai int
4459 vec_any_ge(vector signed char __a, vector bool char __b) {
4460   int __cc;
4461   __builtin_s390_vchbs((vector signed char)__b, __a, &__cc);
4462   return __cc != 0;
4463 }
4464
4465 // This prototype is deprecated.
4466 static inline __ATTRS_o_ai int
4467 vec_any_ge(vector bool char __a, vector signed char __b) {
4468   int __cc;
4469   __builtin_s390_vchbs(__b, (vector signed char)__a, &__cc);
4470   return __cc != 0;
4471 }
4472
4473 static inline __ATTRS_o_ai int
4474 vec_any_ge(vector unsigned char __a, vector unsigned char __b) {
4475   int __cc;
4476   __builtin_s390_vchlbs(__b, __a, &__cc);
4477   return __cc != 0;
4478 }
4479
4480 // This prototype is deprecated.
4481 static inline __ATTRS_o_ai int
4482 vec_any_ge(vector unsigned char __a, vector bool char __b) {
4483   int __cc;
4484   __builtin_s390_vchlbs((vector unsigned char)__b, __a, &__cc);
4485   return __cc != 0;
4486 }
4487
4488 // This prototype is deprecated.
4489 static inline __ATTRS_o_ai int
4490 vec_any_ge(vector bool char __a, vector unsigned char __b) {
4491   int __cc;
4492   __builtin_s390_vchlbs(__b, (vector unsigned char)__a, &__cc);
4493   return __cc != 0;
4494 }
4495
4496 // This prototype is deprecated.
4497 static inline __ATTRS_o_ai int
4498 vec_any_ge(vector bool char __a, vector bool char __b) {
4499   int __cc;
4500   __builtin_s390_vchlbs((vector unsigned char)__b,
4501                         (vector unsigned char)__a, &__cc);
4502   return __cc != 0;
4503 }
4504
4505 static inline __ATTRS_o_ai int
4506 vec_any_ge(vector signed short __a, vector signed short __b) {
4507   int __cc;
4508   __builtin_s390_vchhs(__b, __a, &__cc);
4509   return __cc != 0;
4510 }
4511
4512 // This prototype is deprecated.
4513 static inline __ATTRS_o_ai int
4514 vec_any_ge(vector signed short __a, vector bool short __b) {
4515   int __cc;
4516   __builtin_s390_vchhs((vector signed short)__b, __a, &__cc);
4517   return __cc != 0;
4518 }
4519
4520 // This prototype is deprecated.
4521 static inline __ATTRS_o_ai int
4522 vec_any_ge(vector bool short __a, vector signed short __b) {
4523   int __cc;
4524   __builtin_s390_vchhs(__b, (vector signed short)__a, &__cc);
4525   return __cc != 0;
4526 }
4527
4528 static inline __ATTRS_o_ai int
4529 vec_any_ge(vector unsigned short __a, vector unsigned short __b) {
4530   int __cc;
4531   __builtin_s390_vchlhs(__b, __a, &__cc);
4532   return __cc != 0;
4533 }
4534
4535 // This prototype is deprecated.
4536 static inline __ATTRS_o_ai int
4537 vec_any_ge(vector unsigned short __a, vector bool short __b) {
4538   int __cc;
4539   __builtin_s390_vchlhs((vector unsigned short)__b, __a, &__cc);
4540   return __cc != 0;
4541 }
4542
4543 // This prototype is deprecated.
4544 static inline __ATTRS_o_ai int
4545 vec_any_ge(vector bool short __a, vector unsigned short __b) {
4546   int __cc;
4547   __builtin_s390_vchlhs(__b, (vector unsigned short)__a, &__cc);
4548   return __cc != 0;
4549 }
4550
4551 // This prototype is deprecated.
4552 static inline __ATTRS_o_ai int
4553 vec_any_ge(vector bool short __a, vector bool short __b) {
4554   int __cc;
4555   __builtin_s390_vchlhs((vector unsigned short)__b,
4556                         (vector unsigned short)__a, &__cc);
4557   return __cc != 0;
4558 }
4559
4560 static inline __ATTRS_o_ai int
4561 vec_any_ge(vector signed int __a, vector signed int __b) {
4562   int __cc;
4563   __builtin_s390_vchfs(__b, __a, &__cc);
4564   return __cc != 0;
4565 }
4566
4567 // This prototype is deprecated.
4568 static inline __ATTRS_o_ai int
4569 vec_any_ge(vector signed int __a, vector bool int __b) {
4570   int __cc;
4571   __builtin_s390_vchfs((vector signed int)__b, __a, &__cc);
4572   return __cc != 0;
4573 }
4574
4575 // This prototype is deprecated.
4576 static inline __ATTRS_o_ai int
4577 vec_any_ge(vector bool int __a, vector signed int __b) {
4578   int __cc;
4579   __builtin_s390_vchfs(__b, (vector signed int)__a, &__cc);
4580   return __cc != 0;
4581 }
4582
4583 static inline __ATTRS_o_ai int
4584 vec_any_ge(vector unsigned int __a, vector unsigned int __b) {
4585   int __cc;
4586   __builtin_s390_vchlfs(__b, __a, &__cc);
4587   return __cc != 0;
4588 }
4589
4590 // This prototype is deprecated.
4591 static inline __ATTRS_o_ai int
4592 vec_any_ge(vector unsigned int __a, vector bool int __b) {
4593   int __cc;
4594   __builtin_s390_vchlfs((vector unsigned int)__b, __a, &__cc);
4595   return __cc != 0;
4596 }
4597
4598 // This prototype is deprecated.
4599 static inline __ATTRS_o_ai int
4600 vec_any_ge(vector bool int __a, vector unsigned int __b) {
4601   int __cc;
4602   __builtin_s390_vchlfs(__b, (vector unsigned int)__a, &__cc);
4603   return __cc != 0;
4604 }
4605
4606 // This prototype is deprecated.
4607 static inline __ATTRS_o_ai int
4608 vec_any_ge(vector bool int __a, vector bool int __b) {
4609   int __cc;
4610   __builtin_s390_vchlfs((vector unsigned int)__b,
4611                         (vector unsigned int)__a, &__cc);
4612   return __cc != 0;
4613 }
4614
4615 static inline __ATTRS_o_ai int
4616 vec_any_ge(vector signed long long __a, vector signed long long __b) {
4617   int __cc;
4618   __builtin_s390_vchgs(__b, __a, &__cc);
4619   return __cc != 0;
4620 }
4621
4622 // This prototype is deprecated.
4623 static inline __ATTRS_o_ai int
4624 vec_any_ge(vector signed long long __a, vector bool long long __b) {
4625   int __cc;
4626   __builtin_s390_vchgs((vector signed long long)__b, __a, &__cc);
4627   return __cc != 0;
4628 }
4629
4630 // This prototype is deprecated.
4631 static inline __ATTRS_o_ai int
4632 vec_any_ge(vector bool long long __a, vector signed long long __b) {
4633   int __cc;
4634   __builtin_s390_vchgs(__b, (vector signed long long)__a, &__cc);
4635   return __cc != 0;
4636 }
4637
4638 static inline __ATTRS_o_ai int
4639 vec_any_ge(vector unsigned long long __a, vector unsigned long long __b) {
4640   int __cc;
4641   __builtin_s390_vchlgs(__b, __a, &__cc);
4642   return __cc != 0;
4643 }
4644
4645 // This prototype is deprecated.
4646 static inline __ATTRS_o_ai int
4647 vec_any_ge(vector unsigned long long __a, vector bool long long __b) {
4648   int __cc;
4649   __builtin_s390_vchlgs((vector unsigned long long)__b, __a, &__cc);
4650   return __cc != 0;
4651 }
4652
4653 // This prototype is deprecated.
4654 static inline __ATTRS_o_ai int
4655 vec_any_ge(vector bool long long __a, vector unsigned long long __b) {
4656   int __cc;
4657   __builtin_s390_vchlgs(__b, (vector unsigned long long)__a, &__cc);
4658   return __cc != 0;
4659 }
4660
4661 // This prototype is deprecated.
4662 static inline __ATTRS_o_ai int
4663 vec_any_ge(vector bool long long __a, vector bool long long __b) {
4664   int __cc;
4665   __builtin_s390_vchlgs((vector unsigned long long)__b,
4666                         (vector unsigned long long)__a, &__cc);
4667   return __cc != 0;
4668 }
4669
4670 #if __ARCH__ >= 12
4671 static inline __ATTRS_o_ai int
4672 vec_any_ge(vector float __a, vector float __b) {
4673   int __cc;
4674   __builtin_s390_vfchesbs(__a, __b, &__cc);
4675   return __cc <= 1;
4676 }
4677 #endif
4678
4679 static inline __ATTRS_o_ai int
4680 vec_any_ge(vector double __a, vector double __b) {
4681   int __cc;
4682   __builtin_s390_vfchedbs(__a, __b, &__cc);
4683   return __cc <= 1;
4684 }
4685
4686 /*-- vec_any_gt -------------------------------------------------------------*/
4687
4688 static inline __ATTRS_o_ai int
4689 vec_any_gt(vector signed char __a, vector signed char __b) {
4690   int __cc;
4691   __builtin_s390_vchbs(__a, __b, &__cc);
4692   return __cc <= 1;
4693 }
4694
4695 // This prototype is deprecated.
4696 static inline __ATTRS_o_ai int
4697 vec_any_gt(vector signed char __a, vector bool char __b) {
4698   int __cc;
4699   __builtin_s390_vchbs(__a, (vector signed char)__b, &__cc);
4700   return __cc <= 1;
4701 }
4702
4703 // This prototype is deprecated.
4704 static inline __ATTRS_o_ai int
4705 vec_any_gt(vector bool char __a, vector signed char __b) {
4706   int __cc;
4707   __builtin_s390_vchbs((vector signed char)__a, __b, &__cc);
4708   return __cc <= 1;
4709 }
4710
4711 static inline __ATTRS_o_ai int
4712 vec_any_gt(vector unsigned char __a, vector unsigned char __b) {
4713   int __cc;
4714   __builtin_s390_vchlbs(__a, __b, &__cc);
4715   return __cc <= 1;
4716 }
4717
4718 // This prototype is deprecated.
4719 static inline __ATTRS_o_ai int
4720 vec_any_gt(vector unsigned char __a, vector bool char __b) {
4721   int __cc;
4722   __builtin_s390_vchlbs(__a, (vector unsigned char)__b, &__cc);
4723   return __cc <= 1;
4724 }
4725
4726 // This prototype is deprecated.
4727 static inline __ATTRS_o_ai int
4728 vec_any_gt(vector bool char __a, vector unsigned char __b) {
4729   int __cc;
4730   __builtin_s390_vchlbs((vector unsigned char)__a, __b, &__cc);
4731   return __cc <= 1;
4732 }
4733
4734 // This prototype is deprecated.
4735 static inline __ATTRS_o_ai int
4736 vec_any_gt(vector bool char __a, vector bool char __b) {
4737   int __cc;
4738   __builtin_s390_vchlbs((vector unsigned char)__a,
4739                         (vector unsigned char)__b, &__cc);
4740   return __cc <= 1;
4741 }
4742
4743 static inline __ATTRS_o_ai int
4744 vec_any_gt(vector signed short __a, vector signed short __b) {
4745   int __cc;
4746   __builtin_s390_vchhs(__a, __b, &__cc);
4747   return __cc <= 1;
4748 }
4749
4750 // This prototype is deprecated.
4751 static inline __ATTRS_o_ai int
4752 vec_any_gt(vector signed short __a, vector bool short __b) {
4753   int __cc;
4754   __builtin_s390_vchhs(__a, (vector signed short)__b, &__cc);
4755   return __cc <= 1;
4756 }
4757
4758 // This prototype is deprecated.
4759 static inline __ATTRS_o_ai int
4760 vec_any_gt(vector bool short __a, vector signed short __b) {
4761   int __cc;
4762   __builtin_s390_vchhs((vector signed short)__a, __b, &__cc);
4763   return __cc <= 1;
4764 }
4765
4766 static inline __ATTRS_o_ai int
4767 vec_any_gt(vector unsigned short __a, vector unsigned short __b) {
4768   int __cc;
4769   __builtin_s390_vchlhs(__a, __b, &__cc);
4770   return __cc <= 1;
4771 }
4772
4773 // This prototype is deprecated.
4774 static inline __ATTRS_o_ai int
4775 vec_any_gt(vector unsigned short __a, vector bool short __b) {
4776   int __cc;
4777   __builtin_s390_vchlhs(__a, (vector unsigned short)__b, &__cc);
4778   return __cc <= 1;
4779 }
4780
4781 // This prototype is deprecated.
4782 static inline __ATTRS_o_ai int
4783 vec_any_gt(vector bool short __a, vector unsigned short __b) {
4784   int __cc;
4785   __builtin_s390_vchlhs((vector unsigned short)__a, __b, &__cc);
4786   return __cc <= 1;
4787 }
4788
4789 // This prototype is deprecated.
4790 static inline __ATTRS_o_ai int
4791 vec_any_gt(vector bool short __a, vector bool short __b) {
4792   int __cc;
4793   __builtin_s390_vchlhs((vector unsigned short)__a,
4794                         (vector unsigned short)__b, &__cc);
4795   return __cc <= 1;
4796 }
4797
4798 static inline __ATTRS_o_ai int
4799 vec_any_gt(vector signed int __a, vector signed int __b) {
4800   int __cc;
4801   __builtin_s390_vchfs(__a, __b, &__cc);
4802   return __cc <= 1;
4803 }
4804
4805 // This prototype is deprecated.
4806 static inline __ATTRS_o_ai int
4807 vec_any_gt(vector signed int __a, vector bool int __b) {
4808   int __cc;
4809   __builtin_s390_vchfs(__a, (vector signed int)__b, &__cc);
4810   return __cc <= 1;
4811 }
4812
4813 // This prototype is deprecated.
4814 static inline __ATTRS_o_ai int
4815 vec_any_gt(vector bool int __a, vector signed int __b) {
4816   int __cc;
4817   __builtin_s390_vchfs((vector signed int)__a, __b, &__cc);
4818   return __cc <= 1;
4819 }
4820
4821 static inline __ATTRS_o_ai int
4822 vec_any_gt(vector unsigned int __a, vector unsigned int __b) {
4823   int __cc;
4824   __builtin_s390_vchlfs(__a, __b, &__cc);
4825   return __cc <= 1;
4826 }
4827
4828 // This prototype is deprecated.
4829 static inline __ATTRS_o_ai int
4830 vec_any_gt(vector unsigned int __a, vector bool int __b) {
4831   int __cc;
4832   __builtin_s390_vchlfs(__a, (vector unsigned int)__b, &__cc);
4833   return __cc <= 1;
4834 }
4835
4836 // This prototype is deprecated.
4837 static inline __ATTRS_o_ai int
4838 vec_any_gt(vector bool int __a, vector unsigned int __b) {
4839   int __cc;
4840   __builtin_s390_vchlfs((vector unsigned int)__a, __b, &__cc);
4841   return __cc <= 1;
4842 }
4843
4844 // This prototype is deprecated.
4845 static inline __ATTRS_o_ai int
4846 vec_any_gt(vector bool int __a, vector bool int __b) {
4847   int __cc;
4848   __builtin_s390_vchlfs((vector unsigned int)__a,
4849                         (vector unsigned int)__b, &__cc);
4850   return __cc <= 1;
4851 }
4852
4853 static inline __ATTRS_o_ai int
4854 vec_any_gt(vector signed long long __a, vector signed long long __b) {
4855   int __cc;
4856   __builtin_s390_vchgs(__a, __b, &__cc);
4857   return __cc <= 1;
4858 }
4859
4860 // This prototype is deprecated.
4861 static inline __ATTRS_o_ai int
4862 vec_any_gt(vector signed long long __a, vector bool long long __b) {
4863   int __cc;
4864   __builtin_s390_vchgs(__a, (vector signed long long)__b, &__cc);
4865   return __cc <= 1;
4866 }
4867
4868 // This prototype is deprecated.
4869 static inline __ATTRS_o_ai int
4870 vec_any_gt(vector bool long long __a, vector signed long long __b) {
4871   int __cc;
4872   __builtin_s390_vchgs((vector signed long long)__a, __b, &__cc);
4873   return __cc <= 1;
4874 }
4875
4876 static inline __ATTRS_o_ai int
4877 vec_any_gt(vector unsigned long long __a, vector unsigned long long __b) {
4878   int __cc;
4879   __builtin_s390_vchlgs(__a, __b, &__cc);
4880   return __cc <= 1;
4881 }
4882
4883 // This prototype is deprecated.
4884 static inline __ATTRS_o_ai int
4885 vec_any_gt(vector unsigned long long __a, vector bool long long __b) {
4886   int __cc;
4887   __builtin_s390_vchlgs(__a, (vector unsigned long long)__b, &__cc);
4888   return __cc <= 1;
4889 }
4890
4891 // This prototype is deprecated.
4892 static inline __ATTRS_o_ai int
4893 vec_any_gt(vector bool long long __a, vector unsigned long long __b) {
4894   int __cc;
4895   __builtin_s390_vchlgs((vector unsigned long long)__a, __b, &__cc);
4896   return __cc <= 1;
4897 }
4898
4899 // This prototype is deprecated.
4900 static inline __ATTRS_o_ai int
4901 vec_any_gt(vector bool long long __a, vector bool long long __b) {
4902   int __cc;
4903   __builtin_s390_vchlgs((vector unsigned long long)__a,
4904                         (vector unsigned long long)__b, &__cc);
4905   return __cc <= 1;
4906 }
4907
4908 #if __ARCH__ >= 12
4909 static inline __ATTRS_o_ai int
4910 vec_any_gt(vector float __a, vector float __b) {
4911   int __cc;
4912   __builtin_s390_vfchsbs(__a, __b, &__cc);
4913   return __cc <= 1;
4914 }
4915 #endif
4916
4917 static inline __ATTRS_o_ai int
4918 vec_any_gt(vector double __a, vector double __b) {
4919   int __cc;
4920   __builtin_s390_vfchdbs(__a, __b, &__cc);
4921   return __cc <= 1;
4922 }
4923
4924 /*-- vec_any_le -------------------------------------------------------------*/
4925
4926 static inline __ATTRS_o_ai int
4927 vec_any_le(vector signed char __a, vector signed char __b) {
4928   int __cc;
4929   __builtin_s390_vchbs(__a, __b, &__cc);
4930   return __cc != 0;
4931 }
4932
4933 // This prototype is deprecated.
4934 static inline __ATTRS_o_ai int
4935 vec_any_le(vector signed char __a, vector bool char __b) {
4936   int __cc;
4937   __builtin_s390_vchbs(__a, (vector signed char)__b, &__cc);
4938   return __cc != 0;
4939 }
4940
4941 // This prototype is deprecated.
4942 static inline __ATTRS_o_ai int
4943 vec_any_le(vector bool char __a, vector signed char __b) {
4944   int __cc;
4945   __builtin_s390_vchbs((vector signed char)__a, __b, &__cc);
4946   return __cc != 0;
4947 }
4948
4949 static inline __ATTRS_o_ai int
4950 vec_any_le(vector unsigned char __a, vector unsigned char __b) {
4951   int __cc;
4952   __builtin_s390_vchlbs(__a, __b, &__cc);
4953   return __cc != 0;
4954 }
4955
4956 // This prototype is deprecated.
4957 static inline __ATTRS_o_ai int
4958 vec_any_le(vector unsigned char __a, vector bool char __b) {
4959   int __cc;
4960   __builtin_s390_vchlbs(__a, (vector unsigned char)__b, &__cc);
4961   return __cc != 0;
4962 }
4963
4964 // This prototype is deprecated.
4965 static inline __ATTRS_o_ai int
4966 vec_any_le(vector bool char __a, vector unsigned char __b) {
4967   int __cc;
4968   __builtin_s390_vchlbs((vector unsigned char)__a, __b, &__cc);
4969   return __cc != 0;
4970 }
4971
4972 // This prototype is deprecated.
4973 static inline __ATTRS_o_ai int
4974 vec_any_le(vector bool char __a, vector bool char __b) {
4975   int __cc;
4976   __builtin_s390_vchlbs((vector unsigned char)__a,
4977                         (vector unsigned char)__b, &__cc);
4978   return __cc != 0;
4979 }
4980
4981 static inline __ATTRS_o_ai int
4982 vec_any_le(vector signed short __a, vector signed short __b) {
4983   int __cc;
4984   __builtin_s390_vchhs(__a, __b, &__cc);
4985   return __cc != 0;
4986 }
4987
4988 // This prototype is deprecated.
4989 static inline __ATTRS_o_ai int
4990 vec_any_le(vector signed short __a, vector bool short __b) {
4991   int __cc;
4992   __builtin_s390_vchhs(__a, (vector signed short)__b, &__cc);
4993   return __cc != 0;
4994 }
4995
4996 // This prototype is deprecated.
4997 static inline __ATTRS_o_ai int
4998 vec_any_le(vector bool short __a, vector signed short __b) {
4999   int __cc;
5000   __builtin_s390_vchhs((vector signed short)__a, __b, &__cc);
5001   return __cc != 0;
5002 }
5003
5004 static inline __ATTRS_o_ai int
5005 vec_any_le(vector unsigned short __a, vector unsigned short __b) {
5006   int __cc;
5007   __builtin_s390_vchlhs(__a, __b, &__cc);
5008   return __cc != 0;
5009 }
5010
5011 // This prototype is deprecated.
5012 static inline __ATTRS_o_ai int
5013 vec_any_le(vector unsigned short __a, vector bool short __b) {
5014   int __cc;
5015   __builtin_s390_vchlhs(__a, (vector unsigned short)__b, &__cc);
5016   return __cc != 0;
5017 }
5018
5019 // This prototype is deprecated.
5020 static inline __ATTRS_o_ai int
5021 vec_any_le(vector bool short __a, vector unsigned short __b) {
5022   int __cc;
5023   __builtin_s390_vchlhs((vector unsigned short)__a, __b, &__cc);
5024   return __cc != 0;
5025 }
5026
5027 // This prototype is deprecated.
5028 static inline __ATTRS_o_ai int
5029 vec_any_le(vector bool short __a, vector bool short __b) {
5030   int __cc;
5031   __builtin_s390_vchlhs((vector unsigned short)__a,
5032                         (vector unsigned short)__b, &__cc);
5033   return __cc != 0;
5034 }
5035
5036 static inline __ATTRS_o_ai int
5037 vec_any_le(vector signed int __a, vector signed int __b) {
5038   int __cc;
5039   __builtin_s390_vchfs(__a, __b, &__cc);
5040   return __cc != 0;
5041 }
5042
5043 // This prototype is deprecated.
5044 static inline __ATTRS_o_ai int
5045 vec_any_le(vector signed int __a, vector bool int __b) {
5046   int __cc;
5047   __builtin_s390_vchfs(__a, (vector signed int)__b, &__cc);
5048   return __cc != 0;
5049 }
5050
5051 // This prototype is deprecated.
5052 static inline __ATTRS_o_ai int
5053 vec_any_le(vector bool int __a, vector signed int __b) {
5054   int __cc;
5055   __builtin_s390_vchfs((vector signed int)__a, __b, &__cc);
5056   return __cc != 0;
5057 }
5058
5059 static inline __ATTRS_o_ai int
5060 vec_any_le(vector unsigned int __a, vector unsigned int __b) {
5061   int __cc;
5062   __builtin_s390_vchlfs(__a, __b, &__cc);
5063   return __cc != 0;
5064 }
5065
5066 // This prototype is deprecated.
5067 static inline __ATTRS_o_ai int
5068 vec_any_le(vector unsigned int __a, vector bool int __b) {
5069   int __cc;
5070   __builtin_s390_vchlfs(__a, (vector unsigned int)__b, &__cc);
5071   return __cc != 0;
5072 }
5073
5074 // This prototype is deprecated.
5075 static inline __ATTRS_o_ai int
5076 vec_any_le(vector bool int __a, vector unsigned int __b) {
5077   int __cc;
5078   __builtin_s390_vchlfs((vector unsigned int)__a, __b, &__cc);
5079   return __cc != 0;
5080 }
5081
5082 // This prototype is deprecated.
5083 static inline __ATTRS_o_ai int
5084 vec_any_le(vector bool int __a, vector bool int __b) {
5085   int __cc;
5086   __builtin_s390_vchlfs((vector unsigned int)__a,
5087                         (vector unsigned int)__b, &__cc);
5088   return __cc != 0;
5089 }
5090
5091 static inline __ATTRS_o_ai int
5092 vec_any_le(vector signed long long __a, vector signed long long __b) {
5093   int __cc;
5094   __builtin_s390_vchgs(__a, __b, &__cc);
5095   return __cc != 0;
5096 }
5097
5098 // This prototype is deprecated.
5099 static inline __ATTRS_o_ai int
5100 vec_any_le(vector signed long long __a, vector bool long long __b) {
5101   int __cc;
5102   __builtin_s390_vchgs(__a, (vector signed long long)__b, &__cc);
5103   return __cc != 0;
5104 }
5105
5106 // This prototype is deprecated.
5107 static inline __ATTRS_o_ai int
5108 vec_any_le(vector bool long long __a, vector signed long long __b) {
5109   int __cc;
5110   __builtin_s390_vchgs((vector signed long long)__a, __b, &__cc);
5111   return __cc != 0;
5112 }
5113
5114 static inline __ATTRS_o_ai int
5115 vec_any_le(vector unsigned long long __a, vector unsigned long long __b) {
5116   int __cc;
5117   __builtin_s390_vchlgs(__a, __b, &__cc);
5118   return __cc != 0;
5119 }
5120
5121 // This prototype is deprecated.
5122 static inline __ATTRS_o_ai int
5123 vec_any_le(vector unsigned long long __a, vector bool long long __b) {
5124   int __cc;
5125   __builtin_s390_vchlgs(__a, (vector unsigned long long)__b, &__cc);
5126   return __cc != 0;
5127 }
5128
5129 // This prototype is deprecated.
5130 static inline __ATTRS_o_ai int
5131 vec_any_le(vector bool long long __a, vector unsigned long long __b) {
5132   int __cc;
5133   __builtin_s390_vchlgs((vector unsigned long long)__a, __b, &__cc);
5134   return __cc != 0;
5135 }
5136
5137 // This prototype is deprecated.
5138 static inline __ATTRS_o_ai int
5139 vec_any_le(vector bool long long __a, vector bool long long __b) {
5140   int __cc;
5141   __builtin_s390_vchlgs((vector unsigned long long)__a,
5142                         (vector unsigned long long)__b, &__cc);
5143   return __cc != 0;
5144 }
5145
5146 #if __ARCH__ >= 12
5147 static inline __ATTRS_o_ai int
5148 vec_any_le(vector float __a, vector float __b) {
5149   int __cc;
5150   __builtin_s390_vfchesbs(__b, __a, &__cc);
5151   return __cc <= 1;
5152 }
5153 #endif
5154
5155 static inline __ATTRS_o_ai int
5156 vec_any_le(vector double __a, vector double __b) {
5157   int __cc;
5158   __builtin_s390_vfchedbs(__b, __a, &__cc);
5159   return __cc <= 1;
5160 }
5161
5162 /*-- vec_any_lt -------------------------------------------------------------*/
5163
5164 static inline __ATTRS_o_ai int
5165 vec_any_lt(vector signed char __a, vector signed char __b) {
5166   int __cc;
5167   __builtin_s390_vchbs(__b, __a, &__cc);
5168   return __cc <= 1;
5169 }
5170
5171 // This prototype is deprecated.
5172 static inline __ATTRS_o_ai int
5173 vec_any_lt(vector signed char __a, vector bool char __b) {
5174   int __cc;
5175   __builtin_s390_vchbs((vector signed char)__b, __a, &__cc);
5176   return __cc <= 1;
5177 }
5178
5179 // This prototype is deprecated.
5180 static inline __ATTRS_o_ai int
5181 vec_any_lt(vector bool char __a, vector signed char __b) {
5182   int __cc;
5183   __builtin_s390_vchbs(__b, (vector signed char)__a, &__cc);
5184   return __cc <= 1;
5185 }
5186
5187 static inline __ATTRS_o_ai int
5188 vec_any_lt(vector unsigned char __a, vector unsigned char __b) {
5189   int __cc;
5190   __builtin_s390_vchlbs(__b, __a, &__cc);
5191   return __cc <= 1;
5192 }
5193
5194 // This prototype is deprecated.
5195 static inline __ATTRS_o_ai int
5196 vec_any_lt(vector unsigned char __a, vector bool char __b) {
5197   int __cc;
5198   __builtin_s390_vchlbs((vector unsigned char)__b, __a, &__cc);
5199   return __cc <= 1;
5200 }
5201
5202 // This prototype is deprecated.
5203 static inline __ATTRS_o_ai int
5204 vec_any_lt(vector bool char __a, vector unsigned char __b) {
5205   int __cc;
5206   __builtin_s390_vchlbs(__b, (vector unsigned char)__a, &__cc);
5207   return __cc <= 1;
5208 }
5209
5210 // This prototype is deprecated.
5211 static inline __ATTRS_o_ai int
5212 vec_any_lt(vector bool char __a, vector bool char __b) {
5213   int __cc;
5214   __builtin_s390_vchlbs((vector unsigned char)__b,
5215                         (vector unsigned char)__a, &__cc);
5216   return __cc <= 1;
5217 }
5218
5219 static inline __ATTRS_o_ai int
5220 vec_any_lt(vector signed short __a, vector signed short __b) {
5221   int __cc;
5222   __builtin_s390_vchhs(__b, __a, &__cc);
5223   return __cc <= 1;
5224 }
5225
5226 // This prototype is deprecated.
5227 static inline __ATTRS_o_ai int
5228 vec_any_lt(vector signed short __a, vector bool short __b) {
5229   int __cc;
5230   __builtin_s390_vchhs((vector signed short)__b, __a, &__cc);
5231   return __cc <= 1;
5232 }
5233
5234 // This prototype is deprecated.
5235 static inline __ATTRS_o_ai int
5236 vec_any_lt(vector bool short __a, vector signed short __b) {
5237   int __cc;
5238   __builtin_s390_vchhs(__b, (vector signed short)__a, &__cc);
5239   return __cc <= 1;
5240 }
5241
5242 static inline __ATTRS_o_ai int
5243 vec_any_lt(vector unsigned short __a, vector unsigned short __b) {
5244   int __cc;
5245   __builtin_s390_vchlhs(__b, __a, &__cc);
5246   return __cc <= 1;
5247 }
5248
5249 // This prototype is deprecated.
5250 static inline __ATTRS_o_ai int
5251 vec_any_lt(vector unsigned short __a, vector bool short __b) {
5252   int __cc;
5253   __builtin_s390_vchlhs((vector unsigned short)__b, __a, &__cc);
5254   return __cc <= 1;
5255 }
5256
5257 // This prototype is deprecated.
5258 static inline __ATTRS_o_ai int
5259 vec_any_lt(vector bool short __a, vector unsigned short __b) {
5260   int __cc;
5261   __builtin_s390_vchlhs(__b, (vector unsigned short)__a, &__cc);
5262   return __cc <= 1;
5263 }
5264
5265 // This prototype is deprecated.
5266 static inline __ATTRS_o_ai int
5267 vec_any_lt(vector bool short __a, vector bool short __b) {
5268   int __cc;
5269   __builtin_s390_vchlhs((vector unsigned short)__b,
5270                         (vector unsigned short)__a, &__cc);
5271   return __cc <= 1;
5272 }
5273
5274 static inline __ATTRS_o_ai int
5275 vec_any_lt(vector signed int __a, vector signed int __b) {
5276   int __cc;
5277   __builtin_s390_vchfs(__b, __a, &__cc);
5278   return __cc <= 1;
5279 }
5280
5281 // This prototype is deprecated.
5282 static inline __ATTRS_o_ai int
5283 vec_any_lt(vector signed int __a, vector bool int __b) {
5284   int __cc;
5285   __builtin_s390_vchfs((vector signed int)__b, __a, &__cc);
5286   return __cc <= 1;
5287 }
5288
5289 // This prototype is deprecated.
5290 static inline __ATTRS_o_ai int
5291 vec_any_lt(vector bool int __a, vector signed int __b) {
5292   int __cc;
5293   __builtin_s390_vchfs(__b, (vector signed int)__a, &__cc);
5294   return __cc <= 1;
5295 }
5296
5297 static inline __ATTRS_o_ai int
5298 vec_any_lt(vector unsigned int __a, vector unsigned int __b) {
5299   int __cc;
5300   __builtin_s390_vchlfs(__b, __a, &__cc);
5301   return __cc <= 1;
5302 }
5303
5304 // This prototype is deprecated.
5305 static inline __ATTRS_o_ai int
5306 vec_any_lt(vector unsigned int __a, vector bool int __b) {
5307   int __cc;
5308   __builtin_s390_vchlfs((vector unsigned int)__b, __a, &__cc);
5309   return __cc <= 1;
5310 }
5311
5312 // This prototype is deprecated.
5313 static inline __ATTRS_o_ai int
5314 vec_any_lt(vector bool int __a, vector unsigned int __b) {
5315   int __cc;
5316   __builtin_s390_vchlfs(__b, (vector unsigned int)__a, &__cc);
5317   return __cc <= 1;
5318 }
5319
5320 // This prototype is deprecated.
5321 static inline __ATTRS_o_ai int
5322 vec_any_lt(vector bool int __a, vector bool int __b) {
5323   int __cc;
5324   __builtin_s390_vchlfs((vector unsigned int)__b,
5325                         (vector unsigned int)__a, &__cc);
5326   return __cc <= 1;
5327 }
5328
5329 static inline __ATTRS_o_ai int
5330 vec_any_lt(vector signed long long __a, vector signed long long __b) {
5331   int __cc;
5332   __builtin_s390_vchgs(__b, __a, &__cc);
5333   return __cc <= 1;
5334 }
5335
5336 // This prototype is deprecated.
5337 static inline __ATTRS_o_ai int
5338 vec_any_lt(vector signed long long __a, vector bool long long __b) {
5339   int __cc;
5340   __builtin_s390_vchgs((vector signed long long)__b, __a, &__cc);
5341   return __cc <= 1;
5342 }
5343
5344 // This prototype is deprecated.
5345 static inline __ATTRS_o_ai int
5346 vec_any_lt(vector bool long long __a, vector signed long long __b) {
5347   int __cc;
5348   __builtin_s390_vchgs(__b, (vector signed long long)__a, &__cc);
5349   return __cc <= 1;
5350 }
5351
5352 static inline __ATTRS_o_ai int
5353 vec_any_lt(vector unsigned long long __a, vector unsigned long long __b) {
5354   int __cc;
5355   __builtin_s390_vchlgs(__b, __a, &__cc);
5356   return __cc <= 1;
5357 }
5358
5359 // This prototype is deprecated.
5360 static inline __ATTRS_o_ai int
5361 vec_any_lt(vector unsigned long long __a, vector bool long long __b) {
5362   int __cc;
5363   __builtin_s390_vchlgs((vector unsigned long long)__b, __a, &__cc);
5364   return __cc <= 1;
5365 }
5366
5367 // This prototype is deprecated.
5368 static inline __ATTRS_o_ai int
5369 vec_any_lt(vector bool long long __a, vector unsigned long long __b) {
5370   int __cc;
5371   __builtin_s390_vchlgs(__b, (vector unsigned long long)__a, &__cc);
5372   return __cc <= 1;
5373 }
5374
5375 // This prototype is deprecated.
5376 static inline __ATTRS_o_ai int
5377 vec_any_lt(vector bool long long __a, vector bool long long __b) {
5378   int __cc;
5379   __builtin_s390_vchlgs((vector unsigned long long)__b,
5380                         (vector unsigned long long)__a, &__cc);
5381   return __cc <= 1;
5382 }
5383
5384 #if __ARCH__ >= 12
5385 static inline __ATTRS_o_ai int
5386 vec_any_lt(vector float __a, vector float __b) {
5387   int __cc;
5388   __builtin_s390_vfchsbs(__b, __a, &__cc);
5389   return __cc <= 1;
5390 }
5391 #endif
5392
5393 static inline __ATTRS_o_ai int
5394 vec_any_lt(vector double __a, vector double __b) {
5395   int __cc;
5396   __builtin_s390_vfchdbs(__b, __a, &__cc);
5397   return __cc <= 1;
5398 }
5399
5400 /*-- vec_any_nge ------------------------------------------------------------*/
5401
5402 #if __ARCH__ >= 12
5403 static inline __ATTRS_o_ai int
5404 vec_any_nge(vector float __a, vector float __b) {
5405   int __cc;
5406   __builtin_s390_vfchesbs(__a, __b, &__cc);
5407   return __cc != 0;
5408 }
5409 #endif
5410
5411 static inline __ATTRS_o_ai int
5412 vec_any_nge(vector double __a, vector double __b) {
5413   int __cc;
5414   __builtin_s390_vfchedbs(__a, __b, &__cc);
5415   return __cc != 0;
5416 }
5417
5418 /*-- vec_any_ngt ------------------------------------------------------------*/
5419
5420 #if __ARCH__ >= 12
5421 static inline __ATTRS_o_ai int
5422 vec_any_ngt(vector float __a, vector float __b) {
5423   int __cc;
5424   __builtin_s390_vfchsbs(__a, __b, &__cc);
5425   return __cc != 0;
5426 }
5427 #endif
5428
5429 static inline __ATTRS_o_ai int
5430 vec_any_ngt(vector double __a, vector double __b) {
5431   int __cc;
5432   __builtin_s390_vfchdbs(__a, __b, &__cc);
5433   return __cc != 0;
5434 }
5435
5436 /*-- vec_any_nle ------------------------------------------------------------*/
5437
5438 #if __ARCH__ >= 12
5439 static inline __ATTRS_o_ai int
5440 vec_any_nle(vector float __a, vector float __b) {
5441   int __cc;
5442   __builtin_s390_vfchesbs(__b, __a, &__cc);
5443   return __cc != 0;
5444 }
5445 #endif
5446
5447 static inline __ATTRS_o_ai int
5448 vec_any_nle(vector double __a, vector double __b) {
5449   int __cc;
5450   __builtin_s390_vfchedbs(__b, __a, &__cc);
5451   return __cc != 0;
5452 }
5453
5454 /*-- vec_any_nlt ------------------------------------------------------------*/
5455
5456 #if __ARCH__ >= 12
5457 static inline __ATTRS_o_ai int
5458 vec_any_nlt(vector float __a, vector float __b) {
5459   int __cc;
5460   __builtin_s390_vfchsbs(__b, __a, &__cc);
5461   return __cc != 0;
5462 }
5463 #endif
5464
5465 static inline __ATTRS_o_ai int
5466 vec_any_nlt(vector double __a, vector double __b) {
5467   int __cc;
5468   __builtin_s390_vfchdbs(__b, __a, &__cc);
5469   return __cc != 0;
5470 }
5471
5472 /*-- vec_any_nan ------------------------------------------------------------*/
5473
5474 #if __ARCH__ >= 12
5475 static inline __ATTRS_o_ai int
5476 vec_any_nan(vector float __a) {
5477   int __cc;
5478   __builtin_s390_vftcisb(__a, 15, &__cc);
5479   return __cc != 3;
5480 }
5481 #endif
5482
5483 static inline __ATTRS_o_ai int
5484 vec_any_nan(vector double __a) {
5485   int __cc;
5486   __builtin_s390_vftcidb(__a, 15, &__cc);
5487   return __cc != 3;
5488 }
5489
5490 /*-- vec_any_numeric --------------------------------------------------------*/
5491
5492 #if __ARCH__ >= 12
5493 static inline __ATTRS_o_ai int
5494 vec_any_numeric(vector float __a) {
5495   int __cc;
5496   __builtin_s390_vftcisb(__a, 15, &__cc);
5497   return __cc != 0;
5498 }
5499 #endif
5500
5501 static inline __ATTRS_o_ai int
5502 vec_any_numeric(vector double __a) {
5503   int __cc;
5504   __builtin_s390_vftcidb(__a, 15, &__cc);
5505   return __cc != 0;
5506 }
5507
5508 /*-- vec_andc ---------------------------------------------------------------*/
5509
5510 static inline __ATTRS_o_ai vector bool char
5511 vec_andc(vector bool char __a, vector bool char __b) {
5512   return __a & ~__b;
5513 }
5514
5515 static inline __ATTRS_o_ai vector signed char
5516 vec_andc(vector signed char __a, vector signed char __b) {
5517   return __a & ~__b;
5518 }
5519
5520 // This prototype is deprecated.
5521 static inline __ATTRS_o_ai vector signed char
5522 vec_andc(vector bool char __a, vector signed char __b) {
5523   return __a & ~__b;
5524 }
5525
5526 // This prototype is deprecated.
5527 static inline __ATTRS_o_ai vector signed char
5528 vec_andc(vector signed char __a, vector bool char __b) {
5529   return __a & ~__b;
5530 }
5531
5532 static inline __ATTRS_o_ai vector unsigned char
5533 vec_andc(vector unsigned char __a, vector unsigned char __b) {
5534   return __a & ~__b;
5535 }
5536
5537 // This prototype is deprecated.
5538 static inline __ATTRS_o_ai vector unsigned char
5539 vec_andc(vector bool char __a, vector unsigned char __b) {
5540   return __a & ~__b;
5541 }
5542
5543 // This prototype is deprecated.
5544 static inline __ATTRS_o_ai vector unsigned char
5545 vec_andc(vector unsigned char __a, vector bool char __b) {
5546   return __a & ~__b;
5547 }
5548
5549 static inline __ATTRS_o_ai vector bool short
5550 vec_andc(vector bool short __a, vector bool short __b) {
5551   return __a & ~__b;
5552 }
5553
5554 static inline __ATTRS_o_ai vector signed short
5555 vec_andc(vector signed short __a, vector signed short __b) {
5556   return __a & ~__b;
5557 }
5558
5559 // This prototype is deprecated.
5560 static inline __ATTRS_o_ai vector signed short
5561 vec_andc(vector bool short __a, vector signed short __b) {
5562   return __a & ~__b;
5563 }
5564
5565 // This prototype is deprecated.
5566 static inline __ATTRS_o_ai vector signed short
5567 vec_andc(vector signed short __a, vector bool short __b) {
5568   return __a & ~__b;
5569 }
5570
5571 static inline __ATTRS_o_ai vector unsigned short
5572 vec_andc(vector unsigned short __a, vector unsigned short __b) {
5573   return __a & ~__b;
5574 }
5575
5576 // This prototype is deprecated.
5577 static inline __ATTRS_o_ai vector unsigned short
5578 vec_andc(vector bool short __a, vector unsigned short __b) {
5579   return __a & ~__b;
5580 }
5581
5582 // This prototype is deprecated.
5583 static inline __ATTRS_o_ai vector unsigned short
5584 vec_andc(vector unsigned short __a, vector bool short __b) {
5585   return __a & ~__b;
5586 }
5587
5588 static inline __ATTRS_o_ai vector bool int
5589 vec_andc(vector bool int __a, vector bool int __b) {
5590   return __a & ~__b;
5591 }
5592
5593 static inline __ATTRS_o_ai vector signed int
5594 vec_andc(vector signed int __a, vector signed int __b) {
5595   return __a & ~__b;
5596 }
5597
5598 // This prototype is deprecated.
5599 static inline __ATTRS_o_ai vector signed int
5600 vec_andc(vector bool int __a, vector signed int __b) {
5601   return __a & ~__b;
5602 }
5603
5604 // This prototype is deprecated.
5605 static inline __ATTRS_o_ai vector signed int
5606 vec_andc(vector signed int __a, vector bool int __b) {
5607   return __a & ~__b;
5608 }
5609
5610 static inline __ATTRS_o_ai vector unsigned int
5611 vec_andc(vector unsigned int __a, vector unsigned int __b) {
5612   return __a & ~__b;
5613 }
5614
5615 // This prototype is deprecated.
5616 static inline __ATTRS_o_ai vector unsigned int
5617 vec_andc(vector bool int __a, vector unsigned int __b) {
5618   return __a & ~__b;
5619 }
5620
5621 // This prototype is deprecated.
5622 static inline __ATTRS_o_ai vector unsigned int
5623 vec_andc(vector unsigned int __a, vector bool int __b) {
5624   return __a & ~__b;
5625 }
5626
5627 static inline __ATTRS_o_ai vector bool long long
5628 vec_andc(vector bool long long __a, vector bool long long __b) {
5629   return __a & ~__b;
5630 }
5631
5632 static inline __ATTRS_o_ai vector signed long long
5633 vec_andc(vector signed long long __a, vector signed long long __b) {
5634   return __a & ~__b;
5635 }
5636
5637 // This prototype is deprecated.
5638 static inline __ATTRS_o_ai vector signed long long
5639 vec_andc(vector bool long long __a, vector signed long long __b) {
5640   return __a & ~__b;
5641 }
5642
5643 // This prototype is deprecated.
5644 static inline __ATTRS_o_ai vector signed long long
5645 vec_andc(vector signed long long __a, vector bool long long __b) {
5646   return __a & ~__b;
5647 }
5648
5649 static inline __ATTRS_o_ai vector unsigned long long
5650 vec_andc(vector unsigned long long __a, vector unsigned long long __b) {
5651   return __a & ~__b;
5652 }
5653
5654 // This prototype is deprecated.
5655 static inline __ATTRS_o_ai vector unsigned long long
5656 vec_andc(vector bool long long __a, vector unsigned long long __b) {
5657   return __a & ~__b;
5658 }
5659
5660 // This prototype is deprecated.
5661 static inline __ATTRS_o_ai vector unsigned long long
5662 vec_andc(vector unsigned long long __a, vector bool long long __b) {
5663   return __a & ~__b;
5664 }
5665
5666 #if __ARCH__ >= 12
5667 static inline __ATTRS_o_ai vector float
5668 vec_andc(vector float __a, vector float __b) {
5669   return (vector float)((vector unsigned int)__a &
5670                          ~(vector unsigned int)__b);
5671 }
5672 #endif
5673
5674 static inline __ATTRS_o_ai vector double
5675 vec_andc(vector double __a, vector double __b) {
5676   return (vector double)((vector unsigned long long)__a &
5677                          ~(vector unsigned long long)__b);
5678 }
5679
5680 // This prototype is deprecated.
5681 static inline __ATTRS_o_ai vector double
5682 vec_andc(vector bool long long __a, vector double __b) {
5683   return (vector double)((vector unsigned long long)__a &
5684                          ~(vector unsigned long long)__b);
5685 }
5686
5687 // This prototype is deprecated.
5688 static inline __ATTRS_o_ai vector double
5689 vec_andc(vector double __a, vector bool long long __b) {
5690   return (vector double)((vector unsigned long long)__a &
5691                          ~(vector unsigned long long)__b);
5692 }
5693
5694 /*-- vec_nor ----------------------------------------------------------------*/
5695
5696 static inline __ATTRS_o_ai vector bool char
5697 vec_nor(vector bool char __a, vector bool char __b) {
5698   return ~(__a | __b);
5699 }
5700
5701 static inline __ATTRS_o_ai vector signed char
5702 vec_nor(vector signed char __a, vector signed char __b) {
5703   return ~(__a | __b);
5704 }
5705
5706 // This prototype is deprecated.
5707 static inline __ATTRS_o_ai vector signed char
5708 vec_nor(vector bool char __a, vector signed char __b) {
5709   return ~(__a | __b);
5710 }
5711
5712 // This prototype is deprecated.
5713 static inline __ATTRS_o_ai vector signed char
5714 vec_nor(vector signed char __a, vector bool char __b) {
5715   return ~(__a | __b);
5716 }
5717
5718 static inline __ATTRS_o_ai vector unsigned char
5719 vec_nor(vector unsigned char __a, vector unsigned char __b) {
5720   return ~(__a | __b);
5721 }
5722
5723 // This prototype is deprecated.
5724 static inline __ATTRS_o_ai vector unsigned char
5725 vec_nor(vector bool char __a, vector unsigned char __b) {
5726   return ~(__a | __b);
5727 }
5728
5729 // This prototype is deprecated.
5730 static inline __ATTRS_o_ai vector unsigned char
5731 vec_nor(vector unsigned char __a, vector bool char __b) {
5732   return ~(__a | __b);
5733 }
5734
5735 static inline __ATTRS_o_ai vector bool short
5736 vec_nor(vector bool short __a, vector bool short __b) {
5737   return ~(__a | __b);
5738 }
5739
5740 static inline __ATTRS_o_ai vector signed short
5741 vec_nor(vector signed short __a, vector signed short __b) {
5742   return ~(__a | __b);
5743 }
5744
5745 // This prototype is deprecated.
5746 static inline __ATTRS_o_ai vector signed short
5747 vec_nor(vector bool short __a, vector signed short __b) {
5748   return ~(__a | __b);
5749 }
5750
5751 // This prototype is deprecated.
5752 static inline __ATTRS_o_ai vector signed short
5753 vec_nor(vector signed short __a, vector bool short __b) {
5754   return ~(__a | __b);
5755 }
5756
5757 static inline __ATTRS_o_ai vector unsigned short
5758 vec_nor(vector unsigned short __a, vector unsigned short __b) {
5759   return ~(__a | __b);
5760 }
5761
5762 // This prototype is deprecated.
5763 static inline __ATTRS_o_ai vector unsigned short
5764 vec_nor(vector bool short __a, vector unsigned short __b) {
5765   return ~(__a | __b);
5766 }
5767
5768 // This prototype is deprecated.
5769 static inline __ATTRS_o_ai vector unsigned short
5770 vec_nor(vector unsigned short __a, vector bool short __b) {
5771   return ~(__a | __b);
5772 }
5773
5774 static inline __ATTRS_o_ai vector bool int
5775 vec_nor(vector bool int __a, vector bool int __b) {
5776   return ~(__a | __b);
5777 }
5778
5779 static inline __ATTRS_o_ai vector signed int
5780 vec_nor(vector signed int __a, vector signed int __b) {
5781   return ~(__a | __b);
5782 }
5783
5784 // This prototype is deprecated.
5785 static inline __ATTRS_o_ai vector signed int
5786 vec_nor(vector bool int __a, vector signed int __b) {
5787   return ~(__a | __b);
5788 }
5789
5790 // This prototype is deprecated.
5791 static inline __ATTRS_o_ai vector signed int
5792 vec_nor(vector signed int __a, vector bool int __b) {
5793   return ~(__a | __b);
5794 }
5795
5796 static inline __ATTRS_o_ai vector unsigned int
5797 vec_nor(vector unsigned int __a, vector unsigned int __b) {
5798   return ~(__a | __b);
5799 }
5800
5801 // This prototype is deprecated.
5802 static inline __ATTRS_o_ai vector unsigned int
5803 vec_nor(vector bool int __a, vector unsigned int __b) {
5804   return ~(__a | __b);
5805 }
5806
5807 // This prototype is deprecated.
5808 static inline __ATTRS_o_ai vector unsigned int
5809 vec_nor(vector unsigned int __a, vector bool int __b) {
5810   return ~(__a | __b);
5811 }
5812
5813 static inline __ATTRS_o_ai vector bool long long
5814 vec_nor(vector bool long long __a, vector bool long long __b) {
5815   return ~(__a | __b);
5816 }
5817
5818 static inline __ATTRS_o_ai vector signed long long
5819 vec_nor(vector signed long long __a, vector signed long long __b) {
5820   return ~(__a | __b);
5821 }
5822
5823 // This prototype is deprecated.
5824 static inline __ATTRS_o_ai vector signed long long
5825 vec_nor(vector bool long long __a, vector signed long long __b) {
5826   return ~(__a | __b);
5827 }
5828
5829 // This prototype is deprecated.
5830 static inline __ATTRS_o_ai vector signed long long
5831 vec_nor(vector signed long long __a, vector bool long long __b) {
5832   return ~(__a | __b);
5833 }
5834
5835 static inline __ATTRS_o_ai vector unsigned long long
5836 vec_nor(vector unsigned long long __a, vector unsigned long long __b) {
5837   return ~(__a | __b);
5838 }
5839
5840 // This prototype is deprecated.
5841 static inline __ATTRS_o_ai vector unsigned long long
5842 vec_nor(vector bool long long __a, vector unsigned long long __b) {
5843   return ~(__a | __b);
5844 }
5845
5846 // This prototype is deprecated.
5847 static inline __ATTRS_o_ai vector unsigned long long
5848 vec_nor(vector unsigned long long __a, vector bool long long __b) {
5849   return ~(__a | __b);
5850 }
5851
5852 #if __ARCH__ >= 12
5853 static inline __ATTRS_o_ai vector float
5854 vec_nor(vector float __a, vector float __b) {
5855   return (vector float)~((vector unsigned int)__a |
5856                          (vector unsigned int)__b);
5857 }
5858 #endif
5859
5860 static inline __ATTRS_o_ai vector double
5861 vec_nor(vector double __a, vector double __b) {
5862   return (vector double)~((vector unsigned long long)__a |
5863                           (vector unsigned long long)__b);
5864 }
5865
5866 // This prototype is deprecated.
5867 static inline __ATTRS_o_ai vector double
5868 vec_nor(vector bool long long __a, vector double __b) {
5869   return (vector double)~((vector unsigned long long)__a |
5870                           (vector unsigned long long)__b);
5871 }
5872
5873 // This prototype is deprecated.
5874 static inline __ATTRS_o_ai vector double
5875 vec_nor(vector double __a, vector bool long long __b) {
5876   return (vector double)~((vector unsigned long long)__a |
5877                           (vector unsigned long long)__b);
5878 }
5879
5880 /*-- vec_orc ----------------------------------------------------------------*/
5881
5882 #if __ARCH__ >= 12
5883 static inline __ATTRS_o_ai vector bool char
5884 vec_orc(vector bool char __a, vector bool char __b) {
5885   return __a | ~__b;
5886 }
5887
5888 static inline __ATTRS_o_ai vector signed char
5889 vec_orc(vector signed char __a, vector signed char __b) {
5890   return __a | ~__b;
5891 }
5892
5893 static inline __ATTRS_o_ai vector unsigned char
5894 vec_orc(vector unsigned char __a, vector unsigned char __b) {
5895   return __a | ~__b;
5896 }
5897
5898 static inline __ATTRS_o_ai vector bool short
5899 vec_orc(vector bool short __a, vector bool short __b) {
5900   return __a | ~__b;
5901 }
5902
5903 static inline __ATTRS_o_ai vector signed short
5904 vec_orc(vector signed short __a, vector signed short __b) {
5905   return __a | ~__b;
5906 }
5907
5908 static inline __ATTRS_o_ai vector unsigned short
5909 vec_orc(vector unsigned short __a, vector unsigned short __b) {
5910   return __a | ~__b;
5911 }
5912
5913 static inline __ATTRS_o_ai vector bool int
5914 vec_orc(vector bool int __a, vector bool int __b) {
5915   return __a | ~__b;
5916 }
5917
5918 static inline __ATTRS_o_ai vector signed int
5919 vec_orc(vector signed int __a, vector signed int __b) {
5920   return __a | ~__b;
5921 }
5922
5923 static inline __ATTRS_o_ai vector unsigned int
5924 vec_orc(vector unsigned int __a, vector unsigned int __b) {
5925   return __a | ~__b;
5926 }
5927
5928 static inline __ATTRS_o_ai vector bool long long
5929 vec_orc(vector bool long long __a, vector bool long long __b) {
5930   return __a | ~__b;
5931 }
5932
5933 static inline __ATTRS_o_ai vector signed long long
5934 vec_orc(vector signed long long __a, vector signed long long __b) {
5935   return __a | ~__b;
5936 }
5937
5938 static inline __ATTRS_o_ai vector unsigned long long
5939 vec_orc(vector unsigned long long __a, vector unsigned long long __b) {
5940   return __a | ~__b;
5941 }
5942
5943 static inline __ATTRS_o_ai vector float
5944 vec_orc(vector float __a, vector float __b) {
5945   return (vector float)((vector unsigned int)__a |
5946                         ~(vector unsigned int)__b);
5947 }
5948
5949 static inline __ATTRS_o_ai vector double
5950 vec_orc(vector double __a, vector double __b) {
5951   return (vector double)((vector unsigned long long)__a |
5952                          ~(vector unsigned long long)__b);
5953 }
5954 #endif
5955
5956 /*-- vec_nand ---------------------------------------------------------------*/
5957
5958 #if __ARCH__ >= 12
5959 static inline __ATTRS_o_ai vector bool char
5960 vec_nand(vector bool char __a, vector bool char __b) {
5961   return ~(__a & __b);
5962 }
5963
5964 static inline __ATTRS_o_ai vector signed char
5965 vec_nand(vector signed char __a, vector signed char __b) {
5966   return ~(__a & __b);
5967 }
5968
5969 static inline __ATTRS_o_ai vector unsigned char
5970 vec_nand(vector unsigned char __a, vector unsigned char __b) {
5971   return ~(__a & __b);
5972 }
5973
5974 static inline __ATTRS_o_ai vector bool short
5975 vec_nand(vector bool short __a, vector bool short __b) {
5976   return ~(__a & __b);
5977 }
5978
5979 static inline __ATTRS_o_ai vector signed short
5980 vec_nand(vector signed short __a, vector signed short __b) {
5981   return ~(__a & __b);
5982 }
5983
5984 static inline __ATTRS_o_ai vector unsigned short
5985 vec_nand(vector unsigned short __a, vector unsigned short __b) {
5986   return ~(__a & __b);
5987 }
5988
5989 static inline __ATTRS_o_ai vector bool int
5990 vec_nand(vector bool int __a, vector bool int __b) {
5991   return ~(__a & __b);
5992 }
5993
5994 static inline __ATTRS_o_ai vector signed int
5995 vec_nand(vector signed int __a, vector signed int __b) {
5996   return ~(__a & __b);
5997 }
5998
5999 static inline __ATTRS_o_ai vector unsigned int
6000 vec_nand(vector unsigned int __a, vector unsigned int __b) {
6001   return ~(__a & __b);
6002 }
6003
6004 static inline __ATTRS_o_ai vector bool long long
6005 vec_nand(vector bool long long __a, vector bool long long __b) {
6006   return ~(__a & __b);
6007 }
6008
6009 static inline __ATTRS_o_ai vector signed long long
6010 vec_nand(vector signed long long __a, vector signed long long __b) {
6011   return ~(__a & __b);
6012 }
6013
6014 static inline __ATTRS_o_ai vector unsigned long long
6015 vec_nand(vector unsigned long long __a, vector unsigned long long __b) {
6016   return ~(__a & __b);
6017 }
6018
6019 static inline __ATTRS_o_ai vector float
6020 vec_nand(vector float __a, vector float __b) {
6021   return (vector float)~((vector unsigned int)__a &
6022                          (vector unsigned int)__b);
6023 }
6024
6025 static inline __ATTRS_o_ai vector double
6026 vec_nand(vector double __a, vector double __b) {
6027   return (vector double)~((vector unsigned long long)__a &
6028                           (vector unsigned long long)__b);
6029 }
6030 #endif
6031
6032 /*-- vec_eqv ----------------------------------------------------------------*/
6033
6034 #if __ARCH__ >= 12
6035 static inline __ATTRS_o_ai vector bool char
6036 vec_eqv(vector bool char __a, vector bool char __b) {
6037   return ~(__a ^ __b);
6038 }
6039
6040 static inline __ATTRS_o_ai vector signed char
6041 vec_eqv(vector signed char __a, vector signed char __b) {
6042   return ~(__a ^ __b);
6043 }
6044
6045 static inline __ATTRS_o_ai vector unsigned char
6046 vec_eqv(vector unsigned char __a, vector unsigned char __b) {
6047   return ~(__a ^ __b);
6048 }
6049
6050 static inline __ATTRS_o_ai vector bool short
6051 vec_eqv(vector bool short __a, vector bool short __b) {
6052   return ~(__a ^ __b);
6053 }
6054
6055 static inline __ATTRS_o_ai vector signed short
6056 vec_eqv(vector signed short __a, vector signed short __b) {
6057   return ~(__a ^ __b);
6058 }
6059
6060 static inline __ATTRS_o_ai vector unsigned short
6061 vec_eqv(vector unsigned short __a, vector unsigned short __b) {
6062   return ~(__a ^ __b);
6063 }
6064
6065 static inline __ATTRS_o_ai vector bool int
6066 vec_eqv(vector bool int __a, vector bool int __b) {
6067   return ~(__a ^ __b);
6068 }
6069
6070 static inline __ATTRS_o_ai vector signed int
6071 vec_eqv(vector signed int __a, vector signed int __b) {
6072   return ~(__a ^ __b);
6073 }
6074
6075 static inline __ATTRS_o_ai vector unsigned int
6076 vec_eqv(vector unsigned int __a, vector unsigned int __b) {
6077   return ~(__a ^ __b);
6078 }
6079
6080 static inline __ATTRS_o_ai vector bool long long
6081 vec_eqv(vector bool long long __a, vector bool long long __b) {
6082   return ~(__a ^ __b);
6083 }
6084
6085 static inline __ATTRS_o_ai vector signed long long
6086 vec_eqv(vector signed long long __a, vector signed long long __b) {
6087   return ~(__a ^ __b);
6088 }
6089
6090 static inline __ATTRS_o_ai vector unsigned long long
6091 vec_eqv(vector unsigned long long __a, vector unsigned long long __b) {
6092   return ~(__a ^ __b);
6093 }
6094
6095 static inline __ATTRS_o_ai vector float
6096 vec_eqv(vector float __a, vector float __b) {
6097   return (vector float)~((vector unsigned int)__a ^
6098                          (vector unsigned int)__b);
6099 }
6100
6101 static inline __ATTRS_o_ai vector double
6102 vec_eqv(vector double __a, vector double __b) {
6103   return (vector double)~((vector unsigned long long)__a ^
6104                           (vector unsigned long long)__b);
6105 }
6106 #endif
6107
6108 /*-- vec_cntlz --------------------------------------------------------------*/
6109
6110 static inline __ATTRS_o_ai vector unsigned char
6111 vec_cntlz(vector signed char __a) {
6112   return __builtin_s390_vclzb((vector unsigned char)__a);
6113 }
6114
6115 static inline __ATTRS_o_ai vector unsigned char
6116 vec_cntlz(vector unsigned char __a) {
6117   return __builtin_s390_vclzb(__a);
6118 }
6119
6120 static inline __ATTRS_o_ai vector unsigned short
6121 vec_cntlz(vector signed short __a) {
6122   return __builtin_s390_vclzh((vector unsigned short)__a);
6123 }
6124
6125 static inline __ATTRS_o_ai vector unsigned short
6126 vec_cntlz(vector unsigned short __a) {
6127   return __builtin_s390_vclzh(__a);
6128 }
6129
6130 static inline __ATTRS_o_ai vector unsigned int
6131 vec_cntlz(vector signed int __a) {
6132   return __builtin_s390_vclzf((vector unsigned int)__a);
6133 }
6134
6135 static inline __ATTRS_o_ai vector unsigned int
6136 vec_cntlz(vector unsigned int __a) {
6137   return __builtin_s390_vclzf(__a);
6138 }
6139
6140 static inline __ATTRS_o_ai vector unsigned long long
6141 vec_cntlz(vector signed long long __a) {
6142   return __builtin_s390_vclzg((vector unsigned long long)__a);
6143 }
6144
6145 static inline __ATTRS_o_ai vector unsigned long long
6146 vec_cntlz(vector unsigned long long __a) {
6147   return __builtin_s390_vclzg(__a);
6148 }
6149
6150 /*-- vec_cnttz --------------------------------------------------------------*/
6151
6152 static inline __ATTRS_o_ai vector unsigned char
6153 vec_cnttz(vector signed char __a) {
6154   return __builtin_s390_vctzb((vector unsigned char)__a);
6155 }
6156
6157 static inline __ATTRS_o_ai vector unsigned char
6158 vec_cnttz(vector unsigned char __a) {
6159   return __builtin_s390_vctzb(__a);
6160 }
6161
6162 static inline __ATTRS_o_ai vector unsigned short
6163 vec_cnttz(vector signed short __a) {
6164   return __builtin_s390_vctzh((vector unsigned short)__a);
6165 }
6166
6167 static inline __ATTRS_o_ai vector unsigned short
6168 vec_cnttz(vector unsigned short __a) {
6169   return __builtin_s390_vctzh(__a);
6170 }
6171
6172 static inline __ATTRS_o_ai vector unsigned int
6173 vec_cnttz(vector signed int __a) {
6174   return __builtin_s390_vctzf((vector unsigned int)__a);
6175 }
6176
6177 static inline __ATTRS_o_ai vector unsigned int
6178 vec_cnttz(vector unsigned int __a) {
6179   return __builtin_s390_vctzf(__a);
6180 }
6181
6182 static inline __ATTRS_o_ai vector unsigned long long
6183 vec_cnttz(vector signed long long __a) {
6184   return __builtin_s390_vctzg((vector unsigned long long)__a);
6185 }
6186
6187 static inline __ATTRS_o_ai vector unsigned long long
6188 vec_cnttz(vector unsigned long long __a) {
6189   return __builtin_s390_vctzg(__a);
6190 }
6191
6192 /*-- vec_popcnt -------------------------------------------------------------*/
6193
6194 static inline __ATTRS_o_ai vector unsigned char
6195 vec_popcnt(vector signed char __a) {
6196   return __builtin_s390_vpopctb((vector unsigned char)__a);
6197 }
6198
6199 static inline __ATTRS_o_ai vector unsigned char
6200 vec_popcnt(vector unsigned char __a) {
6201   return __builtin_s390_vpopctb(__a);
6202 }
6203
6204 static inline __ATTRS_o_ai vector unsigned short
6205 vec_popcnt(vector signed short __a) {
6206   return __builtin_s390_vpopcth((vector unsigned short)__a);
6207 }
6208
6209 static inline __ATTRS_o_ai vector unsigned short
6210 vec_popcnt(vector unsigned short __a) {
6211   return __builtin_s390_vpopcth(__a);
6212 }
6213
6214 static inline __ATTRS_o_ai vector unsigned int
6215 vec_popcnt(vector signed int __a) {
6216   return __builtin_s390_vpopctf((vector unsigned int)__a);
6217 }
6218
6219 static inline __ATTRS_o_ai vector unsigned int
6220 vec_popcnt(vector unsigned int __a) {
6221   return __builtin_s390_vpopctf(__a);
6222 }
6223
6224 static inline __ATTRS_o_ai vector unsigned long long
6225 vec_popcnt(vector signed long long __a) {
6226   return __builtin_s390_vpopctg((vector unsigned long long)__a);
6227 }
6228
6229 static inline __ATTRS_o_ai vector unsigned long long
6230 vec_popcnt(vector unsigned long long __a) {
6231   return __builtin_s390_vpopctg(__a);
6232 }
6233
6234 /*-- vec_rl -----------------------------------------------------------------*/
6235
6236 static inline __ATTRS_o_ai vector signed char
6237 vec_rl(vector signed char __a, vector unsigned char __b) {
6238   return (vector signed char)__builtin_s390_verllvb(
6239     (vector unsigned char)__a, __b);
6240 }
6241
6242 static inline __ATTRS_o_ai vector unsigned char
6243 vec_rl(vector unsigned char __a, vector unsigned char __b) {
6244   return __builtin_s390_verllvb(__a, __b);
6245 }
6246
6247 static inline __ATTRS_o_ai vector signed short
6248 vec_rl(vector signed short __a, vector unsigned short __b) {
6249   return (vector signed short)__builtin_s390_verllvh(
6250     (vector unsigned short)__a, __b);
6251 }
6252
6253 static inline __ATTRS_o_ai vector unsigned short
6254 vec_rl(vector unsigned short __a, vector unsigned short __b) {
6255   return __builtin_s390_verllvh(__a, __b);
6256 }
6257
6258 static inline __ATTRS_o_ai vector signed int
6259 vec_rl(vector signed int __a, vector unsigned int __b) {
6260   return (vector signed int)__builtin_s390_verllvf(
6261     (vector unsigned int)__a, __b);
6262 }
6263
6264 static inline __ATTRS_o_ai vector unsigned int
6265 vec_rl(vector unsigned int __a, vector unsigned int __b) {
6266   return __builtin_s390_verllvf(__a, __b);
6267 }
6268
6269 static inline __ATTRS_o_ai vector signed long long
6270 vec_rl(vector signed long long __a, vector unsigned long long __b) {
6271   return (vector signed long long)__builtin_s390_verllvg(
6272     (vector unsigned long long)__a, __b);
6273 }
6274
6275 static inline __ATTRS_o_ai vector unsigned long long
6276 vec_rl(vector unsigned long long __a, vector unsigned long long __b) {
6277   return __builtin_s390_verllvg(__a, __b);
6278 }
6279
6280 /*-- vec_rli ----------------------------------------------------------------*/
6281
6282 static inline __ATTRS_o_ai vector signed char
6283 vec_rli(vector signed char __a, unsigned long __b) {
6284   return (vector signed char)__builtin_s390_verllb(
6285     (vector unsigned char)__a, (int)__b);
6286 }
6287
6288 static inline __ATTRS_o_ai vector unsigned char
6289 vec_rli(vector unsigned char __a, unsigned long __b) {
6290   return __builtin_s390_verllb(__a, (int)__b);
6291 }
6292
6293 static inline __ATTRS_o_ai vector signed short
6294 vec_rli(vector signed short __a, unsigned long __b) {
6295   return (vector signed short)__builtin_s390_verllh(
6296     (vector unsigned short)__a, (int)__b);
6297 }
6298
6299 static inline __ATTRS_o_ai vector unsigned short
6300 vec_rli(vector unsigned short __a, unsigned long __b) {
6301   return __builtin_s390_verllh(__a, (int)__b);
6302 }
6303
6304 static inline __ATTRS_o_ai vector signed int
6305 vec_rli(vector signed int __a, unsigned long __b) {
6306   return (vector signed int)__builtin_s390_verllf(
6307     (vector unsigned int)__a, (int)__b);
6308 }
6309
6310 static inline __ATTRS_o_ai vector unsigned int
6311 vec_rli(vector unsigned int __a, unsigned long __b) {
6312   return __builtin_s390_verllf(__a, (int)__b);
6313 }
6314
6315 static inline __ATTRS_o_ai vector signed long long
6316 vec_rli(vector signed long long __a, unsigned long __b) {
6317   return (vector signed long long)__builtin_s390_verllg(
6318     (vector unsigned long long)__a, (int)__b);
6319 }
6320
6321 static inline __ATTRS_o_ai vector unsigned long long
6322 vec_rli(vector unsigned long long __a, unsigned long __b) {
6323   return __builtin_s390_verllg(__a, (int)__b);
6324 }
6325
6326 /*-- vec_rl_mask ------------------------------------------------------------*/
6327
6328 extern __ATTRS_o vector signed char
6329 vec_rl_mask(vector signed char __a, vector unsigned char __b,
6330             unsigned char __c) __constant(__c);
6331
6332 extern __ATTRS_o vector unsigned char
6333 vec_rl_mask(vector unsigned char __a, vector unsigned char __b,
6334             unsigned char __c) __constant(__c);
6335
6336 extern __ATTRS_o vector signed short
6337 vec_rl_mask(vector signed short __a, vector unsigned short __b,
6338             unsigned char __c) __constant(__c);
6339
6340 extern __ATTRS_o vector unsigned short
6341 vec_rl_mask(vector unsigned short __a, vector unsigned short __b,
6342             unsigned char __c) __constant(__c);
6343
6344 extern __ATTRS_o vector signed int
6345 vec_rl_mask(vector signed int __a, vector unsigned int __b,
6346             unsigned char __c) __constant(__c);
6347
6348 extern __ATTRS_o vector unsigned int
6349 vec_rl_mask(vector unsigned int __a, vector unsigned int __b,
6350             unsigned char __c) __constant(__c);
6351
6352 extern __ATTRS_o vector signed long long
6353 vec_rl_mask(vector signed long long __a, vector unsigned long long __b,
6354             unsigned char __c) __constant(__c);
6355
6356 extern __ATTRS_o vector unsigned long long
6357 vec_rl_mask(vector unsigned long long __a, vector unsigned long long __b,
6358             unsigned char __c) __constant(__c);
6359
6360 #define vec_rl_mask(X, Y, Z) ((__typeof__((vec_rl_mask)((X), (Y), (Z)))) \
6361   __extension__ ({ \
6362     vector unsigned char __res; \
6363     vector unsigned char __x = (vector unsigned char)(X); \
6364     vector unsigned char __y = (vector unsigned char)(Y); \
6365     switch (sizeof ((X)[0])) { \
6366     case 1: __res = (vector unsigned char) __builtin_s390_verimb( \
6367              (vector unsigned char)__x, (vector unsigned char)__x, \
6368              (vector unsigned char)__y, (Z)); break; \
6369     case 2: __res = (vector unsigned char) __builtin_s390_verimh( \
6370              (vector unsigned short)__x, (vector unsigned short)__x, \
6371              (vector unsigned short)__y, (Z)); break; \
6372     case 4: __res = (vector unsigned char) __builtin_s390_verimf( \
6373              (vector unsigned int)__x, (vector unsigned int)__x, \
6374              (vector unsigned int)__y, (Z)); break; \
6375     default: __res = (vector unsigned char) __builtin_s390_verimg( \
6376              (vector unsigned long long)__x, (vector unsigned long long)__x, \
6377              (vector unsigned long long)__y, (Z)); break; \
6378     } __res; }))
6379
6380 /*-- vec_sll ----------------------------------------------------------------*/
6381
6382 static inline __ATTRS_o_ai vector signed char
6383 vec_sll(vector signed char __a, vector unsigned char __b) {
6384   return (vector signed char)__builtin_s390_vsl(
6385     (vector unsigned char)__a, __b);
6386 }
6387
6388 // This prototype is deprecated.
6389 static inline __ATTRS_o_ai vector signed char
6390 vec_sll(vector signed char __a, vector unsigned short __b) {
6391   return (vector signed char)__builtin_s390_vsl(
6392     (vector unsigned char)__a, (vector unsigned char)__b);
6393 }
6394
6395 // This prototype is deprecated.
6396 static inline __ATTRS_o_ai vector signed char
6397 vec_sll(vector signed char __a, vector unsigned int __b) {
6398   return (vector signed char)__builtin_s390_vsl(
6399     (vector unsigned char)__a, (vector unsigned char)__b);
6400 }
6401
6402 // This prototype is deprecated.
6403 static inline __ATTRS_o_ai vector bool char
6404 vec_sll(vector bool char __a, vector unsigned char __b) {
6405   return (vector bool char)__builtin_s390_vsl(
6406     (vector unsigned char)__a, __b);
6407 }
6408
6409 // This prototype is deprecated.
6410 static inline __ATTRS_o_ai vector bool char
6411 vec_sll(vector bool char __a, vector unsigned short __b) {
6412   return (vector bool char)__builtin_s390_vsl(
6413     (vector unsigned char)__a, (vector unsigned char)__b);
6414 }
6415
6416 // This prototype is deprecated.
6417 static inline __ATTRS_o_ai vector bool char
6418 vec_sll(vector bool char __a, vector unsigned int __b) {
6419   return (vector bool char)__builtin_s390_vsl(
6420     (vector unsigned char)__a, (vector unsigned char)__b);
6421 }
6422
6423 static inline __ATTRS_o_ai vector unsigned char
6424 vec_sll(vector unsigned char __a, vector unsigned char __b) {
6425   return __builtin_s390_vsl(__a, __b);
6426 }
6427
6428 // This prototype is deprecated.
6429 static inline __ATTRS_o_ai vector unsigned char
6430 vec_sll(vector unsigned char __a, vector unsigned short __b) {
6431   return __builtin_s390_vsl(__a, (vector unsigned char)__b);
6432 }
6433
6434 // This prototype is deprecated.
6435 static inline __ATTRS_o_ai vector unsigned char
6436 vec_sll(vector unsigned char __a, vector unsigned int __b) {
6437   return __builtin_s390_vsl(__a, (vector unsigned char)__b);
6438 }
6439
6440 static inline __ATTRS_o_ai vector signed short
6441 vec_sll(vector signed short __a, vector unsigned char __b) {
6442   return (vector signed short)__builtin_s390_vsl(
6443     (vector unsigned char)__a, __b);
6444 }
6445
6446 // This prototype is deprecated.
6447 static inline __ATTRS_o_ai vector signed short
6448 vec_sll(vector signed short __a, vector unsigned short __b) {
6449   return (vector signed short)__builtin_s390_vsl(
6450     (vector unsigned char)__a, (vector unsigned char)__b);
6451 }
6452
6453 // This prototype is deprecated.
6454 static inline __ATTRS_o_ai vector signed short
6455 vec_sll(vector signed short __a, vector unsigned int __b) {
6456   return (vector signed short)__builtin_s390_vsl(
6457     (vector unsigned char)__a, (vector unsigned char)__b);
6458 }
6459
6460 // This prototype is deprecated.
6461 static inline __ATTRS_o_ai vector bool short
6462 vec_sll(vector bool short __a, vector unsigned char __b) {
6463   return (vector bool short)__builtin_s390_vsl(
6464     (vector unsigned char)__a, __b);
6465 }
6466
6467 // This prototype is deprecated.
6468 static inline __ATTRS_o_ai vector bool short
6469 vec_sll(vector bool short __a, vector unsigned short __b) {
6470   return (vector bool short)__builtin_s390_vsl(
6471     (vector unsigned char)__a, (vector unsigned char)__b);
6472 }
6473
6474 // This prototype is deprecated.
6475 static inline __ATTRS_o_ai vector bool short
6476 vec_sll(vector bool short __a, vector unsigned int __b) {
6477   return (vector bool short)__builtin_s390_vsl(
6478     (vector unsigned char)__a, (vector unsigned char)__b);
6479 }
6480
6481 static inline __ATTRS_o_ai vector unsigned short
6482 vec_sll(vector unsigned short __a, vector unsigned char __b) {
6483   return (vector unsigned short)__builtin_s390_vsl(
6484     (vector unsigned char)__a, __b);
6485 }
6486
6487 // This prototype is deprecated.
6488 static inline __ATTRS_o_ai vector unsigned short
6489 vec_sll(vector unsigned short __a, vector unsigned short __b) {
6490   return (vector unsigned short)__builtin_s390_vsl(
6491     (vector unsigned char)__a, (vector unsigned char)__b);
6492 }
6493
6494 // This prototype is deprecated.
6495 static inline __ATTRS_o_ai vector unsigned short
6496 vec_sll(vector unsigned short __a, vector unsigned int __b) {
6497   return (vector unsigned short)__builtin_s390_vsl(
6498     (vector unsigned char)__a, (vector unsigned char)__b);
6499 }
6500
6501 static inline __ATTRS_o_ai vector signed int
6502 vec_sll(vector signed int __a, vector unsigned char __b) {
6503   return (vector signed int)__builtin_s390_vsl(
6504     (vector unsigned char)__a, __b);
6505 }
6506
6507 // This prototype is deprecated.
6508 static inline __ATTRS_o_ai vector signed int
6509 vec_sll(vector signed int __a, vector unsigned short __b) {
6510   return (vector signed int)__builtin_s390_vsl(
6511     (vector unsigned char)__a, (vector unsigned char)__b);
6512 }
6513
6514 // This prototype is deprecated.
6515 static inline __ATTRS_o_ai vector signed int
6516 vec_sll(vector signed int __a, vector unsigned int __b) {
6517   return (vector signed int)__builtin_s390_vsl(
6518     (vector unsigned char)__a, (vector unsigned char)__b);
6519 }
6520
6521 // This prototype is deprecated.
6522 static inline __ATTRS_o_ai vector bool int
6523 vec_sll(vector bool int __a, vector unsigned char __b) {
6524   return (vector bool int)__builtin_s390_vsl(
6525     (vector unsigned char)__a, __b);
6526 }
6527
6528 // This prototype is deprecated.
6529 static inline __ATTRS_o_ai vector bool int
6530 vec_sll(vector bool int __a, vector unsigned short __b) {
6531   return (vector bool int)__builtin_s390_vsl(
6532     (vector unsigned char)__a, (vector unsigned char)__b);
6533 }
6534
6535 // This prototype is deprecated.
6536 static inline __ATTRS_o_ai vector bool int
6537 vec_sll(vector bool int __a, vector unsigned int __b) {
6538   return (vector bool int)__builtin_s390_vsl(
6539     (vector unsigned char)__a, (vector unsigned char)__b);
6540 }
6541
6542 static inline __ATTRS_o_ai vector unsigned int
6543 vec_sll(vector unsigned int __a, vector unsigned char __b) {
6544   return (vector unsigned int)__builtin_s390_vsl(
6545     (vector unsigned char)__a, __b);
6546 }
6547
6548 // This prototype is deprecated.
6549 static inline __ATTRS_o_ai vector unsigned int
6550 vec_sll(vector unsigned int __a, vector unsigned short __b) {
6551   return (vector unsigned int)__builtin_s390_vsl(
6552     (vector unsigned char)__a, (vector unsigned char)__b);
6553 }
6554
6555 // This prototype is deprecated.
6556 static inline __ATTRS_o_ai vector unsigned int
6557 vec_sll(vector unsigned int __a, vector unsigned int __b) {
6558   return (vector unsigned int)__builtin_s390_vsl(
6559     (vector unsigned char)__a, (vector unsigned char)__b);
6560 }
6561
6562 static inline __ATTRS_o_ai vector signed long long
6563 vec_sll(vector signed long long __a, vector unsigned char __b) {
6564   return (vector signed long long)__builtin_s390_vsl(
6565     (vector unsigned char)__a, __b);
6566 }
6567
6568 // This prototype is deprecated.
6569 static inline __ATTRS_o_ai vector signed long long
6570 vec_sll(vector signed long long __a, vector unsigned short __b) {
6571   return (vector signed long long)__builtin_s390_vsl(
6572     (vector unsigned char)__a, (vector unsigned char)__b);
6573 }
6574
6575 // This prototype is deprecated.
6576 static inline __ATTRS_o_ai vector signed long long
6577 vec_sll(vector signed long long __a, vector unsigned int __b) {
6578   return (vector signed long long)__builtin_s390_vsl(
6579     (vector unsigned char)__a, (vector unsigned char)__b);
6580 }
6581
6582 // This prototype is deprecated.
6583 static inline __ATTRS_o_ai vector bool long long
6584 vec_sll(vector bool long long __a, vector unsigned char __b) {
6585   return (vector bool long long)__builtin_s390_vsl(
6586     (vector unsigned char)__a, __b);
6587 }
6588
6589 // This prototype is deprecated.
6590 static inline __ATTRS_o_ai vector bool long long
6591 vec_sll(vector bool long long __a, vector unsigned short __b) {
6592   return (vector bool long long)__builtin_s390_vsl(
6593     (vector unsigned char)__a, (vector unsigned char)__b);
6594 }
6595
6596 // This prototype is deprecated.
6597 static inline __ATTRS_o_ai vector bool long long
6598 vec_sll(vector bool long long __a, vector unsigned int __b) {
6599   return (vector bool long long)__builtin_s390_vsl(
6600     (vector unsigned char)__a, (vector unsigned char)__b);
6601 }
6602
6603 static inline __ATTRS_o_ai vector unsigned long long
6604 vec_sll(vector unsigned long long __a, vector unsigned char __b) {
6605   return (vector unsigned long long)__builtin_s390_vsl(
6606     (vector unsigned char)__a, __b);
6607 }
6608
6609 // This prototype is deprecated.
6610 static inline __ATTRS_o_ai vector unsigned long long
6611 vec_sll(vector unsigned long long __a, vector unsigned short __b) {
6612   return (vector unsigned long long)__builtin_s390_vsl(
6613     (vector unsigned char)__a, (vector unsigned char)__b);
6614 }
6615
6616 // This prototype is deprecated.
6617 static inline __ATTRS_o_ai vector unsigned long long
6618 vec_sll(vector unsigned long long __a, vector unsigned int __b) {
6619   return (vector unsigned long long)__builtin_s390_vsl(
6620     (vector unsigned char)__a, (vector unsigned char)__b);
6621 }
6622
6623 /*-- vec_slb ----------------------------------------------------------------*/
6624
6625 static inline __ATTRS_o_ai vector signed char
6626 vec_slb(vector signed char __a, vector signed char __b) {
6627   return (vector signed char)__builtin_s390_vslb(
6628     (vector unsigned char)__a, (vector unsigned char)__b);
6629 }
6630
6631 static inline __ATTRS_o_ai vector signed char
6632 vec_slb(vector signed char __a, vector unsigned char __b) {
6633   return (vector signed char)__builtin_s390_vslb(
6634     (vector unsigned char)__a, __b);
6635 }
6636
6637 static inline __ATTRS_o_ai vector unsigned char
6638 vec_slb(vector unsigned char __a, vector signed char __b) {
6639   return __builtin_s390_vslb(__a, (vector unsigned char)__b);
6640 }
6641
6642 static inline __ATTRS_o_ai vector unsigned char
6643 vec_slb(vector unsigned char __a, vector unsigned char __b) {
6644   return __builtin_s390_vslb(__a, __b);
6645 }
6646
6647 static inline __ATTRS_o_ai vector signed short
6648 vec_slb(vector signed short __a, vector signed short __b) {
6649   return (vector signed short)__builtin_s390_vslb(
6650     (vector unsigned char)__a, (vector unsigned char)__b);
6651 }
6652
6653 static inline __ATTRS_o_ai vector signed short
6654 vec_slb(vector signed short __a, vector unsigned short __b) {
6655   return (vector signed short)__builtin_s390_vslb(
6656     (vector unsigned char)__a, (vector unsigned char)__b);
6657 }
6658
6659 static inline __ATTRS_o_ai vector unsigned short
6660 vec_slb(vector unsigned short __a, vector signed short __b) {
6661   return (vector unsigned short)__builtin_s390_vslb(
6662     (vector unsigned char)__a, (vector unsigned char)__b);
6663 }
6664
6665 static inline __ATTRS_o_ai vector unsigned short
6666 vec_slb(vector unsigned short __a, vector unsigned short __b) {
6667   return (vector unsigned short)__builtin_s390_vslb(
6668     (vector unsigned char)__a, (vector unsigned char)__b);
6669 }
6670
6671 static inline __ATTRS_o_ai vector signed int
6672 vec_slb(vector signed int __a, vector signed int __b) {
6673   return (vector signed int)__builtin_s390_vslb(
6674     (vector unsigned char)__a, (vector unsigned char)__b);
6675 }
6676
6677 static inline __ATTRS_o_ai vector signed int
6678 vec_slb(vector signed int __a, vector unsigned int __b) {
6679   return (vector signed int)__builtin_s390_vslb(
6680     (vector unsigned char)__a, (vector unsigned char)__b);
6681 }
6682
6683 static inline __ATTRS_o_ai vector unsigned int
6684 vec_slb(vector unsigned int __a, vector signed int __b) {
6685   return (vector unsigned int)__builtin_s390_vslb(
6686     (vector unsigned char)__a, (vector unsigned char)__b);
6687 }
6688
6689 static inline __ATTRS_o_ai vector unsigned int
6690 vec_slb(vector unsigned int __a, vector unsigned int __b) {
6691   return (vector unsigned int)__builtin_s390_vslb(
6692     (vector unsigned char)__a, (vector unsigned char)__b);
6693 }
6694
6695 static inline __ATTRS_o_ai vector signed long long
6696 vec_slb(vector signed long long __a, vector signed long long __b) {
6697   return (vector signed long long)__builtin_s390_vslb(
6698     (vector unsigned char)__a, (vector unsigned char)__b);
6699 }
6700
6701 static inline __ATTRS_o_ai vector signed long long
6702 vec_slb(vector signed long long __a, vector unsigned long long __b) {
6703   return (vector signed long long)__builtin_s390_vslb(
6704     (vector unsigned char)__a, (vector unsigned char)__b);
6705 }
6706
6707 static inline __ATTRS_o_ai vector unsigned long long
6708 vec_slb(vector unsigned long long __a, vector signed long long __b) {
6709   return (vector unsigned long long)__builtin_s390_vslb(
6710     (vector unsigned char)__a, (vector unsigned char)__b);
6711 }
6712
6713 static inline __ATTRS_o_ai vector unsigned long long
6714 vec_slb(vector unsigned long long __a, vector unsigned long long __b) {
6715   return (vector unsigned long long)__builtin_s390_vslb(
6716     (vector unsigned char)__a, (vector unsigned char)__b);
6717 }
6718
6719 #if __ARCH__ >= 12
6720 static inline __ATTRS_o_ai vector float
6721 vec_slb(vector float __a, vector signed int __b) {
6722   return (vector float)__builtin_s390_vslb(
6723     (vector unsigned char)__a, (vector unsigned char)__b);
6724 }
6725
6726 static inline __ATTRS_o_ai vector float
6727 vec_slb(vector float __a, vector unsigned int __b) {
6728   return (vector float)__builtin_s390_vslb(
6729     (vector unsigned char)__a, (vector unsigned char)__b);
6730 }
6731 #endif
6732
6733 static inline __ATTRS_o_ai vector double
6734 vec_slb(vector double __a, vector signed long long __b) {
6735   return (vector double)__builtin_s390_vslb(
6736     (vector unsigned char)__a, (vector unsigned char)__b);
6737 }
6738
6739 static inline __ATTRS_o_ai vector double
6740 vec_slb(vector double __a, vector unsigned long long __b) {
6741   return (vector double)__builtin_s390_vslb(
6742     (vector unsigned char)__a, (vector unsigned char)__b);
6743 }
6744
6745 /*-- vec_sld ----------------------------------------------------------------*/
6746
6747 extern __ATTRS_o vector signed char
6748 vec_sld(vector signed char __a, vector signed char __b, int __c)
6749   __constant_range(__c, 0, 15);
6750
6751 extern __ATTRS_o vector bool char
6752 vec_sld(vector bool char __a, vector bool char __b, int __c)
6753   __constant_range(__c, 0, 15);
6754
6755 extern __ATTRS_o vector unsigned char
6756 vec_sld(vector unsigned char __a, vector unsigned char __b, int __c)
6757   __constant_range(__c, 0, 15);
6758
6759 extern __ATTRS_o vector signed short
6760 vec_sld(vector signed short __a, vector signed short __b, int __c)
6761   __constant_range(__c, 0, 15);
6762
6763 extern __ATTRS_o vector bool short
6764 vec_sld(vector bool short __a, vector bool short __b, int __c)
6765   __constant_range(__c, 0, 15);
6766
6767 extern __ATTRS_o vector unsigned short
6768 vec_sld(vector unsigned short __a, vector unsigned short __b, int __c)
6769   __constant_range(__c, 0, 15);
6770
6771 extern __ATTRS_o vector signed int
6772 vec_sld(vector signed int __a, vector signed int __b, int __c)
6773   __constant_range(__c, 0, 15);
6774
6775 extern __ATTRS_o vector bool int
6776 vec_sld(vector bool int __a, vector bool int __b, int __c)
6777   __constant_range(__c, 0, 15);
6778
6779 extern __ATTRS_o vector unsigned int
6780 vec_sld(vector unsigned int __a, vector unsigned int __b, int __c)
6781   __constant_range(__c, 0, 15);
6782
6783 extern __ATTRS_o vector signed long long
6784 vec_sld(vector signed long long __a, vector signed long long __b, int __c)
6785   __constant_range(__c, 0, 15);
6786
6787 extern __ATTRS_o vector bool long long
6788 vec_sld(vector bool long long __a, vector bool long long __b, int __c)
6789   __constant_range(__c, 0, 15);
6790
6791 extern __ATTRS_o vector unsigned long long
6792 vec_sld(vector unsigned long long __a, vector unsigned long long __b, int __c)
6793   __constant_range(__c, 0, 15);
6794
6795 #if __ARCH__ >= 12
6796 extern __ATTRS_o vector float
6797 vec_sld(vector float __a, vector float __b, int __c)
6798   __constant_range(__c, 0, 15);
6799 #endif
6800
6801 extern __ATTRS_o vector double
6802 vec_sld(vector double __a, vector double __b, int __c)
6803   __constant_range(__c, 0, 15);
6804
6805 #define vec_sld(X, Y, Z) ((__typeof__((vec_sld)((X), (Y), (Z)))) \
6806   __builtin_s390_vsldb((vector unsigned char)(X), \
6807                        (vector unsigned char)(Y), (Z)))
6808
6809 /*-- vec_sldw ---------------------------------------------------------------*/
6810
6811 extern __ATTRS_o vector signed char
6812 vec_sldw(vector signed char __a, vector signed char __b, int __c)
6813   __constant_range(__c, 0, 3);
6814
6815 extern __ATTRS_o vector unsigned char
6816 vec_sldw(vector unsigned char __a, vector unsigned char __b, int __c)
6817   __constant_range(__c, 0, 3);
6818
6819 extern __ATTRS_o vector signed short
6820 vec_sldw(vector signed short __a, vector signed short __b, int __c)
6821   __constant_range(__c, 0, 3);
6822
6823 extern __ATTRS_o vector unsigned short
6824 vec_sldw(vector unsigned short __a, vector unsigned short __b, int __c)
6825   __constant_range(__c, 0, 3);
6826
6827 extern __ATTRS_o vector signed int
6828 vec_sldw(vector signed int __a, vector signed int __b, int __c)
6829   __constant_range(__c, 0, 3);
6830
6831 extern __ATTRS_o vector unsigned int
6832 vec_sldw(vector unsigned int __a, vector unsigned int __b, int __c)
6833   __constant_range(__c, 0, 3);
6834
6835 extern __ATTRS_o vector signed long long
6836 vec_sldw(vector signed long long __a, vector signed long long __b, int __c)
6837   __constant_range(__c, 0, 3);
6838
6839 extern __ATTRS_o vector unsigned long long
6840 vec_sldw(vector unsigned long long __a, vector unsigned long long __b, int __c)
6841   __constant_range(__c, 0, 3);
6842
6843 // This prototype is deprecated.
6844 extern __ATTRS_o vector double
6845 vec_sldw(vector double __a, vector double __b, int __c)
6846   __constant_range(__c, 0, 3);
6847
6848 #define vec_sldw(X, Y, Z) ((__typeof__((vec_sldw)((X), (Y), (Z)))) \
6849   __builtin_s390_vsldb((vector unsigned char)(X), \
6850                        (vector unsigned char)(Y), (Z) * 4))
6851
6852 /*-- vec_sral ---------------------------------------------------------------*/
6853
6854 static inline __ATTRS_o_ai vector signed char
6855 vec_sral(vector signed char __a, vector unsigned char __b) {
6856   return (vector signed char)__builtin_s390_vsra(
6857     (vector unsigned char)__a, __b);
6858 }
6859
6860 // This prototype is deprecated.
6861 static inline __ATTRS_o_ai vector signed char
6862 vec_sral(vector signed char __a, vector unsigned short __b) {
6863   return (vector signed char)__builtin_s390_vsra(
6864     (vector unsigned char)__a, (vector unsigned char)__b);
6865 }
6866
6867 // This prototype is deprecated.
6868 static inline __ATTRS_o_ai vector signed char
6869 vec_sral(vector signed char __a, vector unsigned int __b) {
6870   return (vector signed char)__builtin_s390_vsra(
6871     (vector unsigned char)__a, (vector unsigned char)__b);
6872 }
6873
6874 // This prototype is deprecated.
6875 static inline __ATTRS_o_ai vector bool char
6876 vec_sral(vector bool char __a, vector unsigned char __b) {
6877   return (vector bool char)__builtin_s390_vsra(
6878     (vector unsigned char)__a, __b);
6879 }
6880
6881 // This prototype is deprecated.
6882 static inline __ATTRS_o_ai vector bool char
6883 vec_sral(vector bool char __a, vector unsigned short __b) {
6884   return (vector bool char)__builtin_s390_vsra(
6885     (vector unsigned char)__a, (vector unsigned char)__b);
6886 }
6887
6888 // This prototype is deprecated.
6889 static inline __ATTRS_o_ai vector bool char
6890 vec_sral(vector bool char __a, vector unsigned int __b) {
6891   return (vector bool char)__builtin_s390_vsra(
6892     (vector unsigned char)__a, (vector unsigned char)__b);
6893 }
6894
6895 static inline __ATTRS_o_ai vector unsigned char
6896 vec_sral(vector unsigned char __a, vector unsigned char __b) {
6897   return __builtin_s390_vsra(__a, __b);
6898 }
6899
6900 // This prototype is deprecated.
6901 static inline __ATTRS_o_ai vector unsigned char
6902 vec_sral(vector unsigned char __a, vector unsigned short __b) {
6903   return __builtin_s390_vsra(__a, (vector unsigned char)__b);
6904 }
6905
6906 // This prototype is deprecated.
6907 static inline __ATTRS_o_ai vector unsigned char
6908 vec_sral(vector unsigned char __a, vector unsigned int __b) {
6909   return __builtin_s390_vsra(__a, (vector unsigned char)__b);
6910 }
6911
6912 static inline __ATTRS_o_ai vector signed short
6913 vec_sral(vector signed short __a, vector unsigned char __b) {
6914   return (vector signed short)__builtin_s390_vsra(
6915     (vector unsigned char)__a, __b);
6916 }
6917
6918 // This prototype is deprecated.
6919 static inline __ATTRS_o_ai vector signed short
6920 vec_sral(vector signed short __a, vector unsigned short __b) {
6921   return (vector signed short)__builtin_s390_vsra(
6922     (vector unsigned char)__a, (vector unsigned char)__b);
6923 }
6924
6925 // This prototype is deprecated.
6926 static inline __ATTRS_o_ai vector signed short
6927 vec_sral(vector signed short __a, vector unsigned int __b) {
6928   return (vector signed short)__builtin_s390_vsra(
6929     (vector unsigned char)__a, (vector unsigned char)__b);
6930 }
6931
6932 // This prototype is deprecated.
6933 static inline __ATTRS_o_ai vector bool short
6934 vec_sral(vector bool short __a, vector unsigned char __b) {
6935   return (vector bool short)__builtin_s390_vsra(
6936     (vector unsigned char)__a, __b);
6937 }
6938
6939 // This prototype is deprecated.
6940 static inline __ATTRS_o_ai vector bool short
6941 vec_sral(vector bool short __a, vector unsigned short __b) {
6942   return (vector bool short)__builtin_s390_vsra(
6943     (vector unsigned char)__a, (vector unsigned char)__b);
6944 }
6945
6946 // This prototype is deprecated.
6947 static inline __ATTRS_o_ai vector bool short
6948 vec_sral(vector bool short __a, vector unsigned int __b) {
6949   return (vector bool short)__builtin_s390_vsra(
6950     (vector unsigned char)__a, (vector unsigned char)__b);
6951 }
6952
6953 static inline __ATTRS_o_ai vector unsigned short
6954 vec_sral(vector unsigned short __a, vector unsigned char __b) {
6955   return (vector unsigned short)__builtin_s390_vsra(
6956     (vector unsigned char)__a, __b);
6957 }
6958
6959 // This prototype is deprecated.
6960 static inline __ATTRS_o_ai vector unsigned short
6961 vec_sral(vector unsigned short __a, vector unsigned short __b) {
6962   return (vector unsigned short)__builtin_s390_vsra(
6963     (vector unsigned char)__a, (vector unsigned char)__b);
6964 }
6965
6966 // This prototype is deprecated.
6967 static inline __ATTRS_o_ai vector unsigned short
6968 vec_sral(vector unsigned short __a, vector unsigned int __b) {
6969   return (vector unsigned short)__builtin_s390_vsra(
6970     (vector unsigned char)__a, (vector unsigned char)__b);
6971 }
6972
6973 static inline __ATTRS_o_ai vector signed int
6974 vec_sral(vector signed int __a, vector unsigned char __b) {
6975   return (vector signed int)__builtin_s390_vsra(
6976     (vector unsigned char)__a, __b);
6977 }
6978
6979 // This prototype is deprecated.
6980 static inline __ATTRS_o_ai vector signed int
6981 vec_sral(vector signed int __a, vector unsigned short __b) {
6982   return (vector signed int)__builtin_s390_vsra(
6983     (vector unsigned char)__a, (vector unsigned char)__b);
6984 }
6985
6986 // This prototype is deprecated.
6987 static inline __ATTRS_o_ai vector signed int
6988 vec_sral(vector signed int __a, vector unsigned int __b) {
6989   return (vector signed int)__builtin_s390_vsra(
6990     (vector unsigned char)__a, (vector unsigned char)__b);
6991 }
6992
6993 // This prototype is deprecated.
6994 static inline __ATTRS_o_ai vector bool int
6995 vec_sral(vector bool int __a, vector unsigned char __b) {
6996   return (vector bool int)__builtin_s390_vsra(
6997     (vector unsigned char)__a, __b);
6998 }
6999
7000 // This prototype is deprecated.
7001 static inline __ATTRS_o_ai vector bool int
7002 vec_sral(vector bool int __a, vector unsigned short __b) {
7003   return (vector bool int)__builtin_s390_vsra(
7004     (vector unsigned char)__a, (vector unsigned char)__b);
7005 }
7006
7007 // This prototype is deprecated.
7008 static inline __ATTRS_o_ai vector bool int
7009 vec_sral(vector bool int __a, vector unsigned int __b) {
7010   return (vector bool int)__builtin_s390_vsra(
7011     (vector unsigned char)__a, (vector unsigned char)__b);
7012 }
7013
7014 static inline __ATTRS_o_ai vector unsigned int
7015 vec_sral(vector unsigned int __a, vector unsigned char __b) {
7016   return (vector unsigned int)__builtin_s390_vsra(
7017     (vector unsigned char)__a, __b);
7018 }
7019
7020 // This prototype is deprecated.
7021 static inline __ATTRS_o_ai vector unsigned int
7022 vec_sral(vector unsigned int __a, vector unsigned short __b) {
7023   return (vector unsigned int)__builtin_s390_vsra(
7024     (vector unsigned char)__a, (vector unsigned char)__b);
7025 }
7026
7027 // This prototype is deprecated.
7028 static inline __ATTRS_o_ai vector unsigned int
7029 vec_sral(vector unsigned int __a, vector unsigned int __b) {
7030   return (vector unsigned int)__builtin_s390_vsra(
7031     (vector unsigned char)__a, (vector unsigned char)__b);
7032 }
7033
7034 static inline __ATTRS_o_ai vector signed long long
7035 vec_sral(vector signed long long __a, vector unsigned char __b) {
7036   return (vector signed long long)__builtin_s390_vsra(
7037     (vector unsigned char)__a, __b);
7038 }
7039
7040 // This prototype is deprecated.
7041 static inline __ATTRS_o_ai vector signed long long
7042 vec_sral(vector signed long long __a, vector unsigned short __b) {
7043   return (vector signed long long)__builtin_s390_vsra(
7044     (vector unsigned char)__a, (vector unsigned char)__b);
7045 }
7046
7047 // This prototype is deprecated.
7048 static inline __ATTRS_o_ai vector signed long long
7049 vec_sral(vector signed long long __a, vector unsigned int __b) {
7050   return (vector signed long long)__builtin_s390_vsra(
7051     (vector unsigned char)__a, (vector unsigned char)__b);
7052 }
7053
7054 // This prototype is deprecated.
7055 static inline __ATTRS_o_ai vector bool long long
7056 vec_sral(vector bool long long __a, vector unsigned char __b) {
7057   return (vector bool long long)__builtin_s390_vsra(
7058     (vector unsigned char)__a, __b);
7059 }
7060
7061 // This prototype is deprecated.
7062 static inline __ATTRS_o_ai vector bool long long
7063 vec_sral(vector bool long long __a, vector unsigned short __b) {
7064   return (vector bool long long)__builtin_s390_vsra(
7065     (vector unsigned char)__a, (vector unsigned char)__b);
7066 }
7067
7068 // This prototype is deprecated.
7069 static inline __ATTRS_o_ai vector bool long long
7070 vec_sral(vector bool long long __a, vector unsigned int __b) {
7071   return (vector bool long long)__builtin_s390_vsra(
7072     (vector unsigned char)__a, (vector unsigned char)__b);
7073 }
7074
7075 static inline __ATTRS_o_ai vector unsigned long long
7076 vec_sral(vector unsigned long long __a, vector unsigned char __b) {
7077   return (vector unsigned long long)__builtin_s390_vsra(
7078     (vector unsigned char)__a, __b);
7079 }
7080
7081 // This prototype is deprecated.
7082 static inline __ATTRS_o_ai vector unsigned long long
7083 vec_sral(vector unsigned long long __a, vector unsigned short __b) {
7084   return (vector unsigned long long)__builtin_s390_vsra(
7085     (vector unsigned char)__a, (vector unsigned char)__b);
7086 }
7087
7088 // This prototype is deprecated.
7089 static inline __ATTRS_o_ai vector unsigned long long
7090 vec_sral(vector unsigned long long __a, vector unsigned int __b) {
7091   return (vector unsigned long long)__builtin_s390_vsra(
7092     (vector unsigned char)__a, (vector unsigned char)__b);
7093 }
7094
7095 /*-- vec_srab ---------------------------------------------------------------*/
7096
7097 static inline __ATTRS_o_ai vector signed char
7098 vec_srab(vector signed char __a, vector signed char __b) {
7099   return (vector signed char)__builtin_s390_vsrab(
7100     (vector unsigned char)__a, (vector unsigned char)__b);
7101 }
7102
7103 static inline __ATTRS_o_ai vector signed char
7104 vec_srab(vector signed char __a, vector unsigned char __b) {
7105   return (vector signed char)__builtin_s390_vsrab(
7106     (vector unsigned char)__a, __b);
7107 }
7108
7109 static inline __ATTRS_o_ai vector unsigned char
7110 vec_srab(vector unsigned char __a, vector signed char __b) {
7111   return __builtin_s390_vsrab(__a, (vector unsigned char)__b);
7112 }
7113
7114 static inline __ATTRS_o_ai vector unsigned char
7115 vec_srab(vector unsigned char __a, vector unsigned char __b) {
7116   return __builtin_s390_vsrab(__a, __b);
7117 }
7118
7119 static inline __ATTRS_o_ai vector signed short
7120 vec_srab(vector signed short __a, vector signed short __b) {
7121   return (vector signed short)__builtin_s390_vsrab(
7122     (vector unsigned char)__a, (vector unsigned char)__b);
7123 }
7124
7125 static inline __ATTRS_o_ai vector signed short
7126 vec_srab(vector signed short __a, vector unsigned short __b) {
7127   return (vector signed short)__builtin_s390_vsrab(
7128     (vector unsigned char)__a, (vector unsigned char)__b);
7129 }
7130
7131 static inline __ATTRS_o_ai vector unsigned short
7132 vec_srab(vector unsigned short __a, vector signed short __b) {
7133   return (vector unsigned short)__builtin_s390_vsrab(
7134     (vector unsigned char)__a, (vector unsigned char)__b);
7135 }
7136
7137 static inline __ATTRS_o_ai vector unsigned short
7138 vec_srab(vector unsigned short __a, vector unsigned short __b) {
7139   return (vector unsigned short)__builtin_s390_vsrab(
7140     (vector unsigned char)__a, (vector unsigned char)__b);
7141 }
7142
7143 static inline __ATTRS_o_ai vector signed int
7144 vec_srab(vector signed int __a, vector signed int __b) {
7145   return (vector signed int)__builtin_s390_vsrab(
7146     (vector unsigned char)__a, (vector unsigned char)__b);
7147 }
7148
7149 static inline __ATTRS_o_ai vector signed int
7150 vec_srab(vector signed int __a, vector unsigned int __b) {
7151   return (vector signed int)__builtin_s390_vsrab(
7152     (vector unsigned char)__a, (vector unsigned char)__b);
7153 }
7154
7155 static inline __ATTRS_o_ai vector unsigned int
7156 vec_srab(vector unsigned int __a, vector signed int __b) {
7157   return (vector unsigned int)__builtin_s390_vsrab(
7158     (vector unsigned char)__a, (vector unsigned char)__b);
7159 }
7160
7161 static inline __ATTRS_o_ai vector unsigned int
7162 vec_srab(vector unsigned int __a, vector unsigned int __b) {
7163   return (vector unsigned int)__builtin_s390_vsrab(
7164     (vector unsigned char)__a, (vector unsigned char)__b);
7165 }
7166
7167 static inline __ATTRS_o_ai vector signed long long
7168 vec_srab(vector signed long long __a, vector signed long long __b) {
7169   return (vector signed long long)__builtin_s390_vsrab(
7170     (vector unsigned char)__a, (vector unsigned char)__b);
7171 }
7172
7173 static inline __ATTRS_o_ai vector signed long long
7174 vec_srab(vector signed long long __a, vector unsigned long long __b) {
7175   return (vector signed long long)__builtin_s390_vsrab(
7176     (vector unsigned char)__a, (vector unsigned char)__b);
7177 }
7178
7179 static inline __ATTRS_o_ai vector unsigned long long
7180 vec_srab(vector unsigned long long __a, vector signed long long __b) {
7181   return (vector unsigned long long)__builtin_s390_vsrab(
7182     (vector unsigned char)__a, (vector unsigned char)__b);
7183 }
7184
7185 static inline __ATTRS_o_ai vector unsigned long long
7186 vec_srab(vector unsigned long long __a, vector unsigned long long __b) {
7187   return (vector unsigned long long)__builtin_s390_vsrab(
7188     (vector unsigned char)__a, (vector unsigned char)__b);
7189 }
7190
7191 #if __ARCH__ >= 12
7192 static inline __ATTRS_o_ai vector float
7193 vec_srab(vector float __a, vector signed int __b) {
7194   return (vector float)__builtin_s390_vsrab(
7195     (vector unsigned char)__a, (vector unsigned char)__b);
7196 }
7197
7198 static inline __ATTRS_o_ai vector float
7199 vec_srab(vector float __a, vector unsigned int __b) {
7200   return (vector float)__builtin_s390_vsrab(
7201     (vector unsigned char)__a, (vector unsigned char)__b);
7202 }
7203 #endif
7204
7205 static inline __ATTRS_o_ai vector double
7206 vec_srab(vector double __a, vector signed long long __b) {
7207   return (vector double)__builtin_s390_vsrab(
7208     (vector unsigned char)__a, (vector unsigned char)__b);
7209 }
7210
7211 static inline __ATTRS_o_ai vector double
7212 vec_srab(vector double __a, vector unsigned long long __b) {
7213   return (vector double)__builtin_s390_vsrab(
7214     (vector unsigned char)__a, (vector unsigned char)__b);
7215 }
7216
7217 /*-- vec_srl ----------------------------------------------------------------*/
7218
7219 static inline __ATTRS_o_ai vector signed char
7220 vec_srl(vector signed char __a, vector unsigned char __b) {
7221   return (vector signed char)__builtin_s390_vsrl(
7222     (vector unsigned char)__a, __b);
7223 }
7224
7225 // This prototype is deprecated.
7226 static inline __ATTRS_o_ai vector signed char
7227 vec_srl(vector signed char __a, vector unsigned short __b) {
7228   return (vector signed char)__builtin_s390_vsrl(
7229     (vector unsigned char)__a, (vector unsigned char)__b);
7230 }
7231
7232 // This prototype is deprecated.
7233 static inline __ATTRS_o_ai vector signed char
7234 vec_srl(vector signed char __a, vector unsigned int __b) {
7235   return (vector signed char)__builtin_s390_vsrl(
7236     (vector unsigned char)__a, (vector unsigned char)__b);
7237 }
7238
7239 // This prototype is deprecated.
7240 static inline __ATTRS_o_ai vector bool char
7241 vec_srl(vector bool char __a, vector unsigned char __b) {
7242   return (vector bool char)__builtin_s390_vsrl(
7243     (vector unsigned char)__a, __b);
7244 }
7245
7246 // This prototype is deprecated.
7247 static inline __ATTRS_o_ai vector bool char
7248 vec_srl(vector bool char __a, vector unsigned short __b) {
7249   return (vector bool char)__builtin_s390_vsrl(
7250     (vector unsigned char)__a, (vector unsigned char)__b);
7251 }
7252
7253 // This prototype is deprecated.
7254 static inline __ATTRS_o_ai vector bool char
7255 vec_srl(vector bool char __a, vector unsigned int __b) {
7256   return (vector bool char)__builtin_s390_vsrl(
7257     (vector unsigned char)__a, (vector unsigned char)__b);
7258 }
7259
7260 static inline __ATTRS_o_ai vector unsigned char
7261 vec_srl(vector unsigned char __a, vector unsigned char __b) {
7262   return __builtin_s390_vsrl(__a, __b);
7263 }
7264
7265 // This prototype is deprecated.
7266 static inline __ATTRS_o_ai vector unsigned char
7267 vec_srl(vector unsigned char __a, vector unsigned short __b) {
7268   return __builtin_s390_vsrl(__a, (vector unsigned char)__b);
7269 }
7270
7271 // This prototype is deprecated.
7272 static inline __ATTRS_o_ai vector unsigned char
7273 vec_srl(vector unsigned char __a, vector unsigned int __b) {
7274   return __builtin_s390_vsrl(__a, (vector unsigned char)__b);
7275 }
7276
7277 static inline __ATTRS_o_ai vector signed short
7278 vec_srl(vector signed short __a, vector unsigned char __b) {
7279   return (vector signed short)__builtin_s390_vsrl(
7280     (vector unsigned char)__a, __b);
7281 }
7282
7283 // This prototype is deprecated.
7284 static inline __ATTRS_o_ai vector signed short
7285 vec_srl(vector signed short __a, vector unsigned short __b) {
7286   return (vector signed short)__builtin_s390_vsrl(
7287     (vector unsigned char)__a, (vector unsigned char)__b);
7288 }
7289
7290 // This prototype is deprecated.
7291 static inline __ATTRS_o_ai vector signed short
7292 vec_srl(vector signed short __a, vector unsigned int __b) {
7293   return (vector signed short)__builtin_s390_vsrl(
7294     (vector unsigned char)__a, (vector unsigned char)__b);
7295 }
7296
7297 // This prototype is deprecated.
7298 static inline __ATTRS_o_ai vector bool short
7299 vec_srl(vector bool short __a, vector unsigned char __b) {
7300   return (vector bool short)__builtin_s390_vsrl(
7301     (vector unsigned char)__a, __b);
7302 }
7303
7304 // This prototype is deprecated.
7305 static inline __ATTRS_o_ai vector bool short
7306 vec_srl(vector bool short __a, vector unsigned short __b) {
7307   return (vector bool short)__builtin_s390_vsrl(
7308     (vector unsigned char)__a, (vector unsigned char)__b);
7309 }
7310
7311 // This prototype is deprecated.
7312 static inline __ATTRS_o_ai vector bool short
7313 vec_srl(vector bool short __a, vector unsigned int __b) {
7314   return (vector bool short)__builtin_s390_vsrl(
7315     (vector unsigned char)__a, (vector unsigned char)__b);
7316 }
7317
7318 static inline __ATTRS_o_ai vector unsigned short
7319 vec_srl(vector unsigned short __a, vector unsigned char __b) {
7320   return (vector unsigned short)__builtin_s390_vsrl(
7321     (vector unsigned char)__a, __b);
7322 }
7323
7324 // This prototype is deprecated.
7325 static inline __ATTRS_o_ai vector unsigned short
7326 vec_srl(vector unsigned short __a, vector unsigned short __b) {
7327   return (vector unsigned short)__builtin_s390_vsrl(
7328     (vector unsigned char)__a, (vector unsigned char)__b);
7329 }
7330
7331 // This prototype is deprecated.
7332 static inline __ATTRS_o_ai vector unsigned short
7333 vec_srl(vector unsigned short __a, vector unsigned int __b) {
7334   return (vector unsigned short)__builtin_s390_vsrl(
7335     (vector unsigned char)__a, (vector unsigned char)__b);
7336 }
7337
7338 static inline __ATTRS_o_ai vector signed int
7339 vec_srl(vector signed int __a, vector unsigned char __b) {
7340   return (vector signed int)__builtin_s390_vsrl(
7341     (vector unsigned char)__a, __b);
7342 }
7343
7344 // This prototype is deprecated.
7345 static inline __ATTRS_o_ai vector signed int
7346 vec_srl(vector signed int __a, vector unsigned short __b) {
7347   return (vector signed int)__builtin_s390_vsrl(
7348     (vector unsigned char)__a, (vector unsigned char)__b);
7349 }
7350
7351 // This prototype is deprecated.
7352 static inline __ATTRS_o_ai vector signed int
7353 vec_srl(vector signed int __a, vector unsigned int __b) {
7354   return (vector signed int)__builtin_s390_vsrl(
7355     (vector unsigned char)__a, (vector unsigned char)__b);
7356 }
7357
7358 // This prototype is deprecated.
7359 static inline __ATTRS_o_ai vector bool int
7360 vec_srl(vector bool int __a, vector unsigned char __b) {
7361   return (vector bool int)__builtin_s390_vsrl(
7362     (vector unsigned char)__a, __b);
7363 }
7364
7365 // This prototype is deprecated.
7366 static inline __ATTRS_o_ai vector bool int
7367 vec_srl(vector bool int __a, vector unsigned short __b) {
7368   return (vector bool int)__builtin_s390_vsrl(
7369     (vector unsigned char)__a, (vector unsigned char)__b);
7370 }
7371
7372 // This prototype is deprecated.
7373 static inline __ATTRS_o_ai vector bool int
7374 vec_srl(vector bool int __a, vector unsigned int __b) {
7375   return (vector bool int)__builtin_s390_vsrl(
7376     (vector unsigned char)__a, (vector unsigned char)__b);
7377 }
7378
7379 static inline __ATTRS_o_ai vector unsigned int
7380 vec_srl(vector unsigned int __a, vector unsigned char __b) {
7381   return (vector unsigned int)__builtin_s390_vsrl(
7382     (vector unsigned char)__a, __b);
7383 }
7384
7385 // This prototype is deprecated.
7386 static inline __ATTRS_o_ai vector unsigned int
7387 vec_srl(vector unsigned int __a, vector unsigned short __b) {
7388   return (vector unsigned int)__builtin_s390_vsrl(
7389     (vector unsigned char)__a, (vector unsigned char)__b);
7390 }
7391
7392 // This prototype is deprecated.
7393 static inline __ATTRS_o_ai vector unsigned int
7394 vec_srl(vector unsigned int __a, vector unsigned int __b) {
7395   return (vector unsigned int)__builtin_s390_vsrl(
7396     (vector unsigned char)__a, (vector unsigned char)__b);
7397 }
7398
7399 static inline __ATTRS_o_ai vector signed long long
7400 vec_srl(vector signed long long __a, vector unsigned char __b) {
7401   return (vector signed long long)__builtin_s390_vsrl(
7402     (vector unsigned char)__a, __b);
7403 }
7404
7405 // This prototype is deprecated.
7406 static inline __ATTRS_o_ai vector signed long long
7407 vec_srl(vector signed long long __a, vector unsigned short __b) {
7408   return (vector signed long long)__builtin_s390_vsrl(
7409     (vector unsigned char)__a, (vector unsigned char)__b);
7410 }
7411
7412 // This prototype is deprecated.
7413 static inline __ATTRS_o_ai vector signed long long
7414 vec_srl(vector signed long long __a, vector unsigned int __b) {
7415   return (vector signed long long)__builtin_s390_vsrl(
7416     (vector unsigned char)__a, (vector unsigned char)__b);
7417 }
7418
7419 // This prototype is deprecated.
7420 static inline __ATTRS_o_ai vector bool long long
7421 vec_srl(vector bool long long __a, vector unsigned char __b) {
7422   return (vector bool long long)__builtin_s390_vsrl(
7423     (vector unsigned char)__a, __b);
7424 }
7425
7426 // This prototype is deprecated.
7427 static inline __ATTRS_o_ai vector bool long long
7428 vec_srl(vector bool long long __a, vector unsigned short __b) {
7429   return (vector bool long long)__builtin_s390_vsrl(
7430     (vector unsigned char)__a, (vector unsigned char)__b);
7431 }
7432
7433 // This prototype is deprecated.
7434 static inline __ATTRS_o_ai vector bool long long
7435 vec_srl(vector bool long long __a, vector unsigned int __b) {
7436   return (vector bool long long)__builtin_s390_vsrl(
7437     (vector unsigned char)__a, (vector unsigned char)__b);
7438 }
7439
7440 static inline __ATTRS_o_ai vector unsigned long long
7441 vec_srl(vector unsigned long long __a, vector unsigned char __b) {
7442   return (vector unsigned long long)__builtin_s390_vsrl(
7443     (vector unsigned char)__a, __b);
7444 }
7445
7446 // This prototype is deprecated.
7447 static inline __ATTRS_o_ai vector unsigned long long
7448 vec_srl(vector unsigned long long __a, vector unsigned short __b) {
7449   return (vector unsigned long long)__builtin_s390_vsrl(
7450     (vector unsigned char)__a, (vector unsigned char)__b);
7451 }
7452
7453 // This prototype is deprecated.
7454 static inline __ATTRS_o_ai vector unsigned long long
7455 vec_srl(vector unsigned long long __a, vector unsigned int __b) {
7456   return (vector unsigned long long)__builtin_s390_vsrl(
7457     (vector unsigned char)__a, (vector unsigned char)__b);
7458 }
7459
7460 /*-- vec_srb ----------------------------------------------------------------*/
7461
7462 static inline __ATTRS_o_ai vector signed char
7463 vec_srb(vector signed char __a, vector signed char __b) {
7464   return (vector signed char)__builtin_s390_vsrlb(
7465     (vector unsigned char)__a, (vector unsigned char)__b);
7466 }
7467
7468 static inline __ATTRS_o_ai vector signed char
7469 vec_srb(vector signed char __a, vector unsigned char __b) {
7470   return (vector signed char)__builtin_s390_vsrlb(
7471     (vector unsigned char)__a, __b);
7472 }
7473
7474 static inline __ATTRS_o_ai vector unsigned char
7475 vec_srb(vector unsigned char __a, vector signed char __b) {
7476   return __builtin_s390_vsrlb(__a, (vector unsigned char)__b);
7477 }
7478
7479 static inline __ATTRS_o_ai vector unsigned char
7480 vec_srb(vector unsigned char __a, vector unsigned char __b) {
7481   return __builtin_s390_vsrlb(__a, __b);
7482 }
7483
7484 static inline __ATTRS_o_ai vector signed short
7485 vec_srb(vector signed short __a, vector signed short __b) {
7486   return (vector signed short)__builtin_s390_vsrlb(
7487     (vector unsigned char)__a, (vector unsigned char)__b);
7488 }
7489
7490 static inline __ATTRS_o_ai vector signed short
7491 vec_srb(vector signed short __a, vector unsigned short __b) {
7492   return (vector signed short)__builtin_s390_vsrlb(
7493     (vector unsigned char)__a, (vector unsigned char)__b);
7494 }
7495
7496 static inline __ATTRS_o_ai vector unsigned short
7497 vec_srb(vector unsigned short __a, vector signed short __b) {
7498   return (vector unsigned short)__builtin_s390_vsrlb(
7499     (vector unsigned char)__a, (vector unsigned char)__b);
7500 }
7501
7502 static inline __ATTRS_o_ai vector unsigned short
7503 vec_srb(vector unsigned short __a, vector unsigned short __b) {
7504   return (vector unsigned short)__builtin_s390_vsrlb(
7505     (vector unsigned char)__a, (vector unsigned char)__b);
7506 }
7507
7508 static inline __ATTRS_o_ai vector signed int
7509 vec_srb(vector signed int __a, vector signed int __b) {
7510   return (vector signed int)__builtin_s390_vsrlb(
7511     (vector unsigned char)__a, (vector unsigned char)__b);
7512 }
7513
7514 static inline __ATTRS_o_ai vector signed int
7515 vec_srb(vector signed int __a, vector unsigned int __b) {
7516   return (vector signed int)__builtin_s390_vsrlb(
7517     (vector unsigned char)__a, (vector unsigned char)__b);
7518 }
7519
7520 static inline __ATTRS_o_ai vector unsigned int
7521 vec_srb(vector unsigned int __a, vector signed int __b) {
7522   return (vector unsigned int)__builtin_s390_vsrlb(
7523     (vector unsigned char)__a, (vector unsigned char)__b);
7524 }
7525
7526 static inline __ATTRS_o_ai vector unsigned int
7527 vec_srb(vector unsigned int __a, vector unsigned int __b) {
7528   return (vector unsigned int)__builtin_s390_vsrlb(
7529     (vector unsigned char)__a, (vector unsigned char)__b);
7530 }
7531
7532 static inline __ATTRS_o_ai vector signed long long
7533 vec_srb(vector signed long long __a, vector signed long long __b) {
7534   return (vector signed long long)__builtin_s390_vsrlb(
7535     (vector unsigned char)__a, (vector unsigned char)__b);
7536 }
7537
7538 static inline __ATTRS_o_ai vector signed long long
7539 vec_srb(vector signed long long __a, vector unsigned long long __b) {
7540   return (vector signed long long)__builtin_s390_vsrlb(
7541     (vector unsigned char)__a, (vector unsigned char)__b);
7542 }
7543
7544 static inline __ATTRS_o_ai vector unsigned long long
7545 vec_srb(vector unsigned long long __a, vector signed long long __b) {
7546   return (vector unsigned long long)__builtin_s390_vsrlb(
7547     (vector unsigned char)__a, (vector unsigned char)__b);
7548 }
7549
7550 static inline __ATTRS_o_ai vector unsigned long long
7551 vec_srb(vector unsigned long long __a, vector unsigned long long __b) {
7552   return (vector unsigned long long)__builtin_s390_vsrlb(
7553     (vector unsigned char)__a, (vector unsigned char)__b);
7554 }
7555
7556 #if __ARCH__ >= 12
7557 static inline __ATTRS_o_ai vector float
7558 vec_srb(vector float __a, vector signed int __b) {
7559   return (vector float)__builtin_s390_vsrlb(
7560     (vector unsigned char)__a, (vector unsigned char)__b);
7561 }
7562
7563 static inline __ATTRS_o_ai vector float
7564 vec_srb(vector float __a, vector unsigned int __b) {
7565   return (vector float)__builtin_s390_vsrlb(
7566     (vector unsigned char)__a, (vector unsigned char)__b);
7567 }
7568 #endif
7569
7570 static inline __ATTRS_o_ai vector double
7571 vec_srb(vector double __a, vector signed long long __b) {
7572   return (vector double)__builtin_s390_vsrlb(
7573     (vector unsigned char)__a, (vector unsigned char)__b);
7574 }
7575
7576 static inline __ATTRS_o_ai vector double
7577 vec_srb(vector double __a, vector unsigned long long __b) {
7578   return (vector double)__builtin_s390_vsrlb(
7579     (vector unsigned char)__a, (vector unsigned char)__b);
7580 }
7581
7582 /*-- vec_abs ----------------------------------------------------------------*/
7583
7584 static inline __ATTRS_o_ai vector signed char
7585 vec_abs(vector signed char __a) {
7586   return vec_sel(__a, -__a, vec_cmplt(__a, (vector signed char)0));
7587 }
7588
7589 static inline __ATTRS_o_ai vector signed short
7590 vec_abs(vector signed short __a) {
7591   return vec_sel(__a, -__a, vec_cmplt(__a, (vector signed short)0));
7592 }
7593
7594 static inline __ATTRS_o_ai vector signed int
7595 vec_abs(vector signed int __a) {
7596   return vec_sel(__a, -__a, vec_cmplt(__a, (vector signed int)0));
7597 }
7598
7599 static inline __ATTRS_o_ai vector signed long long
7600 vec_abs(vector signed long long __a) {
7601   return vec_sel(__a, -__a, vec_cmplt(__a, (vector signed long long)0));
7602 }
7603
7604 #if __ARCH__ >= 12
7605 static inline __ATTRS_o_ai vector float
7606 vec_abs(vector float __a) {
7607   return __builtin_s390_vflpsb(__a);
7608 }
7609 #endif
7610
7611 static inline __ATTRS_o_ai vector double
7612 vec_abs(vector double __a) {
7613   return __builtin_s390_vflpdb(__a);
7614 }
7615
7616 /*-- vec_nabs ---------------------------------------------------------------*/
7617
7618 #if __ARCH__ >= 12
7619 static inline __ATTRS_o_ai vector float
7620 vec_nabs(vector float __a) {
7621   return __builtin_s390_vflnsb(__a);
7622 }
7623 #endif
7624
7625 static inline __ATTRS_o_ai vector double
7626 vec_nabs(vector double __a) {
7627   return __builtin_s390_vflndb(__a);
7628 }
7629
7630 /*-- vec_max ----------------------------------------------------------------*/
7631
7632 static inline __ATTRS_o_ai vector signed char
7633 vec_max(vector signed char __a, vector signed char __b) {
7634   return vec_sel(__b, __a, vec_cmpgt(__a, __b));
7635 }
7636
7637 // This prototype is deprecated.
7638 static inline __ATTRS_o_ai vector signed char
7639 vec_max(vector signed char __a, vector bool char __b) {
7640   vector signed char __bc = (vector signed char)__b;
7641   return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
7642 }
7643
7644 // This prototype is deprecated.
7645 static inline __ATTRS_o_ai vector signed char
7646 vec_max(vector bool char __a, vector signed char __b) {
7647   vector signed char __ac = (vector signed char)__a;
7648   return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
7649 }
7650
7651 static inline __ATTRS_o_ai vector unsigned char
7652 vec_max(vector unsigned char __a, vector unsigned char __b) {
7653   return vec_sel(__b, __a, vec_cmpgt(__a, __b));
7654 }
7655
7656 // This prototype is deprecated.
7657 static inline __ATTRS_o_ai vector unsigned char
7658 vec_max(vector unsigned char __a, vector bool char __b) {
7659   vector unsigned char __bc = (vector unsigned char)__b;
7660   return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
7661 }
7662
7663 // This prototype is deprecated.
7664 static inline __ATTRS_o_ai vector unsigned char
7665 vec_max(vector bool char __a, vector unsigned char __b) {
7666   vector unsigned char __ac = (vector unsigned char)__a;
7667   return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
7668 }
7669
7670 static inline __ATTRS_o_ai vector signed short
7671 vec_max(vector signed short __a, vector signed short __b) {
7672   return vec_sel(__b, __a, vec_cmpgt(__a, __b));
7673 }
7674
7675 // This prototype is deprecated.
7676 static inline __ATTRS_o_ai vector signed short
7677 vec_max(vector signed short __a, vector bool short __b) {
7678   vector signed short __bc = (vector signed short)__b;
7679   return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
7680 }
7681
7682 // This prototype is deprecated.
7683 static inline __ATTRS_o_ai vector signed short
7684 vec_max(vector bool short __a, vector signed short __b) {
7685   vector signed short __ac = (vector signed short)__a;
7686   return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
7687 }
7688
7689 static inline __ATTRS_o_ai vector unsigned short
7690 vec_max(vector unsigned short __a, vector unsigned short __b) {
7691   return vec_sel(__b, __a, vec_cmpgt(__a, __b));
7692 }
7693
7694 // This prototype is deprecated.
7695 static inline __ATTRS_o_ai vector unsigned short
7696 vec_max(vector unsigned short __a, vector bool short __b) {
7697   vector unsigned short __bc = (vector unsigned short)__b;
7698   return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
7699 }
7700
7701 // This prototype is deprecated.
7702 static inline __ATTRS_o_ai vector unsigned short
7703 vec_max(vector bool short __a, vector unsigned short __b) {
7704   vector unsigned short __ac = (vector unsigned short)__a;
7705   return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
7706 }
7707
7708 static inline __ATTRS_o_ai vector signed int
7709 vec_max(vector signed int __a, vector signed int __b) {
7710   return vec_sel(__b, __a, vec_cmpgt(__a, __b));
7711 }
7712
7713 // This prototype is deprecated.
7714 static inline __ATTRS_o_ai vector signed int
7715 vec_max(vector signed int __a, vector bool int __b) {
7716   vector signed int __bc = (vector signed int)__b;
7717   return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
7718 }
7719
7720 // This prototype is deprecated.
7721 static inline __ATTRS_o_ai vector signed int
7722 vec_max(vector bool int __a, vector signed int __b) {
7723   vector signed int __ac = (vector signed int)__a;
7724   return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
7725 }
7726
7727 static inline __ATTRS_o_ai vector unsigned int
7728 vec_max(vector unsigned int __a, vector unsigned int __b) {
7729   return vec_sel(__b, __a, vec_cmpgt(__a, __b));
7730 }
7731
7732 // This prototype is deprecated.
7733 static inline __ATTRS_o_ai vector unsigned int
7734 vec_max(vector unsigned int __a, vector bool int __b) {
7735   vector unsigned int __bc = (vector unsigned int)__b;
7736   return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
7737 }
7738
7739 // This prototype is deprecated.
7740 static inline __ATTRS_o_ai vector unsigned int
7741 vec_max(vector bool int __a, vector unsigned int __b) {
7742   vector unsigned int __ac = (vector unsigned int)__a;
7743   return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
7744 }
7745
7746 static inline __ATTRS_o_ai vector signed long long
7747 vec_max(vector signed long long __a, vector signed long long __b) {
7748   return vec_sel(__b, __a, vec_cmpgt(__a, __b));
7749 }
7750
7751 // This prototype is deprecated.
7752 static inline __ATTRS_o_ai vector signed long long
7753 vec_max(vector signed long long __a, vector bool long long __b) {
7754   vector signed long long __bc = (vector signed long long)__b;
7755   return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
7756 }
7757
7758 // This prototype is deprecated.
7759 static inline __ATTRS_o_ai vector signed long long
7760 vec_max(vector bool long long __a, vector signed long long __b) {
7761   vector signed long long __ac = (vector signed long long)__a;
7762   return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
7763 }
7764
7765 static inline __ATTRS_o_ai vector unsigned long long
7766 vec_max(vector unsigned long long __a, vector unsigned long long __b) {
7767   return vec_sel(__b, __a, vec_cmpgt(__a, __b));
7768 }
7769
7770 // This prototype is deprecated.
7771 static inline __ATTRS_o_ai vector unsigned long long
7772 vec_max(vector unsigned long long __a, vector bool long long __b) {
7773   vector unsigned long long __bc = (vector unsigned long long)__b;
7774   return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
7775 }
7776
7777 // This prototype is deprecated.
7778 static inline __ATTRS_o_ai vector unsigned long long
7779 vec_max(vector bool long long __a, vector unsigned long long __b) {
7780   vector unsigned long long __ac = (vector unsigned long long)__a;
7781   return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
7782 }
7783
7784 #if __ARCH__ >= 12
7785 static inline __ATTRS_o_ai vector float
7786 vec_max(vector float __a, vector float __b) {
7787   return __builtin_s390_vfmaxsb(__a, __b, 0);
7788 }
7789 #endif
7790
7791 static inline __ATTRS_o_ai vector double
7792 vec_max(vector double __a, vector double __b) {
7793 #if __ARCH__ >= 12
7794   return __builtin_s390_vfmaxdb(__a, __b, 0);
7795 #else
7796   return vec_sel(__b, __a, vec_cmpgt(__a, __b));
7797 #endif
7798 }
7799
7800 /*-- vec_min ----------------------------------------------------------------*/
7801
7802 static inline __ATTRS_o_ai vector signed char
7803 vec_min(vector signed char __a, vector signed char __b) {
7804   return vec_sel(__a, __b, vec_cmpgt(__a, __b));
7805 }
7806
7807 // This prototype is deprecated.
7808 static inline __ATTRS_o_ai vector signed char
7809 vec_min(vector signed char __a, vector bool char __b) {
7810   vector signed char __bc = (vector signed char)__b;
7811   return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
7812 }
7813
7814 // This prototype is deprecated.
7815 static inline __ATTRS_o_ai vector signed char
7816 vec_min(vector bool char __a, vector signed char __b) {
7817   vector signed char __ac = (vector signed char)__a;
7818   return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
7819 }
7820
7821 static inline __ATTRS_o_ai vector unsigned char
7822 vec_min(vector unsigned char __a, vector unsigned char __b) {
7823   return vec_sel(__a, __b, vec_cmpgt(__a, __b));
7824 }
7825
7826 // This prototype is deprecated.
7827 static inline __ATTRS_o_ai vector unsigned char
7828 vec_min(vector unsigned char __a, vector bool char __b) {
7829   vector unsigned char __bc = (vector unsigned char)__b;
7830   return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
7831 }
7832
7833 // This prototype is deprecated.
7834 static inline __ATTRS_o_ai vector unsigned char
7835 vec_min(vector bool char __a, vector unsigned char __b) {
7836   vector unsigned char __ac = (vector unsigned char)__a;
7837   return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
7838 }
7839
7840 static inline __ATTRS_o_ai vector signed short
7841 vec_min(vector signed short __a, vector signed short __b) {
7842   return vec_sel(__a, __b, vec_cmpgt(__a, __b));
7843 }
7844
7845 // This prototype is deprecated.
7846 static inline __ATTRS_o_ai vector signed short
7847 vec_min(vector signed short __a, vector bool short __b) {
7848   vector signed short __bc = (vector signed short)__b;
7849   return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
7850 }
7851
7852 // This prototype is deprecated.
7853 static inline __ATTRS_o_ai vector signed short
7854 vec_min(vector bool short __a, vector signed short __b) {
7855   vector signed short __ac = (vector signed short)__a;
7856   return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
7857 }
7858
7859 static inline __ATTRS_o_ai vector unsigned short
7860 vec_min(vector unsigned short __a, vector unsigned short __b) {
7861   return vec_sel(__a, __b, vec_cmpgt(__a, __b));
7862 }
7863
7864 // This prototype is deprecated.
7865 static inline __ATTRS_o_ai vector unsigned short
7866 vec_min(vector unsigned short __a, vector bool short __b) {
7867   vector unsigned short __bc = (vector unsigned short)__b;
7868   return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
7869 }
7870
7871 // This prototype is deprecated.
7872 static inline __ATTRS_o_ai vector unsigned short
7873 vec_min(vector bool short __a, vector unsigned short __b) {
7874   vector unsigned short __ac = (vector unsigned short)__a;
7875   return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
7876 }
7877
7878 static inline __ATTRS_o_ai vector signed int
7879 vec_min(vector signed int __a, vector signed int __b) {
7880   return vec_sel(__a, __b, vec_cmpgt(__a, __b));
7881 }
7882
7883 // This prototype is deprecated.
7884 static inline __ATTRS_o_ai vector signed int
7885 vec_min(vector signed int __a, vector bool int __b) {
7886   vector signed int __bc = (vector signed int)__b;
7887   return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
7888 }
7889
7890 // This prototype is deprecated.
7891 static inline __ATTRS_o_ai vector signed int
7892 vec_min(vector bool int __a, vector signed int __b) {
7893   vector signed int __ac = (vector signed int)__a;
7894   return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
7895 }
7896
7897 static inline __ATTRS_o_ai vector unsigned int
7898 vec_min(vector unsigned int __a, vector unsigned int __b) {
7899   return vec_sel(__a, __b, vec_cmpgt(__a, __b));
7900 }
7901
7902 // This prototype is deprecated.
7903 static inline __ATTRS_o_ai vector unsigned int
7904 vec_min(vector unsigned int __a, vector bool int __b) {
7905   vector unsigned int __bc = (vector unsigned int)__b;
7906   return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
7907 }
7908
7909 // This prototype is deprecated.
7910 static inline __ATTRS_o_ai vector unsigned int
7911 vec_min(vector bool int __a, vector unsigned int __b) {
7912   vector unsigned int __ac = (vector unsigned int)__a;
7913   return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
7914 }
7915
7916 static inline __ATTRS_o_ai vector signed long long
7917 vec_min(vector signed long long __a, vector signed long long __b) {
7918   return vec_sel(__a, __b, vec_cmpgt(__a, __b));
7919 }
7920
7921 // This prototype is deprecated.
7922 static inline __ATTRS_o_ai vector signed long long
7923 vec_min(vector signed long long __a, vector bool long long __b) {
7924   vector signed long long __bc = (vector signed long long)__b;
7925   return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
7926 }
7927
7928 // This prototype is deprecated.
7929 static inline __ATTRS_o_ai vector signed long long
7930 vec_min(vector bool long long __a, vector signed long long __b) {
7931   vector signed long long __ac = (vector signed long long)__a;
7932   return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
7933 }
7934
7935 static inline __ATTRS_o_ai vector unsigned long long
7936 vec_min(vector unsigned long long __a, vector unsigned long long __b) {
7937   return vec_sel(__a, __b, vec_cmpgt(__a, __b));
7938 }
7939
7940 // This prototype is deprecated.
7941 static inline __ATTRS_o_ai vector unsigned long long
7942 vec_min(vector unsigned long long __a, vector bool long long __b) {
7943   vector unsigned long long __bc = (vector unsigned long long)__b;
7944   return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
7945 }
7946
7947 // This prototype is deprecated.
7948 static inline __ATTRS_o_ai vector unsigned long long
7949 vec_min(vector bool long long __a, vector unsigned long long __b) {
7950   vector unsigned long long __ac = (vector unsigned long long)__a;
7951   return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
7952 }
7953
7954 #if __ARCH__ >= 12
7955 static inline __ATTRS_o_ai vector float
7956 vec_min(vector float __a, vector float __b) {
7957   return __builtin_s390_vfminsb(__a, __b, 0);
7958 }
7959 #endif
7960
7961 static inline __ATTRS_o_ai vector double
7962 vec_min(vector double __a, vector double __b) {
7963 #if __ARCH__ >= 12
7964   return __builtin_s390_vfmindb(__a, __b, 0);
7965 #else
7966   return vec_sel(__a, __b, vec_cmpgt(__a, __b));
7967 #endif
7968 }
7969
7970 /*-- vec_add_u128 -----------------------------------------------------------*/
7971
7972 static inline __ATTRS_ai vector unsigned char
7973 vec_add_u128(vector unsigned char __a, vector unsigned char __b) {
7974   return __builtin_s390_vaq(__a, __b);
7975 }
7976
7977 /*-- vec_addc ---------------------------------------------------------------*/
7978
7979 static inline __ATTRS_o_ai vector unsigned char
7980 vec_addc(vector unsigned char __a, vector unsigned char __b) {
7981   return __builtin_s390_vaccb(__a, __b);
7982 }
7983
7984 static inline __ATTRS_o_ai vector unsigned short
7985 vec_addc(vector unsigned short __a, vector unsigned short __b) {
7986   return __builtin_s390_vacch(__a, __b);
7987 }
7988
7989 static inline __ATTRS_o_ai vector unsigned int
7990 vec_addc(vector unsigned int __a, vector unsigned int __b) {
7991   return __builtin_s390_vaccf(__a, __b);
7992 }
7993
7994 static inline __ATTRS_o_ai vector unsigned long long
7995 vec_addc(vector unsigned long long __a, vector unsigned long long __b) {
7996   return __builtin_s390_vaccg(__a, __b);
7997 }
7998
7999 /*-- vec_addc_u128 ----------------------------------------------------------*/
8000
8001 static inline __ATTRS_ai vector unsigned char
8002 vec_addc_u128(vector unsigned char __a, vector unsigned char __b) {
8003   return __builtin_s390_vaccq(__a, __b);
8004 }
8005
8006 /*-- vec_adde_u128 ----------------------------------------------------------*/
8007
8008 static inline __ATTRS_ai vector unsigned char
8009 vec_adde_u128(vector unsigned char __a, vector unsigned char __b,
8010               vector unsigned char __c) {
8011   return __builtin_s390_vacq(__a, __b, __c);
8012 }
8013
8014 /*-- vec_addec_u128 ---------------------------------------------------------*/
8015
8016 static inline __ATTRS_ai vector unsigned char
8017 vec_addec_u128(vector unsigned char __a, vector unsigned char __b,
8018                vector unsigned char __c) {
8019   return __builtin_s390_vacccq(__a, __b, __c);
8020 }
8021
8022 /*-- vec_avg ----------------------------------------------------------------*/
8023
8024 static inline __ATTRS_o_ai vector signed char
8025 vec_avg(vector signed char __a, vector signed char __b) {
8026   return __builtin_s390_vavgb(__a, __b);
8027 }
8028
8029 static inline __ATTRS_o_ai vector signed short
8030 vec_avg(vector signed short __a, vector signed short __b) {
8031   return __builtin_s390_vavgh(__a, __b);
8032 }
8033
8034 static inline __ATTRS_o_ai vector signed int
8035 vec_avg(vector signed int __a, vector signed int __b) {
8036   return __builtin_s390_vavgf(__a, __b);
8037 }
8038
8039 static inline __ATTRS_o_ai vector signed long long
8040 vec_avg(vector signed long long __a, vector signed long long __b) {
8041   return __builtin_s390_vavgg(__a, __b);
8042 }
8043
8044 static inline __ATTRS_o_ai vector unsigned char
8045 vec_avg(vector unsigned char __a, vector unsigned char __b) {
8046   return __builtin_s390_vavglb(__a, __b);
8047 }
8048
8049 static inline __ATTRS_o_ai vector unsigned short
8050 vec_avg(vector unsigned short __a, vector unsigned short __b) {
8051   return __builtin_s390_vavglh(__a, __b);
8052 }
8053
8054 static inline __ATTRS_o_ai vector unsigned int
8055 vec_avg(vector unsigned int __a, vector unsigned int __b) {
8056   return __builtin_s390_vavglf(__a, __b);
8057 }
8058
8059 static inline __ATTRS_o_ai vector unsigned long long
8060 vec_avg(vector unsigned long long __a, vector unsigned long long __b) {
8061   return __builtin_s390_vavglg(__a, __b);
8062 }
8063
8064 /*-- vec_checksum -----------------------------------------------------------*/
8065
8066 static inline __ATTRS_ai vector unsigned int
8067 vec_checksum(vector unsigned int __a, vector unsigned int __b) {
8068   return __builtin_s390_vcksm(__a, __b);
8069 }
8070
8071 /*-- vec_gfmsum -------------------------------------------------------------*/
8072
8073 static inline __ATTRS_o_ai vector unsigned short
8074 vec_gfmsum(vector unsigned char __a, vector unsigned char __b) {
8075   return __builtin_s390_vgfmb(__a, __b);
8076 }
8077
8078 static inline __ATTRS_o_ai vector unsigned int
8079 vec_gfmsum(vector unsigned short __a, vector unsigned short __b) {
8080   return __builtin_s390_vgfmh(__a, __b);
8081 }
8082
8083 static inline __ATTRS_o_ai vector unsigned long long
8084 vec_gfmsum(vector unsigned int __a, vector unsigned int __b) {
8085   return __builtin_s390_vgfmf(__a, __b);
8086 }
8087
8088 /*-- vec_gfmsum_128 ---------------------------------------------------------*/
8089
8090 static inline __ATTRS_o_ai vector unsigned char
8091 vec_gfmsum_128(vector unsigned long long __a, vector unsigned long long __b) {
8092   return __builtin_s390_vgfmg(__a, __b);
8093 }
8094
8095 /*-- vec_gfmsum_accum -------------------------------------------------------*/
8096
8097 static inline __ATTRS_o_ai vector unsigned short
8098 vec_gfmsum_accum(vector unsigned char __a, vector unsigned char __b,
8099                  vector unsigned short __c) {
8100   return __builtin_s390_vgfmab(__a, __b, __c);
8101 }
8102
8103 static inline __ATTRS_o_ai vector unsigned int
8104 vec_gfmsum_accum(vector unsigned short __a, vector unsigned short __b,
8105                  vector unsigned int __c) {
8106   return __builtin_s390_vgfmah(__a, __b, __c);
8107 }
8108
8109 static inline __ATTRS_o_ai vector unsigned long long
8110 vec_gfmsum_accum(vector unsigned int __a, vector unsigned int __b,
8111                  vector unsigned long long __c) {
8112   return __builtin_s390_vgfmaf(__a, __b, __c);
8113 }
8114
8115 /*-- vec_gfmsum_accum_128 ---------------------------------------------------*/
8116
8117 static inline __ATTRS_o_ai vector unsigned char
8118 vec_gfmsum_accum_128(vector unsigned long long __a,
8119                      vector unsigned long long __b,
8120                      vector unsigned char __c) {
8121   return __builtin_s390_vgfmag(__a, __b, __c);
8122 }
8123
8124 /*-- vec_mladd --------------------------------------------------------------*/
8125
8126 static inline __ATTRS_o_ai vector signed char
8127 vec_mladd(vector signed char __a, vector signed char __b,
8128           vector signed char __c) {
8129   return __a * __b + __c;
8130 }
8131
8132 static inline __ATTRS_o_ai vector signed char
8133 vec_mladd(vector unsigned char __a, vector signed char __b,
8134           vector signed char __c) {
8135   return (vector signed char)__a * __b + __c;
8136 }
8137
8138 static inline __ATTRS_o_ai vector signed char
8139 vec_mladd(vector signed char __a, vector unsigned char __b,
8140           vector unsigned char __c) {
8141   return __a * (vector signed char)__b + (vector signed char)__c;
8142 }
8143
8144 static inline __ATTRS_o_ai vector unsigned char
8145 vec_mladd(vector unsigned char __a, vector unsigned char __b,
8146           vector unsigned char __c) {
8147   return __a * __b + __c;
8148 }
8149
8150 static inline __ATTRS_o_ai vector signed short
8151 vec_mladd(vector signed short __a, vector signed short __b,
8152           vector signed short __c) {
8153   return __a * __b + __c;
8154 }
8155
8156 static inline __ATTRS_o_ai vector signed short
8157 vec_mladd(vector unsigned short __a, vector signed short __b,
8158           vector signed short __c) {
8159   return (vector signed short)__a * __b + __c;
8160 }
8161
8162 static inline __ATTRS_o_ai vector signed short
8163 vec_mladd(vector signed short __a, vector unsigned short __b,
8164           vector unsigned short __c) {
8165   return __a * (vector signed short)__b + (vector signed short)__c;
8166 }
8167
8168 static inline __ATTRS_o_ai vector unsigned short
8169 vec_mladd(vector unsigned short __a, vector unsigned short __b,
8170           vector unsigned short __c) {
8171   return __a * __b + __c;
8172 }
8173
8174 static inline __ATTRS_o_ai vector signed int
8175 vec_mladd(vector signed int __a, vector signed int __b,
8176           vector signed int __c) {
8177   return __a * __b + __c;
8178 }
8179
8180 static inline __ATTRS_o_ai vector signed int
8181 vec_mladd(vector unsigned int __a, vector signed int __b,
8182           vector signed int __c) {
8183   return (vector signed int)__a * __b + __c;
8184 }
8185
8186 static inline __ATTRS_o_ai vector signed int
8187 vec_mladd(vector signed int __a, vector unsigned int __b,
8188           vector unsigned int __c) {
8189   return __a * (vector signed int)__b + (vector signed int)__c;
8190 }
8191
8192 static inline __ATTRS_o_ai vector unsigned int
8193 vec_mladd(vector unsigned int __a, vector unsigned int __b,
8194           vector unsigned int __c) {
8195   return __a * __b + __c;
8196 }
8197
8198 /*-- vec_mhadd --------------------------------------------------------------*/
8199
8200 static inline __ATTRS_o_ai vector signed char
8201 vec_mhadd(vector signed char __a, vector signed char __b,
8202           vector signed char __c) {
8203   return __builtin_s390_vmahb(__a, __b, __c);
8204 }
8205
8206 static inline __ATTRS_o_ai vector unsigned char
8207 vec_mhadd(vector unsigned char __a, vector unsigned char __b,
8208           vector unsigned char __c) {
8209   return __builtin_s390_vmalhb(__a, __b, __c);
8210 }
8211
8212 static inline __ATTRS_o_ai vector signed short
8213 vec_mhadd(vector signed short __a, vector signed short __b,
8214           vector signed short __c) {
8215   return __builtin_s390_vmahh(__a, __b, __c);
8216 }
8217
8218 static inline __ATTRS_o_ai vector unsigned short
8219 vec_mhadd(vector unsigned short __a, vector unsigned short __b,
8220           vector unsigned short __c) {
8221   return __builtin_s390_vmalhh(__a, __b, __c);
8222 }
8223
8224 static inline __ATTRS_o_ai vector signed int
8225 vec_mhadd(vector signed int __a, vector signed int __b,
8226           vector signed int __c) {
8227   return __builtin_s390_vmahf(__a, __b, __c);
8228 }
8229
8230 static inline __ATTRS_o_ai vector unsigned int
8231 vec_mhadd(vector unsigned int __a, vector unsigned int __b,
8232           vector unsigned int __c) {
8233   return __builtin_s390_vmalhf(__a, __b, __c);
8234 }
8235
8236 /*-- vec_meadd --------------------------------------------------------------*/
8237
8238 static inline __ATTRS_o_ai vector signed short
8239 vec_meadd(vector signed char __a, vector signed char __b,
8240           vector signed short __c) {
8241   return __builtin_s390_vmaeb(__a, __b, __c);
8242 }
8243
8244 static inline __ATTRS_o_ai vector unsigned short
8245 vec_meadd(vector unsigned char __a, vector unsigned char __b,
8246           vector unsigned short __c) {
8247   return __builtin_s390_vmaleb(__a, __b, __c);
8248 }
8249
8250 static inline __ATTRS_o_ai vector signed int
8251 vec_meadd(vector signed short __a, vector signed short __b,
8252           vector signed int __c) {
8253   return __builtin_s390_vmaeh(__a, __b, __c);
8254 }
8255
8256 static inline __ATTRS_o_ai vector unsigned int
8257 vec_meadd(vector unsigned short __a, vector unsigned short __b,
8258           vector unsigned int __c) {
8259   return __builtin_s390_vmaleh(__a, __b, __c);
8260 }
8261
8262 static inline __ATTRS_o_ai vector signed long long
8263 vec_meadd(vector signed int __a, vector signed int __b,
8264           vector signed long long __c) {
8265   return __builtin_s390_vmaef(__a, __b, __c);
8266 }
8267
8268 static inline __ATTRS_o_ai vector unsigned long long
8269 vec_meadd(vector unsigned int __a, vector unsigned int __b,
8270           vector unsigned long long __c) {
8271   return __builtin_s390_vmalef(__a, __b, __c);
8272 }
8273
8274 /*-- vec_moadd --------------------------------------------------------------*/
8275
8276 static inline __ATTRS_o_ai vector signed short
8277 vec_moadd(vector signed char __a, vector signed char __b,
8278           vector signed short __c) {
8279   return __builtin_s390_vmaob(__a, __b, __c);
8280 }
8281
8282 static inline __ATTRS_o_ai vector unsigned short
8283 vec_moadd(vector unsigned char __a, vector unsigned char __b,
8284           vector unsigned short __c) {
8285   return __builtin_s390_vmalob(__a, __b, __c);
8286 }
8287
8288 static inline __ATTRS_o_ai vector signed int
8289 vec_moadd(vector signed short __a, vector signed short __b,
8290           vector signed int __c) {
8291   return __builtin_s390_vmaoh(__a, __b, __c);
8292 }
8293
8294 static inline __ATTRS_o_ai vector unsigned int
8295 vec_moadd(vector unsigned short __a, vector unsigned short __b,
8296           vector unsigned int __c) {
8297   return __builtin_s390_vmaloh(__a, __b, __c);
8298 }
8299
8300 static inline __ATTRS_o_ai vector signed long long
8301 vec_moadd(vector signed int __a, vector signed int __b,
8302           vector signed long long __c) {
8303   return __builtin_s390_vmaof(__a, __b, __c);
8304 }
8305
8306 static inline __ATTRS_o_ai vector unsigned long long
8307 vec_moadd(vector unsigned int __a, vector unsigned int __b,
8308           vector unsigned long long __c) {
8309   return __builtin_s390_vmalof(__a, __b, __c);
8310 }
8311
8312 /*-- vec_mulh ---------------------------------------------------------------*/
8313
8314 static inline __ATTRS_o_ai vector signed char
8315 vec_mulh(vector signed char __a, vector signed char __b) {
8316   return __builtin_s390_vmhb(__a, __b);
8317 }
8318
8319 static inline __ATTRS_o_ai vector unsigned char
8320 vec_mulh(vector unsigned char __a, vector unsigned char __b) {
8321   return __builtin_s390_vmlhb(__a, __b);
8322 }
8323
8324 static inline __ATTRS_o_ai vector signed short
8325 vec_mulh(vector signed short __a, vector signed short __b) {
8326   return __builtin_s390_vmhh(__a, __b);
8327 }
8328
8329 static inline __ATTRS_o_ai vector unsigned short
8330 vec_mulh(vector unsigned short __a, vector unsigned short __b) {
8331   return __builtin_s390_vmlhh(__a, __b);
8332 }
8333
8334 static inline __ATTRS_o_ai vector signed int
8335 vec_mulh(vector signed int __a, vector signed int __b) {
8336   return __builtin_s390_vmhf(__a, __b);
8337 }
8338
8339 static inline __ATTRS_o_ai vector unsigned int
8340 vec_mulh(vector unsigned int __a, vector unsigned int __b) {
8341   return __builtin_s390_vmlhf(__a, __b);
8342 }
8343
8344 /*-- vec_mule ---------------------------------------------------------------*/
8345
8346 static inline __ATTRS_o_ai vector signed short
8347 vec_mule(vector signed char __a, vector signed char __b) {
8348   return __builtin_s390_vmeb(__a, __b);
8349 }
8350
8351 static inline __ATTRS_o_ai vector unsigned short
8352 vec_mule(vector unsigned char __a, vector unsigned char __b) {
8353   return __builtin_s390_vmleb(__a, __b);
8354 }
8355
8356 static inline __ATTRS_o_ai vector signed int
8357 vec_mule(vector signed short __a, vector signed short __b) {
8358   return __builtin_s390_vmeh(__a, __b);
8359 }
8360
8361 static inline __ATTRS_o_ai vector unsigned int
8362 vec_mule(vector unsigned short __a, vector unsigned short __b) {
8363   return __builtin_s390_vmleh(__a, __b);
8364 }
8365
8366 static inline __ATTRS_o_ai vector signed long long
8367 vec_mule(vector signed int __a, vector signed int __b) {
8368   return __builtin_s390_vmef(__a, __b);
8369 }
8370
8371 static inline __ATTRS_o_ai vector unsigned long long
8372 vec_mule(vector unsigned int __a, vector unsigned int __b) {
8373   return __builtin_s390_vmlef(__a, __b);
8374 }
8375
8376 /*-- vec_mulo ---------------------------------------------------------------*/
8377
8378 static inline __ATTRS_o_ai vector signed short
8379 vec_mulo(vector signed char __a, vector signed char __b) {
8380   return __builtin_s390_vmob(__a, __b);
8381 }
8382
8383 static inline __ATTRS_o_ai vector unsigned short
8384 vec_mulo(vector unsigned char __a, vector unsigned char __b) {
8385   return __builtin_s390_vmlob(__a, __b);
8386 }
8387
8388 static inline __ATTRS_o_ai vector signed int
8389 vec_mulo(vector signed short __a, vector signed short __b) {
8390   return __builtin_s390_vmoh(__a, __b);
8391 }
8392
8393 static inline __ATTRS_o_ai vector unsigned int
8394 vec_mulo(vector unsigned short __a, vector unsigned short __b) {
8395   return __builtin_s390_vmloh(__a, __b);
8396 }
8397
8398 static inline __ATTRS_o_ai vector signed long long
8399 vec_mulo(vector signed int __a, vector signed int __b) {
8400   return __builtin_s390_vmof(__a, __b);
8401 }
8402
8403 static inline __ATTRS_o_ai vector unsigned long long
8404 vec_mulo(vector unsigned int __a, vector unsigned int __b) {
8405   return __builtin_s390_vmlof(__a, __b);
8406 }
8407
8408 /*-- vec_msum_u128 ----------------------------------------------------------*/
8409
8410 #if __ARCH__ >= 12
8411 #define vec_msum_u128(X, Y, Z, W) \
8412   ((vector unsigned char)__builtin_s390_vmslg((X), (Y), (Z), (W)));
8413 #endif
8414
8415 /*-- vec_sub_u128 -----------------------------------------------------------*/
8416
8417 static inline __ATTRS_ai vector unsigned char
8418 vec_sub_u128(vector unsigned char __a, vector unsigned char __b) {
8419   return __builtin_s390_vsq(__a, __b);
8420 }
8421
8422 /*-- vec_subc ---------------------------------------------------------------*/
8423
8424 static inline __ATTRS_o_ai vector unsigned char
8425 vec_subc(vector unsigned char __a, vector unsigned char __b) {
8426   return __builtin_s390_vscbib(__a, __b);
8427 }
8428
8429 static inline __ATTRS_o_ai vector unsigned short
8430 vec_subc(vector unsigned short __a, vector unsigned short __b) {
8431   return __builtin_s390_vscbih(__a, __b);
8432 }
8433
8434 static inline __ATTRS_o_ai vector unsigned int
8435 vec_subc(vector unsigned int __a, vector unsigned int __b) {
8436   return __builtin_s390_vscbif(__a, __b);
8437 }
8438
8439 static inline __ATTRS_o_ai vector unsigned long long
8440 vec_subc(vector unsigned long long __a, vector unsigned long long __b) {
8441   return __builtin_s390_vscbig(__a, __b);
8442 }
8443
8444 /*-- vec_subc_u128 ----------------------------------------------------------*/
8445
8446 static inline __ATTRS_ai vector unsigned char
8447 vec_subc_u128(vector unsigned char __a, vector unsigned char __b) {
8448   return __builtin_s390_vscbiq(__a, __b);
8449 }
8450
8451 /*-- vec_sube_u128 ----------------------------------------------------------*/
8452
8453 static inline __ATTRS_ai vector unsigned char
8454 vec_sube_u128(vector unsigned char __a, vector unsigned char __b,
8455               vector unsigned char __c) {
8456   return __builtin_s390_vsbiq(__a, __b, __c);
8457 }
8458
8459 /*-- vec_subec_u128 ---------------------------------------------------------*/
8460
8461 static inline __ATTRS_ai vector unsigned char
8462 vec_subec_u128(vector unsigned char __a, vector unsigned char __b,
8463                vector unsigned char __c) {
8464   return __builtin_s390_vsbcbiq(__a, __b, __c);
8465 }
8466
8467 /*-- vec_sum2 ---------------------------------------------------------------*/
8468
8469 static inline __ATTRS_o_ai vector unsigned long long
8470 vec_sum2(vector unsigned short __a, vector unsigned short __b) {
8471   return __builtin_s390_vsumgh(__a, __b);
8472 }
8473
8474 static inline __ATTRS_o_ai vector unsigned long long
8475 vec_sum2(vector unsigned int __a, vector unsigned int __b) {
8476   return __builtin_s390_vsumgf(__a, __b);
8477 }
8478
8479 /*-- vec_sum_u128 -----------------------------------------------------------*/
8480
8481 static inline __ATTRS_o_ai vector unsigned char
8482 vec_sum_u128(vector unsigned int __a, vector unsigned int __b) {
8483   return __builtin_s390_vsumqf(__a, __b);
8484 }
8485
8486 static inline __ATTRS_o_ai vector unsigned char
8487 vec_sum_u128(vector unsigned long long __a, vector unsigned long long __b) {
8488   return __builtin_s390_vsumqg(__a, __b);
8489 }
8490
8491 /*-- vec_sum4 ---------------------------------------------------------------*/
8492
8493 static inline __ATTRS_o_ai vector unsigned int
8494 vec_sum4(vector unsigned char __a, vector unsigned char __b) {
8495   return __builtin_s390_vsumb(__a, __b);
8496 }
8497
8498 static inline __ATTRS_o_ai vector unsigned int
8499 vec_sum4(vector unsigned short __a, vector unsigned short __b) {
8500   return __builtin_s390_vsumh(__a, __b);
8501 }
8502
8503 /*-- vec_test_mask ----------------------------------------------------------*/
8504
8505 static inline __ATTRS_o_ai int
8506 vec_test_mask(vector signed char __a, vector unsigned char __b) {
8507   return __builtin_s390_vtm((vector unsigned char)__a,
8508                             (vector unsigned char)__b);
8509 }
8510
8511 static inline __ATTRS_o_ai int
8512 vec_test_mask(vector unsigned char __a, vector unsigned char __b) {
8513   return __builtin_s390_vtm(__a, __b);
8514 }
8515
8516 static inline __ATTRS_o_ai int
8517 vec_test_mask(vector signed short __a, vector unsigned short __b) {
8518   return __builtin_s390_vtm((vector unsigned char)__a,
8519                             (vector unsigned char)__b);
8520 }
8521
8522 static inline __ATTRS_o_ai int
8523 vec_test_mask(vector unsigned short __a, vector unsigned short __b) {
8524   return __builtin_s390_vtm((vector unsigned char)__a,
8525                             (vector unsigned char)__b);
8526 }
8527
8528 static inline __ATTRS_o_ai int
8529 vec_test_mask(vector signed int __a, vector unsigned int __b) {
8530   return __builtin_s390_vtm((vector unsigned char)__a,
8531                             (vector unsigned char)__b);
8532 }
8533
8534 static inline __ATTRS_o_ai int
8535 vec_test_mask(vector unsigned int __a, vector unsigned int __b) {
8536   return __builtin_s390_vtm((vector unsigned char)__a,
8537                             (vector unsigned char)__b);
8538 }
8539
8540 static inline __ATTRS_o_ai int
8541 vec_test_mask(vector signed long long __a, vector unsigned long long __b) {
8542   return __builtin_s390_vtm((vector unsigned char)__a,
8543                             (vector unsigned char)__b);
8544 }
8545
8546 static inline __ATTRS_o_ai int
8547 vec_test_mask(vector unsigned long long __a, vector unsigned long long __b) {
8548   return __builtin_s390_vtm((vector unsigned char)__a,
8549                             (vector unsigned char)__b);
8550 }
8551
8552 #if __ARCH__ >= 12
8553 static inline __ATTRS_o_ai int
8554 vec_test_mask(vector float __a, vector unsigned int __b) {
8555   return __builtin_s390_vtm((vector unsigned char)__a,
8556                             (vector unsigned char)__b);
8557 }
8558 #endif
8559
8560 static inline __ATTRS_o_ai int
8561 vec_test_mask(vector double __a, vector unsigned long long __b) {
8562   return __builtin_s390_vtm((vector unsigned char)__a,
8563                             (vector unsigned char)__b);
8564 }
8565
8566 /*-- vec_madd ---------------------------------------------------------------*/
8567
8568 #if __ARCH__ >= 12
8569 static inline __ATTRS_o_ai vector float
8570 vec_madd(vector float __a, vector float __b, vector float __c) {
8571   return __builtin_s390_vfmasb(__a, __b, __c);
8572 }
8573 #endif
8574
8575 static inline __ATTRS_o_ai vector double
8576 vec_madd(vector double __a, vector double __b, vector double __c) {
8577   return __builtin_s390_vfmadb(__a, __b, __c);
8578 }
8579
8580 /*-- vec_msub ---------------------------------------------------------------*/
8581
8582 #if __ARCH__ >= 12
8583 static inline __ATTRS_o_ai vector float
8584 vec_msub(vector float __a, vector float __b, vector float __c) {
8585   return __builtin_s390_vfmssb(__a, __b, __c);
8586 }
8587 #endif
8588
8589 static inline __ATTRS_o_ai vector double
8590 vec_msub(vector double __a, vector double __b, vector double __c) {
8591   return __builtin_s390_vfmsdb(__a, __b, __c);
8592 }
8593
8594 /*-- vec_nmadd ---------------------------------------------------------------*/
8595
8596 #if __ARCH__ >= 12
8597 static inline __ATTRS_o_ai vector float
8598 vec_nmadd(vector float __a, vector float __b, vector float __c) {
8599   return __builtin_s390_vfnmasb(__a, __b, __c);
8600 }
8601
8602 static inline __ATTRS_o_ai vector double
8603 vec_nmadd(vector double __a, vector double __b, vector double __c) {
8604   return __builtin_s390_vfnmadb(__a, __b, __c);
8605 }
8606 #endif
8607
8608 /*-- vec_nmsub ---------------------------------------------------------------*/
8609
8610 #if __ARCH__ >= 12
8611 static inline __ATTRS_o_ai vector float
8612 vec_nmsub(vector float __a, vector float __b, vector float __c) {
8613   return __builtin_s390_vfnmssb(__a, __b, __c);
8614 }
8615
8616 static inline __ATTRS_o_ai vector double
8617 vec_nmsub(vector double __a, vector double __b, vector double __c) {
8618   return __builtin_s390_vfnmsdb(__a, __b, __c);
8619 }
8620 #endif
8621
8622 /*-- vec_sqrt ---------------------------------------------------------------*/
8623
8624 #if __ARCH__ >= 12
8625 static inline __ATTRS_o_ai vector float
8626 vec_sqrt(vector float __a) {
8627   return __builtin_s390_vfsqsb(__a);
8628 }
8629 #endif
8630
8631 static inline __ATTRS_o_ai vector double
8632 vec_sqrt(vector double __a) {
8633   return __builtin_s390_vfsqdb(__a);
8634 }
8635
8636 /*-- vec_ld2f ---------------------------------------------------------------*/
8637
8638 // This prototype is deprecated.
8639 static inline __ATTRS_ai vector double
8640 vec_ld2f(const float *__ptr) {
8641   typedef float __v2f32 __attribute__((__vector_size__(8)));
8642   return __builtin_convertvector(*(const __v2f32 *)__ptr, vector double);
8643 }
8644
8645 /*-- vec_st2f ---------------------------------------------------------------*/
8646
8647 // This prototype is deprecated.
8648 static inline __ATTRS_ai void
8649 vec_st2f(vector double __a, float *__ptr) {
8650   typedef float __v2f32 __attribute__((__vector_size__(8)));
8651   *(__v2f32 *)__ptr = __builtin_convertvector(__a, __v2f32);
8652 }
8653
8654 /*-- vec_ctd ----------------------------------------------------------------*/
8655
8656 // This prototype is deprecated.
8657 static inline __ATTRS_o_ai vector double
8658 vec_ctd(vector signed long long __a, int __b)
8659   __constant_range(__b, 0, 31) {
8660   vector double __conv = __builtin_convertvector(__a, vector double);
8661   __conv *= (vector double)(vector unsigned long long)((0x3ffULL - __b) << 52);
8662   return __conv;
8663 }
8664
8665 // This prototype is deprecated.
8666 static inline __ATTRS_o_ai vector double
8667 vec_ctd(vector unsigned long long __a, int __b)
8668   __constant_range(__b, 0, 31) {
8669   vector double __conv = __builtin_convertvector(__a, vector double);
8670   __conv *= (vector double)(vector unsigned long long)((0x3ffULL - __b) << 52);
8671   return __conv;
8672 }
8673
8674 /*-- vec_ctsl ---------------------------------------------------------------*/
8675
8676 // This prototype is deprecated.
8677 static inline __ATTRS_o_ai vector signed long long
8678 vec_ctsl(vector double __a, int __b)
8679   __constant_range(__b, 0, 31) {
8680   __a *= (vector double)(vector unsigned long long)((0x3ffULL + __b) << 52);
8681   return __builtin_convertvector(__a, vector signed long long);
8682 }
8683
8684 /*-- vec_ctul ---------------------------------------------------------------*/
8685
8686 // This prototype is deprecated.
8687 static inline __ATTRS_o_ai vector unsigned long long
8688 vec_ctul(vector double __a, int __b)
8689   __constant_range(__b, 0, 31) {
8690   __a *= (vector double)(vector unsigned long long)((0x3ffULL + __b) << 52);
8691   return __builtin_convertvector(__a, vector unsigned long long);
8692 }
8693
8694 /*-- vec_doublee ------------------------------------------------------------*/
8695
8696 #if __ARCH__ >= 12
8697 static inline __ATTRS_ai vector double
8698 vec_doublee(vector float __a) {
8699   typedef float __v2f32 __attribute__((__vector_size__(8)));
8700   __v2f32 __pack = __builtin_shufflevector(__a, __a, 0, 2);
8701   return __builtin_convertvector(__pack, vector double);
8702 }
8703 #endif
8704
8705 /*-- vec_floate -------------------------------------------------------------*/
8706
8707 #if __ARCH__ >= 12
8708 static inline __ATTRS_ai vector float
8709 vec_floate(vector double __a) {
8710   typedef float __v2f32 __attribute__((__vector_size__(8)));
8711   __v2f32 __pack = __builtin_convertvector(__a, __v2f32);
8712   return __builtin_shufflevector(__pack, __pack, 0, -1, 1, -1);
8713 }
8714 #endif
8715
8716 /*-- vec_double -------------------------------------------------------------*/
8717
8718 static inline __ATTRS_o_ai vector double
8719 vec_double(vector signed long long __a) {
8720   return __builtin_convertvector(__a, vector double);
8721 }
8722
8723 static inline __ATTRS_o_ai vector double
8724 vec_double(vector unsigned long long __a) {
8725   return __builtin_convertvector(__a, vector double);
8726 }
8727
8728 /*-- vec_signed -------------------------------------------------------------*/
8729
8730 static inline __ATTRS_o_ai vector signed long long
8731 vec_signed(vector double __a) {
8732   return __builtin_convertvector(__a, vector signed long long);
8733 }
8734
8735 /*-- vec_unsigned -----------------------------------------------------------*/
8736
8737 static inline __ATTRS_o_ai vector unsigned long long
8738 vec_unsigned(vector double __a) {
8739   return __builtin_convertvector(__a, vector unsigned long long);
8740 }
8741
8742 /*-- vec_roundp -------------------------------------------------------------*/
8743
8744 #if __ARCH__ >= 12
8745 static inline __ATTRS_o_ai vector float
8746 vec_roundp(vector float __a) {
8747   return __builtin_s390_vfisb(__a, 4, 6);
8748 }
8749 #endif
8750
8751 static inline __ATTRS_o_ai vector double
8752 vec_roundp(vector double __a) {
8753   return __builtin_s390_vfidb(__a, 4, 6);
8754 }
8755
8756 /*-- vec_ceil ---------------------------------------------------------------*/
8757
8758 #if __ARCH__ >= 12
8759 static inline __ATTRS_o_ai vector float
8760 vec_ceil(vector float __a) {
8761   // On this platform, vec_ceil never triggers the IEEE-inexact exception.
8762   return __builtin_s390_vfisb(__a, 4, 6);
8763 }
8764 #endif
8765
8766 static inline __ATTRS_o_ai vector double
8767 vec_ceil(vector double __a) {
8768   // On this platform, vec_ceil never triggers the IEEE-inexact exception.
8769   return __builtin_s390_vfidb(__a, 4, 6);
8770 }
8771
8772 /*-- vec_roundm -------------------------------------------------------------*/
8773
8774 #if __ARCH__ >= 12
8775 static inline __ATTRS_o_ai vector float
8776 vec_roundm(vector float __a) {
8777   return __builtin_s390_vfisb(__a, 4, 7);
8778 }
8779 #endif
8780
8781 static inline __ATTRS_o_ai vector double
8782 vec_roundm(vector double __a) {
8783   return __builtin_s390_vfidb(__a, 4, 7);
8784 }
8785
8786 /*-- vec_floor --------------------------------------------------------------*/
8787
8788 #if __ARCH__ >= 12
8789 static inline __ATTRS_o_ai vector float
8790 vec_floor(vector float __a) {
8791   // On this platform, vec_floor never triggers the IEEE-inexact exception.
8792   return __builtin_s390_vfisb(__a, 4, 7);
8793 }
8794 #endif
8795
8796 static inline __ATTRS_o_ai vector double
8797 vec_floor(vector double __a) {
8798   // On this platform, vec_floor never triggers the IEEE-inexact exception.
8799   return __builtin_s390_vfidb(__a, 4, 7);
8800 }
8801
8802 /*-- vec_roundz -------------------------------------------------------------*/
8803
8804 #if __ARCH__ >= 12
8805 static inline __ATTRS_o_ai vector float
8806 vec_roundz(vector float __a) {
8807   return __builtin_s390_vfisb(__a, 4, 5);
8808 }
8809 #endif
8810
8811 static inline __ATTRS_o_ai vector double
8812 vec_roundz(vector double __a) {
8813   return __builtin_s390_vfidb(__a, 4, 5);
8814 }
8815
8816 /*-- vec_trunc --------------------------------------------------------------*/
8817
8818 #if __ARCH__ >= 12
8819 static inline __ATTRS_o_ai vector float
8820 vec_trunc(vector float __a) {
8821   // On this platform, vec_trunc never triggers the IEEE-inexact exception.
8822   return __builtin_s390_vfisb(__a, 4, 5);
8823 }
8824 #endif
8825
8826 static inline __ATTRS_o_ai vector double
8827 vec_trunc(vector double __a) {
8828   // On this platform, vec_trunc never triggers the IEEE-inexact exception.
8829   return __builtin_s390_vfidb(__a, 4, 5);
8830 }
8831
8832 /*-- vec_roundc -------------------------------------------------------------*/
8833
8834 #if __ARCH__ >= 12
8835 static inline __ATTRS_o_ai vector float
8836 vec_roundc(vector float __a) {
8837   return __builtin_s390_vfisb(__a, 4, 0);
8838 }
8839 #endif
8840
8841 static inline __ATTRS_o_ai vector double
8842 vec_roundc(vector double __a) {
8843   return __builtin_s390_vfidb(__a, 4, 0);
8844 }
8845
8846 /*-- vec_rint ---------------------------------------------------------------*/
8847
8848 #if __ARCH__ >= 12
8849 static inline __ATTRS_o_ai vector float
8850 vec_rint(vector float __a) {
8851   // vec_rint may trigger the IEEE-inexact exception.
8852   return __builtin_s390_vfisb(__a, 0, 0);
8853 }
8854 #endif
8855
8856 static inline __ATTRS_o_ai vector double
8857 vec_rint(vector double __a) {
8858   // vec_rint may trigger the IEEE-inexact exception.
8859   return __builtin_s390_vfidb(__a, 0, 0);
8860 }
8861
8862 /*-- vec_round --------------------------------------------------------------*/
8863
8864 #if __ARCH__ >= 12
8865 static inline __ATTRS_o_ai vector float
8866 vec_round(vector float __a) {
8867   return __builtin_s390_vfisb(__a, 4, 4);
8868 }
8869 #endif
8870
8871 static inline __ATTRS_o_ai vector double
8872 vec_round(vector double __a) {
8873   return __builtin_s390_vfidb(__a, 4, 4);
8874 }
8875
8876 /*-- vec_fp_test_data_class -------------------------------------------------*/
8877
8878 #if __ARCH__ >= 12
8879 extern __ATTRS_o vector bool int
8880 vec_fp_test_data_class(vector float __a, int __b, int *__c)
8881   __constant_range(__b, 0, 4095);
8882
8883 extern __ATTRS_o vector bool long long
8884 vec_fp_test_data_class(vector double __a, int __b, int *__c)
8885   __constant_range(__b, 0, 4095);
8886
8887 #define vec_fp_test_data_class(X, Y, Z) \
8888   ((__typeof__((vec_fp_test_data_class)((X), (Y), (Z)))) \
8889    __extension__ ({ \
8890      vector unsigned char __res; \
8891      vector unsigned char __x = (vector unsigned char)(X); \
8892      int *__z = (Z); \
8893      switch (sizeof ((X)[0])) { \
8894      case 4:  __res = (vector unsigned char) \
8895                       __builtin_s390_vftcisb((vector float)__x, (Y), __z); \
8896               break; \
8897      default: __res = (vector unsigned char) \
8898                       __builtin_s390_vftcidb((vector double)__x, (Y), __z); \
8899               break; \
8900      } __res; }))
8901 #else
8902 #define vec_fp_test_data_class(X, Y, Z) \
8903   ((vector bool long long)__builtin_s390_vftcidb((X), (Y), (Z)))
8904 #endif
8905
8906 #define __VEC_CLASS_FP_ZERO_P (1 << 11)
8907 #define __VEC_CLASS_FP_ZERO_N (1 << 10)
8908 #define __VEC_CLASS_FP_ZERO (__VEC_CLASS_FP_ZERO_P | __VEC_CLASS_FP_ZERO_N)
8909 #define __VEC_CLASS_FP_NORMAL_P (1 << 9)
8910 #define __VEC_CLASS_FP_NORMAL_N (1 << 8)
8911 #define __VEC_CLASS_FP_NORMAL (__VEC_CLASS_FP_NORMAL_P | \
8912                                __VEC_CLASS_FP_NORMAL_N)
8913 #define __VEC_CLASS_FP_SUBNORMAL_P (1 << 7)
8914 #define __VEC_CLASS_FP_SUBNORMAL_N (1 << 6)
8915 #define __VEC_CLASS_FP_SUBNORMAL (__VEC_CLASS_FP_SUBNORMAL_P | \
8916                                   __VEC_CLASS_FP_SUBNORMAL_N)
8917 #define __VEC_CLASS_FP_INFINITY_P (1 << 5)
8918 #define __VEC_CLASS_FP_INFINITY_N (1 << 4)
8919 #define __VEC_CLASS_FP_INFINITY (__VEC_CLASS_FP_INFINITY_P | \
8920                                  __VEC_CLASS_FP_INFINITY_N)
8921 #define __VEC_CLASS_FP_QNAN_P (1 << 3)
8922 #define __VEC_CLASS_FP_QNAN_N (1 << 2)
8923 #define __VEC_CLASS_FP_QNAN (__VEC_CLASS_FP_QNAN_P | __VEC_CLASS_FP_QNAN_N)
8924 #define __VEC_CLASS_FP_SNAN_P (1 << 1)
8925 #define __VEC_CLASS_FP_SNAN_N (1 << 0)
8926 #define __VEC_CLASS_FP_SNAN (__VEC_CLASS_FP_SNAN_P | __VEC_CLASS_FP_SNAN_N)
8927 #define __VEC_CLASS_FP_NAN (__VEC_CLASS_FP_QNAN | __VEC_CLASS_FP_SNAN)
8928 #define __VEC_CLASS_FP_NOT_NORMAL (__VEC_CLASS_FP_NAN | \
8929                                    __VEC_CLASS_FP_SUBNORMAL | \
8930                                    __VEC_CLASS_FP_ZERO | \
8931                                    __VEC_CLASS_FP_INFINITY)
8932
8933 /*-- vec_cp_until_zero ------------------------------------------------------*/
8934
8935 static inline __ATTRS_o_ai vector signed char
8936 vec_cp_until_zero(vector signed char __a) {
8937   return (vector signed char)__builtin_s390_vistrb((vector unsigned char)__a);
8938 }
8939
8940 static inline __ATTRS_o_ai vector bool char
8941 vec_cp_until_zero(vector bool char __a) {
8942   return (vector bool char)__builtin_s390_vistrb((vector unsigned char)__a);
8943 }
8944
8945 static inline __ATTRS_o_ai vector unsigned char
8946 vec_cp_until_zero(vector unsigned char __a) {
8947   return __builtin_s390_vistrb(__a);
8948 }
8949
8950 static inline __ATTRS_o_ai vector signed short
8951 vec_cp_until_zero(vector signed short __a) {
8952   return (vector signed short)__builtin_s390_vistrh((vector unsigned short)__a);
8953 }
8954
8955 static inline __ATTRS_o_ai vector bool short
8956 vec_cp_until_zero(vector bool short __a) {
8957   return (vector bool short)__builtin_s390_vistrh((vector unsigned short)__a);
8958 }
8959
8960 static inline __ATTRS_o_ai vector unsigned short
8961 vec_cp_until_zero(vector unsigned short __a) {
8962   return __builtin_s390_vistrh(__a);
8963 }
8964
8965 static inline __ATTRS_o_ai vector signed int
8966 vec_cp_until_zero(vector signed int __a) {
8967   return (vector signed int)__builtin_s390_vistrf((vector unsigned int)__a);
8968 }
8969
8970 static inline __ATTRS_o_ai vector bool int
8971 vec_cp_until_zero(vector bool int __a) {
8972   return (vector bool int)__builtin_s390_vistrf((vector unsigned int)__a);
8973 }
8974
8975 static inline __ATTRS_o_ai vector unsigned int
8976 vec_cp_until_zero(vector unsigned int __a) {
8977   return __builtin_s390_vistrf(__a);
8978 }
8979
8980 /*-- vec_cp_until_zero_cc ---------------------------------------------------*/
8981
8982 static inline __ATTRS_o_ai vector signed char
8983 vec_cp_until_zero_cc(vector signed char __a, int *__cc) {
8984   return (vector signed char)
8985     __builtin_s390_vistrbs((vector unsigned char)__a, __cc);
8986 }
8987
8988 static inline __ATTRS_o_ai vector bool char
8989 vec_cp_until_zero_cc(vector bool char __a, int *__cc) {
8990   return (vector bool char)
8991     __builtin_s390_vistrbs((vector unsigned char)__a, __cc);
8992 }
8993
8994 static inline __ATTRS_o_ai vector unsigned char
8995 vec_cp_until_zero_cc(vector unsigned char __a, int *__cc) {
8996   return __builtin_s390_vistrbs(__a, __cc);
8997 }
8998
8999 static inline __ATTRS_o_ai vector signed short
9000 vec_cp_until_zero_cc(vector signed short __a, int *__cc) {
9001   return (vector signed short)
9002     __builtin_s390_vistrhs((vector unsigned short)__a, __cc);
9003 }
9004
9005 static inline __ATTRS_o_ai vector bool short
9006 vec_cp_until_zero_cc(vector bool short __a, int *__cc) {
9007   return (vector bool short)
9008     __builtin_s390_vistrhs((vector unsigned short)__a, __cc);
9009 }
9010
9011 static inline __ATTRS_o_ai vector unsigned short
9012 vec_cp_until_zero_cc(vector unsigned short __a, int *__cc) {
9013   return __builtin_s390_vistrhs(__a, __cc);
9014 }
9015
9016 static inline __ATTRS_o_ai vector signed int
9017 vec_cp_until_zero_cc(vector signed int __a, int *__cc) {
9018   return (vector signed int)
9019     __builtin_s390_vistrfs((vector unsigned int)__a, __cc);
9020 }
9021
9022 static inline __ATTRS_o_ai vector bool int
9023 vec_cp_until_zero_cc(vector bool int __a, int *__cc) {
9024   return (vector bool int)__builtin_s390_vistrfs((vector unsigned int)__a,
9025                                                  __cc);
9026 }
9027
9028 static inline __ATTRS_o_ai vector unsigned int
9029 vec_cp_until_zero_cc(vector unsigned int __a, int *__cc) {
9030   return __builtin_s390_vistrfs(__a, __cc);
9031 }
9032
9033 /*-- vec_cmpeq_idx ----------------------------------------------------------*/
9034
9035 static inline __ATTRS_o_ai vector signed char
9036 vec_cmpeq_idx(vector signed char __a, vector signed char __b) {
9037   return (vector signed char)
9038     __builtin_s390_vfeeb((vector unsigned char)__a,
9039                          (vector unsigned char)__b);
9040 }
9041
9042 static inline __ATTRS_o_ai vector unsigned char
9043 vec_cmpeq_idx(vector bool char __a, vector bool char __b) {
9044   return __builtin_s390_vfeeb((vector unsigned char)__a,
9045                               (vector unsigned char)__b);
9046 }
9047
9048 static inline __ATTRS_o_ai vector unsigned char
9049 vec_cmpeq_idx(vector unsigned char __a, vector unsigned char __b) {
9050   return __builtin_s390_vfeeb(__a, __b);
9051 }
9052
9053 static inline __ATTRS_o_ai vector signed short
9054 vec_cmpeq_idx(vector signed short __a, vector signed short __b) {
9055   return (vector signed short)
9056     __builtin_s390_vfeeh((vector unsigned short)__a,
9057                          (vector unsigned short)__b);
9058 }
9059
9060 static inline __ATTRS_o_ai vector unsigned short
9061 vec_cmpeq_idx(vector bool short __a, vector bool short __b) {
9062   return __builtin_s390_vfeeh((vector unsigned short)__a,
9063                               (vector unsigned short)__b);
9064 }
9065
9066 static inline __ATTRS_o_ai vector unsigned short
9067 vec_cmpeq_idx(vector unsigned short __a, vector unsigned short __b) {
9068   return __builtin_s390_vfeeh(__a, __b);
9069 }
9070
9071 static inline __ATTRS_o_ai vector signed int
9072 vec_cmpeq_idx(vector signed int __a, vector signed int __b) {
9073   return (vector signed int)
9074     __builtin_s390_vfeef((vector unsigned int)__a,
9075                          (vector unsigned int)__b);
9076 }
9077
9078 static inline __ATTRS_o_ai vector unsigned int
9079 vec_cmpeq_idx(vector bool int __a, vector bool int __b) {
9080   return __builtin_s390_vfeef((vector unsigned int)__a,
9081                               (vector unsigned int)__b);
9082 }
9083
9084 static inline __ATTRS_o_ai vector unsigned int
9085 vec_cmpeq_idx(vector unsigned int __a, vector unsigned int __b) {
9086   return __builtin_s390_vfeef(__a, __b);
9087 }
9088
9089 /*-- vec_cmpeq_idx_cc -------------------------------------------------------*/
9090
9091 static inline __ATTRS_o_ai vector signed char
9092 vec_cmpeq_idx_cc(vector signed char __a, vector signed char __b, int *__cc) {
9093   return (vector signed char)
9094     __builtin_s390_vfeebs((vector unsigned char)__a,
9095                           (vector unsigned char)__b, __cc);
9096 }
9097
9098 static inline __ATTRS_o_ai vector unsigned char
9099 vec_cmpeq_idx_cc(vector bool char __a, vector bool char __b, int *__cc) {
9100   return __builtin_s390_vfeebs((vector unsigned char)__a,
9101                                (vector unsigned char)__b, __cc);
9102 }
9103
9104 static inline __ATTRS_o_ai vector unsigned char
9105 vec_cmpeq_idx_cc(vector unsigned char __a, vector unsigned char __b,
9106                  int *__cc) {
9107   return __builtin_s390_vfeebs(__a, __b, __cc);
9108 }
9109
9110 static inline __ATTRS_o_ai vector signed short
9111 vec_cmpeq_idx_cc(vector signed short __a, vector signed short __b, int *__cc) {
9112   return (vector signed short)
9113     __builtin_s390_vfeehs((vector unsigned short)__a,
9114                           (vector unsigned short)__b, __cc);
9115 }
9116
9117 static inline __ATTRS_o_ai vector unsigned short
9118 vec_cmpeq_idx_cc(vector bool short __a, vector bool short __b, int *__cc) {
9119   return __builtin_s390_vfeehs((vector unsigned short)__a,
9120                                (vector unsigned short)__b, __cc);
9121 }
9122
9123 static inline __ATTRS_o_ai vector unsigned short
9124 vec_cmpeq_idx_cc(vector unsigned short __a, vector unsigned short __b,
9125                  int *__cc) {
9126   return __builtin_s390_vfeehs(__a, __b, __cc);
9127 }
9128
9129 static inline __ATTRS_o_ai vector signed int
9130 vec_cmpeq_idx_cc(vector signed int __a, vector signed int __b, int *__cc) {
9131   return (vector signed int)
9132     __builtin_s390_vfeefs((vector unsigned int)__a,
9133                           (vector unsigned int)__b, __cc);
9134 }
9135
9136 static inline __ATTRS_o_ai vector unsigned int
9137 vec_cmpeq_idx_cc(vector bool int __a, vector bool int __b, int *__cc) {
9138   return __builtin_s390_vfeefs((vector unsigned int)__a,
9139                                (vector unsigned int)__b, __cc);
9140 }
9141
9142 static inline __ATTRS_o_ai vector unsigned int
9143 vec_cmpeq_idx_cc(vector unsigned int __a, vector unsigned int __b, int *__cc) {
9144   return __builtin_s390_vfeefs(__a, __b, __cc);
9145 }
9146
9147 /*-- vec_cmpeq_or_0_idx -----------------------------------------------------*/
9148
9149 static inline __ATTRS_o_ai vector signed char
9150 vec_cmpeq_or_0_idx(vector signed char __a, vector signed char __b) {
9151   return (vector signed char)
9152     __builtin_s390_vfeezb((vector unsigned char)__a,
9153                           (vector unsigned char)__b);
9154 }
9155
9156 static inline __ATTRS_o_ai vector unsigned char
9157 vec_cmpeq_or_0_idx(vector bool char __a, vector bool char __b) {
9158   return __builtin_s390_vfeezb((vector unsigned char)__a,
9159                                (vector unsigned char)__b);
9160 }
9161
9162 static inline __ATTRS_o_ai vector unsigned char
9163 vec_cmpeq_or_0_idx(vector unsigned char __a, vector unsigned char __b) {
9164   return __builtin_s390_vfeezb(__a, __b);
9165 }
9166
9167 static inline __ATTRS_o_ai vector signed short
9168 vec_cmpeq_or_0_idx(vector signed short __a, vector signed short __b) {
9169   return (vector signed short)
9170     __builtin_s390_vfeezh((vector unsigned short)__a,
9171                           (vector unsigned short)__b);
9172 }
9173
9174 static inline __ATTRS_o_ai vector unsigned short
9175 vec_cmpeq_or_0_idx(vector bool short __a, vector bool short __b) {
9176   return __builtin_s390_vfeezh((vector unsigned short)__a,
9177                                (vector unsigned short)__b);
9178 }
9179
9180 static inline __ATTRS_o_ai vector unsigned short
9181 vec_cmpeq_or_0_idx(vector unsigned short __a, vector unsigned short __b) {
9182   return __builtin_s390_vfeezh(__a, __b);
9183 }
9184
9185 static inline __ATTRS_o_ai vector signed int
9186 vec_cmpeq_or_0_idx(vector signed int __a, vector signed int __b) {
9187   return (vector signed int)
9188     __builtin_s390_vfeezf((vector unsigned int)__a,
9189                           (vector unsigned int)__b);
9190 }
9191
9192 static inline __ATTRS_o_ai vector unsigned int
9193 vec_cmpeq_or_0_idx(vector bool int __a, vector bool int __b) {
9194   return __builtin_s390_vfeezf((vector unsigned int)__a,
9195                                (vector unsigned int)__b);
9196 }
9197
9198 static inline __ATTRS_o_ai vector unsigned int
9199 vec_cmpeq_or_0_idx(vector unsigned int __a, vector unsigned int __b) {
9200   return __builtin_s390_vfeezf(__a, __b);
9201 }
9202
9203 /*-- vec_cmpeq_or_0_idx_cc --------------------------------------------------*/
9204
9205 static inline __ATTRS_o_ai vector signed char
9206 vec_cmpeq_or_0_idx_cc(vector signed char __a, vector signed char __b,
9207                       int *__cc) {
9208   return (vector signed char)
9209     __builtin_s390_vfeezbs((vector unsigned char)__a,
9210                            (vector unsigned char)__b, __cc);
9211 }
9212
9213 static inline __ATTRS_o_ai vector unsigned char
9214 vec_cmpeq_or_0_idx_cc(vector bool char __a, vector bool char __b, int *__cc) {
9215   return __builtin_s390_vfeezbs((vector unsigned char)__a,
9216                                 (vector unsigned char)__b, __cc);
9217 }
9218
9219 static inline __ATTRS_o_ai vector unsigned char
9220 vec_cmpeq_or_0_idx_cc(vector unsigned char __a, vector unsigned char __b,
9221                       int *__cc) {
9222   return __builtin_s390_vfeezbs(__a, __b, __cc);
9223 }
9224
9225 static inline __ATTRS_o_ai vector signed short
9226 vec_cmpeq_or_0_idx_cc(vector signed short __a, vector signed short __b,
9227                       int *__cc) {
9228   return (vector signed short)
9229     __builtin_s390_vfeezhs((vector unsigned short)__a,
9230                            (vector unsigned short)__b, __cc);
9231 }
9232
9233 static inline __ATTRS_o_ai vector unsigned short
9234 vec_cmpeq_or_0_idx_cc(vector bool short __a, vector bool short __b, int *__cc) {
9235   return __builtin_s390_vfeezhs((vector unsigned short)__a,
9236                                 (vector unsigned short)__b, __cc);
9237 }
9238
9239 static inline __ATTRS_o_ai vector unsigned short
9240 vec_cmpeq_or_0_idx_cc(vector unsigned short __a, vector unsigned short __b,
9241                       int *__cc) {
9242   return __builtin_s390_vfeezhs(__a, __b, __cc);
9243 }
9244
9245 static inline __ATTRS_o_ai vector signed int
9246 vec_cmpeq_or_0_idx_cc(vector signed int __a, vector signed int __b, int *__cc) {
9247   return (vector signed int)
9248     __builtin_s390_vfeezfs((vector unsigned int)__a,
9249                            (vector unsigned int)__b, __cc);
9250 }
9251
9252 static inline __ATTRS_o_ai vector unsigned int
9253 vec_cmpeq_or_0_idx_cc(vector bool int __a, vector bool int __b, int *__cc) {
9254   return __builtin_s390_vfeezfs((vector unsigned int)__a,
9255                                 (vector unsigned int)__b, __cc);
9256 }
9257
9258 static inline __ATTRS_o_ai vector unsigned int
9259 vec_cmpeq_or_0_idx_cc(vector unsigned int __a, vector unsigned int __b,
9260                       int *__cc) {
9261   return __builtin_s390_vfeezfs(__a, __b, __cc);
9262 }
9263
9264 /*-- vec_cmpne_idx ----------------------------------------------------------*/
9265
9266 static inline __ATTRS_o_ai vector signed char
9267 vec_cmpne_idx(vector signed char __a, vector signed char __b) {
9268   return (vector signed char)
9269     __builtin_s390_vfeneb((vector unsigned char)__a,
9270                           (vector unsigned char)__b);
9271 }
9272
9273 static inline __ATTRS_o_ai vector unsigned char
9274 vec_cmpne_idx(vector bool char __a, vector bool char __b) {
9275   return __builtin_s390_vfeneb((vector unsigned char)__a,
9276                                (vector unsigned char)__b);
9277 }
9278
9279 static inline __ATTRS_o_ai vector unsigned char
9280 vec_cmpne_idx(vector unsigned char __a, vector unsigned char __b) {
9281   return __builtin_s390_vfeneb(__a, __b);
9282 }
9283
9284 static inline __ATTRS_o_ai vector signed short
9285 vec_cmpne_idx(vector signed short __a, vector signed short __b) {
9286   return (vector signed short)
9287     __builtin_s390_vfeneh((vector unsigned short)__a,
9288                           (vector unsigned short)__b);
9289 }
9290
9291 static inline __ATTRS_o_ai vector unsigned short
9292 vec_cmpne_idx(vector bool short __a, vector bool short __b) {
9293   return __builtin_s390_vfeneh((vector unsigned short)__a,
9294                                (vector unsigned short)__b);
9295 }
9296
9297 static inline __ATTRS_o_ai vector unsigned short
9298 vec_cmpne_idx(vector unsigned short __a, vector unsigned short __b) {
9299   return __builtin_s390_vfeneh(__a, __b);
9300 }
9301
9302 static inline __ATTRS_o_ai vector signed int
9303 vec_cmpne_idx(vector signed int __a, vector signed int __b) {
9304   return (vector signed int)
9305     __builtin_s390_vfenef((vector unsigned int)__a,
9306                           (vector unsigned int)__b);
9307 }
9308
9309 static inline __ATTRS_o_ai vector unsigned int
9310 vec_cmpne_idx(vector bool int __a, vector bool int __b) {
9311   return __builtin_s390_vfenef((vector unsigned int)__a,
9312                                (vector unsigned int)__b);
9313 }
9314
9315 static inline __ATTRS_o_ai vector unsigned int
9316 vec_cmpne_idx(vector unsigned int __a, vector unsigned int __b) {
9317   return __builtin_s390_vfenef(__a, __b);
9318 }
9319
9320 /*-- vec_cmpne_idx_cc -------------------------------------------------------*/
9321
9322 static inline __ATTRS_o_ai vector signed char
9323 vec_cmpne_idx_cc(vector signed char __a, vector signed char __b, int *__cc) {
9324   return (vector signed char)
9325     __builtin_s390_vfenebs((vector unsigned char)__a,
9326                            (vector unsigned char)__b, __cc);
9327 }
9328
9329 static inline __ATTRS_o_ai vector unsigned char
9330 vec_cmpne_idx_cc(vector bool char __a, vector bool char __b, int *__cc) {
9331   return __builtin_s390_vfenebs((vector unsigned char)__a,
9332                                 (vector unsigned char)__b, __cc);
9333 }
9334
9335 static inline __ATTRS_o_ai vector unsigned char
9336 vec_cmpne_idx_cc(vector unsigned char __a, vector unsigned char __b,
9337                  int *__cc) {
9338   return __builtin_s390_vfenebs(__a, __b, __cc);
9339 }
9340
9341 static inline __ATTRS_o_ai vector signed short
9342 vec_cmpne_idx_cc(vector signed short __a, vector signed short __b, int *__cc) {
9343   return (vector signed short)
9344     __builtin_s390_vfenehs((vector unsigned short)__a,
9345                            (vector unsigned short)__b, __cc);
9346 }
9347
9348 static inline __ATTRS_o_ai vector unsigned short
9349 vec_cmpne_idx_cc(vector bool short __a, vector bool short __b, int *__cc) {
9350   return __builtin_s390_vfenehs((vector unsigned short)__a,
9351                                 (vector unsigned short)__b, __cc);
9352 }
9353
9354 static inline __ATTRS_o_ai vector unsigned short
9355 vec_cmpne_idx_cc(vector unsigned short __a, vector unsigned short __b,
9356                  int *__cc) {
9357   return __builtin_s390_vfenehs(__a, __b, __cc);
9358 }
9359
9360 static inline __ATTRS_o_ai vector signed int
9361 vec_cmpne_idx_cc(vector signed int __a, vector signed int __b, int *__cc) {
9362   return (vector signed int)
9363     __builtin_s390_vfenefs((vector unsigned int)__a,
9364                            (vector unsigned int)__b, __cc);
9365 }
9366
9367 static inline __ATTRS_o_ai vector unsigned int
9368 vec_cmpne_idx_cc(vector bool int __a, vector bool int __b, int *__cc) {
9369   return __builtin_s390_vfenefs((vector unsigned int)__a,
9370                                 (vector unsigned int)__b, __cc);
9371 }
9372
9373 static inline __ATTRS_o_ai vector unsigned int
9374 vec_cmpne_idx_cc(vector unsigned int __a, vector unsigned int __b, int *__cc) {
9375   return __builtin_s390_vfenefs(__a, __b, __cc);
9376 }
9377
9378 /*-- vec_cmpne_or_0_idx -----------------------------------------------------*/
9379
9380 static inline __ATTRS_o_ai vector signed char
9381 vec_cmpne_or_0_idx(vector signed char __a, vector signed char __b) {
9382   return (vector signed char)
9383     __builtin_s390_vfenezb((vector unsigned char)__a,
9384                            (vector unsigned char)__b);
9385 }
9386
9387 static inline __ATTRS_o_ai vector unsigned char
9388 vec_cmpne_or_0_idx(vector bool char __a, vector bool char __b) {
9389   return __builtin_s390_vfenezb((vector unsigned char)__a,
9390                                 (vector unsigned char)__b);
9391 }
9392
9393 static inline __ATTRS_o_ai vector unsigned char
9394 vec_cmpne_or_0_idx(vector unsigned char __a, vector unsigned char __b) {
9395   return __builtin_s390_vfenezb(__a, __b);
9396 }
9397
9398 static inline __ATTRS_o_ai vector signed short
9399 vec_cmpne_or_0_idx(vector signed short __a, vector signed short __b) {
9400   return (vector signed short)
9401     __builtin_s390_vfenezh((vector unsigned short)__a,
9402                            (vector unsigned short)__b);
9403 }
9404
9405 static inline __ATTRS_o_ai vector unsigned short
9406 vec_cmpne_or_0_idx(vector bool short __a, vector bool short __b) {
9407   return __builtin_s390_vfenezh((vector unsigned short)__a,
9408                                 (vector unsigned short)__b);
9409 }
9410
9411 static inline __ATTRS_o_ai vector unsigned short
9412 vec_cmpne_or_0_idx(vector unsigned short __a, vector unsigned short __b) {
9413   return __builtin_s390_vfenezh(__a, __b);
9414 }
9415
9416 static inline __ATTRS_o_ai vector signed int
9417 vec_cmpne_or_0_idx(vector signed int __a, vector signed int __b) {
9418   return (vector signed int)
9419     __builtin_s390_vfenezf((vector unsigned int)__a,
9420                            (vector unsigned int)__b);
9421 }
9422
9423 static inline __ATTRS_o_ai vector unsigned int
9424 vec_cmpne_or_0_idx(vector bool int __a, vector bool int __b) {
9425   return __builtin_s390_vfenezf((vector unsigned int)__a,
9426                                 (vector unsigned int)__b);
9427 }
9428
9429 static inline __ATTRS_o_ai vector unsigned int
9430 vec_cmpne_or_0_idx(vector unsigned int __a, vector unsigned int __b) {
9431   return __builtin_s390_vfenezf(__a, __b);
9432 }
9433
9434 /*-- vec_cmpne_or_0_idx_cc --------------------------------------------------*/
9435
9436 static inline __ATTRS_o_ai vector signed char
9437 vec_cmpne_or_0_idx_cc(vector signed char __a, vector signed char __b,
9438                       int *__cc) {
9439   return (vector signed char)
9440     __builtin_s390_vfenezbs((vector unsigned char)__a,
9441                             (vector unsigned char)__b, __cc);
9442 }
9443
9444 static inline __ATTRS_o_ai vector unsigned char
9445 vec_cmpne_or_0_idx_cc(vector bool char __a, vector bool char __b, int *__cc) {
9446   return __builtin_s390_vfenezbs((vector unsigned char)__a,
9447                                  (vector unsigned char)__b, __cc);
9448 }
9449
9450 static inline __ATTRS_o_ai vector unsigned char
9451 vec_cmpne_or_0_idx_cc(vector unsigned char __a, vector unsigned char __b,
9452                       int *__cc) {
9453   return __builtin_s390_vfenezbs(__a, __b, __cc);
9454 }
9455
9456 static inline __ATTRS_o_ai vector signed short
9457 vec_cmpne_or_0_idx_cc(vector signed short __a, vector signed short __b,
9458                       int *__cc) {
9459   return (vector signed short)
9460     __builtin_s390_vfenezhs((vector unsigned short)__a,
9461                             (vector unsigned short)__b, __cc);
9462 }
9463
9464 static inline __ATTRS_o_ai vector unsigned short
9465 vec_cmpne_or_0_idx_cc(vector bool short __a, vector bool short __b, int *__cc) {
9466   return __builtin_s390_vfenezhs((vector unsigned short)__a,
9467                                  (vector unsigned short)__b, __cc);
9468 }
9469
9470 static inline __ATTRS_o_ai vector unsigned short
9471 vec_cmpne_or_0_idx_cc(vector unsigned short __a, vector unsigned short __b,
9472                       int *__cc) {
9473   return __builtin_s390_vfenezhs(__a, __b, __cc);
9474 }
9475
9476 static inline __ATTRS_o_ai vector signed int
9477 vec_cmpne_or_0_idx_cc(vector signed int __a, vector signed int __b, int *__cc) {
9478   return (vector signed int)
9479     __builtin_s390_vfenezfs((vector unsigned int)__a,
9480                             (vector unsigned int)__b, __cc);
9481 }
9482
9483 static inline __ATTRS_o_ai vector unsigned int
9484 vec_cmpne_or_0_idx_cc(vector bool int __a, vector bool int __b, int *__cc) {
9485   return __builtin_s390_vfenezfs((vector unsigned int)__a,
9486                                  (vector unsigned int)__b, __cc);
9487 }
9488
9489 static inline __ATTRS_o_ai vector unsigned int
9490 vec_cmpne_or_0_idx_cc(vector unsigned int __a, vector unsigned int __b,
9491                       int *__cc) {
9492   return __builtin_s390_vfenezfs(__a, __b, __cc);
9493 }
9494
9495 /*-- vec_cmprg --------------------------------------------------------------*/
9496
9497 static inline __ATTRS_o_ai vector bool char
9498 vec_cmprg(vector unsigned char __a, vector unsigned char __b,
9499           vector unsigned char __c) {
9500   return (vector bool char)__builtin_s390_vstrcb(__a, __b, __c, 4);
9501 }
9502
9503 static inline __ATTRS_o_ai vector bool short
9504 vec_cmprg(vector unsigned short __a, vector unsigned short __b,
9505           vector unsigned short __c) {
9506   return (vector bool short)__builtin_s390_vstrch(__a, __b, __c, 4);
9507 }
9508
9509 static inline __ATTRS_o_ai vector bool int
9510 vec_cmprg(vector unsigned int __a, vector unsigned int __b,
9511           vector unsigned int __c) {
9512   return (vector bool int)__builtin_s390_vstrcf(__a, __b, __c, 4);
9513 }
9514
9515 /*-- vec_cmprg_cc -----------------------------------------------------------*/
9516
9517 static inline __ATTRS_o_ai vector bool char
9518 vec_cmprg_cc(vector unsigned char __a, vector unsigned char __b,
9519              vector unsigned char __c, int *__cc) {
9520   return (vector bool char)__builtin_s390_vstrcbs(__a, __b, __c, 4, __cc);
9521 }
9522
9523 static inline __ATTRS_o_ai vector bool short
9524 vec_cmprg_cc(vector unsigned short __a, vector unsigned short __b,
9525              vector unsigned short __c, int *__cc) {
9526   return (vector bool short)__builtin_s390_vstrchs(__a, __b, __c, 4, __cc);
9527 }
9528
9529 static inline __ATTRS_o_ai vector bool int
9530 vec_cmprg_cc(vector unsigned int __a, vector unsigned int __b,
9531              vector unsigned int __c, int *__cc) {
9532   return (vector bool int)__builtin_s390_vstrcfs(__a, __b, __c, 4, __cc);
9533 }
9534
9535 /*-- vec_cmprg_idx ----------------------------------------------------------*/
9536
9537 static inline __ATTRS_o_ai vector unsigned char
9538 vec_cmprg_idx(vector unsigned char __a, vector unsigned char __b,
9539               vector unsigned char __c) {
9540   return __builtin_s390_vstrcb(__a, __b, __c, 0);
9541 }
9542
9543 static inline __ATTRS_o_ai vector unsigned short
9544 vec_cmprg_idx(vector unsigned short __a, vector unsigned short __b,
9545               vector unsigned short __c) {
9546   return __builtin_s390_vstrch(__a, __b, __c, 0);
9547 }
9548
9549 static inline __ATTRS_o_ai vector unsigned int
9550 vec_cmprg_idx(vector unsigned int __a, vector unsigned int __b,
9551               vector unsigned int __c) {
9552   return __builtin_s390_vstrcf(__a, __b, __c, 0);
9553 }
9554
9555 /*-- vec_cmprg_idx_cc -------------------------------------------------------*/
9556
9557 static inline __ATTRS_o_ai vector unsigned char
9558 vec_cmprg_idx_cc(vector unsigned char __a, vector unsigned char __b,
9559                  vector unsigned char __c, int *__cc) {
9560   return __builtin_s390_vstrcbs(__a, __b, __c, 0, __cc);
9561 }
9562
9563 static inline __ATTRS_o_ai vector unsigned short
9564 vec_cmprg_idx_cc(vector unsigned short __a, vector unsigned short __b,
9565                  vector unsigned short __c, int *__cc) {
9566   return __builtin_s390_vstrchs(__a, __b, __c, 0, __cc);
9567 }
9568
9569 static inline __ATTRS_o_ai vector unsigned int
9570 vec_cmprg_idx_cc(vector unsigned int __a, vector unsigned int __b,
9571                  vector unsigned int __c, int *__cc) {
9572   return __builtin_s390_vstrcfs(__a, __b, __c, 0, __cc);
9573 }
9574
9575 /*-- vec_cmprg_or_0_idx -----------------------------------------------------*/
9576
9577 static inline __ATTRS_o_ai vector unsigned char
9578 vec_cmprg_or_0_idx(vector unsigned char __a, vector unsigned char __b,
9579                    vector unsigned char __c) {
9580   return __builtin_s390_vstrczb(__a, __b, __c, 0);
9581 }
9582
9583 static inline __ATTRS_o_ai vector unsigned short
9584 vec_cmprg_or_0_idx(vector unsigned short __a, vector unsigned short __b,
9585                    vector unsigned short __c) {
9586   return __builtin_s390_vstrczh(__a, __b, __c, 0);
9587 }
9588
9589 static inline __ATTRS_o_ai vector unsigned int
9590 vec_cmprg_or_0_idx(vector unsigned int __a, vector unsigned int __b,
9591                    vector unsigned int __c) {
9592   return __builtin_s390_vstrczf(__a, __b, __c, 0);
9593 }
9594
9595 /*-- vec_cmprg_or_0_idx_cc --------------------------------------------------*/
9596
9597 static inline __ATTRS_o_ai vector unsigned char
9598 vec_cmprg_or_0_idx_cc(vector unsigned char __a, vector unsigned char __b,
9599                       vector unsigned char __c, int *__cc) {
9600   return __builtin_s390_vstrczbs(__a, __b, __c, 0, __cc);
9601 }
9602
9603 static inline __ATTRS_o_ai vector unsigned short
9604 vec_cmprg_or_0_idx_cc(vector unsigned short __a, vector unsigned short __b,
9605                       vector unsigned short __c, int *__cc) {
9606   return __builtin_s390_vstrczhs(__a, __b, __c, 0, __cc);
9607 }
9608
9609 static inline __ATTRS_o_ai vector unsigned int
9610 vec_cmprg_or_0_idx_cc(vector unsigned int __a, vector unsigned int __b,
9611                       vector unsigned int __c, int *__cc) {
9612   return __builtin_s390_vstrczfs(__a, __b, __c, 0, __cc);
9613 }
9614
9615 /*-- vec_cmpnrg -------------------------------------------------------------*/
9616
9617 static inline __ATTRS_o_ai vector bool char
9618 vec_cmpnrg(vector unsigned char __a, vector unsigned char __b,
9619            vector unsigned char __c) {
9620   return (vector bool char)__builtin_s390_vstrcb(__a, __b, __c, 12);
9621 }
9622
9623 static inline __ATTRS_o_ai vector bool short
9624 vec_cmpnrg(vector unsigned short __a, vector unsigned short __b,
9625            vector unsigned short __c) {
9626   return (vector bool short)__builtin_s390_vstrch(__a, __b, __c, 12);
9627 }
9628
9629 static inline __ATTRS_o_ai vector bool int
9630 vec_cmpnrg(vector unsigned int __a, vector unsigned int __b,
9631            vector unsigned int __c) {
9632   return (vector bool int)__builtin_s390_vstrcf(__a, __b, __c, 12);
9633 }
9634
9635 /*-- vec_cmpnrg_cc ----------------------------------------------------------*/
9636
9637 static inline __ATTRS_o_ai vector bool char
9638 vec_cmpnrg_cc(vector unsigned char __a, vector unsigned char __b,
9639               vector unsigned char __c, int *__cc) {
9640   return (vector bool char)__builtin_s390_vstrcbs(__a, __b, __c, 12, __cc);
9641 }
9642
9643 static inline __ATTRS_o_ai vector bool short
9644 vec_cmpnrg_cc(vector unsigned short __a, vector unsigned short __b,
9645               vector unsigned short __c, int *__cc) {
9646   return (vector bool short)__builtin_s390_vstrchs(__a, __b, __c, 12, __cc);
9647 }
9648
9649 static inline __ATTRS_o_ai vector bool int
9650 vec_cmpnrg_cc(vector unsigned int __a, vector unsigned int __b,
9651               vector unsigned int __c, int *__cc) {
9652   return (vector bool int)__builtin_s390_vstrcfs(__a, __b, __c, 12, __cc);
9653 }
9654
9655 /*-- vec_cmpnrg_idx ---------------------------------------------------------*/
9656
9657 static inline __ATTRS_o_ai vector unsigned char
9658 vec_cmpnrg_idx(vector unsigned char __a, vector unsigned char __b,
9659                vector unsigned char __c) {
9660   return __builtin_s390_vstrcb(__a, __b, __c, 8);
9661 }
9662
9663 static inline __ATTRS_o_ai vector unsigned short
9664 vec_cmpnrg_idx(vector unsigned short __a, vector unsigned short __b,
9665                vector unsigned short __c) {
9666   return __builtin_s390_vstrch(__a, __b, __c, 8);
9667 }
9668
9669 static inline __ATTRS_o_ai vector unsigned int
9670 vec_cmpnrg_idx(vector unsigned int __a, vector unsigned int __b,
9671                vector unsigned int __c) {
9672   return __builtin_s390_vstrcf(__a, __b, __c, 8);
9673 }
9674
9675 /*-- vec_cmpnrg_idx_cc ------------------------------------------------------*/
9676
9677 static inline __ATTRS_o_ai vector unsigned char
9678 vec_cmpnrg_idx_cc(vector unsigned char __a, vector unsigned char __b,
9679                   vector unsigned char __c, int *__cc) {
9680   return __builtin_s390_vstrcbs(__a, __b, __c, 8, __cc);
9681 }
9682
9683 static inline __ATTRS_o_ai vector unsigned short
9684 vec_cmpnrg_idx_cc(vector unsigned short __a, vector unsigned short __b,
9685                   vector unsigned short __c, int *__cc) {
9686   return __builtin_s390_vstrchs(__a, __b, __c, 8, __cc);
9687 }
9688
9689 static inline __ATTRS_o_ai vector unsigned int
9690 vec_cmpnrg_idx_cc(vector unsigned int __a, vector unsigned int __b,
9691                   vector unsigned int __c, int *__cc) {
9692   return __builtin_s390_vstrcfs(__a, __b, __c, 8, __cc);
9693 }
9694
9695 /*-- vec_cmpnrg_or_0_idx ----------------------------------------------------*/
9696
9697 static inline __ATTRS_o_ai vector unsigned char
9698 vec_cmpnrg_or_0_idx(vector unsigned char __a, vector unsigned char __b,
9699                     vector unsigned char __c) {
9700   return __builtin_s390_vstrczb(__a, __b, __c, 8);
9701 }
9702
9703 static inline __ATTRS_o_ai vector unsigned short
9704 vec_cmpnrg_or_0_idx(vector unsigned short __a, vector unsigned short __b,
9705                     vector unsigned short __c) {
9706   return __builtin_s390_vstrczh(__a, __b, __c, 8);
9707 }
9708
9709 static inline __ATTRS_o_ai vector unsigned int
9710 vec_cmpnrg_or_0_idx(vector unsigned int __a, vector unsigned int __b,
9711                     vector unsigned int __c) {
9712   return __builtin_s390_vstrczf(__a, __b, __c, 8);
9713 }
9714
9715 /*-- vec_cmpnrg_or_0_idx_cc -------------------------------------------------*/
9716
9717 static inline __ATTRS_o_ai vector unsigned char
9718 vec_cmpnrg_or_0_idx_cc(vector unsigned char __a, vector unsigned char __b,
9719                        vector unsigned char __c, int *__cc) {
9720   return __builtin_s390_vstrczbs(__a, __b, __c, 8, __cc);
9721 }
9722
9723 static inline __ATTRS_o_ai vector unsigned short
9724 vec_cmpnrg_or_0_idx_cc(vector unsigned short __a, vector unsigned short __b,
9725                        vector unsigned short __c, int *__cc) {
9726   return __builtin_s390_vstrczhs(__a, __b, __c, 8, __cc);
9727 }
9728
9729 static inline __ATTRS_o_ai vector unsigned int
9730 vec_cmpnrg_or_0_idx_cc(vector unsigned int __a, vector unsigned int __b,
9731                        vector unsigned int __c, int *__cc) {
9732   return __builtin_s390_vstrczfs(__a, __b, __c, 8, __cc);
9733 }
9734
9735 /*-- vec_find_any_eq --------------------------------------------------------*/
9736
9737 static inline __ATTRS_o_ai vector bool char
9738 vec_find_any_eq(vector signed char __a, vector signed char __b) {
9739   return (vector bool char)
9740     __builtin_s390_vfaeb((vector unsigned char)__a,
9741                          (vector unsigned char)__b, 4);
9742 }
9743
9744 static inline __ATTRS_o_ai vector bool char
9745 vec_find_any_eq(vector bool char __a, vector bool char __b) {
9746   return (vector bool char)
9747     __builtin_s390_vfaeb((vector unsigned char)__a,
9748                          (vector unsigned char)__b, 4);
9749 }
9750
9751 static inline __ATTRS_o_ai vector bool char
9752 vec_find_any_eq(vector unsigned char __a, vector unsigned char __b) {
9753   return (vector bool char)__builtin_s390_vfaeb(__a, __b, 4);
9754 }
9755
9756 static inline __ATTRS_o_ai vector bool short
9757 vec_find_any_eq(vector signed short __a, vector signed short __b) {
9758   return (vector bool short)
9759     __builtin_s390_vfaeh((vector unsigned short)__a,
9760                          (vector unsigned short)__b, 4);
9761 }
9762
9763 static inline __ATTRS_o_ai vector bool short
9764 vec_find_any_eq(vector bool short __a, vector bool short __b) {
9765   return (vector bool short)
9766     __builtin_s390_vfaeh((vector unsigned short)__a,
9767                          (vector unsigned short)__b, 4);
9768 }
9769
9770 static inline __ATTRS_o_ai vector bool short
9771 vec_find_any_eq(vector unsigned short __a, vector unsigned short __b) {
9772   return (vector bool short)__builtin_s390_vfaeh(__a, __b, 4);
9773 }
9774
9775 static inline __ATTRS_o_ai vector bool int
9776 vec_find_any_eq(vector signed int __a, vector signed int __b) {
9777   return (vector bool int)
9778     __builtin_s390_vfaef((vector unsigned int)__a,
9779                          (vector unsigned int)__b, 4);
9780 }
9781
9782 static inline __ATTRS_o_ai vector bool int
9783 vec_find_any_eq(vector bool int __a, vector bool int __b) {
9784   return (vector bool int)
9785     __builtin_s390_vfaef((vector unsigned int)__a,
9786                          (vector unsigned int)__b, 4);
9787 }
9788
9789 static inline __ATTRS_o_ai vector bool int
9790 vec_find_any_eq(vector unsigned int __a, vector unsigned int __b) {
9791   return (vector bool int)__builtin_s390_vfaef(__a, __b, 4);
9792 }
9793
9794 /*-- vec_find_any_eq_cc -----------------------------------------------------*/
9795
9796 static inline __ATTRS_o_ai vector bool char
9797 vec_find_any_eq_cc(vector signed char __a, vector signed char __b, int *__cc) {
9798   return (vector bool char)
9799     __builtin_s390_vfaebs((vector unsigned char)__a,
9800                           (vector unsigned char)__b, 4, __cc);
9801 }
9802
9803 static inline __ATTRS_o_ai vector bool char
9804 vec_find_any_eq_cc(vector bool char __a, vector bool char __b, int *__cc) {
9805   return (vector bool char)
9806     __builtin_s390_vfaebs((vector unsigned char)__a,
9807                           (vector unsigned char)__b, 4, __cc);
9808 }
9809
9810 static inline __ATTRS_o_ai vector bool char
9811 vec_find_any_eq_cc(vector unsigned char __a, vector unsigned char __b,
9812                    int *__cc) {
9813   return (vector bool char)__builtin_s390_vfaebs(__a, __b, 4, __cc);
9814 }
9815
9816 static inline __ATTRS_o_ai vector bool short
9817 vec_find_any_eq_cc(vector signed short __a, vector signed short __b,
9818                    int *__cc) {
9819   return (vector bool short)
9820     __builtin_s390_vfaehs((vector unsigned short)__a,
9821                           (vector unsigned short)__b, 4, __cc);
9822 }
9823
9824 static inline __ATTRS_o_ai vector bool short
9825 vec_find_any_eq_cc(vector bool short __a, vector bool short __b, int *__cc) {
9826   return (vector bool short)
9827     __builtin_s390_vfaehs((vector unsigned short)__a,
9828                           (vector unsigned short)__b, 4, __cc);
9829 }
9830
9831 static inline __ATTRS_o_ai vector bool short
9832 vec_find_any_eq_cc(vector unsigned short __a, vector unsigned short __b,
9833                    int *__cc) {
9834   return (vector bool short)__builtin_s390_vfaehs(__a, __b, 4, __cc);
9835 }
9836
9837 static inline __ATTRS_o_ai vector bool int
9838 vec_find_any_eq_cc(vector signed int __a, vector signed int __b, int *__cc) {
9839   return (vector bool int)
9840     __builtin_s390_vfaefs((vector unsigned int)__a,
9841                           (vector unsigned int)__b, 4, __cc);
9842 }
9843
9844 static inline __ATTRS_o_ai vector bool int
9845 vec_find_any_eq_cc(vector bool int __a, vector bool int __b, int *__cc) {
9846   return (vector bool int)
9847     __builtin_s390_vfaefs((vector unsigned int)__a,
9848                           (vector unsigned int)__b, 4, __cc);
9849 }
9850
9851 static inline __ATTRS_o_ai vector bool int
9852 vec_find_any_eq_cc(vector unsigned int __a, vector unsigned int __b,
9853                    int *__cc) {
9854   return (vector bool int)__builtin_s390_vfaefs(__a, __b, 4, __cc);
9855 }
9856
9857 /*-- vec_find_any_eq_idx ----------------------------------------------------*/
9858
9859 static inline __ATTRS_o_ai vector signed char
9860 vec_find_any_eq_idx(vector signed char __a, vector signed char __b) {
9861   return (vector signed char)
9862     __builtin_s390_vfaeb((vector unsigned char)__a,
9863                          (vector unsigned char)__b, 0);
9864 }
9865
9866 static inline __ATTRS_o_ai vector unsigned char
9867 vec_find_any_eq_idx(vector bool char __a, vector bool char __b) {
9868   return __builtin_s390_vfaeb((vector unsigned char)__a,
9869                               (vector unsigned char)__b, 0);
9870 }
9871
9872 static inline __ATTRS_o_ai vector unsigned char
9873 vec_find_any_eq_idx(vector unsigned char __a, vector unsigned char __b) {
9874   return __builtin_s390_vfaeb(__a, __b, 0);
9875 }
9876
9877 static inline __ATTRS_o_ai vector signed short
9878 vec_find_any_eq_idx(vector signed short __a, vector signed short __b) {
9879   return (vector signed short)
9880     __builtin_s390_vfaeh((vector unsigned short)__a,
9881                          (vector unsigned short)__b, 0);
9882 }
9883
9884 static inline __ATTRS_o_ai vector unsigned short
9885 vec_find_any_eq_idx(vector bool short __a, vector bool short __b) {
9886   return __builtin_s390_vfaeh((vector unsigned short)__a,
9887                               (vector unsigned short)__b, 0);
9888 }
9889
9890 static inline __ATTRS_o_ai vector unsigned short
9891 vec_find_any_eq_idx(vector unsigned short __a, vector unsigned short __b) {
9892   return __builtin_s390_vfaeh(__a, __b, 0);
9893 }
9894
9895 static inline __ATTRS_o_ai vector signed int
9896 vec_find_any_eq_idx(vector signed int __a, vector signed int __b) {
9897   return (vector signed int)
9898     __builtin_s390_vfaef((vector unsigned int)__a,
9899                          (vector unsigned int)__b, 0);
9900 }
9901
9902 static inline __ATTRS_o_ai vector unsigned int
9903 vec_find_any_eq_idx(vector bool int __a, vector bool int __b) {
9904   return __builtin_s390_vfaef((vector unsigned int)__a,
9905                               (vector unsigned int)__b, 0);
9906 }
9907
9908 static inline __ATTRS_o_ai vector unsigned int
9909 vec_find_any_eq_idx(vector unsigned int __a, vector unsigned int __b) {
9910   return __builtin_s390_vfaef(__a, __b, 0);
9911 }
9912
9913 /*-- vec_find_any_eq_idx_cc -------------------------------------------------*/
9914
9915 static inline __ATTRS_o_ai vector signed char
9916 vec_find_any_eq_idx_cc(vector signed char __a, vector signed char __b,
9917                        int *__cc) {
9918   return (vector signed char)
9919     __builtin_s390_vfaebs((vector unsigned char)__a,
9920                           (vector unsigned char)__b, 0, __cc);
9921 }
9922
9923 static inline __ATTRS_o_ai vector unsigned char
9924 vec_find_any_eq_idx_cc(vector bool char __a, vector bool char __b, int *__cc) {
9925   return __builtin_s390_vfaebs((vector unsigned char)__a,
9926                                (vector unsigned char)__b, 0, __cc);
9927 }
9928
9929 static inline __ATTRS_o_ai vector unsigned char
9930 vec_find_any_eq_idx_cc(vector unsigned char __a, vector unsigned char __b,
9931                        int *__cc) {
9932   return __builtin_s390_vfaebs(__a, __b, 0, __cc);
9933 }
9934
9935 static inline __ATTRS_o_ai vector signed short
9936 vec_find_any_eq_idx_cc(vector signed short __a, vector signed short __b,
9937                        int *__cc) {
9938   return (vector signed short)
9939     __builtin_s390_vfaehs((vector unsigned short)__a,
9940                           (vector unsigned short)__b, 0, __cc);
9941 }
9942
9943 static inline __ATTRS_o_ai vector unsigned short
9944 vec_find_any_eq_idx_cc(vector bool short __a, vector bool short __b,
9945                        int *__cc) {
9946   return __builtin_s390_vfaehs((vector unsigned short)__a,
9947                                (vector unsigned short)__b, 0, __cc);
9948 }
9949
9950 static inline __ATTRS_o_ai vector unsigned short
9951 vec_find_any_eq_idx_cc(vector unsigned short __a, vector unsigned short __b,
9952                        int *__cc) {
9953   return __builtin_s390_vfaehs(__a, __b, 0, __cc);
9954 }
9955
9956 static inline __ATTRS_o_ai vector signed int
9957 vec_find_any_eq_idx_cc(vector signed int __a, vector signed int __b,
9958                        int *__cc) {
9959   return (vector signed int)
9960     __builtin_s390_vfaefs((vector unsigned int)__a,
9961                           (vector unsigned int)__b, 0, __cc);
9962 }
9963
9964 static inline __ATTRS_o_ai vector unsigned int
9965 vec_find_any_eq_idx_cc(vector bool int __a, vector bool int __b, int *__cc) {
9966   return __builtin_s390_vfaefs((vector unsigned int)__a,
9967                                (vector unsigned int)__b, 0, __cc);
9968 }
9969
9970 static inline __ATTRS_o_ai vector unsigned int
9971 vec_find_any_eq_idx_cc(vector unsigned int __a, vector unsigned int __b,
9972                        int *__cc) {
9973   return __builtin_s390_vfaefs(__a, __b, 0, __cc);
9974 }
9975
9976 /*-- vec_find_any_eq_or_0_idx -----------------------------------------------*/
9977
9978 static inline __ATTRS_o_ai vector signed char
9979 vec_find_any_eq_or_0_idx(vector signed char __a, vector signed char __b) {
9980   return (vector signed char)
9981     __builtin_s390_vfaezb((vector unsigned char)__a,
9982                           (vector unsigned char)__b, 0);
9983 }
9984
9985 static inline __ATTRS_o_ai vector unsigned char
9986 vec_find_any_eq_or_0_idx(vector bool char __a, vector bool char __b) {
9987   return __builtin_s390_vfaezb((vector unsigned char)__a,
9988                                (vector unsigned char)__b, 0);
9989 }
9990
9991 static inline __ATTRS_o_ai vector unsigned char
9992 vec_find_any_eq_or_0_idx(vector unsigned char __a, vector unsigned char __b) {
9993   return __builtin_s390_vfaezb(__a, __b, 0);
9994 }
9995
9996 static inline __ATTRS_o_ai vector signed short
9997 vec_find_any_eq_or_0_idx(vector signed short __a, vector signed short __b) {
9998   return (vector signed short)
9999     __builtin_s390_vfaezh((vector unsigned short)__a,
10000                           (vector unsigned short)__b, 0);
10001 }
10002
10003 static inline __ATTRS_o_ai vector unsigned short
10004 vec_find_any_eq_or_0_idx(vector bool short __a, vector bool short __b) {
10005   return __builtin_s390_vfaezh((vector unsigned short)__a,
10006                                (vector unsigned short)__b, 0);
10007 }
10008
10009 static inline __ATTRS_o_ai vector unsigned short
10010 vec_find_any_eq_or_0_idx(vector unsigned short __a, vector unsigned short __b) {
10011   return __builtin_s390_vfaezh(__a, __b, 0);
10012 }
10013
10014 static inline __ATTRS_o_ai vector signed int
10015 vec_find_any_eq_or_0_idx(vector signed int __a, vector signed int __b) {
10016   return (vector signed int)
10017     __builtin_s390_vfaezf((vector unsigned int)__a,
10018                           (vector unsigned int)__b, 0);
10019 }
10020
10021 static inline __ATTRS_o_ai vector unsigned int
10022 vec_find_any_eq_or_0_idx(vector bool int __a, vector bool int __b) {
10023   return __builtin_s390_vfaezf((vector unsigned int)__a,
10024                                (vector unsigned int)__b, 0);
10025 }
10026
10027 static inline __ATTRS_o_ai vector unsigned int
10028 vec_find_any_eq_or_0_idx(vector unsigned int __a, vector unsigned int __b) {
10029   return __builtin_s390_vfaezf(__a, __b, 0);
10030 }
10031
10032 /*-- vec_find_any_eq_or_0_idx_cc --------------------------------------------*/
10033
10034 static inline __ATTRS_o_ai vector signed char
10035 vec_find_any_eq_or_0_idx_cc(vector signed char __a, vector signed char __b,
10036                             int *__cc) {
10037   return (vector signed char)
10038     __builtin_s390_vfaezbs((vector unsigned char)__a,
10039                            (vector unsigned char)__b, 0, __cc);
10040 }
10041
10042 static inline __ATTRS_o_ai vector unsigned char
10043 vec_find_any_eq_or_0_idx_cc(vector bool char __a, vector bool char __b,
10044                             int *__cc) {
10045   return __builtin_s390_vfaezbs((vector unsigned char)__a,
10046                                 (vector unsigned char)__b, 0, __cc);
10047 }
10048
10049 static inline __ATTRS_o_ai vector unsigned char
10050 vec_find_any_eq_or_0_idx_cc(vector unsigned char __a, vector unsigned char __b,
10051                             int *__cc) {
10052   return __builtin_s390_vfaezbs(__a, __b, 0, __cc);
10053 }
10054
10055 static inline __ATTRS_o_ai vector signed short
10056 vec_find_any_eq_or_0_idx_cc(vector signed short __a, vector signed short __b,
10057                             int *__cc) {
10058   return (vector signed short)
10059     __builtin_s390_vfaezhs((vector unsigned short)__a,
10060                            (vector unsigned short)__b, 0, __cc);
10061 }
10062
10063 static inline __ATTRS_o_ai vector unsigned short
10064 vec_find_any_eq_or_0_idx_cc(vector bool short __a, vector bool short __b,
10065                             int *__cc) {
10066   return __builtin_s390_vfaezhs((vector unsigned short)__a,
10067                                 (vector unsigned short)__b, 0, __cc);
10068 }
10069
10070 static inline __ATTRS_o_ai vector unsigned short
10071 vec_find_any_eq_or_0_idx_cc(vector unsigned short __a,
10072                             vector unsigned short __b, int *__cc) {
10073   return __builtin_s390_vfaezhs(__a, __b, 0, __cc);
10074 }
10075
10076 static inline __ATTRS_o_ai vector signed int
10077 vec_find_any_eq_or_0_idx_cc(vector signed int __a, vector signed int __b,
10078                             int *__cc) {
10079   return (vector signed int)
10080     __builtin_s390_vfaezfs((vector unsigned int)__a,
10081                            (vector unsigned int)__b, 0, __cc);
10082 }
10083
10084 static inline __ATTRS_o_ai vector unsigned int
10085 vec_find_any_eq_or_0_idx_cc(vector bool int __a, vector bool int __b,
10086                             int *__cc) {
10087   return __builtin_s390_vfaezfs((vector unsigned int)__a,
10088                                 (vector unsigned int)__b, 0, __cc);
10089 }
10090
10091 static inline __ATTRS_o_ai vector unsigned int
10092 vec_find_any_eq_or_0_idx_cc(vector unsigned int __a, vector unsigned int __b,
10093                             int *__cc) {
10094   return __builtin_s390_vfaezfs(__a, __b, 0, __cc);
10095 }
10096
10097 /*-- vec_find_any_ne --------------------------------------------------------*/
10098
10099 static inline __ATTRS_o_ai vector bool char
10100 vec_find_any_ne(vector signed char __a, vector signed char __b) {
10101   return (vector bool char)
10102     __builtin_s390_vfaeb((vector unsigned char)__a,
10103                          (vector unsigned char)__b, 12);
10104 }
10105
10106 static inline __ATTRS_o_ai vector bool char
10107 vec_find_any_ne(vector bool char __a, vector bool char __b) {
10108   return (vector bool char)
10109     __builtin_s390_vfaeb((vector unsigned char)__a,
10110                          (vector unsigned char)__b, 12);
10111 }
10112
10113 static inline __ATTRS_o_ai vector bool char
10114 vec_find_any_ne(vector unsigned char __a, vector unsigned char __b) {
10115   return (vector bool char)__builtin_s390_vfaeb(__a, __b, 12);
10116 }
10117
10118 static inline __ATTRS_o_ai vector bool short
10119 vec_find_any_ne(vector signed short __a, vector signed short __b) {
10120   return (vector bool short)
10121     __builtin_s390_vfaeh((vector unsigned short)__a,
10122                          (vector unsigned short)__b, 12);
10123 }
10124
10125 static inline __ATTRS_o_ai vector bool short
10126 vec_find_any_ne(vector bool short __a, vector bool short __b) {
10127   return (vector bool short)
10128     __builtin_s390_vfaeh((vector unsigned short)__a,
10129                          (vector unsigned short)__b, 12);
10130 }
10131
10132 static inline __ATTRS_o_ai vector bool short
10133 vec_find_any_ne(vector unsigned short __a, vector unsigned short __b) {
10134   return (vector bool short)__builtin_s390_vfaeh(__a, __b, 12);
10135 }
10136
10137 static inline __ATTRS_o_ai vector bool int
10138 vec_find_any_ne(vector signed int __a, vector signed int __b) {
10139   return (vector bool int)
10140     __builtin_s390_vfaef((vector unsigned int)__a,
10141                          (vector unsigned int)__b, 12);
10142 }
10143
10144 static inline __ATTRS_o_ai vector bool int
10145 vec_find_any_ne(vector bool int __a, vector bool int __b) {
10146   return (vector bool int)
10147     __builtin_s390_vfaef((vector unsigned int)__a,
10148                          (vector unsigned int)__b, 12);
10149 }
10150
10151 static inline __ATTRS_o_ai vector bool int
10152 vec_find_any_ne(vector unsigned int __a, vector unsigned int __b) {
10153   return (vector bool int)__builtin_s390_vfaef(__a, __b, 12);
10154 }
10155
10156 /*-- vec_find_any_ne_cc -----------------------------------------------------*/
10157
10158 static inline __ATTRS_o_ai vector bool char
10159 vec_find_any_ne_cc(vector signed char __a, vector signed char __b, int *__cc) {
10160   return (vector bool char)
10161     __builtin_s390_vfaebs((vector unsigned char)__a,
10162                           (vector unsigned char)__b, 12, __cc);
10163 }
10164
10165 static inline __ATTRS_o_ai vector bool char
10166 vec_find_any_ne_cc(vector bool char __a, vector bool char __b, int *__cc) {
10167   return (vector bool char)
10168     __builtin_s390_vfaebs((vector unsigned char)__a,
10169                           (vector unsigned char)__b, 12, __cc);
10170 }
10171
10172 static inline __ATTRS_o_ai vector bool char
10173 vec_find_any_ne_cc(vector unsigned char __a, vector unsigned char __b,
10174                    int *__cc) {
10175   return (vector bool char)__builtin_s390_vfaebs(__a, __b, 12, __cc);
10176 }
10177
10178 static inline __ATTRS_o_ai vector bool short
10179 vec_find_any_ne_cc(vector signed short __a, vector signed short __b,
10180                    int *__cc) {
10181   return (vector bool short)
10182     __builtin_s390_vfaehs((vector unsigned short)__a,
10183                           (vector unsigned short)__b, 12, __cc);
10184 }
10185
10186 static inline __ATTRS_o_ai vector bool short
10187 vec_find_any_ne_cc(vector bool short __a, vector bool short __b, int *__cc) {
10188   return (vector bool short)
10189     __builtin_s390_vfaehs((vector unsigned short)__a,
10190                           (vector unsigned short)__b, 12, __cc);
10191 }
10192
10193 static inline __ATTRS_o_ai vector bool short
10194 vec_find_any_ne_cc(vector unsigned short __a, vector unsigned short __b,
10195                    int *__cc) {
10196   return (vector bool short)__builtin_s390_vfaehs(__a, __b, 12, __cc);
10197 }
10198
10199 static inline __ATTRS_o_ai vector bool int
10200 vec_find_any_ne_cc(vector signed int __a, vector signed int __b, int *__cc) {
10201   return (vector bool int)
10202     __builtin_s390_vfaefs((vector unsigned int)__a,
10203                           (vector unsigned int)__b, 12, __cc);
10204 }
10205
10206 static inline __ATTRS_o_ai vector bool int
10207 vec_find_any_ne_cc(vector bool int __a, vector bool int __b, int *__cc) {
10208   return (vector bool int)
10209     __builtin_s390_vfaefs((vector unsigned int)__a,
10210                           (vector unsigned int)__b, 12, __cc);
10211 }
10212
10213 static inline __ATTRS_o_ai vector bool int
10214 vec_find_any_ne_cc(vector unsigned int __a, vector unsigned int __b,
10215                    int *__cc) {
10216   return (vector bool int)__builtin_s390_vfaefs(__a, __b, 12, __cc);
10217 }
10218
10219 /*-- vec_find_any_ne_idx ----------------------------------------------------*/
10220
10221 static inline __ATTRS_o_ai vector signed char
10222 vec_find_any_ne_idx(vector signed char __a, vector signed char __b) {
10223   return (vector signed char)
10224     __builtin_s390_vfaeb((vector unsigned char)__a,
10225                          (vector unsigned char)__b, 8);
10226 }
10227
10228 static inline __ATTRS_o_ai vector unsigned char
10229 vec_find_any_ne_idx(vector bool char __a, vector bool char __b) {
10230   return __builtin_s390_vfaeb((vector unsigned char)__a,
10231                               (vector unsigned char)__b, 8);
10232 }
10233
10234 static inline __ATTRS_o_ai vector unsigned char
10235 vec_find_any_ne_idx(vector unsigned char __a, vector unsigned char __b) {
10236   return __builtin_s390_vfaeb(__a, __b, 8);
10237 }
10238
10239 static inline __ATTRS_o_ai vector signed short
10240 vec_find_any_ne_idx(vector signed short __a, vector signed short __b) {
10241   return (vector signed short)
10242     __builtin_s390_vfaeh((vector unsigned short)__a,
10243                          (vector unsigned short)__b, 8);
10244 }
10245
10246 static inline __ATTRS_o_ai vector unsigned short
10247 vec_find_any_ne_idx(vector bool short __a, vector bool short __b) {
10248   return __builtin_s390_vfaeh((vector unsigned short)__a,
10249                               (vector unsigned short)__b, 8);
10250 }
10251
10252 static inline __ATTRS_o_ai vector unsigned short
10253 vec_find_any_ne_idx(vector unsigned short __a, vector unsigned short __b) {
10254   return __builtin_s390_vfaeh(__a, __b, 8);
10255 }
10256
10257 static inline __ATTRS_o_ai vector signed int
10258 vec_find_any_ne_idx(vector signed int __a, vector signed int __b) {
10259   return (vector signed int)
10260     __builtin_s390_vfaef((vector unsigned int)__a,
10261                          (vector unsigned int)__b, 8);
10262 }
10263
10264 static inline __ATTRS_o_ai vector unsigned int
10265 vec_find_any_ne_idx(vector bool int __a, vector bool int __b) {
10266   return __builtin_s390_vfaef((vector unsigned int)__a,
10267                               (vector unsigned int)__b, 8);
10268 }
10269
10270 static inline __ATTRS_o_ai vector unsigned int
10271 vec_find_any_ne_idx(vector unsigned int __a, vector unsigned int __b) {
10272   return __builtin_s390_vfaef(__a, __b, 8);
10273 }
10274
10275 /*-- vec_find_any_ne_idx_cc -------------------------------------------------*/
10276
10277 static inline __ATTRS_o_ai vector signed char
10278 vec_find_any_ne_idx_cc(vector signed char __a, vector signed char __b,
10279                        int *__cc) {
10280   return (vector signed char)
10281     __builtin_s390_vfaebs((vector unsigned char)__a,
10282                           (vector unsigned char)__b, 8, __cc);
10283 }
10284
10285 static inline __ATTRS_o_ai vector unsigned char
10286 vec_find_any_ne_idx_cc(vector bool char __a, vector bool char __b, int *__cc) {
10287   return __builtin_s390_vfaebs((vector unsigned char)__a,
10288                                (vector unsigned char)__b, 8, __cc);
10289 }
10290
10291 static inline __ATTRS_o_ai vector unsigned char
10292 vec_find_any_ne_idx_cc(vector unsigned char __a, vector unsigned char __b,
10293                        int *__cc) {
10294   return __builtin_s390_vfaebs(__a, __b, 8, __cc);
10295 }
10296
10297 static inline __ATTRS_o_ai vector signed short
10298 vec_find_any_ne_idx_cc(vector signed short __a, vector signed short __b,
10299                        int *__cc) {
10300   return (vector signed short)
10301     __builtin_s390_vfaehs((vector unsigned short)__a,
10302                           (vector unsigned short)__b, 8, __cc);
10303 }
10304
10305 static inline __ATTRS_o_ai vector unsigned short
10306 vec_find_any_ne_idx_cc(vector bool short __a, vector bool short __b,
10307                        int *__cc) {
10308   return __builtin_s390_vfaehs((vector unsigned short)__a,
10309                                (vector unsigned short)__b, 8, __cc);
10310 }
10311
10312 static inline __ATTRS_o_ai vector unsigned short
10313 vec_find_any_ne_idx_cc(vector unsigned short __a, vector unsigned short __b,
10314                        int *__cc) {
10315   return __builtin_s390_vfaehs(__a, __b, 8, __cc);
10316 }
10317
10318 static inline __ATTRS_o_ai vector signed int
10319 vec_find_any_ne_idx_cc(vector signed int __a, vector signed int __b,
10320                        int *__cc) {
10321   return (vector signed int)
10322     __builtin_s390_vfaefs((vector unsigned int)__a,
10323                           (vector unsigned int)__b, 8, __cc);
10324 }
10325
10326 static inline __ATTRS_o_ai vector unsigned int
10327 vec_find_any_ne_idx_cc(vector bool int __a, vector bool int __b, int *__cc) {
10328   return __builtin_s390_vfaefs((vector unsigned int)__a,
10329                                (vector unsigned int)__b, 8, __cc);
10330 }
10331
10332 static inline __ATTRS_o_ai vector unsigned int
10333 vec_find_any_ne_idx_cc(vector unsigned int __a, vector unsigned int __b,
10334                        int *__cc) {
10335   return __builtin_s390_vfaefs(__a, __b, 8, __cc);
10336 }
10337
10338 /*-- vec_find_any_ne_or_0_idx -----------------------------------------------*/
10339
10340 static inline __ATTRS_o_ai vector signed char
10341 vec_find_any_ne_or_0_idx(vector signed char __a, vector signed char __b) {
10342   return (vector signed char)
10343     __builtin_s390_vfaezb((vector unsigned char)__a,
10344                           (vector unsigned char)__b, 8);
10345 }
10346
10347 static inline __ATTRS_o_ai vector unsigned char
10348 vec_find_any_ne_or_0_idx(vector bool char __a, vector bool char __b) {
10349   return __builtin_s390_vfaezb((vector unsigned char)__a,
10350                                (vector unsigned char)__b, 8);
10351 }
10352
10353 static inline __ATTRS_o_ai vector unsigned char
10354 vec_find_any_ne_or_0_idx(vector unsigned char __a, vector unsigned char __b) {
10355   return __builtin_s390_vfaezb(__a, __b, 8);
10356 }
10357
10358 static inline __ATTRS_o_ai vector signed short
10359 vec_find_any_ne_or_0_idx(vector signed short __a, vector signed short __b) {
10360   return (vector signed short)
10361     __builtin_s390_vfaezh((vector unsigned short)__a,
10362                           (vector unsigned short)__b, 8);
10363 }
10364
10365 static inline __ATTRS_o_ai vector unsigned short
10366 vec_find_any_ne_or_0_idx(vector bool short __a, vector bool short __b) {
10367   return __builtin_s390_vfaezh((vector unsigned short)__a,
10368                                (vector unsigned short)__b, 8);
10369 }
10370
10371 static inline __ATTRS_o_ai vector unsigned short
10372 vec_find_any_ne_or_0_idx(vector unsigned short __a, vector unsigned short __b) {
10373   return __builtin_s390_vfaezh(__a, __b, 8);
10374 }
10375
10376 static inline __ATTRS_o_ai vector signed int
10377 vec_find_any_ne_or_0_idx(vector signed int __a, vector signed int __b) {
10378   return (vector signed int)
10379     __builtin_s390_vfaezf((vector unsigned int)__a,
10380                           (vector unsigned int)__b, 8);
10381 }
10382
10383 static inline __ATTRS_o_ai vector unsigned int
10384 vec_find_any_ne_or_0_idx(vector bool int __a, vector bool int __b) {
10385   return __builtin_s390_vfaezf((vector unsigned int)__a,
10386                                (vector unsigned int)__b, 8);
10387 }
10388
10389 static inline __ATTRS_o_ai vector unsigned int
10390 vec_find_any_ne_or_0_idx(vector unsigned int __a, vector unsigned int __b) {
10391   return __builtin_s390_vfaezf(__a, __b, 8);
10392 }
10393
10394 /*-- vec_find_any_ne_or_0_idx_cc --------------------------------------------*/
10395
10396 static inline __ATTRS_o_ai vector signed char
10397 vec_find_any_ne_or_0_idx_cc(vector signed char __a, vector signed char __b,
10398                             int *__cc) {
10399   return (vector signed char)
10400     __builtin_s390_vfaezbs((vector unsigned char)__a,
10401                            (vector unsigned char)__b, 8, __cc);
10402 }
10403
10404 static inline __ATTRS_o_ai vector unsigned char
10405 vec_find_any_ne_or_0_idx_cc(vector bool char __a, vector bool char __b,
10406                             int *__cc) {
10407   return __builtin_s390_vfaezbs((vector unsigned char)__a,
10408                                 (vector unsigned char)__b, 8, __cc);
10409 }
10410
10411 static inline __ATTRS_o_ai vector unsigned char
10412 vec_find_any_ne_or_0_idx_cc(vector unsigned char __a, vector unsigned char __b,
10413                             int *__cc) {
10414   return __builtin_s390_vfaezbs(__a, __b, 8, __cc);
10415 }
10416
10417 static inline __ATTRS_o_ai vector signed short
10418 vec_find_any_ne_or_0_idx_cc(vector signed short __a, vector signed short __b,
10419                             int *__cc) {
10420   return (vector signed short)
10421     __builtin_s390_vfaezhs((vector unsigned short)__a,
10422                            (vector unsigned short)__b, 8, __cc);
10423 }
10424
10425 static inline __ATTRS_o_ai vector unsigned short
10426 vec_find_any_ne_or_0_idx_cc(vector bool short __a, vector bool short __b,
10427                             int *__cc) {
10428   return __builtin_s390_vfaezhs((vector unsigned short)__a,
10429                                 (vector unsigned short)__b, 8, __cc);
10430 }
10431
10432 static inline __ATTRS_o_ai vector unsigned short
10433 vec_find_any_ne_or_0_idx_cc(vector unsigned short __a,
10434                             vector unsigned short __b, int *__cc) {
10435   return __builtin_s390_vfaezhs(__a, __b, 8, __cc);
10436 }
10437
10438 static inline __ATTRS_o_ai vector signed int
10439 vec_find_any_ne_or_0_idx_cc(vector signed int __a, vector signed int __b,
10440                             int *__cc) {
10441   return (vector signed int)
10442     __builtin_s390_vfaezfs((vector unsigned int)__a,
10443                            (vector unsigned int)__b, 8, __cc);
10444 }
10445
10446 static inline __ATTRS_o_ai vector unsigned int
10447 vec_find_any_ne_or_0_idx_cc(vector bool int __a, vector bool int __b,
10448                             int *__cc) {
10449   return __builtin_s390_vfaezfs((vector unsigned int)__a,
10450                                 (vector unsigned int)__b, 8, __cc);
10451 }
10452
10453 static inline __ATTRS_o_ai vector unsigned int
10454 vec_find_any_ne_or_0_idx_cc(vector unsigned int __a, vector unsigned int __b,
10455                             int *__cc) {
10456   return __builtin_s390_vfaezfs(__a, __b, 8, __cc);
10457 }
10458
10459 #undef __constant_pow2_range
10460 #undef __constant_range
10461 #undef __constant
10462 #undef __ATTRS_o
10463 #undef __ATTRS_o_ai
10464 #undef __ATTRS_ai
10465
10466 #else
10467
10468 #error "Use -fzvector to enable vector extensions"
10469
10470 #endif