clang  16.0.0git
altivec.h
Go to the documentation of this file.
1 /*===---- altivec.h - Standard header for type generic math ---------------===*\
2  *
3  * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4  * See https://llvm.org/LICENSE.txt for license information.
5  * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6  *
7 \*===----------------------------------------------------------------------===*/
8 
9 #ifndef __ALTIVEC_H
10 #define __ALTIVEC_H
11 
12 #ifndef __ALTIVEC__
13 #error "AltiVec support not enabled"
14 #endif
15 
16 /* Constants for mapping CR6 bits to predicate result. */
17 
18 #define __CR6_EQ 0
19 #define __CR6_EQ_REV 1
20 #define __CR6_LT 2
21 #define __CR6_LT_REV 3
22 #define __CR6_GT 4
23 #define __CR6_GT_REV 5
24 #define __CR6_SO 6
25 #define __CR6_SO_REV 7
26 
27 /* Constants for vec_test_data_class */
28 #define __VEC_CLASS_FP_SUBNORMAL_N (1 << 0)
29 #define __VEC_CLASS_FP_SUBNORMAL_P (1 << 1)
30 #define __VEC_CLASS_FP_SUBNORMAL (__VEC_CLASS_FP_SUBNORMAL_P | \
31  __VEC_CLASS_FP_SUBNORMAL_N)
32 #define __VEC_CLASS_FP_ZERO_N (1<<2)
33 #define __VEC_CLASS_FP_ZERO_P (1<<3)
34 #define __VEC_CLASS_FP_ZERO (__VEC_CLASS_FP_ZERO_P | \
35  __VEC_CLASS_FP_ZERO_N)
36 #define __VEC_CLASS_FP_INFINITY_N (1<<4)
37 #define __VEC_CLASS_FP_INFINITY_P (1<<5)
38 #define __VEC_CLASS_FP_INFINITY (__VEC_CLASS_FP_INFINITY_P | \
39  __VEC_CLASS_FP_INFINITY_N)
40 #define __VEC_CLASS_FP_NAN (1<<6)
41 #define __VEC_CLASS_FP_NOT_NORMAL (__VEC_CLASS_FP_NAN | \
42  __VEC_CLASS_FP_SUBNORMAL | \
43  __VEC_CLASS_FP_ZERO | \
44  __VEC_CLASS_FP_INFINITY)
45 
46 #define __ATTRS_o_ai __attribute__((__overloadable__, __always_inline__))
47 
48 #include <stddef.h>
49 
50 static __inline__ vector signed char __ATTRS_o_ai vec_perm(
51  vector signed char __a, vector signed char __b, vector unsigned char __c);
52 
53 static __inline__ vector unsigned char __ATTRS_o_ai
54 vec_perm(vector unsigned char __a, vector unsigned char __b,
55  vector unsigned char __c);
56 
57 static __inline__ vector bool char __ATTRS_o_ai
58 vec_perm(vector bool char __a, vector bool char __b, vector unsigned char __c);
59 
60 static __inline__ vector short __ATTRS_o_ai vec_perm(vector signed short __a,
61  vector signed short __b,
62  vector unsigned char __c);
63 
64 static __inline__ vector unsigned short __ATTRS_o_ai
65 vec_perm(vector unsigned short __a, vector unsigned short __b,
66  vector unsigned char __c);
67 
68 static __inline__ vector bool short __ATTRS_o_ai vec_perm(
69  vector bool short __a, vector bool short __b, vector unsigned char __c);
70 
71 static __inline__ vector pixel __ATTRS_o_ai vec_perm(vector pixel __a,
72  vector pixel __b,
73  vector unsigned char __c);
74 
75 static __inline__ vector int __ATTRS_o_ai vec_perm(vector signed int __a,
76  vector signed int __b,
77  vector unsigned char __c);
78 
79 static __inline__ vector unsigned int __ATTRS_o_ai vec_perm(
80  vector unsigned int __a, vector unsigned int __b, vector unsigned char __c);
81 
82 static __inline__ vector bool int __ATTRS_o_ai
83 vec_perm(vector bool int __a, vector bool int __b, vector unsigned char __c);
84 
85 static __inline__ vector float __ATTRS_o_ai vec_perm(vector float __a,
86  vector float __b,
87  vector unsigned char __c);
88 
89 #ifdef __VSX__
90 static __inline__ vector long long __ATTRS_o_ai
91 vec_perm(vector signed long long __a, vector signed long long __b,
92  vector unsigned char __c);
93 
94 static __inline__ vector unsigned long long __ATTRS_o_ai
95 vec_perm(vector unsigned long long __a, vector unsigned long long __b,
96  vector unsigned char __c);
97 
98 static __inline__ vector bool long long __ATTRS_o_ai
99 vec_perm(vector bool long long __a, vector bool long long __b,
100  vector unsigned char __c);
101 
102 static __inline__ vector double __ATTRS_o_ai vec_perm(vector double __a,
103  vector double __b,
104  vector unsigned char __c);
105 #endif
106 
107 static __inline__ vector unsigned char __ATTRS_o_ai
108 vec_xor(vector unsigned char __a, vector unsigned char __b);
109 
110 /* vec_abs */
111 
112 #define __builtin_altivec_abs_v16qi vec_abs
113 #define __builtin_altivec_abs_v8hi vec_abs
114 #define __builtin_altivec_abs_v4si vec_abs
115 
116 static __inline__ vector signed char __ATTRS_o_ai
117 vec_abs(vector signed char __a) {
118  return __builtin_altivec_vmaxsb(__a, -__a);
119 }
120 
121 static __inline__ vector signed short __ATTRS_o_ai
122 vec_abs(vector signed short __a) {
123  return __builtin_altivec_vmaxsh(__a, -__a);
124 }
125 
126 static __inline__ vector signed int __ATTRS_o_ai
127 vec_abs(vector signed int __a) {
128  return __builtin_altivec_vmaxsw(__a, -__a);
129 }
130 
131 #ifdef __POWER8_VECTOR__
132 static __inline__ vector signed long long __ATTRS_o_ai
133 vec_abs(vector signed long long __a) {
134  return __builtin_altivec_vmaxsd(__a, -__a);
135 }
136 #endif
137 
138 static __inline__ vector float __ATTRS_o_ai vec_abs(vector float __a) {
139 #ifdef __VSX__
140  return __builtin_vsx_xvabssp(__a);
141 #else
142  vector unsigned int __res =
143  (vector unsigned int)__a & (vector unsigned int)(0x7FFFFFFF);
144  return (vector float)__res;
145 #endif
146 }
147 
148 #ifdef __VSX__
149 static __inline__ vector double __ATTRS_o_ai vec_abs(vector double __a) {
150  return __builtin_vsx_xvabsdp(__a);
151 }
152 #endif
153 
154 /* vec_abss */
155 #define __builtin_altivec_abss_v16qi vec_abss
156 #define __builtin_altivec_abss_v8hi vec_abss
157 #define __builtin_altivec_abss_v4si vec_abss
158 
159 static __inline__ vector signed char __ATTRS_o_ai
160 vec_abss(vector signed char __a) {
161  return __builtin_altivec_vmaxsb(
162  __a, __builtin_altivec_vsubsbs((vector signed char)(0), __a));
163 }
164 
165 static __inline__ vector signed short __ATTRS_o_ai
166 vec_abss(vector signed short __a) {
167  return __builtin_altivec_vmaxsh(
168  __a, __builtin_altivec_vsubshs((vector signed short)(0), __a));
169 }
170 
171 static __inline__ vector signed int __ATTRS_o_ai
172 vec_abss(vector signed int __a) {
173  return __builtin_altivec_vmaxsw(
174  __a, __builtin_altivec_vsubsws((vector signed int)(0), __a));
175 }
176 
177 /* vec_absd */
178 #if defined(__POWER9_VECTOR__)
179 
180 static __inline__ vector unsigned char __ATTRS_o_ai
181 vec_absd(vector unsigned char __a, vector unsigned char __b) {
182  return __builtin_altivec_vabsdub(__a, __b);
183 }
184 
185 static __inline__ vector unsigned short __ATTRS_o_ai
186 vec_absd(vector unsigned short __a, vector unsigned short __b) {
187  return __builtin_altivec_vabsduh(__a, __b);
188 }
189 
190 static __inline__ vector unsigned int __ATTRS_o_ai
191 vec_absd(vector unsigned int __a, vector unsigned int __b) {
192  return __builtin_altivec_vabsduw(__a, __b);
193 }
194 
195 #endif /* End __POWER9_VECTOR__ */
196 
197 /* vec_add */
198 
199 static __inline__ vector signed char __ATTRS_o_ai
200 vec_add(vector signed char __a, vector signed char __b) {
201  return __a + __b;
202 }
203 
204 static __inline__ vector signed char __ATTRS_o_ai
205 vec_add(vector bool char __a, vector signed char __b) {
206  return (vector signed char)__a + __b;
207 }
208 
209 static __inline__ vector signed char __ATTRS_o_ai
210 vec_add(vector signed char __a, vector bool char __b) {
211  return __a + (vector signed char)__b;
212 }
213 
214 static __inline__ vector unsigned char __ATTRS_o_ai
215 vec_add(vector unsigned char __a, vector unsigned char __b) {
216  return __a + __b;
217 }
218 
219 static __inline__ vector unsigned char __ATTRS_o_ai
220 vec_add(vector bool char __a, vector unsigned char __b) {
221  return (vector unsigned char)__a + __b;
222 }
223 
224 static __inline__ vector unsigned char __ATTRS_o_ai
225 vec_add(vector unsigned char __a, vector bool char __b) {
226  return __a + (vector unsigned char)__b;
227 }
228 
229 static __inline__ vector short __ATTRS_o_ai vec_add(vector short __a,
230  vector short __b) {
231  return __a + __b;
232 }
233 
234 static __inline__ vector short __ATTRS_o_ai vec_add(vector bool short __a,
235  vector short __b) {
236  return (vector short)__a + __b;
237 }
238 
239 static __inline__ vector short __ATTRS_o_ai vec_add(vector short __a,
240  vector bool short __b) {
241  return __a + (vector short)__b;
242 }
243 
244 static __inline__ vector unsigned short __ATTRS_o_ai
245 vec_add(vector unsigned short __a, vector unsigned short __b) {
246  return __a + __b;
247 }
248 
249 static __inline__ vector unsigned short __ATTRS_o_ai
250 vec_add(vector bool short __a, vector unsigned short __b) {
251  return (vector unsigned short)__a + __b;
252 }
253 
254 static __inline__ vector unsigned short __ATTRS_o_ai
255 vec_add(vector unsigned short __a, vector bool short __b) {
256  return __a + (vector unsigned short)__b;
257 }
258 
259 static __inline__ vector int __ATTRS_o_ai vec_add(vector int __a,
260  vector int __b) {
261  return __a + __b;
262 }
263 
264 static __inline__ vector int __ATTRS_o_ai vec_add(vector bool int __a,
265  vector int __b) {
266  return (vector int)__a + __b;
267 }
268 
269 static __inline__ vector int __ATTRS_o_ai vec_add(vector int __a,
270  vector bool int __b) {
271  return __a + (vector int)__b;
272 }
273 
274 static __inline__ vector unsigned int __ATTRS_o_ai
275 vec_add(vector unsigned int __a, vector unsigned int __b) {
276  return __a + __b;
277 }
278 
279 static __inline__ vector unsigned int __ATTRS_o_ai
280 vec_add(vector bool int __a, vector unsigned int __b) {
281  return (vector unsigned int)__a + __b;
282 }
283 
284 static __inline__ vector unsigned int __ATTRS_o_ai
285 vec_add(vector unsigned int __a, vector bool int __b) {
286  return __a + (vector unsigned int)__b;
287 }
288 
289 #ifdef __POWER8_VECTOR__
290 static __inline__ vector signed long long __ATTRS_o_ai
291 vec_add(vector signed long long __a, vector signed long long __b) {
292  return __a + __b;
293 }
294 
295 static __inline__ vector unsigned long long __ATTRS_o_ai
296 vec_add(vector unsigned long long __a, vector unsigned long long __b) {
297  return __a + __b;
298 }
299 
300 #ifdef __SIZEOF_INT128__
301 static __inline__ vector signed __int128 __ATTRS_o_ai
302 vec_add(vector signed __int128 __a, vector signed __int128 __b) {
303  return __a + __b;
304 }
305 
306 static __inline__ vector unsigned __int128 __ATTRS_o_ai
307 vec_add(vector unsigned __int128 __a, vector unsigned __int128 __b) {
308  return __a + __b;
309 }
310 #endif
311 
312 static __inline__ vector unsigned char __attribute__((__always_inline__))
313 vec_add_u128(vector unsigned char __a, vector unsigned char __b) {
314  return (vector unsigned char)__builtin_altivec_vadduqm(__a, __b);
315 }
316 #elif defined(__VSX__)
317 static __inline__ vector signed long long __ATTRS_o_ai
318 vec_add(vector signed long long __a, vector signed long long __b) {
319 #ifdef __LITTLE_ENDIAN__
320  // Little endian systems on CPU's prior to Power8 don't really exist
321  // so scalarizing is fine.
322  return __a + __b;
323 #else
324  vector unsigned int __res =
325  (vector unsigned int)__a + (vector unsigned int)__b;
326  vector unsigned int __carry = __builtin_altivec_vaddcuw(
327  (vector unsigned int)__a, (vector unsigned int)__b);
328  __carry = (vector unsigned int)__builtin_shufflevector(
329  (vector unsigned char)__carry, (vector unsigned char)__carry, 0, 0, 0, 7,
330  0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0);
331  return (vector signed long long)(__res + __carry);
332 #endif
333 }
334 
335 static __inline__ vector unsigned long long __ATTRS_o_ai
336 vec_add(vector unsigned long long __a, vector unsigned long long __b) {
337  return (vector unsigned long long)vec_add((vector signed long long)__a,
338  (vector signed long long)__b);
339 }
340 #endif // __POWER8_VECTOR__
341 
342 static __inline__ vector float __ATTRS_o_ai vec_add(vector float __a,
343  vector float __b) {
344  return __a + __b;
345 }
346 
347 #ifdef __VSX__
348 static __inline__ vector double __ATTRS_o_ai vec_add(vector double __a,
349  vector double __b) {
350  return __a + __b;
351 }
352 #endif // __VSX__
353 
354 /* vec_adde */
355 
356 #ifdef __POWER8_VECTOR__
357 #ifdef __SIZEOF_INT128__
358 static __inline__ vector signed __int128 __ATTRS_o_ai
359 vec_adde(vector signed __int128 __a, vector signed __int128 __b,
360  vector signed __int128 __c) {
361  return (vector signed __int128)__builtin_altivec_vaddeuqm(
362  (vector unsigned __int128)__a, (vector unsigned __int128)__b,
363  (vector unsigned __int128)__c);
364 }
365 
366 static __inline__ vector unsigned __int128 __ATTRS_o_ai
367 vec_adde(vector unsigned __int128 __a, vector unsigned __int128 __b,
368  vector unsigned __int128 __c) {
369  return __builtin_altivec_vaddeuqm(__a, __b, __c);
370 }
371 #endif
372 
373 static __inline__ vector unsigned char __attribute__((__always_inline__))
374 vec_adde_u128(vector unsigned char __a, vector unsigned char __b,
375  vector unsigned char __c) {
376  return (vector unsigned char)__builtin_altivec_vaddeuqm_c(
377  (vector unsigned char)__a, (vector unsigned char)__b,
378  (vector unsigned char)__c);
379 }
380 #endif
381 
382 static __inline__ vector signed int __ATTRS_o_ai
383 vec_adde(vector signed int __a, vector signed int __b,
384  vector signed int __c) {
385  vector signed int __mask = {1, 1, 1, 1};
386  vector signed int __carry = __c & __mask;
387  return vec_add(vec_add(__a, __b), __carry);
388 }
389 
390 static __inline__ vector unsigned int __ATTRS_o_ai
391 vec_adde(vector unsigned int __a, vector unsigned int __b,
392  vector unsigned int __c) {
393  vector unsigned int __mask = {1, 1, 1, 1};
394  vector unsigned int __carry = __c & __mask;
395  return vec_add(vec_add(__a, __b), __carry);
396 }
397 
398 /* vec_addec */
399 
400 #ifdef __POWER8_VECTOR__
401 #ifdef __SIZEOF_INT128__
402 static __inline__ vector signed __int128 __ATTRS_o_ai
403 vec_addec(vector signed __int128 __a, vector signed __int128 __b,
404  vector signed __int128 __c) {
405  return (vector signed __int128)__builtin_altivec_vaddecuq(
406  (vector unsigned __int128)__a, (vector unsigned __int128)__b,
407  (vector unsigned __int128)__c);
408 }
409 
410 static __inline__ vector unsigned __int128 __ATTRS_o_ai
411 vec_addec(vector unsigned __int128 __a, vector unsigned __int128 __b,
412  vector unsigned __int128 __c) {
413  return __builtin_altivec_vaddecuq(__a, __b, __c);
414 }
415 #endif
416 
417 static __inline__ vector unsigned char __attribute__((__always_inline__))
418 vec_addec_u128(vector unsigned char __a, vector unsigned char __b,
419  vector unsigned char __c) {
420  return (vector unsigned char)__builtin_altivec_vaddecuq_c(
421  (vector unsigned char)__a, (vector unsigned char)__b,
422  (vector unsigned char)__c);
423 }
424 
425 #ifdef __powerpc64__
426 static __inline__ vector signed int __ATTRS_o_ai
427 vec_addec(vector signed int __a, vector signed int __b,
428  vector signed int __c) {
429 
430  signed int __result[4];
431  for (int i = 0; i < 4; i++) {
432  unsigned int __tempa = (unsigned int) __a[i];
433  unsigned int __tempb = (unsigned int) __b[i];
434  unsigned int __tempc = (unsigned int) __c[i];
435  __tempc = __tempc & 0x00000001;
436  unsigned long long __longa = (unsigned long long) __tempa;
437  unsigned long long __longb = (unsigned long long) __tempb;
438  unsigned long long __longc = (unsigned long long) __tempc;
439  unsigned long long __sum = __longa + __longb + __longc;
440  unsigned long long __res = (__sum >> 32) & 0x01;
441  unsigned long long __tempres = (unsigned int) __res;
442  __result[i] = (signed int) __tempres;
443  }
444 
445  vector signed int ret = { __result[0], __result[1], __result[2], __result[3] };
446  return ret;
447 }
448 
449 static __inline__ vector unsigned int __ATTRS_o_ai
450 vec_addec(vector unsigned int __a, vector unsigned int __b,
451  vector unsigned int __c) {
452 
453  unsigned int __result[4];
454  for (int i = 0; i < 4; i++) {
455  unsigned int __tempc = __c[i] & 1;
456  unsigned long long __longa = (unsigned long long) __a[i];
457  unsigned long long __longb = (unsigned long long) __b[i];
458  unsigned long long __longc = (unsigned long long) __tempc;
459  unsigned long long __sum = __longa + __longb + __longc;
460  unsigned long long __res = (__sum >> 32) & 0x01;
461  unsigned long long __tempres = (unsigned int) __res;
462  __result[i] = (signed int) __tempres;
463  }
464 
465  vector unsigned int ret = { __result[0], __result[1], __result[2], __result[3] };
466  return ret;
467 }
468 #endif // __powerpc64__
469 #endif // __POWER8_VECTOR__
470 
471 /* vec_vaddubm */
472 
473 #define __builtin_altivec_vaddubm vec_vaddubm
474 
475 static __inline__ vector signed char __ATTRS_o_ai
476 vec_vaddubm(vector signed char __a, vector signed char __b) {
477  return __a + __b;
478 }
479 
480 static __inline__ vector signed char __ATTRS_o_ai
481 vec_vaddubm(vector bool char __a, vector signed char __b) {
482  return (vector signed char)__a + __b;
483 }
484 
485 static __inline__ vector signed char __ATTRS_o_ai
486 vec_vaddubm(vector signed char __a, vector bool char __b) {
487  return __a + (vector signed char)__b;
488 }
489 
490 static __inline__ vector unsigned char __ATTRS_o_ai
491 vec_vaddubm(vector unsigned char __a, vector unsigned char __b) {
492  return __a + __b;
493 }
494 
495 static __inline__ vector unsigned char __ATTRS_o_ai
496 vec_vaddubm(vector bool char __a, vector unsigned char __b) {
497  return (vector unsigned char)__a + __b;
498 }
499 
500 static __inline__ vector unsigned char __ATTRS_o_ai
501 vec_vaddubm(vector unsigned char __a, vector bool char __b) {
502  return __a + (vector unsigned char)__b;
503 }
504 
505 /* vec_vadduhm */
506 
507 #define __builtin_altivec_vadduhm vec_vadduhm
508 
509 static __inline__ vector short __ATTRS_o_ai vec_vadduhm(vector short __a,
510  vector short __b) {
511  return __a + __b;
512 }
513 
514 static __inline__ vector short __ATTRS_o_ai vec_vadduhm(vector bool short __a,
515  vector short __b) {
516  return (vector short)__a + __b;
517 }
518 
519 static __inline__ vector short __ATTRS_o_ai vec_vadduhm(vector short __a,
520  vector bool short __b) {
521  return __a + (vector short)__b;
522 }
523 
524 static __inline__ vector unsigned short __ATTRS_o_ai
525 vec_vadduhm(vector unsigned short __a, vector unsigned short __b) {
526  return __a + __b;
527 }
528 
529 static __inline__ vector unsigned short __ATTRS_o_ai
530 vec_vadduhm(vector bool short __a, vector unsigned short __b) {
531  return (vector unsigned short)__a + __b;
532 }
533 
534 static __inline__ vector unsigned short __ATTRS_o_ai
535 vec_vadduhm(vector unsigned short __a, vector bool short __b) {
536  return __a + (vector unsigned short)__b;
537 }
538 
539 /* vec_vadduwm */
540 
541 #define __builtin_altivec_vadduwm vec_vadduwm
542 
543 static __inline__ vector int __ATTRS_o_ai vec_vadduwm(vector int __a,
544  vector int __b) {
545  return __a + __b;
546 }
547 
548 static __inline__ vector int __ATTRS_o_ai vec_vadduwm(vector bool int __a,
549  vector int __b) {
550  return (vector int)__a + __b;
551 }
552 
553 static __inline__ vector int __ATTRS_o_ai vec_vadduwm(vector int __a,
554  vector bool int __b) {
555  return __a + (vector int)__b;
556 }
557 
558 static __inline__ vector unsigned int __ATTRS_o_ai
559 vec_vadduwm(vector unsigned int __a, vector unsigned int __b) {
560  return __a + __b;
561 }
562 
563 static __inline__ vector unsigned int __ATTRS_o_ai
564 vec_vadduwm(vector bool int __a, vector unsigned int __b) {
565  return (vector unsigned int)__a + __b;
566 }
567 
568 static __inline__ vector unsigned int __ATTRS_o_ai
569 vec_vadduwm(vector unsigned int __a, vector bool int __b) {
570  return __a + (vector unsigned int)__b;
571 }
572 
573 /* vec_vaddfp */
574 
575 #define __builtin_altivec_vaddfp vec_vaddfp
576 
577 static __inline__ vector float __attribute__((__always_inline__))
578 vec_vaddfp(vector float __a, vector float __b) {
579  return __a + __b;
580 }
581 
582 /* vec_addc */
583 
584 static __inline__ vector signed int __ATTRS_o_ai
585 vec_addc(vector signed int __a, vector signed int __b) {
586  return (vector signed int)__builtin_altivec_vaddcuw((vector unsigned int)__a,
587  (vector unsigned int)__b);
588 }
589 
590 static __inline__ vector unsigned int __ATTRS_o_ai
591 vec_addc(vector unsigned int __a, vector unsigned int __b) {
592  return __builtin_altivec_vaddcuw(__a, __b);
593 }
594 
595 #ifdef __POWER8_VECTOR__
596 #ifdef __SIZEOF_INT128__
597 static __inline__ vector signed __int128 __ATTRS_o_ai
598 vec_addc(vector signed __int128 __a, vector signed __int128 __b) {
599  return (vector signed __int128)__builtin_altivec_vaddcuq(
600  (vector unsigned __int128)__a, (vector unsigned __int128)__b);
601 }
602 
603 static __inline__ vector unsigned __int128 __ATTRS_o_ai
604 vec_addc(vector unsigned __int128 __a, vector unsigned __int128 __b) {
605  return __builtin_altivec_vaddcuq(__a, __b);
606 }
607 #endif
608 
609 static __inline__ vector unsigned char __attribute__((__always_inline__))
610 vec_addc_u128(vector unsigned char __a, vector unsigned char __b) {
611  return (vector unsigned char)__builtin_altivec_vaddcuq_c(
612  (vector unsigned char)__a, (vector unsigned char)__b);
613 }
614 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__)
615 
616 /* vec_vaddcuw */
617 
618 static __inline__ vector unsigned int __attribute__((__always_inline__))
619 vec_vaddcuw(vector unsigned int __a, vector unsigned int __b) {
620  return __builtin_altivec_vaddcuw(__a, __b);
621 }
622 
623 /* vec_adds */
624 
625 static __inline__ vector signed char __ATTRS_o_ai
626 vec_adds(vector signed char __a, vector signed char __b) {
627  return __builtin_altivec_vaddsbs(__a, __b);
628 }
629 
630 static __inline__ vector signed char __ATTRS_o_ai
631 vec_adds(vector bool char __a, vector signed char __b) {
632  return __builtin_altivec_vaddsbs((vector signed char)__a, __b);
633 }
634 
635 static __inline__ vector signed char __ATTRS_o_ai
636 vec_adds(vector signed char __a, vector bool char __b) {
637  return __builtin_altivec_vaddsbs(__a, (vector signed char)__b);
638 }
639 
640 static __inline__ vector unsigned char __ATTRS_o_ai
641 vec_adds(vector unsigned char __a, vector unsigned char __b) {
642  return __builtin_altivec_vaddubs(__a, __b);
643 }
644 
645 static __inline__ vector unsigned char __ATTRS_o_ai
646 vec_adds(vector bool char __a, vector unsigned char __b) {
647  return __builtin_altivec_vaddubs((vector unsigned char)__a, __b);
648 }
649 
650 static __inline__ vector unsigned char __ATTRS_o_ai
651 vec_adds(vector unsigned char __a, vector bool char __b) {
652  return __builtin_altivec_vaddubs(__a, (vector unsigned char)__b);
653 }
654 
655 static __inline__ vector short __ATTRS_o_ai vec_adds(vector short __a,
656  vector short __b) {
657  return __builtin_altivec_vaddshs(__a, __b);
658 }
659 
660 static __inline__ vector short __ATTRS_o_ai vec_adds(vector bool short __a,
661  vector short __b) {
662  return __builtin_altivec_vaddshs((vector short)__a, __b);
663 }
664 
665 static __inline__ vector short __ATTRS_o_ai vec_adds(vector short __a,
666  vector bool short __b) {
667  return __builtin_altivec_vaddshs(__a, (vector short)__b);
668 }
669 
670 static __inline__ vector unsigned short __ATTRS_o_ai
671 vec_adds(vector unsigned short __a, vector unsigned short __b) {
672  return __builtin_altivec_vadduhs(__a, __b);
673 }
674 
675 static __inline__ vector unsigned short __ATTRS_o_ai
676 vec_adds(vector bool short __a, vector unsigned short __b) {
677  return __builtin_altivec_vadduhs((vector unsigned short)__a, __b);
678 }
679 
680 static __inline__ vector unsigned short __ATTRS_o_ai
681 vec_adds(vector unsigned short __a, vector bool short __b) {
682  return __builtin_altivec_vadduhs(__a, (vector unsigned short)__b);
683 }
684 
685 static __inline__ vector int __ATTRS_o_ai vec_adds(vector int __a,
686  vector int __b) {
687  return __builtin_altivec_vaddsws(__a, __b);
688 }
689 
690 static __inline__ vector int __ATTRS_o_ai vec_adds(vector bool int __a,
691  vector int __b) {
692  return __builtin_altivec_vaddsws((vector int)__a, __b);
693 }
694 
695 static __inline__ vector int __ATTRS_o_ai vec_adds(vector int __a,
696  vector bool int __b) {
697  return __builtin_altivec_vaddsws(__a, (vector int)__b);
698 }
699 
700 static __inline__ vector unsigned int __ATTRS_o_ai
701 vec_adds(vector unsigned int __a, vector unsigned int __b) {
702  return __builtin_altivec_vadduws(__a, __b);
703 }
704 
705 static __inline__ vector unsigned int __ATTRS_o_ai
706 vec_adds(vector bool int __a, vector unsigned int __b) {
707  return __builtin_altivec_vadduws((vector unsigned int)__a, __b);
708 }
709 
710 static __inline__ vector unsigned int __ATTRS_o_ai
711 vec_adds(vector unsigned int __a, vector bool int __b) {
712  return __builtin_altivec_vadduws(__a, (vector unsigned int)__b);
713 }
714 
715 /* vec_vaddsbs */
716 
717 static __inline__ vector signed char __ATTRS_o_ai
718 vec_vaddsbs(vector signed char __a, vector signed char __b) {
719  return __builtin_altivec_vaddsbs(__a, __b);
720 }
721 
722 static __inline__ vector signed char __ATTRS_o_ai
723 vec_vaddsbs(vector bool char __a, vector signed char __b) {
724  return __builtin_altivec_vaddsbs((vector signed char)__a, __b);
725 }
726 
727 static __inline__ vector signed char __ATTRS_o_ai
728 vec_vaddsbs(vector signed char __a, vector bool char __b) {
729  return __builtin_altivec_vaddsbs(__a, (vector signed char)__b);
730 }
731 
732 /* vec_vaddubs */
733 
734 static __inline__ vector unsigned char __ATTRS_o_ai
735 vec_vaddubs(vector unsigned char __a, vector unsigned char __b) {
736  return __builtin_altivec_vaddubs(__a, __b);
737 }
738 
739 static __inline__ vector unsigned char __ATTRS_o_ai
740 vec_vaddubs(vector bool char __a, vector unsigned char __b) {
741  return __builtin_altivec_vaddubs((vector unsigned char)__a, __b);
742 }
743 
744 static __inline__ vector unsigned char __ATTRS_o_ai
745 vec_vaddubs(vector unsigned char __a, vector bool char __b) {
746  return __builtin_altivec_vaddubs(__a, (vector unsigned char)__b);
747 }
748 
749 /* vec_vaddshs */
750 
751 static __inline__ vector short __ATTRS_o_ai vec_vaddshs(vector short __a,
752  vector short __b) {
753  return __builtin_altivec_vaddshs(__a, __b);
754 }
755 
756 static __inline__ vector short __ATTRS_o_ai vec_vaddshs(vector bool short __a,
757  vector short __b) {
758  return __builtin_altivec_vaddshs((vector short)__a, __b);
759 }
760 
761 static __inline__ vector short __ATTRS_o_ai vec_vaddshs(vector short __a,
762  vector bool short __b) {
763  return __builtin_altivec_vaddshs(__a, (vector short)__b);
764 }
765 
766 /* vec_vadduhs */
767 
768 static __inline__ vector unsigned short __ATTRS_o_ai
769 vec_vadduhs(vector unsigned short __a, vector unsigned short __b) {
770  return __builtin_altivec_vadduhs(__a, __b);
771 }
772 
773 static __inline__ vector unsigned short __ATTRS_o_ai
774 vec_vadduhs(vector bool short __a, vector unsigned short __b) {
775  return __builtin_altivec_vadduhs((vector unsigned short)__a, __b);
776 }
777 
778 static __inline__ vector unsigned short __ATTRS_o_ai
779 vec_vadduhs(vector unsigned short __a, vector bool short __b) {
780  return __builtin_altivec_vadduhs(__a, (vector unsigned short)__b);
781 }
782 
783 /* vec_vaddsws */
784 
785 static __inline__ vector int __ATTRS_o_ai vec_vaddsws(vector int __a,
786  vector int __b) {
787  return __builtin_altivec_vaddsws(__a, __b);
788 }
789 
790 static __inline__ vector int __ATTRS_o_ai vec_vaddsws(vector bool int __a,
791  vector int __b) {
792  return __builtin_altivec_vaddsws((vector int)__a, __b);
793 }
794 
795 static __inline__ vector int __ATTRS_o_ai vec_vaddsws(vector int __a,
796  vector bool int __b) {
797  return __builtin_altivec_vaddsws(__a, (vector int)__b);
798 }
799 
800 /* vec_vadduws */
801 
802 static __inline__ vector unsigned int __ATTRS_o_ai
803 vec_vadduws(vector unsigned int __a, vector unsigned int __b) {
804  return __builtin_altivec_vadduws(__a, __b);
805 }
806 
807 static __inline__ vector unsigned int __ATTRS_o_ai
808 vec_vadduws(vector bool int __a, vector unsigned int __b) {
809  return __builtin_altivec_vadduws((vector unsigned int)__a, __b);
810 }
811 
812 static __inline__ vector unsigned int __ATTRS_o_ai
813 vec_vadduws(vector unsigned int __a, vector bool int __b) {
814  return __builtin_altivec_vadduws(__a, (vector unsigned int)__b);
815 }
816 
817 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) && \
818  defined(__SIZEOF_INT128__)
819 /* vec_vadduqm */
820 
821 static __inline__ vector signed __int128 __ATTRS_o_ai
822 vec_vadduqm(vector signed __int128 __a, vector signed __int128 __b) {
823  return __a + __b;
824 }
825 
826 static __inline__ vector unsigned __int128 __ATTRS_o_ai
827 vec_vadduqm(vector unsigned __int128 __a, vector unsigned __int128 __b) {
828  return __a + __b;
829 }
830 
831 /* vec_vaddeuqm */
832 
833 static __inline__ vector signed __int128 __ATTRS_o_ai
834 vec_vaddeuqm(vector signed __int128 __a, vector signed __int128 __b,
835  vector signed __int128 __c) {
836  return (vector signed __int128)__builtin_altivec_vaddeuqm(
837  (vector unsigned __int128)__a, (vector unsigned __int128)__b,
838  (vector unsigned __int128)__c);
839 }
840 
841 static __inline__ vector unsigned __int128 __ATTRS_o_ai
842 vec_vaddeuqm(vector unsigned __int128 __a, vector unsigned __int128 __b,
843  vector unsigned __int128 __c) {
844  return __builtin_altivec_vaddeuqm(__a, __b, __c);
845 }
846 
847 /* vec_vaddcuq */
848 
849 static __inline__ vector signed __int128 __ATTRS_o_ai
850 vec_vaddcuq(vector signed __int128 __a, vector signed __int128 __b) {
851  return (vector signed __int128)__builtin_altivec_vaddcuq(
852  (vector unsigned __int128)__a, (vector unsigned __int128)__b);
853 }
854 
855 static __inline__ vector unsigned __int128 __ATTRS_o_ai
856 vec_vaddcuq(vector unsigned __int128 __a, vector unsigned __int128 __b) {
857  return __builtin_altivec_vaddcuq(__a, __b);
858 }
859 
860 /* vec_vaddecuq */
861 
862 static __inline__ vector signed __int128 __ATTRS_o_ai
863 vec_vaddecuq(vector signed __int128 __a, vector signed __int128 __b,
864  vector signed __int128 __c) {
865  return (vector signed __int128)__builtin_altivec_vaddecuq(
866  (vector unsigned __int128)__a, (vector unsigned __int128)__b,
867  (vector unsigned __int128)__c);
868 }
869 
870 static __inline__ vector unsigned __int128 __ATTRS_o_ai
871 vec_vaddecuq(vector unsigned __int128 __a, vector unsigned __int128 __b,
872  vector unsigned __int128 __c) {
873  return __builtin_altivec_vaddecuq(__a, __b, __c);
874 }
875 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__)
876 
877 /* vec_and */
878 
879 #define __builtin_altivec_vand vec_and
880 
881 static __inline__ vector signed char __ATTRS_o_ai
882 vec_and(vector signed char __a, vector signed char __b) {
883  return __a & __b;
884 }
885 
886 static __inline__ vector signed char __ATTRS_o_ai
887 vec_and(vector bool char __a, vector signed char __b) {
888  return (vector signed char)__a & __b;
889 }
890 
891 static __inline__ vector signed char __ATTRS_o_ai
892 vec_and(vector signed char __a, vector bool char __b) {
893  return __a & (vector signed char)__b;
894 }
895 
896 static __inline__ vector unsigned char __ATTRS_o_ai
897 vec_and(vector unsigned char __a, vector unsigned char __b) {
898  return __a & __b;
899 }
900 
901 static __inline__ vector unsigned char __ATTRS_o_ai
902 vec_and(vector bool char __a, vector unsigned char __b) {
903  return (vector unsigned char)__a & __b;
904 }
905 
906 static __inline__ vector unsigned char __ATTRS_o_ai
907 vec_and(vector unsigned char __a, vector bool char __b) {
908  return __a & (vector unsigned char)__b;
909 }
910 
911 static __inline__ vector bool char __ATTRS_o_ai vec_and(vector bool char __a,
912  vector bool char __b) {
913  return __a & __b;
914 }
915 
916 static __inline__ vector short __ATTRS_o_ai vec_and(vector short __a,
917  vector short __b) {
918  return __a & __b;
919 }
920 
921 static __inline__ vector short __ATTRS_o_ai vec_and(vector bool short __a,
922  vector short __b) {
923  return (vector short)__a & __b;
924 }
925 
926 static __inline__ vector short __ATTRS_o_ai vec_and(vector short __a,
927  vector bool short __b) {
928  return __a & (vector short)__b;
929 }
930 
931 static __inline__ vector unsigned short __ATTRS_o_ai
932 vec_and(vector unsigned short __a, vector unsigned short __b) {
933  return __a & __b;
934 }
935 
936 static __inline__ vector unsigned short __ATTRS_o_ai
937 vec_and(vector bool short __a, vector unsigned short __b) {
938  return (vector unsigned short)__a & __b;
939 }
940 
941 static __inline__ vector unsigned short __ATTRS_o_ai
942 vec_and(vector unsigned short __a, vector bool short __b) {
943  return __a & (vector unsigned short)__b;
944 }
945 
946 static __inline__ vector bool short __ATTRS_o_ai
947 vec_and(vector bool short __a, vector bool short __b) {
948  return __a & __b;
949 }
950 
951 static __inline__ vector int __ATTRS_o_ai vec_and(vector int __a,
952  vector int __b) {
953  return __a & __b;
954 }
955 
956 static __inline__ vector int __ATTRS_o_ai vec_and(vector bool int __a,
957  vector int __b) {
958  return (vector int)__a & __b;
959 }
960 
961 static __inline__ vector int __ATTRS_o_ai vec_and(vector int __a,
962  vector bool int __b) {
963  return __a & (vector int)__b;
964 }
965 
966 static __inline__ vector unsigned int __ATTRS_o_ai
967 vec_and(vector unsigned int __a, vector unsigned int __b) {
968  return __a & __b;
969 }
970 
971 static __inline__ vector unsigned int __ATTRS_o_ai
972 vec_and(vector bool int __a, vector unsigned int __b) {
973  return (vector unsigned int)__a & __b;
974 }
975 
976 static __inline__ vector unsigned int __ATTRS_o_ai
977 vec_and(vector unsigned int __a, vector bool int __b) {
978  return __a & (vector unsigned int)__b;
979 }
980 
981 static __inline__ vector bool int __ATTRS_o_ai vec_and(vector bool int __a,
982  vector bool int __b) {
983  return __a & __b;
984 }
985 
986 static __inline__ vector float __ATTRS_o_ai vec_and(vector float __a,
987  vector float __b) {
988  vector unsigned int __res =
989  (vector unsigned int)__a & (vector unsigned int)__b;
990  return (vector float)__res;
991 }
992 
993 static __inline__ vector float __ATTRS_o_ai vec_and(vector bool int __a,
994  vector float __b) {
995  vector unsigned int __res =
996  (vector unsigned int)__a & (vector unsigned int)__b;
997  return (vector float)__res;
998 }
999 
1000 static __inline__ vector float __ATTRS_o_ai vec_and(vector float __a,
1001  vector bool int __b) {
1002  vector unsigned int __res =
1003  (vector unsigned int)__a & (vector unsigned int)__b;
1004  return (vector float)__res;
1005 }
1006 
1007 #ifdef __VSX__
1008 static __inline__ vector double __ATTRS_o_ai vec_and(vector bool long long __a,
1009  vector double __b) {
1010  vector unsigned long long __res =
1011  (vector unsigned long long)__a & (vector unsigned long long)__b;
1012  return (vector double)__res;
1013 }
1014 
1015 static __inline__ vector double __ATTRS_o_ai
1016 vec_and(vector double __a, vector bool long long __b) {
1017  vector unsigned long long __res =
1018  (vector unsigned long long)__a & (vector unsigned long long)__b;
1019  return (vector double)__res;
1020 }
1021 
1022 static __inline__ vector double __ATTRS_o_ai vec_and(vector double __a,
1023  vector double __b) {
1024  vector unsigned long long __res =
1025  (vector unsigned long long)__a & (vector unsigned long long)__b;
1026  return (vector double)__res;
1027 }
1028 
1029 static __inline__ vector signed long long __ATTRS_o_ai
1030 vec_and(vector signed long long __a, vector signed long long __b) {
1031  return __a & __b;
1032 }
1033 
1034 static __inline__ vector signed long long __ATTRS_o_ai
1035 vec_and(vector bool long long __a, vector signed long long __b) {
1036  return (vector signed long long)__a & __b;
1037 }
1038 
1039 static __inline__ vector signed long long __ATTRS_o_ai
1040 vec_and(vector signed long long __a, vector bool long long __b) {
1041  return __a & (vector signed long long)__b;
1042 }
1043 
1044 static __inline__ vector unsigned long long __ATTRS_o_ai
1045 vec_and(vector unsigned long long __a, vector unsigned long long __b) {
1046  return __a & __b;
1047 }
1048 
1049 static __inline__ vector unsigned long long __ATTRS_o_ai
1050 vec_and(vector bool long long __a, vector unsigned long long __b) {
1051  return (vector unsigned long long)__a & __b;
1052 }
1053 
1054 static __inline__ vector unsigned long long __ATTRS_o_ai
1055 vec_and(vector unsigned long long __a, vector bool long long __b) {
1056  return __a & (vector unsigned long long)__b;
1057 }
1058 
1059 static __inline__ vector bool long long __ATTRS_o_ai
1060 vec_and(vector bool long long __a, vector bool long long __b) {
1061  return __a & __b;
1062 }
1063 #endif
1064 
1065 /* vec_vand */
1066 
1067 static __inline__ vector signed char __ATTRS_o_ai
1068 vec_vand(vector signed char __a, vector signed char __b) {
1069  return __a & __b;
1070 }
1071 
1072 static __inline__ vector signed char __ATTRS_o_ai
1073 vec_vand(vector bool char __a, vector signed char __b) {
1074  return (vector signed char)__a & __b;
1075 }
1076 
1077 static __inline__ vector signed char __ATTRS_o_ai
1078 vec_vand(vector signed char __a, vector bool char __b) {
1079  return __a & (vector signed char)__b;
1080 }
1081 
1082 static __inline__ vector unsigned char __ATTRS_o_ai
1083 vec_vand(vector unsigned char __a, vector unsigned char __b) {
1084  return __a & __b;
1085 }
1086 
1087 static __inline__ vector unsigned char __ATTRS_o_ai
1088 vec_vand(vector bool char __a, vector unsigned char __b) {
1089  return (vector unsigned char)__a & __b;
1090 }
1091 
1092 static __inline__ vector unsigned char __ATTRS_o_ai
1093 vec_vand(vector unsigned char __a, vector bool char __b) {
1094  return __a & (vector unsigned char)__b;
1095 }
1096 
1097 static __inline__ vector bool char __ATTRS_o_ai vec_vand(vector bool char __a,
1098  vector bool char __b) {
1099  return __a & __b;
1100 }
1101 
1102 static __inline__ vector short __ATTRS_o_ai vec_vand(vector short __a,
1103  vector short __b) {
1104  return __a & __b;
1105 }
1106 
1107 static __inline__ vector short __ATTRS_o_ai vec_vand(vector bool short __a,
1108  vector short __b) {
1109  return (vector short)__a & __b;
1110 }
1111 
1112 static __inline__ vector short __ATTRS_o_ai vec_vand(vector short __a,
1113  vector bool short __b) {
1114  return __a & (vector short)__b;
1115 }
1116 
1117 static __inline__ vector unsigned short __ATTRS_o_ai
1118 vec_vand(vector unsigned short __a, vector unsigned short __b) {
1119  return __a & __b;
1120 }
1121 
1122 static __inline__ vector unsigned short __ATTRS_o_ai
1123 vec_vand(vector bool short __a, vector unsigned short __b) {
1124  return (vector unsigned short)__a & __b;
1125 }
1126 
1127 static __inline__ vector unsigned short __ATTRS_o_ai
1128 vec_vand(vector unsigned short __a, vector bool short __b) {
1129  return __a & (vector unsigned short)__b;
1130 }
1131 
1132 static __inline__ vector bool short __ATTRS_o_ai
1133 vec_vand(vector bool short __a, vector bool short __b) {
1134  return __a & __b;
1135 }
1136 
1137 static __inline__ vector int __ATTRS_o_ai vec_vand(vector int __a,
1138  vector int __b) {
1139  return __a & __b;
1140 }
1141 
1142 static __inline__ vector int __ATTRS_o_ai vec_vand(vector bool int __a,
1143  vector int __b) {
1144  return (vector int)__a & __b;
1145 }
1146 
1147 static __inline__ vector int __ATTRS_o_ai vec_vand(vector int __a,
1148  vector bool int __b) {
1149  return __a & (vector int)__b;
1150 }
1151 
1152 static __inline__ vector unsigned int __ATTRS_o_ai
1153 vec_vand(vector unsigned int __a, vector unsigned int __b) {
1154  return __a & __b;
1155 }
1156 
1157 static __inline__ vector unsigned int __ATTRS_o_ai
1158 vec_vand(vector bool int __a, vector unsigned int __b) {
1159  return (vector unsigned int)__a & __b;
1160 }
1161 
1162 static __inline__ vector unsigned int __ATTRS_o_ai
1163 vec_vand(vector unsigned int __a, vector bool int __b) {
1164  return __a & (vector unsigned int)__b;
1165 }
1166 
1167 static __inline__ vector bool int __ATTRS_o_ai vec_vand(vector bool int __a,
1168  vector bool int __b) {
1169  return __a & __b;
1170 }
1171 
1172 static __inline__ vector float __ATTRS_o_ai vec_vand(vector float __a,
1173  vector float __b) {
1174  vector unsigned int __res =
1175  (vector unsigned int)__a & (vector unsigned int)__b;
1176  return (vector float)__res;
1177 }
1178 
1179 static __inline__ vector float __ATTRS_o_ai vec_vand(vector bool int __a,
1180  vector float __b) {
1181  vector unsigned int __res =
1182  (vector unsigned int)__a & (vector unsigned int)__b;
1183  return (vector float)__res;
1184 }
1185 
1186 static __inline__ vector float __ATTRS_o_ai vec_vand(vector float __a,
1187  vector bool int __b) {
1188  vector unsigned int __res =
1189  (vector unsigned int)__a & (vector unsigned int)__b;
1190  return (vector float)__res;
1191 }
1192 
1193 #ifdef __VSX__
1194 static __inline__ vector signed long long __ATTRS_o_ai
1195 vec_vand(vector signed long long __a, vector signed long long __b) {
1196  return __a & __b;
1197 }
1198 
1199 static __inline__ vector signed long long __ATTRS_o_ai
1200 vec_vand(vector bool long long __a, vector signed long long __b) {
1201  return (vector signed long long)__a & __b;
1202 }
1203 
1204 static __inline__ vector signed long long __ATTRS_o_ai
1205 vec_vand(vector signed long long __a, vector bool long long __b) {
1206  return __a & (vector signed long long)__b;
1207 }
1208 
1209 static __inline__ vector unsigned long long __ATTRS_o_ai
1210 vec_vand(vector unsigned long long __a, vector unsigned long long __b) {
1211  return __a & __b;
1212 }
1213 
1214 static __inline__ vector unsigned long long __ATTRS_o_ai
1215 vec_vand(vector bool long long __a, vector unsigned long long __b) {
1216  return (vector unsigned long long)__a & __b;
1217 }
1218 
1219 static __inline__ vector unsigned long long __ATTRS_o_ai
1220 vec_vand(vector unsigned long long __a, vector bool long long __b) {
1221  return __a & (vector unsigned long long)__b;
1222 }
1223 
1224 static __inline__ vector bool long long __ATTRS_o_ai
1225 vec_vand(vector bool long long __a, vector bool long long __b) {
1226  return __a & __b;
1227 }
1228 #endif
1229 
1230 /* vec_andc */
1231 
1232 #define __builtin_altivec_vandc vec_andc
1233 
1234 static __inline__ vector signed char __ATTRS_o_ai
1235 vec_andc(vector signed char __a, vector signed char __b) {
1236  return __a & ~__b;
1237 }
1238 
1239 static __inline__ vector signed char __ATTRS_o_ai
1240 vec_andc(vector bool char __a, vector signed char __b) {
1241  return (vector signed char)__a & ~__b;
1242 }
1243 
1244 static __inline__ vector signed char __ATTRS_o_ai
1245 vec_andc(vector signed char __a, vector bool char __b) {
1246  return __a & ~(vector signed char)__b;
1247 }
1248 
1249 static __inline__ vector unsigned char __ATTRS_o_ai
1250 vec_andc(vector unsigned char __a, vector unsigned char __b) {
1251  return __a & ~__b;
1252 }
1253 
1254 static __inline__ vector unsigned char __ATTRS_o_ai
1255 vec_andc(vector bool char __a, vector unsigned char __b) {
1256  return (vector unsigned char)__a & ~__b;
1257 }
1258 
1259 static __inline__ vector unsigned char __ATTRS_o_ai
1260 vec_andc(vector unsigned char __a, vector bool char __b) {
1261  return __a & ~(vector unsigned char)__b;
1262 }
1263 
1264 static __inline__ vector bool char __ATTRS_o_ai vec_andc(vector bool char __a,
1265  vector bool char __b) {
1266  return __a & ~__b;
1267 }
1268 
1269 static __inline__ vector short __ATTRS_o_ai vec_andc(vector short __a,
1270  vector short __b) {
1271  return __a & ~__b;
1272 }
1273 
1274 static __inline__ vector short __ATTRS_o_ai vec_andc(vector bool short __a,
1275  vector short __b) {
1276  return (vector short)__a & ~__b;
1277 }
1278 
1279 static __inline__ vector short __ATTRS_o_ai vec_andc(vector short __a,
1280  vector bool short __b) {
1281  return __a & ~(vector short)__b;
1282 }
1283 
1284 static __inline__ vector unsigned short __ATTRS_o_ai
1285 vec_andc(vector unsigned short __a, vector unsigned short __b) {
1286  return __a & ~__b;
1287 }
1288 
1289 static __inline__ vector unsigned short __ATTRS_o_ai
1290 vec_andc(vector bool short __a, vector unsigned short __b) {
1291  return (vector unsigned short)__a & ~__b;
1292 }
1293 
1294 static __inline__ vector unsigned short __ATTRS_o_ai
1295 vec_andc(vector unsigned short __a, vector bool short __b) {
1296  return __a & ~(vector unsigned short)__b;
1297 }
1298 
1299 static __inline__ vector bool short __ATTRS_o_ai
1300 vec_andc(vector bool short __a, vector bool short __b) {
1301  return __a & ~__b;
1302 }
1303 
1304 static __inline__ vector int __ATTRS_o_ai vec_andc(vector int __a,
1305  vector int __b) {
1306  return __a & ~__b;
1307 }
1308 
1309 static __inline__ vector int __ATTRS_o_ai vec_andc(vector bool int __a,
1310  vector int __b) {
1311  return (vector int)__a & ~__b;
1312 }
1313 
1314 static __inline__ vector int __ATTRS_o_ai vec_andc(vector int __a,
1315  vector bool int __b) {
1316  return __a & ~(vector int)__b;
1317 }
1318 
1319 static __inline__ vector unsigned int __ATTRS_o_ai
1320 vec_andc(vector unsigned int __a, vector unsigned int __b) {
1321  return __a & ~__b;
1322 }
1323 
1324 static __inline__ vector unsigned int __ATTRS_o_ai
1325 vec_andc(vector bool int __a, vector unsigned int __b) {
1326  return (vector unsigned int)__a & ~__b;
1327 }
1328 
1329 static __inline__ vector unsigned int __ATTRS_o_ai
1330 vec_andc(vector unsigned int __a, vector bool int __b) {
1331  return __a & ~(vector unsigned int)__b;
1332 }
1333 
1334 static __inline__ vector bool int __ATTRS_o_ai vec_andc(vector bool int __a,
1335  vector bool int __b) {
1336  return __a & ~__b;
1337 }
1338 
1339 static __inline__ vector float __ATTRS_o_ai vec_andc(vector float __a,
1340  vector float __b) {
1341  vector unsigned int __res =
1342  (vector unsigned int)__a & ~(vector unsigned int)__b;
1343  return (vector float)__res;
1344 }
1345 
1346 static __inline__ vector float __ATTRS_o_ai vec_andc(vector bool int __a,
1347  vector float __b) {
1348  vector unsigned int __res =
1349  (vector unsigned int)__a & ~(vector unsigned int)__b;
1350  return (vector float)__res;
1351 }
1352 
1353 static __inline__ vector float __ATTRS_o_ai vec_andc(vector float __a,
1354  vector bool int __b) {
1355  vector unsigned int __res =
1356  (vector unsigned int)__a & ~(vector unsigned int)__b;
1357  return (vector float)__res;
1358 }
1359 
1360 #ifdef __VSX__
1361 static __inline__ vector double __ATTRS_o_ai vec_andc(vector bool long long __a,
1362  vector double __b) {
1363  vector unsigned long long __res =
1364  (vector unsigned long long)__a & ~(vector unsigned long long)__b;
1365  return (vector double)__res;
1366 }
1367 
1368 static __inline__ vector double __ATTRS_o_ai
1369 vec_andc(vector double __a, vector bool long long __b) {
1370  vector unsigned long long __res =
1371  (vector unsigned long long)__a & ~(vector unsigned long long)__b;
1372  return (vector double)__res;
1373 }
1374 
1375 static __inline__ vector double __ATTRS_o_ai vec_andc(vector double __a,
1376  vector double __b) {
1377  vector unsigned long long __res =
1378  (vector unsigned long long)__a & ~(vector unsigned long long)__b;
1379  return (vector double)__res;
1380 }
1381 
1382 static __inline__ vector signed long long __ATTRS_o_ai
1383 vec_andc(vector signed long long __a, vector signed long long __b) {
1384  return __a & ~__b;
1385 }
1386 
1387 static __inline__ vector signed long long __ATTRS_o_ai
1388 vec_andc(vector bool long long __a, vector signed long long __b) {
1389  return (vector signed long long)__a & ~__b;
1390 }
1391 
1392 static __inline__ vector signed long long __ATTRS_o_ai
1393 vec_andc(vector signed long long __a, vector bool long long __b) {
1394  return __a & ~(vector signed long long)__b;
1395 }
1396 
1397 static __inline__ vector unsigned long long __ATTRS_o_ai
1398 vec_andc(vector unsigned long long __a, vector unsigned long long __b) {
1399  return __a & ~__b;
1400 }
1401 
1402 static __inline__ vector unsigned long long __ATTRS_o_ai
1403 vec_andc(vector bool long long __a, vector unsigned long long __b) {
1404  return (vector unsigned long long)__a & ~__b;
1405 }
1406 
1407 static __inline__ vector unsigned long long __ATTRS_o_ai
1408 vec_andc(vector unsigned long long __a, vector bool long long __b) {
1409  return __a & ~(vector unsigned long long)__b;
1410 }
1411 
1412 static __inline__ vector bool long long __ATTRS_o_ai
1413 vec_andc(vector bool long long __a, vector bool long long __b) {
1414  return __a & ~__b;
1415 }
1416 #endif
1417 
1418 /* vec_vandc */
1419 
1420 static __inline__ vector signed char __ATTRS_o_ai
1421 vec_vandc(vector signed char __a, vector signed char __b) {
1422  return __a & ~__b;
1423 }
1424 
1425 static __inline__ vector signed char __ATTRS_o_ai
1426 vec_vandc(vector bool char __a, vector signed char __b) {
1427  return (vector signed char)__a & ~__b;
1428 }
1429 
1430 static __inline__ vector signed char __ATTRS_o_ai
1431 vec_vandc(vector signed char __a, vector bool char __b) {
1432  return __a & ~(vector signed char)__b;
1433 }
1434 
1435 static __inline__ vector unsigned char __ATTRS_o_ai
1436 vec_vandc(vector unsigned char __a, vector unsigned char __b) {
1437  return __a & ~__b;
1438 }
1439 
1440 static __inline__ vector unsigned char __ATTRS_o_ai
1441 vec_vandc(vector bool char __a, vector unsigned char __b) {
1442  return (vector unsigned char)__a & ~__b;
1443 }
1444 
1445 static __inline__ vector unsigned char __ATTRS_o_ai
1446 vec_vandc(vector unsigned char __a, vector bool char __b) {
1447  return __a & ~(vector unsigned char)__b;
1448 }
1449 
1450 static __inline__ vector bool char __ATTRS_o_ai
1451 vec_vandc(vector bool char __a, vector bool char __b) {
1452  return __a & ~__b;
1453 }
1454 
1455 static __inline__ vector short __ATTRS_o_ai vec_vandc(vector short __a,
1456  vector short __b) {
1457  return __a & ~__b;
1458 }
1459 
1460 static __inline__ vector short __ATTRS_o_ai vec_vandc(vector bool short __a,
1461  vector short __b) {
1462  return (vector short)__a & ~__b;
1463 }
1464 
1465 static __inline__ vector short __ATTRS_o_ai vec_vandc(vector short __a,
1466  vector bool short __b) {
1467  return __a & ~(vector short)__b;
1468 }
1469 
1470 static __inline__ vector unsigned short __ATTRS_o_ai
1471 vec_vandc(vector unsigned short __a, vector unsigned short __b) {
1472  return __a & ~__b;
1473 }
1474 
1475 static __inline__ vector unsigned short __ATTRS_o_ai
1476 vec_vandc(vector bool short __a, vector unsigned short __b) {
1477  return (vector unsigned short)__a & ~__b;
1478 }
1479 
1480 static __inline__ vector unsigned short __ATTRS_o_ai
1481 vec_vandc(vector unsigned short __a, vector bool short __b) {
1482  return __a & ~(vector unsigned short)__b;
1483 }
1484 
1485 static __inline__ vector bool short __ATTRS_o_ai
1486 vec_vandc(vector bool short __a, vector bool short __b) {
1487  return __a & ~__b;
1488 }
1489 
1490 static __inline__ vector int __ATTRS_o_ai vec_vandc(vector int __a,
1491  vector int __b) {
1492  return __a & ~__b;
1493 }
1494 
1495 static __inline__ vector int __ATTRS_o_ai vec_vandc(vector bool int __a,
1496  vector int __b) {
1497  return (vector int)__a & ~__b;
1498 }
1499 
1500 static __inline__ vector int __ATTRS_o_ai vec_vandc(vector int __a,
1501  vector bool int __b) {
1502  return __a & ~(vector int)__b;
1503 }
1504 
1505 static __inline__ vector unsigned int __ATTRS_o_ai
1506 vec_vandc(vector unsigned int __a, vector unsigned int __b) {
1507  return __a & ~__b;
1508 }
1509 
1510 static __inline__ vector unsigned int __ATTRS_o_ai
1511 vec_vandc(vector bool int __a, vector unsigned int __b) {
1512  return (vector unsigned int)__a & ~__b;
1513 }
1514 
1515 static __inline__ vector unsigned int __ATTRS_o_ai
1516 vec_vandc(vector unsigned int __a, vector bool int __b) {
1517  return __a & ~(vector unsigned int)__b;
1518 }
1519 
1520 static __inline__ vector bool int __ATTRS_o_ai vec_vandc(vector bool int __a,
1521  vector bool int __b) {
1522  return __a & ~__b;
1523 }
1524 
1525 static __inline__ vector float __ATTRS_o_ai vec_vandc(vector float __a,
1526  vector float __b) {
1527  vector unsigned int __res =
1528  (vector unsigned int)__a & ~(vector unsigned int)__b;
1529  return (vector float)__res;
1530 }
1531 
1532 static __inline__ vector float __ATTRS_o_ai vec_vandc(vector bool int __a,
1533  vector float __b) {
1534  vector unsigned int __res =
1535  (vector unsigned int)__a & ~(vector unsigned int)__b;
1536  return (vector float)__res;
1537 }
1538 
1539 static __inline__ vector float __ATTRS_o_ai vec_vandc(vector float __a,
1540  vector bool int __b) {
1541  vector unsigned int __res =
1542  (vector unsigned int)__a & ~(vector unsigned int)__b;
1543  return (vector float)__res;
1544 }
1545 
1546 #ifdef __VSX__
1547 static __inline__ vector signed long long __ATTRS_o_ai
1548 vec_vandc(vector signed long long __a, vector signed long long __b) {
1549  return __a & ~__b;
1550 }
1551 
1552 static __inline__ vector signed long long __ATTRS_o_ai
1553 vec_vandc(vector bool long long __a, vector signed long long __b) {
1554  return (vector signed long long)__a & ~__b;
1555 }
1556 
1557 static __inline__ vector signed long long __ATTRS_o_ai
1558 vec_vandc(vector signed long long __a, vector bool long long __b) {
1559  return __a & ~(vector signed long long)__b;
1560 }
1561 
1562 static __inline__ vector unsigned long long __ATTRS_o_ai
1563 vec_vandc(vector unsigned long long __a, vector unsigned long long __b) {
1564  return __a & ~__b;
1565 }
1566 
1567 static __inline__ vector unsigned long long __ATTRS_o_ai
1568 vec_vandc(vector bool long long __a, vector unsigned long long __b) {
1569  return (vector unsigned long long)__a & ~__b;
1570 }
1571 
1572 static __inline__ vector unsigned long long __ATTRS_o_ai
1573 vec_vandc(vector unsigned long long __a, vector bool long long __b) {
1574  return __a & ~(vector unsigned long long)__b;
1575 }
1576 
1577 static __inline__ vector bool long long __ATTRS_o_ai
1578 vec_vandc(vector bool long long __a, vector bool long long __b) {
1579  return __a & ~__b;
1580 }
1581 #endif
1582 
1583 /* vec_avg */
1584 
1585 static __inline__ vector signed char __ATTRS_o_ai
1586 vec_avg(vector signed char __a, vector signed char __b) {
1587  return __builtin_altivec_vavgsb(__a, __b);
1588 }
1589 
1590 static __inline__ vector unsigned char __ATTRS_o_ai
1591 vec_avg(vector unsigned char __a, vector unsigned char __b) {
1592  return __builtin_altivec_vavgub(__a, __b);
1593 }
1594 
1595 static __inline__ vector short __ATTRS_o_ai vec_avg(vector short __a,
1596  vector short __b) {
1597  return __builtin_altivec_vavgsh(__a, __b);
1598 }
1599 
1600 static __inline__ vector unsigned short __ATTRS_o_ai
1601 vec_avg(vector unsigned short __a, vector unsigned short __b) {
1602  return __builtin_altivec_vavguh(__a, __b);
1603 }
1604 
1605 static __inline__ vector int __ATTRS_o_ai vec_avg(vector int __a,
1606  vector int __b) {
1607  return __builtin_altivec_vavgsw(__a, __b);
1608 }
1609 
1610 static __inline__ vector unsigned int __ATTRS_o_ai
1611 vec_avg(vector unsigned int __a, vector unsigned int __b) {
1612  return __builtin_altivec_vavguw(__a, __b);
1613 }
1614 
1615 /* vec_vavgsb */
1616 
1617 static __inline__ vector signed char __attribute__((__always_inline__))
1618 vec_vavgsb(vector signed char __a, vector signed char __b) {
1619  return __builtin_altivec_vavgsb(__a, __b);
1620 }
1621 
1622 /* vec_vavgub */
1623 
1624 static __inline__ vector unsigned char __attribute__((__always_inline__))
1625 vec_vavgub(vector unsigned char __a, vector unsigned char __b) {
1626  return __builtin_altivec_vavgub(__a, __b);
1627 }
1628 
1629 /* vec_vavgsh */
1630 
1631 static __inline__ vector short __attribute__((__always_inline__))
1632 vec_vavgsh(vector short __a, vector short __b) {
1633  return __builtin_altivec_vavgsh(__a, __b);
1634 }
1635 
1636 /* vec_vavguh */
1637 
1638 static __inline__ vector unsigned short __attribute__((__always_inline__))
1639 vec_vavguh(vector unsigned short __a, vector unsigned short __b) {
1640  return __builtin_altivec_vavguh(__a, __b);
1641 }
1642 
1643 /* vec_vavgsw */
1644 
1645 static __inline__ vector int __attribute__((__always_inline__))
1646 vec_vavgsw(vector int __a, vector int __b) {
1647  return __builtin_altivec_vavgsw(__a, __b);
1648 }
1649 
1650 /* vec_vavguw */
1651 
1652 static __inline__ vector unsigned int __attribute__((__always_inline__))
1653 vec_vavguw(vector unsigned int __a, vector unsigned int __b) {
1654  return __builtin_altivec_vavguw(__a, __b);
1655 }
1656 
1657 /* vec_ceil */
1658 
1659 static __inline__ vector float __ATTRS_o_ai vec_ceil(vector float __a) {
1660 #ifdef __VSX__
1661  return __builtin_vsx_xvrspip(__a);
1662 #else
1663  return __builtin_altivec_vrfip(__a);
1664 #endif
1665 }
1666 
1667 #ifdef __VSX__
1668 static __inline__ vector double __ATTRS_o_ai vec_ceil(vector double __a) {
1669  return __builtin_vsx_xvrdpip(__a);
1670 }
1671 #endif
1672 
1673 /* vec_roundp */
1674 static __inline__ vector float __ATTRS_o_ai vec_roundp(vector float __a) {
1675  return vec_ceil(__a);
1676 }
1677 
1678 #ifdef __VSX__
1679 static __inline__ vector double __ATTRS_o_ai vec_roundp(vector double __a) {
1680  return vec_ceil(__a);
1681 }
1682 #endif
1683 
1684 /* vec_vrfip */
1685 
1686 static __inline__ vector float __attribute__((__always_inline__))
1687 vec_vrfip(vector float __a) {
1688  return __builtin_altivec_vrfip(__a);
1689 }
1690 
1691 /* vec_cmpb */
1692 
1693 static __inline__ vector int __attribute__((__always_inline__))
1694 vec_cmpb(vector float __a, vector float __b) {
1695  return __builtin_altivec_vcmpbfp(__a, __b);
1696 }
1697 
1698 /* vec_vcmpbfp */
1699 
1700 static __inline__ vector int __attribute__((__always_inline__))
1701 vec_vcmpbfp(vector float __a, vector float __b) {
1702  return __builtin_altivec_vcmpbfp(__a, __b);
1703 }
1704 
1705 /* vec_cmpeq */
1706 
1707 static __inline__ vector bool char __ATTRS_o_ai
1708 vec_cmpeq(vector signed char __a, vector signed char __b) {
1709  return (vector bool char)__builtin_altivec_vcmpequb((vector char)__a,
1710  (vector char)__b);
1711 }
1712 
1713 static __inline__ vector bool char __ATTRS_o_ai
1714 vec_cmpeq(vector unsigned char __a, vector unsigned char __b) {
1715  return (vector bool char)__builtin_altivec_vcmpequb((vector char)__a,
1716  (vector char)__b);
1717 }
1718 
1719 static __inline__ vector bool char __ATTRS_o_ai
1720 vec_cmpeq(vector bool char __a, vector bool char __b) {
1721  return (vector bool char)__builtin_altivec_vcmpequb((vector char)__a,
1722  (vector char)__b);
1723 }
1724 
1725 static __inline__ vector bool short __ATTRS_o_ai vec_cmpeq(vector short __a,
1726  vector short __b) {
1727  return (vector bool short)__builtin_altivec_vcmpequh(__a, __b);
1728 }
1729 
1730 static __inline__ vector bool short __ATTRS_o_ai
1731 vec_cmpeq(vector unsigned short __a, vector unsigned short __b) {
1732  return (vector bool short)__builtin_altivec_vcmpequh((vector short)__a,
1733  (vector short)__b);
1734 }
1735 
1736 static __inline__ vector bool short __ATTRS_o_ai
1737 vec_cmpeq(vector bool short __a, vector bool short __b) {
1738  return (vector bool short)__builtin_altivec_vcmpequh((vector short)__a,
1739  (vector short)__b);
1740 }
1741 
1742 static __inline__ vector bool int __ATTRS_o_ai vec_cmpeq(vector int __a,
1743  vector int __b) {
1744  return (vector bool int)__builtin_altivec_vcmpequw(__a, __b);
1745 }
1746 
1747 static __inline__ vector bool int __ATTRS_o_ai
1748 vec_cmpeq(vector unsigned int __a, vector unsigned int __b) {
1749  return (vector bool int)__builtin_altivec_vcmpequw((vector int)__a,
1750  (vector int)__b);
1751 }
1752 
1753 static __inline__ vector bool int __ATTRS_o_ai vec_cmpeq(vector bool int __a,
1754  vector bool int __b) {
1755  return (vector bool int)__builtin_altivec_vcmpequw((vector int)__a,
1756  (vector int)__b);
1757 }
1758 
1759 #ifdef __POWER8_VECTOR__
1760 static __inline__ vector bool long long __ATTRS_o_ai
1761 vec_cmpeq(vector signed long long __a, vector signed long long __b) {
1762  return (vector bool long long)__builtin_altivec_vcmpequd(__a, __b);
1763 }
1764 
1765 static __inline__ vector bool long long __ATTRS_o_ai
1766 vec_cmpeq(vector unsigned long long __a, vector unsigned long long __b) {
1767  return (vector bool long long)__builtin_altivec_vcmpequd(
1768  (vector long long)__a, (vector long long)__b);
1769 }
1770 
1771 static __inline__ vector bool long long __ATTRS_o_ai
1772 vec_cmpeq(vector bool long long __a, vector bool long long __b) {
1773  return (vector bool long long)__builtin_altivec_vcmpequd(
1774  (vector long long)__a, (vector long long)__b);
1775 }
1776 #elif defined(__VSX__)
1777 static __inline__ vector bool long long __ATTRS_o_ai
1778 vec_cmpeq(vector signed long long __a, vector signed long long __b) {
1779  vector bool int __wordcmp =
1780  vec_cmpeq((vector signed int)__a, (vector signed int)__b);
1781 #ifdef __LITTLE_ENDIAN__
1782  __wordcmp &= __builtin_shufflevector(__wordcmp, __wordcmp, 3, 0, 1, 2);
1783  return (vector bool long long)__builtin_shufflevector(__wordcmp, __wordcmp, 1,
1784  1, 3, 3);
1785 #else
1786  __wordcmp &= __builtin_shufflevector(__wordcmp, __wordcmp, 1, 2, 3, 0);
1787  return (vector bool long long)__builtin_shufflevector(__wordcmp, __wordcmp, 0,
1788  0, 2, 2);
1789 #endif
1790 }
1791 
1792 static __inline__ vector bool long long __ATTRS_o_ai
1793 vec_cmpeq(vector unsigned long long __a, vector unsigned long long __b) {
1794  return vec_cmpeq((vector signed long long)__a, (vector signed long long)__b);
1795 }
1796 
1797 static __inline__ vector bool long long __ATTRS_o_ai
1798 vec_cmpeq(vector bool long long __a, vector bool long long __b) {
1799  return vec_cmpeq((vector signed long long)__a, (vector signed long long)__b);
1800 }
1801 #endif
1802 
1803 static __inline__ vector bool int __ATTRS_o_ai vec_cmpeq(vector float __a,
1804  vector float __b) {
1805 #ifdef __VSX__
1806  return (vector bool int)__builtin_vsx_xvcmpeqsp(__a, __b);
1807 #else
1808  return (vector bool int)__builtin_altivec_vcmpeqfp(__a, __b);
1809 #endif
1810 }
1811 
1812 #ifdef __VSX__
1813 static __inline__ vector bool long long __ATTRS_o_ai
1814 vec_cmpeq(vector double __a, vector double __b) {
1815  return (vector bool long long)__builtin_vsx_xvcmpeqdp(__a, __b);
1816 }
1817 #endif
1818 
1819 #if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
1820 static __inline__ vector bool __int128 __ATTRS_o_ai
1821 vec_cmpeq(vector signed __int128 __a, vector signed __int128 __b) {
1822  return (vector bool __int128)__builtin_altivec_vcmpequq(
1823  (vector unsigned __int128)__a, (vector unsigned __int128)__b);
1824 }
1825 
1826 static __inline__ vector bool __int128 __ATTRS_o_ai
1827 vec_cmpeq(vector unsigned __int128 __a, vector unsigned __int128 __b) {
1828  return (vector bool __int128)__builtin_altivec_vcmpequq(
1829  (vector unsigned __int128)__a, (vector unsigned __int128)__b);
1830 }
1831 
1832 static __inline__ vector bool __int128 __ATTRS_o_ai
1833 vec_cmpeq(vector bool __int128 __a, vector bool __int128 __b) {
1834  return (vector bool __int128)__builtin_altivec_vcmpequq(
1835  (vector unsigned __int128)__a, (vector unsigned __int128)__b);
1836 }
1837 #endif
1838 
1839 #ifdef __POWER9_VECTOR__
1840 /* vec_cmpne */
1841 
1842 static __inline__ vector bool char __ATTRS_o_ai
1843 vec_cmpne(vector bool char __a, vector bool char __b) {
1844  return (vector bool char)__builtin_altivec_vcmpneb((vector char)__a,
1845  (vector char)__b);
1846 }
1847 
1848 static __inline__ vector bool char __ATTRS_o_ai
1849 vec_cmpne(vector signed char __a, vector signed char __b) {
1850  return (vector bool char)__builtin_altivec_vcmpneb((vector char)__a,
1851  (vector char)__b);
1852 }
1853 
1854 static __inline__ vector bool char __ATTRS_o_ai
1855 vec_cmpne(vector unsigned char __a, vector unsigned char __b) {
1856  return (vector bool char)__builtin_altivec_vcmpneb((vector char)__a,
1857  (vector char)__b);
1858 }
1859 
1860 static __inline__ vector bool short __ATTRS_o_ai
1861 vec_cmpne(vector bool short __a, vector bool short __b) {
1862  return (vector bool short)__builtin_altivec_vcmpneh((vector short)__a,
1863  (vector short)__b);
1864 }
1865 
1866 static __inline__ vector bool short __ATTRS_o_ai
1867 vec_cmpne(vector signed short __a, vector signed short __b) {
1868  return (vector bool short)__builtin_altivec_vcmpneh((vector short)__a,
1869  (vector short)__b);
1870 }
1871 
1872 static __inline__ vector bool short __ATTRS_o_ai
1873 vec_cmpne(vector unsigned short __a, vector unsigned short __b) {
1874  return (vector bool short)__builtin_altivec_vcmpneh((vector short)__a,
1875  (vector short)__b);
1876 }
1877 
1878 static __inline__ vector bool int __ATTRS_o_ai
1879 vec_cmpne(vector bool int __a, vector bool int __b) {
1880  return (vector bool int)__builtin_altivec_vcmpnew((vector int)__a,
1881  (vector int)__b);
1882 }
1883 
1884 static __inline__ vector bool int __ATTRS_o_ai
1885 vec_cmpne(vector signed int __a, vector signed int __b) {
1886  return (vector bool int)__builtin_altivec_vcmpnew((vector int)__a,
1887  (vector int)__b);
1888 }
1889 
1890 static __inline__ vector bool int __ATTRS_o_ai
1891 vec_cmpne(vector unsigned int __a, vector unsigned int __b) {
1892  return (vector bool int)__builtin_altivec_vcmpnew((vector int)__a,
1893  (vector int)__b);
1894 }
1895 
1896 static __inline__ vector bool int __ATTRS_o_ai
1897 vec_cmpne(vector float __a, vector float __b) {
1898  return (vector bool int)__builtin_altivec_vcmpnew((vector int)__a,
1899  (vector int)__b);
1900 }
1901 
1902 #if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
1903 static __inline__ vector bool __int128 __ATTRS_o_ai
1904 vec_cmpne(vector unsigned __int128 __a, vector unsigned __int128 __b) {
1905  return (vector bool __int128)~(__builtin_altivec_vcmpequq(
1906  (vector unsigned __int128)__a, (vector unsigned __int128)__b));
1907 }
1908 
1909 static __inline__ vector bool __int128 __ATTRS_o_ai
1910 vec_cmpne(vector signed __int128 __a, vector signed __int128 __b) {
1911  return (vector bool __int128)~(__builtin_altivec_vcmpequq(
1912  (vector unsigned __int128)__a, (vector unsigned __int128)__b));
1913 }
1914 
1915 static __inline__ vector bool __int128 __ATTRS_o_ai
1916 vec_cmpne(vector bool __int128 __a, vector bool __int128 __b) {
1917  return (vector bool __int128)~(__builtin_altivec_vcmpequq(
1918  (vector unsigned __int128)__a, (vector unsigned __int128)__b));
1919 }
1920 #endif
1921 
1922 /* vec_cmpnez */
1923 
1924 static __inline__ vector bool char __ATTRS_o_ai
1925 vec_cmpnez(vector signed char __a, vector signed char __b) {
1926  return (vector bool char)__builtin_altivec_vcmpnezb((vector char)__a,
1927  (vector char)__b);
1928 }
1929 
1930 static __inline__ vector bool char __ATTRS_o_ai
1931 vec_cmpnez(vector unsigned char __a, vector unsigned char __b) {
1932  return (vector bool char)__builtin_altivec_vcmpnezb((vector char)__a,
1933  (vector char)__b);
1934 }
1935 
1936 static __inline__ vector bool short __ATTRS_o_ai
1937 vec_cmpnez(vector signed short __a, vector signed short __b) {
1938  return (vector bool short)__builtin_altivec_vcmpnezh((vector short)__a,
1939  (vector short)__b);
1940 }
1941 
1942 static __inline__ vector bool short __ATTRS_o_ai
1943 vec_cmpnez(vector unsigned short __a, vector unsigned short __b) {
1944  return (vector bool short)__builtin_altivec_vcmpnezh((vector short)__a,
1945  (vector short)__b);
1946 }
1947 
1948 static __inline__ vector bool int __ATTRS_o_ai
1949 vec_cmpnez(vector signed int __a, vector signed int __b) {
1950  return (vector bool int)__builtin_altivec_vcmpnezw((vector int)__a,
1951  (vector int)__b);
1952 }
1953 
1954 static __inline__ vector bool int __ATTRS_o_ai
1955 vec_cmpnez(vector unsigned int __a, vector unsigned int __b) {
1956  return (vector bool int)__builtin_altivec_vcmpnezw((vector int)__a,
1957  (vector int)__b);
1958 }
1959 
1960 static __inline__ signed int __ATTRS_o_ai
1961 vec_cntlz_lsbb(vector signed char __a) {
1962 #ifdef __LITTLE_ENDIAN__
1963  return __builtin_altivec_vctzlsbb((vector unsigned char)__a);
1964 #else
1965  return __builtin_altivec_vclzlsbb((vector unsigned char)__a);
1966 #endif
1967 }
1968 
1969 static __inline__ signed int __ATTRS_o_ai
1970 vec_cntlz_lsbb(vector unsigned char __a) {
1971 #ifdef __LITTLE_ENDIAN__
1972  return __builtin_altivec_vctzlsbb((vector unsigned char)__a);
1973 #else
1974  return __builtin_altivec_vclzlsbb(__a);
1975 #endif
1976 }
1977 
1978 static __inline__ signed int __ATTRS_o_ai
1979 vec_cnttz_lsbb(vector signed char __a) {
1980 #ifdef __LITTLE_ENDIAN__
1981  return __builtin_altivec_vclzlsbb((vector unsigned char)__a);
1982 #else
1983  return __builtin_altivec_vctzlsbb((vector unsigned char)__a);
1984 #endif
1985 }
1986 
1987 static __inline__ signed int __ATTRS_o_ai
1988 vec_cnttz_lsbb(vector unsigned char __a) {
1989 #ifdef __LITTLE_ENDIAN__
1990  return __builtin_altivec_vclzlsbb(__a);
1991 #else
1992  return __builtin_altivec_vctzlsbb(__a);
1993 #endif
1994 }
1995 
1996 static __inline__ vector unsigned int __ATTRS_o_ai
1997 vec_parity_lsbb(vector unsigned int __a) {
1998  return __builtin_altivec_vprtybw(__a);
1999 }
2000 
2001 static __inline__ vector unsigned int __ATTRS_o_ai
2002 vec_parity_lsbb(vector signed int __a) {
2003  return __builtin_altivec_vprtybw((vector unsigned int)__a);
2004 }
2005 
2006 #ifdef __SIZEOF_INT128__
2007 static __inline__ vector unsigned __int128 __ATTRS_o_ai
2008 vec_parity_lsbb(vector unsigned __int128 __a) {
2009  return __builtin_altivec_vprtybq(__a);
2010 }
2011 
2012 static __inline__ vector unsigned __int128 __ATTRS_o_ai
2013 vec_parity_lsbb(vector signed __int128 __a) {
2014  return __builtin_altivec_vprtybq((vector unsigned __int128)__a);
2015 }
2016 #endif
2017 
2018 static __inline__ vector unsigned long long __ATTRS_o_ai
2019 vec_parity_lsbb(vector unsigned long long __a) {
2020  return __builtin_altivec_vprtybd(__a);
2021 }
2022 
2023 static __inline__ vector unsigned long long __ATTRS_o_ai
2024 vec_parity_lsbb(vector signed long long __a) {
2025  return __builtin_altivec_vprtybd((vector unsigned long long)__a);
2026 }
2027 
2028 #else
2029 /* vec_cmpne */
2030 
2031 static __inline__ vector bool char __ATTRS_o_ai
2032 vec_cmpne(vector bool char __a, vector bool char __b) {
2033  return ~(vec_cmpeq(__a, __b));
2034 }
2035 
2036 static __inline__ vector bool char __ATTRS_o_ai
2037 vec_cmpne(vector signed char __a, vector signed char __b) {
2038  return ~(vec_cmpeq(__a, __b));
2039 }
2040 
2041 static __inline__ vector bool char __ATTRS_o_ai
2042 vec_cmpne(vector unsigned char __a, vector unsigned char __b) {
2043  return ~(vec_cmpeq(__a, __b));
2044 }
2045 
2046 static __inline__ vector bool short __ATTRS_o_ai
2047 vec_cmpne(vector bool short __a, vector bool short __b) {
2048  return ~(vec_cmpeq(__a, __b));
2049 }
2050 
2051 static __inline__ vector bool short __ATTRS_o_ai
2052 vec_cmpne(vector signed short __a, vector signed short __b) {
2053  return ~(vec_cmpeq(__a, __b));
2054 }
2055 
2056 static __inline__ vector bool short __ATTRS_o_ai
2057 vec_cmpne(vector unsigned short __a, vector unsigned short __b) {
2058  return ~(vec_cmpeq(__a, __b));
2059 }
2060 
2061 static __inline__ vector bool int __ATTRS_o_ai
2062 vec_cmpne(vector bool int __a, vector bool int __b) {
2063  return ~(vec_cmpeq(__a, __b));
2064 }
2065 
2066 static __inline__ vector bool int __ATTRS_o_ai
2067 vec_cmpne(vector signed int __a, vector signed int __b) {
2068  return ~(vec_cmpeq(__a, __b));
2069 }
2070 
2071 static __inline__ vector bool int __ATTRS_o_ai
2072 vec_cmpne(vector unsigned int __a, vector unsigned int __b) {
2073  return ~(vec_cmpeq(__a, __b));
2074 }
2075 
2076 static __inline__ vector bool int __ATTRS_o_ai
2077 vec_cmpne(vector float __a, vector float __b) {
2078  return ~(vec_cmpeq(__a, __b));
2079 }
2080 #endif
2081 
2082 #ifdef __POWER8_VECTOR__
2083 static __inline__ vector bool long long __ATTRS_o_ai
2084 vec_cmpne(vector bool long long __a, vector bool long long __b) {
2085  return (vector bool long long)
2086  ~(__builtin_altivec_vcmpequd((vector long long)__a, (vector long long)__b));
2087 }
2088 
2089 static __inline__ vector bool long long __ATTRS_o_ai
2090 vec_cmpne(vector signed long long __a, vector signed long long __b) {
2091  return (vector bool long long)
2092  ~(__builtin_altivec_vcmpequd((vector long long)__a, (vector long long)__b));
2093 }
2094 
2095 static __inline__ vector bool long long __ATTRS_o_ai
2096 vec_cmpne(vector unsigned long long __a, vector unsigned long long __b) {
2097  return (vector bool long long)
2098  ~(__builtin_altivec_vcmpequd((vector long long)__a, (vector long long)__b));
2099 }
2100 #elif defined(__VSX__)
2101 static __inline__ vector bool long long __ATTRS_o_ai
2102 vec_cmpne(vector bool long long __a, vector bool long long __b) {
2103  return (vector bool long long)~(
2104  vec_cmpeq((vector signed long long)__a, (vector signed long long)__b));
2105 }
2106 
2107 static __inline__ vector bool long long __ATTRS_o_ai
2108 vec_cmpne(vector signed long long __a, vector signed long long __b) {
2109  return (vector bool long long)~(
2110  vec_cmpeq((vector signed long long)__a, (vector signed long long)__b));
2111 }
2112 
2113 static __inline__ vector bool long long __ATTRS_o_ai
2114 vec_cmpne(vector unsigned long long __a, vector unsigned long long __b) {
2115  return (vector bool long long)~(
2116  vec_cmpeq((vector signed long long)__a, (vector signed long long)__b));
2117 }
2118 #endif
2119 
2120 #ifdef __VSX__
2121 static __inline__ vector bool long long __ATTRS_o_ai
2122 vec_cmpne(vector double __a, vector double __b) {
2123  return (vector bool long long)
2124  ~(__builtin_altivec_vcmpequd((vector long long)__a, (vector long long)__b));
2125 }
2126 #endif
2127 
2128 /* vec_cmpgt */
2129 
2130 static __inline__ vector bool char __ATTRS_o_ai
2131 vec_cmpgt(vector signed char __a, vector signed char __b) {
2132  return (vector bool char)__builtin_altivec_vcmpgtsb(__a, __b);
2133 }
2134 
2135 static __inline__ vector bool char __ATTRS_o_ai
2136 vec_cmpgt(vector unsigned char __a, vector unsigned char __b) {
2137  return (vector bool char)__builtin_altivec_vcmpgtub(__a, __b);
2138 }
2139 
2140 static __inline__ vector bool short __ATTRS_o_ai vec_cmpgt(vector short __a,
2141  vector short __b) {
2142  return (vector bool short)__builtin_altivec_vcmpgtsh(__a, __b);
2143 }
2144 
2145 static __inline__ vector bool short __ATTRS_o_ai
2146 vec_cmpgt(vector unsigned short __a, vector unsigned short __b) {
2147  return (vector bool short)__builtin_altivec_vcmpgtuh(__a, __b);
2148 }
2149 
2150 static __inline__ vector bool int __ATTRS_o_ai vec_cmpgt(vector int __a,
2151  vector int __b) {
2152  return (vector bool int)__builtin_altivec_vcmpgtsw(__a, __b);
2153 }
2154 
2155 static __inline__ vector bool int __ATTRS_o_ai
2156 vec_cmpgt(vector unsigned int __a, vector unsigned int __b) {
2157  return (vector bool int)__builtin_altivec_vcmpgtuw(__a, __b);
2158 }
2159 
2160 #ifdef __POWER8_VECTOR__
2161 static __inline__ vector bool long long __ATTRS_o_ai
2162 vec_cmpgt(vector signed long long __a, vector signed long long __b) {
2163  return (vector bool long long)__builtin_altivec_vcmpgtsd(__a, __b);
2164 }
2165 
2166 static __inline__ vector bool long long __ATTRS_o_ai
2167 vec_cmpgt(vector unsigned long long __a, vector unsigned long long __b) {
2168  return (vector bool long long)__builtin_altivec_vcmpgtud(__a, __b);
2169 }
2170 #elif defined(__VSX__)
2171 static __inline__ vector bool long long __ATTRS_o_ai
2172 vec_cmpgt(vector signed long long __a, vector signed long long __b) {
2173  vector signed int __sgtw = (vector signed int)vec_cmpgt(
2174  (vector signed int)__a, (vector signed int)__b);
2175  vector unsigned int __ugtw = (vector unsigned int)vec_cmpgt(
2176  (vector unsigned int)__a, (vector unsigned int)__b);
2177  vector unsigned int __eqw = (vector unsigned int)vec_cmpeq(
2178  (vector signed int)__a, (vector signed int)__b);
2179 #ifdef __LITTLE_ENDIAN__
2180  __ugtw = __builtin_shufflevector(__ugtw, __ugtw, 3, 0, 1, 2) & __eqw;
2181  __sgtw |= (vector signed int)__ugtw;
2182  return (vector bool long long)__builtin_shufflevector(__sgtw, __sgtw, 1, 1, 3,
2183  3);
2184 #else
2185  __ugtw = __builtin_shufflevector(__ugtw, __ugtw, 1, 2, 3, 0) & __eqw;
2186  __sgtw |= (vector signed int)__ugtw;
2187  return (vector bool long long)__builtin_shufflevector(__sgtw, __sgtw, 0, 0, 2,
2188  2);
2189 #endif
2190 }
2191 
2192 static __inline__ vector bool long long __ATTRS_o_ai
2193 vec_cmpgt(vector unsigned long long __a, vector unsigned long long __b) {
2194  vector unsigned int __ugtw = (vector unsigned int)vec_cmpgt(
2195  (vector unsigned int)__a, (vector unsigned int)__b);
2196  vector unsigned int __eqw = (vector unsigned int)vec_cmpeq(
2197  (vector signed int)__a, (vector signed int)__b);
2198 #ifdef __LITTLE_ENDIAN__
2199  __eqw = __builtin_shufflevector(__ugtw, __ugtw, 3, 0, 1, 2) & __eqw;
2200  __ugtw |= __eqw;
2201  return (vector bool long long)__builtin_shufflevector(__ugtw, __ugtw, 1, 1, 3,
2202  3);
2203 #else
2204  __eqw = __builtin_shufflevector(__ugtw, __ugtw, 1, 2, 3, 0) & __eqw;
2205  __ugtw |= __eqw;
2206  return (vector bool long long)__builtin_shufflevector(__ugtw, __ugtw, 0, 0, 2,
2207  2);
2208 #endif
2209 }
2210 #endif
2211 
2212 static __inline__ vector bool int __ATTRS_o_ai vec_cmpgt(vector float __a,
2213  vector float __b) {
2214 #ifdef __VSX__
2215  return (vector bool int)__builtin_vsx_xvcmpgtsp(__a, __b);
2216 #else
2217  return (vector bool int)__builtin_altivec_vcmpgtfp(__a, __b);
2218 #endif
2219 }
2220 
2221 #ifdef __VSX__
2222 static __inline__ vector bool long long __ATTRS_o_ai
2223 vec_cmpgt(vector double __a, vector double __b) {
2224  return (vector bool long long)__builtin_vsx_xvcmpgtdp(__a, __b);
2225 }
2226 #endif
2227 
2228 #if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
2229 static __inline__ vector bool __int128 __ATTRS_o_ai
2230 vec_cmpgt(vector signed __int128 __a, vector signed __int128 __b) {
2231  return (vector bool __int128)__builtin_altivec_vcmpgtsq(__a, __b);
2232 }
2233 
2234 static __inline__ vector bool __int128 __ATTRS_o_ai
2235 vec_cmpgt(vector unsigned __int128 __a, vector unsigned __int128 __b) {
2236  return (vector bool __int128)__builtin_altivec_vcmpgtuq(__a, __b);
2237 }
2238 #endif
2239 
2240 /* vec_cmpge */
2241 
2242 static __inline__ vector bool char __ATTRS_o_ai
2243 vec_cmpge(vector signed char __a, vector signed char __b) {
2244  return ~(vec_cmpgt(__b, __a));
2245 }
2246 
2247 static __inline__ vector bool char __ATTRS_o_ai
2248 vec_cmpge(vector unsigned char __a, vector unsigned char __b) {
2249  return ~(vec_cmpgt(__b, __a));
2250 }
2251 
2252 static __inline__ vector bool short __ATTRS_o_ai
2253 vec_cmpge(vector signed short __a, vector signed short __b) {
2254  return ~(vec_cmpgt(__b, __a));
2255 }
2256 
2257 static __inline__ vector bool short __ATTRS_o_ai
2258 vec_cmpge(vector unsigned short __a, vector unsigned short __b) {
2259  return ~(vec_cmpgt(__b, __a));
2260 }
2261 
2262 static __inline__ vector bool int __ATTRS_o_ai
2263 vec_cmpge(vector signed int __a, vector signed int __b) {
2264  return ~(vec_cmpgt(__b, __a));
2265 }
2266 
2267 static __inline__ vector bool int __ATTRS_o_ai
2268 vec_cmpge(vector unsigned int __a, vector unsigned int __b) {
2269  return ~(vec_cmpgt(__b, __a));
2270 }
2271 
2272 static __inline__ vector bool int __ATTRS_o_ai vec_cmpge(vector float __a,
2273  vector float __b) {
2274 #ifdef __VSX__
2275  return (vector bool int)__builtin_vsx_xvcmpgesp(__a, __b);
2276 #else
2277  return (vector bool int)__builtin_altivec_vcmpgefp(__a, __b);
2278 #endif
2279 }
2280 
2281 #ifdef __VSX__
2282 static __inline__ vector bool long long __ATTRS_o_ai
2283 vec_cmpge(vector double __a, vector double __b) {
2284  return (vector bool long long)__builtin_vsx_xvcmpgedp(__a, __b);
2285 }
2286 
2287 static __inline__ vector bool long long __ATTRS_o_ai
2288 vec_cmpge(vector signed long long __a, vector signed long long __b) {
2289  return ~(vec_cmpgt(__b, __a));
2290 }
2291 
2292 static __inline__ vector bool long long __ATTRS_o_ai
2293 vec_cmpge(vector unsigned long long __a, vector unsigned long long __b) {
2294  return ~(vec_cmpgt(__b, __a));
2295 }
2296 #endif
2297 
2298 #if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
2299 static __inline__ vector bool __int128 __ATTRS_o_ai
2300 vec_cmpge(vector signed __int128 __a, vector signed __int128 __b) {
2301  return ~(vec_cmpgt(__b, __a));
2302 }
2303 
2304 static __inline__ vector bool __int128 __ATTRS_o_ai
2305 vec_cmpge(vector unsigned __int128 __a, vector unsigned __int128 __b) {
2306  return ~(vec_cmpgt(__b, __a));
2307 }
2308 #endif
2309 
2310 /* vec_vcmpgefp */
2311 
2312 static __inline__ vector bool int __attribute__((__always_inline__))
2313 vec_vcmpgefp(vector float __a, vector float __b) {
2314  return (vector bool int)__builtin_altivec_vcmpgefp(__a, __b);
2315 }
2316 
2317 /* vec_vcmpgtsb */
2318 
2319 static __inline__ vector bool char __attribute__((__always_inline__))
2320 vec_vcmpgtsb(vector signed char __a, vector signed char __b) {
2321  return (vector bool char)__builtin_altivec_vcmpgtsb(__a, __b);
2322 }
2323 
2324 /* vec_vcmpgtub */
2325 
2326 static __inline__ vector bool char __attribute__((__always_inline__))
2327 vec_vcmpgtub(vector unsigned char __a, vector unsigned char __b) {
2328  return (vector bool char)__builtin_altivec_vcmpgtub(__a, __b);
2329 }
2330 
2331 /* vec_vcmpgtsh */
2332 
2333 static __inline__ vector bool short __attribute__((__always_inline__))
2334 vec_vcmpgtsh(vector short __a, vector short __b) {
2335  return (vector bool short)__builtin_altivec_vcmpgtsh(__a, __b);
2336 }
2337 
2338 /* vec_vcmpgtuh */
2339 
2340 static __inline__ vector bool short __attribute__((__always_inline__))
2341 vec_vcmpgtuh(vector unsigned short __a, vector unsigned short __b) {
2342  return (vector bool short)__builtin_altivec_vcmpgtuh(__a, __b);
2343 }
2344 
2345 /* vec_vcmpgtsw */
2346 
2347 static __inline__ vector bool int __attribute__((__always_inline__))
2348 vec_vcmpgtsw(vector int __a, vector int __b) {
2349  return (vector bool int)__builtin_altivec_vcmpgtsw(__a, __b);
2350 }
2351 
2352 /* vec_vcmpgtuw */
2353 
2354 static __inline__ vector bool int __attribute__((__always_inline__))
2355 vec_vcmpgtuw(vector unsigned int __a, vector unsigned int __b) {
2356  return (vector bool int)__builtin_altivec_vcmpgtuw(__a, __b);
2357 }
2358 
2359 /* vec_vcmpgtfp */
2360 
2361 static __inline__ vector bool int __attribute__((__always_inline__))
2362 vec_vcmpgtfp(vector float __a, vector float __b) {
2363  return (vector bool int)__builtin_altivec_vcmpgtfp(__a, __b);
2364 }
2365 
2366 /* vec_cmple */
2367 
2368 static __inline__ vector bool char __ATTRS_o_ai
2369 vec_cmple(vector signed char __a, vector signed char __b) {
2370  return vec_cmpge(__b, __a);
2371 }
2372 
2373 static __inline__ vector bool char __ATTRS_o_ai
2374 vec_cmple(vector unsigned char __a, vector unsigned char __b) {
2375  return vec_cmpge(__b, __a);
2376 }
2377 
2378 static __inline__ vector bool short __ATTRS_o_ai
2379 vec_cmple(vector signed short __a, vector signed short __b) {
2380  return vec_cmpge(__b, __a);
2381 }
2382 
2383 static __inline__ vector bool short __ATTRS_o_ai
2384 vec_cmple(vector unsigned short __a, vector unsigned short __b) {
2385  return vec_cmpge(__b, __a);
2386 }
2387 
2388 static __inline__ vector bool int __ATTRS_o_ai
2389 vec_cmple(vector signed int __a, vector signed int __b) {
2390  return vec_cmpge(__b, __a);
2391 }
2392 
2393 static __inline__ vector bool int __ATTRS_o_ai
2394 vec_cmple(vector unsigned int __a, vector unsigned int __b) {
2395  return vec_cmpge(__b, __a);
2396 }
2397 
2398 static __inline__ vector bool int __ATTRS_o_ai vec_cmple(vector float __a,
2399  vector float __b) {
2400  return vec_cmpge(__b, __a);
2401 }
2402 
2403 #ifdef __VSX__
2404 static __inline__ vector bool long long __ATTRS_o_ai
2405 vec_cmple(vector double __a, vector double __b) {
2406  return vec_cmpge(__b, __a);
2407 }
2408 
2409 static __inline__ vector bool long long __ATTRS_o_ai
2410 vec_cmple(vector signed long long __a, vector signed long long __b) {
2411  return vec_cmpge(__b, __a);
2412 }
2413 
2414 static __inline__ vector bool long long __ATTRS_o_ai
2415 vec_cmple(vector unsigned long long __a, vector unsigned long long __b) {
2416  return vec_cmpge(__b, __a);
2417 }
2418 #endif
2419 
2420 #if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
2421 static __inline__ vector bool __int128 __ATTRS_o_ai
2422 vec_cmple(vector signed __int128 __a, vector signed __int128 __b) {
2423  return vec_cmpge(__b, __a);
2424 }
2425 
2426 static __inline__ vector bool __int128 __ATTRS_o_ai
2427 vec_cmple(vector unsigned __int128 __a, vector unsigned __int128 __b) {
2428  return vec_cmpge(__b, __a);
2429 }
2430 #endif
2431 
2432 /* vec_cmplt */
2433 
2434 static __inline__ vector bool char __ATTRS_o_ai
2435 vec_cmplt(vector signed char __a, vector signed char __b) {
2436  return vec_cmpgt(__b, __a);
2437 }
2438 
2439 static __inline__ vector bool char __ATTRS_o_ai
2440 vec_cmplt(vector unsigned char __a, vector unsigned char __b) {
2441  return vec_cmpgt(__b, __a);
2442 }
2443 
2444 static __inline__ vector bool short __ATTRS_o_ai vec_cmplt(vector short __a,
2445  vector short __b) {
2446  return vec_cmpgt(__b, __a);
2447 }
2448 
2449 static __inline__ vector bool short __ATTRS_o_ai
2450 vec_cmplt(vector unsigned short __a, vector unsigned short __b) {
2451  return vec_cmpgt(__b, __a);
2452 }
2453 
2454 static __inline__ vector bool int __ATTRS_o_ai vec_cmplt(vector int __a,
2455  vector int __b) {
2456  return vec_cmpgt(__b, __a);
2457 }
2458 
2459 static __inline__ vector bool int __ATTRS_o_ai
2460 vec_cmplt(vector unsigned int __a, vector unsigned int __b) {
2461  return vec_cmpgt(__b, __a);
2462 }
2463 
2464 static __inline__ vector bool int __ATTRS_o_ai vec_cmplt(vector float __a,
2465  vector float __b) {
2466  return vec_cmpgt(__b, __a);
2467 }
2468 
2469 #ifdef __VSX__
2470 static __inline__ vector bool long long __ATTRS_o_ai
2471 vec_cmplt(vector double __a, vector double __b) {
2472  return vec_cmpgt(__b, __a);
2473 }
2474 #endif
2475 
2476 #if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
2477 static __inline__ vector bool __int128 __ATTRS_o_ai
2478 vec_cmplt(vector signed __int128 __a, vector signed __int128 __b) {
2479  return vec_cmpgt(__b, __a);
2480 }
2481 
2482 static __inline__ vector bool __int128 __ATTRS_o_ai
2483 vec_cmplt(vector unsigned __int128 __a, vector unsigned __int128 __b) {
2484  return vec_cmpgt(__b, __a);
2485 }
2486 #endif
2487 
2488 #ifdef __VSX__
2489 static __inline__ vector bool long long __ATTRS_o_ai
2490 vec_cmplt(vector signed long long __a, vector signed long long __b) {
2491  return vec_cmpgt(__b, __a);
2492 }
2493 
2494 static __inline__ vector bool long long __ATTRS_o_ai
2495 vec_cmplt(vector unsigned long long __a, vector unsigned long long __b) {
2496  return vec_cmpgt(__b, __a);
2497 }
2498 #endif
2499 
2500 #ifdef __POWER8_VECTOR__
2501 /* vec_popcnt */
2502 
2503 static __inline__ vector unsigned char __ATTRS_o_ai
2504 vec_popcnt(vector signed char __a) {
2505  return (vector unsigned char)__builtin_altivec_vpopcntb(
2506  (vector unsigned char)__a);
2507 }
2508 static __inline__ vector unsigned char __ATTRS_o_ai
2509 vec_popcnt(vector unsigned char __a) {
2510  return __builtin_altivec_vpopcntb(__a);
2511 }
2512 static __inline__ vector unsigned short __ATTRS_o_ai
2513 vec_popcnt(vector signed short __a) {
2514  return (vector unsigned short)__builtin_altivec_vpopcnth(
2515  (vector unsigned short)__a);
2516 }
2517 static __inline__ vector unsigned short __ATTRS_o_ai
2518 vec_popcnt(vector unsigned short __a) {
2519  return __builtin_altivec_vpopcnth(__a);
2520 }
2521 static __inline__ vector unsigned int __ATTRS_o_ai
2522 vec_popcnt(vector signed int __a) {
2523  return __builtin_altivec_vpopcntw((vector unsigned int)__a);
2524 }
2525 static __inline__ vector unsigned int __ATTRS_o_ai
2526 vec_popcnt(vector unsigned int __a) {
2527  return __builtin_altivec_vpopcntw(__a);
2528 }
2529 static __inline__ vector unsigned long long __ATTRS_o_ai
2530 vec_popcnt(vector signed long long __a) {
2531  return __builtin_altivec_vpopcntd((vector unsigned long long)__a);
2532 }
2533 static __inline__ vector unsigned long long __ATTRS_o_ai
2534 vec_popcnt(vector unsigned long long __a) {
2535  return __builtin_altivec_vpopcntd(__a);
2536 }
2537 
2538 #define vec_vclz vec_cntlz
2539 /* vec_cntlz */
2540 
2541 static __inline__ vector signed char __ATTRS_o_ai
2542 vec_cntlz(vector signed char __a) {
2543  return (vector signed char)__builtin_altivec_vclzb((vector unsigned char)__a);
2544 }
2545 static __inline__ vector unsigned char __ATTRS_o_ai
2546 vec_cntlz(vector unsigned char __a) {
2547  return __builtin_altivec_vclzb(__a);
2548 }
2549 static __inline__ vector signed short __ATTRS_o_ai
2550 vec_cntlz(vector signed short __a) {
2551  return (vector signed short)__builtin_altivec_vclzh(
2552  (vector unsigned short)__a);
2553 }
2554 static __inline__ vector unsigned short __ATTRS_o_ai
2555 vec_cntlz(vector unsigned short __a) {
2556  return __builtin_altivec_vclzh(__a);
2557 }
2558 static __inline__ vector signed int __ATTRS_o_ai
2559 vec_cntlz(vector signed int __a) {
2560  return (vector signed int)__builtin_altivec_vclzw((vector unsigned int)__a);
2561 }
2562 static __inline__ vector unsigned int __ATTRS_o_ai
2563 vec_cntlz(vector unsigned int __a) {
2564  return __builtin_altivec_vclzw(__a);
2565 }
2566 static __inline__ vector signed long long __ATTRS_o_ai
2567 vec_cntlz(vector signed long long __a) {
2568  return (vector signed long long)__builtin_altivec_vclzd(
2569  (vector unsigned long long)__a);
2570 }
2571 static __inline__ vector unsigned long long __ATTRS_o_ai
2572 vec_cntlz(vector unsigned long long __a) {
2573  return __builtin_altivec_vclzd(__a);
2574 }
2575 #endif
2576 
2577 #ifdef __POWER9_VECTOR__
2578 
2579 /* vec_cnttz */
2580 
2581 static __inline__ vector signed char __ATTRS_o_ai
2582 vec_cnttz(vector signed char __a) {
2583  return (vector signed char)__builtin_altivec_vctzb((vector unsigned char)__a);
2584 }
2585 static __inline__ vector unsigned char __ATTRS_o_ai
2586 vec_cnttz(vector unsigned char __a) {
2587  return __builtin_altivec_vctzb(__a);
2588 }
2589 static __inline__ vector signed short __ATTRS_o_ai
2590 vec_cnttz(vector signed short __a) {
2591  return (vector signed short)__builtin_altivec_vctzh(
2592  (vector unsigned short)__a);
2593 }
2594 static __inline__ vector unsigned short __ATTRS_o_ai
2595 vec_cnttz(vector unsigned short __a) {
2596  return __builtin_altivec_vctzh(__a);
2597 }
2598 static __inline__ vector signed int __ATTRS_o_ai
2599 vec_cnttz(vector signed int __a) {
2600  return (vector signed int)__builtin_altivec_vctzw((vector unsigned int)__a);
2601 }
2602 static __inline__ vector unsigned int __ATTRS_o_ai
2603 vec_cnttz(vector unsigned int __a) {
2604  return __builtin_altivec_vctzw(__a);
2605 }
2606 static __inline__ vector signed long long __ATTRS_o_ai
2607 vec_cnttz(vector signed long long __a) {
2608  return (vector signed long long)__builtin_altivec_vctzd(
2609  (vector unsigned long long)__a);
2610 }
2611 static __inline__ vector unsigned long long __ATTRS_o_ai
2612 vec_cnttz(vector unsigned long long __a) {
2613  return __builtin_altivec_vctzd(__a);
2614 }
2615 
2616 /* vec_first_match_index */
2617 
2618 static __inline__ unsigned __ATTRS_o_ai
2619 vec_first_match_index(vector signed char __a, vector signed char __b) {
2620  vector unsigned long long __res =
2621 #ifdef __LITTLE_ENDIAN__
2622  vec_cnttz((vector unsigned long long)vec_cmpeq(__a, __b));
2623 #else
2624  vec_cntlz((vector unsigned long long)vec_cmpeq(__a, __b));
2625 #endif
2626  if (__res[0] == 64) {
2627  return (__res[1] + 64) >> 3;
2628  }
2629  return __res[0] >> 3;
2630 }
2631 
2632 static __inline__ unsigned __ATTRS_o_ai
2633 vec_first_match_index(vector unsigned char __a, vector unsigned char __b) {
2634  vector unsigned long long __res =
2635 #ifdef __LITTLE_ENDIAN__
2636  vec_cnttz((vector unsigned long long)vec_cmpeq(__a, __b));
2637 #else
2638  vec_cntlz((vector unsigned long long)vec_cmpeq(__a, __b));
2639 #endif
2640  if (__res[0] == 64) {
2641  return (__res[1] + 64) >> 3;
2642  }
2643  return __res[0] >> 3;
2644 }
2645 
2646 static __inline__ unsigned __ATTRS_o_ai
2647 vec_first_match_index(vector signed short __a, vector signed short __b) {
2648  vector unsigned long long __res =
2649 #ifdef __LITTLE_ENDIAN__
2650  vec_cnttz((vector unsigned long long)vec_cmpeq(__a, __b));
2651 #else
2652  vec_cntlz((vector unsigned long long)vec_cmpeq(__a, __b));
2653 #endif
2654  if (__res[0] == 64) {
2655  return (__res[1] + 64) >> 4;
2656  }
2657  return __res[0] >> 4;
2658 }
2659 
2660 static __inline__ unsigned __ATTRS_o_ai
2661 vec_first_match_index(vector unsigned short __a, vector unsigned short __b) {
2662  vector unsigned long long __res =
2663 #ifdef __LITTLE_ENDIAN__
2664  vec_cnttz((vector unsigned long long)vec_cmpeq(__a, __b));
2665 #else
2666  vec_cntlz((vector unsigned long long)vec_cmpeq(__a, __b));
2667 #endif
2668  if (__res[0] == 64) {
2669  return (__res[1] + 64) >> 4;
2670  }
2671  return __res[0] >> 4;
2672 }
2673 
2674 static __inline__ unsigned __ATTRS_o_ai
2675 vec_first_match_index(vector signed int __a, vector signed int __b) {
2676  vector unsigned long long __res =
2677 #ifdef __LITTLE_ENDIAN__
2678  vec_cnttz((vector unsigned long long)vec_cmpeq(__a, __b));
2679 #else
2680  vec_cntlz((vector unsigned long long)vec_cmpeq(__a, __b));
2681 #endif
2682  if (__res[0] == 64) {
2683  return (__res[1] + 64) >> 5;
2684  }
2685  return __res[0] >> 5;
2686 }
2687 
2688 static __inline__ unsigned __ATTRS_o_ai
2689 vec_first_match_index(vector unsigned int __a, vector unsigned int __b) {
2690  vector unsigned long long __res =
2691 #ifdef __LITTLE_ENDIAN__
2692  vec_cnttz((vector unsigned long long)vec_cmpeq(__a, __b));
2693 #else
2694  vec_cntlz((vector unsigned long long)vec_cmpeq(__a, __b));
2695 #endif
2696  if (__res[0] == 64) {
2697  return (__res[1] + 64) >> 5;
2698  }
2699  return __res[0] >> 5;
2700 }
2701 
2702 /* vec_first_match_or_eos_index */
2703 
2704 static __inline__ unsigned __ATTRS_o_ai
2705 vec_first_match_or_eos_index(vector signed char __a, vector signed char __b) {
2706  /* Compare the result of the comparison of two vectors with either and OR the
2707  result. Either the elements are equal or one will equal the comparison
2708  result if either is zero.
2709  */
2710  vector bool char __tmp1 = vec_cmpeq(__a, __b);
2711  vector bool char __tmp2 = __tmp1 |
2712  vec_cmpeq((vector signed char)__tmp1, __a) |
2713  vec_cmpeq((vector signed char)__tmp1, __b);
2714 
2715  vector unsigned long long __res =
2716 #ifdef __LITTLE_ENDIAN__
2717  vec_cnttz((vector unsigned long long)__tmp2);
2718 #else
2719  vec_cntlz((vector unsigned long long)__tmp2);
2720 #endif
2721  if (__res[0] == 64) {
2722  return (__res[1] + 64) >> 3;
2723  }
2724  return __res[0] >> 3;
2725 }
2726 
2727 static __inline__ unsigned __ATTRS_o_ai
2728 vec_first_match_or_eos_index(vector unsigned char __a,
2729  vector unsigned char __b) {
2730  vector bool char __tmp1 = vec_cmpeq(__a, __b);
2731  vector bool char __tmp2 = __tmp1 |
2732  vec_cmpeq((vector unsigned char)__tmp1, __a) |
2733  vec_cmpeq((vector unsigned char)__tmp1, __b);
2734 
2735  vector unsigned long long __res =
2736 #ifdef __LITTLE_ENDIAN__
2737  vec_cnttz((vector unsigned long long)__tmp2);
2738 #else
2739  vec_cntlz((vector unsigned long long)__tmp2);
2740 #endif
2741  if (__res[0] == 64) {
2742  return (__res[1] + 64) >> 3;
2743  }
2744  return __res[0] >> 3;
2745 }
2746 
2747 static __inline__ unsigned __ATTRS_o_ai
2748 vec_first_match_or_eos_index(vector signed short __a, vector signed short __b) {
2749  vector bool short __tmp1 = vec_cmpeq(__a, __b);
2750  vector bool short __tmp2 = __tmp1 |
2751  vec_cmpeq((vector signed short)__tmp1, __a) |
2752  vec_cmpeq((vector signed short)__tmp1, __b);
2753 
2754  vector unsigned long long __res =
2755 #ifdef __LITTLE_ENDIAN__
2756  vec_cnttz((vector unsigned long long)__tmp2);
2757 #else
2758  vec_cntlz((vector unsigned long long)__tmp2);
2759 #endif
2760  if (__res[0] == 64) {
2761  return (__res[1] + 64) >> 4;
2762  }
2763  return __res[0] >> 4;
2764 }
2765 
2766 static __inline__ unsigned __ATTRS_o_ai
2767 vec_first_match_or_eos_index(vector unsigned short __a,
2768  vector unsigned short __b) {
2769  vector bool short __tmp1 = vec_cmpeq(__a, __b);
2770  vector bool short __tmp2 = __tmp1 |
2771  vec_cmpeq((vector unsigned short)__tmp1, __a) |
2772  vec_cmpeq((vector unsigned short)__tmp1, __b);
2773 
2774  vector unsigned long long __res =
2775 #ifdef __LITTLE_ENDIAN__
2776  vec_cnttz((vector unsigned long long)__tmp2);
2777 #else
2778  vec_cntlz((vector unsigned long long)__tmp2);
2779 #endif
2780  if (__res[0] == 64) {
2781  return (__res[1] + 64) >> 4;
2782  }
2783  return __res[0] >> 4;
2784 }
2785 
2786 static __inline__ unsigned __ATTRS_o_ai
2787 vec_first_match_or_eos_index(vector signed int __a, vector signed int __b) {
2788  vector bool int __tmp1 = vec_cmpeq(__a, __b);
2789  vector bool int __tmp2 = __tmp1 | vec_cmpeq((vector signed int)__tmp1, __a) |
2790  vec_cmpeq((vector signed int)__tmp1, __b);
2791 
2792  vector unsigned long long __res =
2793 #ifdef __LITTLE_ENDIAN__
2794  vec_cnttz((vector unsigned long long)__tmp2);
2795 #else
2796  vec_cntlz((vector unsigned long long)__tmp2);
2797 #endif
2798  if (__res[0] == 64) {
2799  return (__res[1] + 64) >> 5;
2800  }
2801  return __res[0] >> 5;
2802 }
2803 
2804 static __inline__ unsigned __ATTRS_o_ai
2805 vec_first_match_or_eos_index(vector unsigned int __a, vector unsigned int __b) {
2806  vector bool int __tmp1 = vec_cmpeq(__a, __b);
2807  vector bool int __tmp2 = __tmp1 |
2808  vec_cmpeq((vector unsigned int)__tmp1, __a) |
2809  vec_cmpeq((vector unsigned int)__tmp1, __b);
2810 
2811  vector unsigned long long __res =
2812 #ifdef __LITTLE_ENDIAN__
2813  vec_cnttz((vector unsigned long long)__tmp2);
2814 #else
2815  vec_cntlz((vector unsigned long long)__tmp2);
2816 #endif
2817  if (__res[0] == 64) {
2818  return (__res[1] + 64) >> 5;
2819  }
2820  return __res[0] >> 5;
2821 }
2822 
2823 /* vec_first_mismatch_index */
2824 
2825 static __inline__ unsigned __ATTRS_o_ai
2826 vec_first_mismatch_index(vector signed char __a, vector signed char __b) {
2827  vector unsigned long long __res =
2828 #ifdef __LITTLE_ENDIAN__
2829  vec_cnttz((vector unsigned long long)vec_cmpne(__a, __b));
2830 #else
2831  vec_cntlz((vector unsigned long long)vec_cmpne(__a, __b));
2832 #endif
2833  if (__res[0] == 64) {
2834  return (__res[1] + 64) >> 3;
2835  }
2836  return __res[0] >> 3;
2837 }
2838 
2839 static __inline__ unsigned __ATTRS_o_ai
2840 vec_first_mismatch_index(vector unsigned char __a, vector unsigned char __b) {
2841  vector unsigned long long __res =
2842 #ifdef __LITTLE_ENDIAN__
2843  vec_cnttz((vector unsigned long long)vec_cmpne(__a, __b));
2844 #else
2845  vec_cntlz((vector unsigned long long)vec_cmpne(__a, __b));
2846 #endif
2847  if (__res[0] == 64) {
2848  return (__res[1] + 64) >> 3;
2849  }
2850  return __res[0] >> 3;
2851 }
2852 
2853 static __inline__ unsigned __ATTRS_o_ai
2854 vec_first_mismatch_index(vector signed short __a, vector signed short __b) {
2855  vector unsigned long long __res =
2856 #ifdef __LITTLE_ENDIAN__
2857  vec_cnttz((vector unsigned long long)vec_cmpne(__a, __b));
2858 #else
2859  vec_cntlz((vector unsigned long long)vec_cmpne(__a, __b));
2860 #endif
2861  if (__res[0] == 64) {
2862  return (__res[1] + 64) >> 4;
2863  }
2864  return __res[0] >> 4;
2865 }
2866 
2867 static __inline__ unsigned __ATTRS_o_ai
2868 vec_first_mismatch_index(vector unsigned short __a, vector unsigned short __b) {
2869  vector unsigned long long __res =
2870 #ifdef __LITTLE_ENDIAN__
2871  vec_cnttz((vector unsigned long long)vec_cmpne(__a, __b));
2872 #else
2873  vec_cntlz((vector unsigned long long)vec_cmpne(__a, __b));
2874 #endif
2875  if (__res[0] == 64) {
2876  return (__res[1] + 64) >> 4;
2877  }
2878  return __res[0] >> 4;
2879 }
2880 
2881 static __inline__ unsigned __ATTRS_o_ai
2882 vec_first_mismatch_index(vector signed int __a, vector signed int __b) {
2883  vector unsigned long long __res =
2884 #ifdef __LITTLE_ENDIAN__
2885  vec_cnttz((vector unsigned long long)vec_cmpne(__a, __b));
2886 #else
2887  vec_cntlz((vector unsigned long long)vec_cmpne(__a, __b));
2888 #endif
2889  if (__res[0] == 64) {
2890  return (__res[1] + 64) >> 5;
2891  }
2892  return __res[0] >> 5;
2893 }
2894 
2895 static __inline__ unsigned __ATTRS_o_ai
2896 vec_first_mismatch_index(vector unsigned int __a, vector unsigned int __b) {
2897  vector unsigned long long __res =
2898 #ifdef __LITTLE_ENDIAN__
2899  vec_cnttz((vector unsigned long long)vec_cmpne(__a, __b));
2900 #else
2901  vec_cntlz((vector unsigned long long)vec_cmpne(__a, __b));
2902 #endif
2903  if (__res[0] == 64) {
2904  return (__res[1] + 64) >> 5;
2905  }
2906  return __res[0] >> 5;
2907 }
2908 
2909 /* vec_first_mismatch_or_eos_index */
2910 
2911 static __inline__ unsigned __ATTRS_o_ai
2912 vec_first_mismatch_or_eos_index(vector signed char __a,
2913  vector signed char __b) {
2914  vector unsigned long long __res =
2915 #ifdef __LITTLE_ENDIAN__
2916  vec_cnttz((vector unsigned long long)vec_cmpnez(__a, __b));
2917 #else
2918  vec_cntlz((vector unsigned long long)vec_cmpnez(__a, __b));
2919 #endif
2920  if (__res[0] == 64) {
2921  return (__res[1] + 64) >> 3;
2922  }
2923  return __res[0] >> 3;
2924 }
2925 
2926 static __inline__ unsigned __ATTRS_o_ai
2927 vec_first_mismatch_or_eos_index(vector unsigned char __a,
2928  vector unsigned char __b) {
2929  vector unsigned long long __res =
2930 #ifdef __LITTLE_ENDIAN__
2931  vec_cnttz((vector unsigned long long)vec_cmpnez(__a, __b));
2932 #else
2933  vec_cntlz((vector unsigned long long)vec_cmpnez(__a, __b));
2934 #endif
2935  if (__res[0] == 64) {
2936  return (__res[1] + 64) >> 3;
2937  }
2938  return __res[0] >> 3;
2939 }
2940 
2941 static __inline__ unsigned __ATTRS_o_ai
2942 vec_first_mismatch_or_eos_index(vector signed short __a,
2943  vector signed short __b) {
2944  vector unsigned long long __res =
2945 #ifdef __LITTLE_ENDIAN__
2946  vec_cnttz((vector unsigned long long)vec_cmpnez(__a, __b));
2947 #else
2948  vec_cntlz((vector unsigned long long)vec_cmpnez(__a, __b));
2949 #endif
2950  if (__res[0] == 64) {
2951  return (__res[1] + 64) >> 4;
2952  }
2953  return __res[0] >> 4;
2954 }
2955 
2956 static __inline__ unsigned __ATTRS_o_ai
2957 vec_first_mismatch_or_eos_index(vector unsigned short __a,
2958  vector unsigned short __b) {
2959  vector unsigned long long __res =
2960 #ifdef __LITTLE_ENDIAN__
2961  vec_cnttz((vector unsigned long long)vec_cmpnez(__a, __b));
2962 #else
2963  vec_cntlz((vector unsigned long long)vec_cmpnez(__a, __b));
2964 #endif
2965  if (__res[0] == 64) {
2966  return (__res[1] + 64) >> 4;
2967  }
2968  return __res[0] >> 4;
2969 }
2970 
2971 static __inline__ unsigned __ATTRS_o_ai
2972 vec_first_mismatch_or_eos_index(vector signed int __a, vector signed int __b) {
2973  vector unsigned long long __res =
2974 #ifdef __LITTLE_ENDIAN__
2975  vec_cnttz((vector unsigned long long)vec_cmpnez(__a, __b));
2976 #else
2977  vec_cntlz((vector unsigned long long)vec_cmpnez(__a, __b));
2978 #endif
2979  if (__res[0] == 64) {
2980  return (__res[1] + 64) >> 5;
2981  }
2982  return __res[0] >> 5;
2983 }
2984 
2985 static __inline__ unsigned __ATTRS_o_ai
2986 vec_first_mismatch_or_eos_index(vector unsigned int __a,
2987  vector unsigned int __b) {
2988  vector unsigned long long __res =
2989 #ifdef __LITTLE_ENDIAN__
2990  vec_cnttz((vector unsigned long long)vec_cmpnez(__a, __b));
2991 #else
2992  vec_cntlz((vector unsigned long long)vec_cmpnez(__a, __b));
2993 #endif
2994  if (__res[0] == 64) {
2995  return (__res[1] + 64) >> 5;
2996  }
2997  return __res[0] >> 5;
2998 }
2999 
3000 static __inline__ vector double __ATTRS_o_ai
3001 vec_insert_exp(vector double __a, vector unsigned long long __b) {
3002  return __builtin_vsx_xviexpdp((vector unsigned long long)__a,__b);
3003 }
3004 
3005 static __inline__ vector double __ATTRS_o_ai
3006 vec_insert_exp(vector unsigned long long __a, vector unsigned long long __b) {
3007  return __builtin_vsx_xviexpdp(__a,__b);
3008 }
3009 
3010 static __inline__ vector float __ATTRS_o_ai
3011 vec_insert_exp(vector float __a, vector unsigned int __b) {
3012  return __builtin_vsx_xviexpsp((vector unsigned int)__a,__b);
3013 }
3014 
3015 static __inline__ vector float __ATTRS_o_ai
3016 vec_insert_exp(vector unsigned int __a, vector unsigned int __b) {
3017  return __builtin_vsx_xviexpsp(__a,__b);
3018 }
3019 
3020 #if defined(__powerpc64__)
3021 static __inline__ vector signed char __ATTRS_o_ai vec_xl_len(const signed char *__a,
3022  size_t __b) {
3023  return (vector signed char)__builtin_vsx_lxvl(__a, (__b << 56));
3024 }
3025 
3026 static __inline__ vector unsigned char __ATTRS_o_ai
3027 vec_xl_len(const unsigned char *__a, size_t __b) {
3028  return (vector unsigned char)__builtin_vsx_lxvl(__a, (__b << 56));
3029 }
3030 
3031 static __inline__ vector signed short __ATTRS_o_ai vec_xl_len(const signed short *__a,
3032  size_t __b) {
3033  return (vector signed short)__builtin_vsx_lxvl(__a, (__b << 56));
3034 }
3035 
3036 static __inline__ vector unsigned short __ATTRS_o_ai
3037 vec_xl_len(const unsigned short *__a, size_t __b) {
3038  return (vector unsigned short)__builtin_vsx_lxvl(__a, (__b << 56));
3039 }
3040 
3041 static __inline__ vector signed int __ATTRS_o_ai vec_xl_len(const signed int *__a,
3042  size_t __b) {
3043  return (vector signed int)__builtin_vsx_lxvl(__a, (__b << 56));
3044 }
3045 
3046 static __inline__ vector unsigned int __ATTRS_o_ai vec_xl_len(const unsigned int *__a,
3047  size_t __b) {
3048  return (vector unsigned int)__builtin_vsx_lxvl(__a, (__b << 56));
3049 }
3050 
3051 static __inline__ vector float __ATTRS_o_ai vec_xl_len(const float *__a, size_t __b) {
3052  return (vector float)__builtin_vsx_lxvl(__a, (__b << 56));
3053 }
3054 
3055 #ifdef __SIZEOF_INT128__
3056 static __inline__ vector signed __int128 __ATTRS_o_ai
3057 vec_xl_len(const signed __int128 *__a, size_t __b) {
3058  return (vector signed __int128)__builtin_vsx_lxvl(__a, (__b << 56));
3059 }
3060 
3061 static __inline__ vector unsigned __int128 __ATTRS_o_ai
3062 vec_xl_len(const unsigned __int128 *__a, size_t __b) {
3063  return (vector unsigned __int128)__builtin_vsx_lxvl(__a, (__b << 56));
3064 }
3065 #endif
3066 
3067 static __inline__ vector signed long long __ATTRS_o_ai
3068 vec_xl_len(const signed long long *__a, size_t __b) {
3069  return (vector signed long long)__builtin_vsx_lxvl(__a, (__b << 56));
3070 }
3071 
3072 static __inline__ vector unsigned long long __ATTRS_o_ai
3073 vec_xl_len(const unsigned long long *__a, size_t __b) {
3074  return (vector unsigned long long)__builtin_vsx_lxvl(__a, (__b << 56));
3075 }
3076 
3077 static __inline__ vector double __ATTRS_o_ai vec_xl_len(const double *__a,
3078  size_t __b) {
3079  return (vector double)__builtin_vsx_lxvl(__a, (__b << 56));
3080 }
3081 
3082 static __inline__ vector unsigned char __ATTRS_o_ai
3083 vec_xl_len_r(const unsigned char *__a, size_t __b) {
3084  vector unsigned char __res =
3085  (vector unsigned char)__builtin_vsx_lxvll(__a, (__b << 56));
3086  vector unsigned char __mask =
3087  (vector unsigned char)__builtin_altivec_lvsr(16 - __b, (int *)NULL);
3088  return (vector unsigned char)__builtin_altivec_vperm_4si(
3089  (vector int)__res, (vector int)__res, __mask);
3090 }
3091 
3092 // vec_xst_len
3093 static __inline__ void __ATTRS_o_ai vec_xst_len(vector unsigned char __a,
3094  unsigned char *__b,
3095  size_t __c) {
3096  return __builtin_vsx_stxvl((vector int)__a, __b, (__c << 56));
3097 }
3098 
3099 static __inline__ void __ATTRS_o_ai vec_xst_len(vector signed char __a,
3100  signed char *__b, size_t __c) {
3101  return __builtin_vsx_stxvl((vector int)__a, __b, (__c << 56));
3102 }
3103 
3104 static __inline__ void __ATTRS_o_ai vec_xst_len(vector signed short __a,
3105  signed short *__b, size_t __c) {
3106  return __builtin_vsx_stxvl((vector int)__a, __b, (__c << 56));
3107 }
3108 
3109 static __inline__ void __ATTRS_o_ai vec_xst_len(vector unsigned short __a,
3110  unsigned short *__b,
3111  size_t __c) {
3112  return __builtin_vsx_stxvl((vector int)__a, __b, (__c << 56));
3113 }
3114 
3115 static __inline__ void __ATTRS_o_ai vec_xst_len(vector signed int __a,
3116  signed int *__b, size_t __c) {
3117  return __builtin_vsx_stxvl((vector int)__a, __b, (__c << 56));
3118 }
3119 
3120 static __inline__ void __ATTRS_o_ai vec_xst_len(vector unsigned int __a,
3121  unsigned int *__b, size_t __c) {
3122  return __builtin_vsx_stxvl((vector int)__a, __b, (__c << 56));
3123 }
3124 
3125 static __inline__ void __ATTRS_o_ai vec_xst_len(vector float __a, float *__b,
3126  size_t __c) {
3127  return __builtin_vsx_stxvl((vector int)__a, __b, (__c << 56));
3128 }
3129 
3130 #ifdef __SIZEOF_INT128__
3131 static __inline__ void __ATTRS_o_ai vec_xst_len(vector signed __int128 __a,
3132  signed __int128 *__b,
3133  size_t __c) {
3134  return __builtin_vsx_stxvl((vector int)__a, __b, (__c << 56));
3135 }
3136 
3137 static __inline__ void __ATTRS_o_ai vec_xst_len(vector unsigned __int128 __a,
3138  unsigned __int128 *__b,
3139  size_t __c) {
3140  return __builtin_vsx_stxvl((vector int)__a, __b, (__c << 56));
3141 }
3142 #endif
3143 
3144 static __inline__ void __ATTRS_o_ai vec_xst_len(vector signed long long __a,
3145  signed long long *__b,
3146  size_t __c) {
3147  return __builtin_vsx_stxvl((vector int)__a, __b, (__c << 56));
3148 }
3149 
3150 static __inline__ void __ATTRS_o_ai vec_xst_len(vector unsigned long long __a,
3151  unsigned long long *__b,
3152  size_t __c) {
3153  return __builtin_vsx_stxvl((vector int)__a, __b, (__c << 56));
3154 }
3155 
3156 static __inline__ void __ATTRS_o_ai vec_xst_len(vector double __a, double *__b,
3157  size_t __c) {
3158  return __builtin_vsx_stxvl((vector int)__a, __b, (__c << 56));
3159 }
3160 
3161 static __inline__ void __ATTRS_o_ai vec_xst_len_r(vector unsigned char __a,
3162  unsigned char *__b,
3163  size_t __c) {
3164  vector unsigned char __mask =
3165  (vector unsigned char)__builtin_altivec_lvsl(16 - __c, (int *)NULL);
3166  vector unsigned char __res =
3167  (vector unsigned char)__builtin_altivec_vperm_4si(
3168  (vector int)__a, (vector int)__a, __mask);
3169  return __builtin_vsx_stxvll((vector int)__res, __b, (__c << 56));
3170 }
3171 #endif
3172 #endif
3173 
3174 #if defined(__POWER9_VECTOR__) && defined(__powerpc64__)
3175 #define __vec_ldrmb(PTR, CNT) vec_xl_len_r((const unsigned char *)(PTR), (CNT))
3176 #define __vec_strmb(PTR, CNT, VAL) \
3177  vec_xst_len_r((VAL), (unsigned char *)(PTR), (CNT))
3178 #else
3179 #define __vec_ldrmb __builtin_vsx_ldrmb
3180 #define __vec_strmb __builtin_vsx_strmb
3181 #endif
3182 
3183 /* vec_cpsgn */
3184 
3185 #ifdef __VSX__
3186 static __inline__ vector float __ATTRS_o_ai vec_cpsgn(vector float __a,
3187  vector float __b) {
3188  return __builtin_vsx_xvcpsgnsp(__b, __a);
3189 }
3190 
3191 static __inline__ vector double __ATTRS_o_ai vec_cpsgn(vector double __a,
3192  vector double __b) {
3193  return __builtin_vsx_xvcpsgndp(__b, __a);
3194 }
3195 #endif
3196 
3197 /* vec_ctf */
3198 
3199 #ifdef __VSX__
3200 // There are some functions that have different signatures with the XL compiler
3201 // from those in Clang/GCC and documented in the PVIPR. This macro ensures that
3202 // the XL-compatible signatures are used for those functions.
3203 #ifdef __XL_COMPAT_ALTIVEC__
3204 #define vec_ctf(__a, __b) \
3205  _Generic( \
3206  (__a), vector int \
3207  : (vector float)__builtin_altivec_vcfsx((vector int)(__a), (__b)), \
3208  vector unsigned int \
3209  : (vector float)__builtin_altivec_vcfux((vector unsigned int)(__a), \
3210  (__b)), \
3211  vector unsigned long long \
3212  : (vector float)(__builtin_vsx_xvcvuxdsp( \
3213  (vector unsigned long long)(__a)) * \
3214  (vector float)(vector unsigned)((0x7f - (__b)) << 23)), \
3215  vector signed long long \
3216  : (vector float)(__builtin_vsx_xvcvsxdsp( \
3217  (vector signed long long)(__a)) * \
3218  (vector float)(vector unsigned)((0x7f - (__b)) << 23)))
3219 #else // __XL_COMPAT_ALTIVEC__
3220 #define vec_ctf(__a, __b) \
3221  _Generic( \
3222  (__a), vector int \
3223  : (vector float)__builtin_altivec_vcfsx((vector int)(__a), (__b)), \
3224  vector unsigned int \
3225  : (vector float)__builtin_altivec_vcfux((vector unsigned int)(__a), \
3226  (__b)), \
3227  vector unsigned long long \
3228  : (vector float)(__builtin_convertvector( \
3229  (vector unsigned long long)(__a), vector double) * \
3230  (vector double)(vector unsigned long long)((0x3ffULL - \
3231  (__b)) \
3232  << 52)), \
3233  vector signed long long \
3234  : (vector float)(__builtin_convertvector((vector signed long long)(__a), \
3235  vector double) * \
3236  (vector double)(vector unsigned long long)((0x3ffULL - \
3237  (__b)) \
3238  << 52)))
3239 #endif // __XL_COMPAT_ALTIVEC__
3240 #else
3241 #define vec_ctf(__a, __b) \
3242  _Generic((__a), vector int \
3243  : (vector float)__builtin_altivec_vcfsx((vector int)(__a), (__b)), \
3244  vector unsigned int \
3245  : (vector float)__builtin_altivec_vcfux((vector unsigned int)(__a), \
3246  (__b)))
3247 #endif
3248 
3249 /* vec_ctd */
3250 #ifdef __VSX__
3251 #define vec_ctd(__a, __b) \
3252  _Generic((__a), vector signed int \
3253  : (vec_doublee((vector signed int)(__a)) * \
3254  (vector double)(vector unsigned long long)((0x3ffULL - (__b)) \
3255  << 52)), \
3256  vector unsigned int \
3257  : (vec_doublee((vector unsigned int)(__a)) * \
3258  (vector double)(vector unsigned long long)((0x3ffULL - (__b)) \
3259  << 52)), \
3260  vector unsigned long long \
3261  : (__builtin_convertvector((vector unsigned long long)(__a), \
3262  vector double) * \
3263  (vector double)(vector unsigned long long)((0x3ffULL - (__b)) \
3264  << 52)), \
3265  vector signed long long \
3266  : (__builtin_convertvector((vector signed long long)(__a), \
3267  vector double) * \
3268  (vector double)(vector unsigned long long)((0x3ffULL - (__b)) \
3269  << 52)))
3270 #endif // __VSX__
3271 
3272 /* vec_vcfsx */
3273 
3274 #define vec_vcfux __builtin_altivec_vcfux
3275 /* vec_vcfux */
3276 
3277 #define vec_vcfsx(__a, __b) __builtin_altivec_vcfsx((vector int)(__a), (__b))
3278 
3279 /* vec_cts */
3280 
3281 #ifdef __VSX__
3282 #ifdef __XL_COMPAT_ALTIVEC__
3283 #define vec_cts(__a, __b) \
3284  _Generic((__a), vector float \
3285  : (vector signed int)__builtin_altivec_vctsxs((vector float)(__a), \
3286  (__b)), \
3287  vector double \
3288  : __extension__({ \
3289  vector double __ret = \
3290  (vector double)(__a) * \
3291  (vector double)(vector unsigned long long)((0x3ffULL + (__b)) \
3292  << 52); \
3293  (vector signed long long)__builtin_vsx_xvcvdpsxws(__ret); \
3294  }))
3295 #else // __XL_COMPAT_ALTIVEC__
3296 #define vec_cts(__a, __b) \
3297  _Generic((__a), vector float \
3298  : (vector signed int)__builtin_altivec_vctsxs((vector float)(__a), \
3299  (__b)), \
3300  vector double \
3301  : __extension__({ \
3302  vector double __ret = \
3303  (vector double)(__a) * \
3304  (vector double)(vector unsigned long long)((0x3ffULL + (__b)) \
3305  << 52); \
3306  (vector signed long long)__builtin_convertvector( \
3307  __ret, vector signed long long); \
3308  }))
3309 #endif // __XL_COMPAT_ALTIVEC__
3310 #else
3311 #define vec_cts __builtin_altivec_vctsxs
3312 #endif
3313 
3314 /* vec_vctsxs */
3315 
3316 #define vec_vctsxs __builtin_altivec_vctsxs
3317 
3318 /* vec_ctu */
3319 
3320 #ifdef __VSX__
3321 #ifdef __XL_COMPAT_ALTIVEC__
3322 #define vec_ctu(__a, __b) \
3323  _Generic((__a), vector float \
3324  : (vector unsigned int)__builtin_altivec_vctuxs( \
3325  (vector float)(__a), (__b)), \
3326  vector double \
3327  : __extension__({ \
3328  vector double __ret = \
3329  (vector double)(__a) * \
3330  (vector double)(vector unsigned long long)((0x3ffULL + __b) \
3331  << 52); \
3332  (vector unsigned long long)__builtin_vsx_xvcvdpuxws(__ret); \
3333  }))
3334 #else // __XL_COMPAT_ALTIVEC__
3335 #define vec_ctu(__a, __b) \
3336  _Generic((__a), vector float \
3337  : (vector unsigned int)__builtin_altivec_vctuxs( \
3338  (vector float)(__a), (__b)), \
3339  vector double \
3340  : __extension__({ \
3341  vector double __ret = \
3342  (vector double)(__a) * \
3343  (vector double)(vector unsigned long long)((0x3ffULL + __b) \
3344  << 52); \
3345  (vector unsigned long long)__builtin_convertvector( \
3346  __ret, vector unsigned long long); \
3347  }))
3348 #endif // __XL_COMPAT_ALTIVEC__
3349 #else
3350 #define vec_ctu __builtin_altivec_vctuxs
3351 #endif
3352 
3353 #ifdef __LITTLE_ENDIAN__
3354 /* vec_ctsl */
3355 
3356 #ifdef __VSX__
3357 #define vec_ctsl(__a, __b) \
3358  _Generic((__a), vector float \
3359  : __extension__({ \
3360  vector float __ret = \
3361  (vector float)(__a) * \
3362  (vector float)(vector unsigned)((0x7f + (__b)) << 23); \
3363  __builtin_vsx_xvcvspsxds( \
3364  __builtin_vsx_xxsldwi(__ret, __ret, 1)); \
3365  }), \
3366  vector double \
3367  : __extension__({ \
3368  vector double __ret = \
3369  (vector double)(__a) * \
3370  (vector double)(vector unsigned long long)((0x3ffULL + __b) \
3371  << 52); \
3372  __builtin_convertvector(__ret, vector signed long long); \
3373  }))
3374 
3375 /* vec_ctul */
3376 
3377 #define vec_ctul(__a, __b) \
3378  _Generic((__a), vector float \
3379  : __extension__({ \
3380  vector float __ret = \
3381  (vector float)(__a) * \
3382  (vector float)(vector unsigned)((0x7f + (__b)) << 23); \
3383  __builtin_vsx_xvcvspuxds( \
3384  __builtin_vsx_xxsldwi(__ret, __ret, 1)); \
3385  }), \
3386  vector double \
3387  : __extension__({ \
3388  vector double __ret = \
3389  (vector double)(__a) * \
3390  (vector double)(vector unsigned long long)((0x3ffULL + __b) \
3391  << 52); \
3392  __builtin_convertvector(__ret, vector unsigned long long); \
3393  }))
3394 #endif
3395 #else // __LITTLE_ENDIAN__
3396 /* vec_ctsl */
3397 
3398 #ifdef __VSX__
3399 #define vec_ctsl(__a, __b) \
3400  _Generic((__a), vector float \
3401  : __extension__({ \
3402  vector float __ret = \
3403  (vector float)(__a) * \
3404  (vector float)(vector unsigned)((0x7f + (__b)) << 23); \
3405  __builtin_vsx_xvcvspsxds(__ret); \
3406  }), \
3407  vector double \
3408  : __extension__({ \
3409  vector double __ret = \
3410  (vector double)(__a) * \
3411  (vector double)(vector unsigned long long)((0x3ffULL + __b) \
3412  << 52); \
3413  __builtin_convertvector(__ret, vector signed long long); \
3414  }))
3415 
3416 /* vec_ctul */
3417 
3418 #define vec_ctul(__a, __b) \
3419  _Generic((__a), vector float \
3420  : __extension__({ \
3421  vector float __ret = \
3422  (vector float)(__a) * \
3423  (vector float)(vector unsigned)((0x7f + (__b)) << 23); \
3424  __builtin_vsx_xvcvspuxds(__ret); \
3425  }), \
3426  vector double \
3427  : __extension__({ \
3428  vector double __ret = \
3429  (vector double)(__a) * \
3430  (vector double)(vector unsigned long long)((0x3ffULL + __b) \
3431  << 52); \
3432  __builtin_convertvector(__ret, vector unsigned long long); \
3433  }))
3434 #endif
3435 #endif // __LITTLE_ENDIAN__
3436 
3437 /* vec_vctuxs */
3438 
3439 #define vec_vctuxs __builtin_altivec_vctuxs
3440 
3441 /* vec_signext */
3442 
3443 #ifdef __POWER9_VECTOR__
3444 static __inline__ vector signed int __ATTRS_o_ai
3445 vec_signexti(vector signed char __a) {
3446  return __builtin_altivec_vextsb2w(__a);
3447 }
3448 
3449 static __inline__ vector signed int __ATTRS_o_ai
3450 vec_signexti(vector signed short __a) {
3451  return __builtin_altivec_vextsh2w(__a);
3452 }
3453 
3454 static __inline__ vector signed long long __ATTRS_o_ai
3455 vec_signextll(vector signed char __a) {
3456  return __builtin_altivec_vextsb2d(__a);
3457 }
3458 
3459 static __inline__ vector signed long long __ATTRS_o_ai
3460 vec_signextll(vector signed short __a) {
3461  return __builtin_altivec_vextsh2d(__a);
3462 }
3463 
3464 static __inline__ vector signed long long __ATTRS_o_ai
3465 vec_signextll(vector signed int __a) {
3466  return __builtin_altivec_vextsw2d(__a);
3467 }
3468 #endif
3469 
3470 #if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
3471 static __inline__ vector signed __int128 __ATTRS_o_ai
3472 vec_signextq(vector signed long long __a) {
3473  return __builtin_altivec_vextsd2q(__a);
3474 }
3475 #endif
3476 
3477 /* vec_signed */
3478 
3479 static __inline__ vector signed int __ATTRS_o_ai
3480 vec_sld(vector signed int, vector signed int, unsigned const int __c);
3481 
3482 static __inline__ vector signed int __ATTRS_o_ai
3483 vec_signed(vector float __a) {
3484  return __builtin_convertvector(__a, vector signed int);
3485 }
3486 
3487 #ifdef __VSX__
3488 static __inline__ vector signed long long __ATTRS_o_ai
3489 vec_signed(vector double __a) {
3490  return __builtin_convertvector(__a, vector signed long long);
3491 }
3492 
3493 static __inline__ vector signed int __attribute__((__always_inline__))
3494 vec_signed2(vector double __a, vector double __b) {
3495  return (vector signed int) { __a[0], __a[1], __b[0], __b[1] };
3496 }
3497 
3498 static __inline__ vector signed int __ATTRS_o_ai
3499 vec_signede(vector double __a) {
3500 #ifdef __LITTLE_ENDIAN__
3501  vector signed int __ret = __builtin_vsx_xvcvdpsxws(__a);
3502  return vec_sld(__ret, __ret, 12);
3503 #else
3504  return __builtin_vsx_xvcvdpsxws(__a);
3505 #endif
3506 }
3507 
3508 static __inline__ vector signed int __ATTRS_o_ai
3509 vec_signedo(vector double __a) {
3510 #ifdef __LITTLE_ENDIAN__
3511  return __builtin_vsx_xvcvdpsxws(__a);
3512 #else
3513  vector signed int __ret = __builtin_vsx_xvcvdpsxws(__a);
3514  return vec_sld(__ret, __ret, 12);
3515 #endif
3516 }
3517 #endif
3518 
3519 /* vec_unsigned */
3520 
3521 static __inline__ vector unsigned int __ATTRS_o_ai
3522 vec_sld(vector unsigned int, vector unsigned int, unsigned const int __c);
3523 
3524 static __inline__ vector unsigned int __ATTRS_o_ai
3525 vec_unsigned(vector float __a) {
3526  return __builtin_convertvector(__a, vector unsigned int);
3527 }
3528 
3529 #ifdef __VSX__
3530 static __inline__ vector unsigned long long __ATTRS_o_ai
3531 vec_unsigned(vector double __a) {
3532  return __builtin_convertvector(__a, vector unsigned long long);
3533 }
3534 
3535 static __inline__ vector unsigned int __attribute__((__always_inline__))
3536 vec_unsigned2(vector double __a, vector double __b) {
3537  return (vector unsigned int) { __a[0], __a[1], __b[0], __b[1] };
3538 }
3539 
3540 static __inline__ vector unsigned int __ATTRS_o_ai
3541 vec_unsignede(vector double __a) {
3542 #ifdef __LITTLE_ENDIAN__
3543  vector unsigned int __ret = __builtin_vsx_xvcvdpuxws(__a);
3544  return vec_sld(__ret, __ret, 12);
3545 #else
3546  return __builtin_vsx_xvcvdpuxws(__a);
3547 #endif
3548 }
3549 
3550 static __inline__ vector unsigned int __ATTRS_o_ai
3551 vec_unsignedo(vector double __a) {
3552 #ifdef __LITTLE_ENDIAN__
3553  return __builtin_vsx_xvcvdpuxws(__a);
3554 #else
3555  vector unsigned int __ret = __builtin_vsx_xvcvdpuxws(__a);
3556  return vec_sld(__ret, __ret, 12);
3557 #endif
3558 }
3559 #endif
3560 
3561 /* vec_float */
3562 
3563 static __inline__ vector float __ATTRS_o_ai
3564 vec_sld(vector float, vector float, unsigned const int __c);
3565 
3566 static __inline__ vector float __ATTRS_o_ai
3567 vec_float(vector signed int __a) {
3568  return __builtin_convertvector(__a, vector float);
3569 }
3570 
3571 static __inline__ vector float __ATTRS_o_ai
3572 vec_float(vector unsigned int __a) {
3573  return __builtin_convertvector(__a, vector float);
3574 }
3575 
3576 #ifdef __VSX__
3577 static __inline__ vector float __ATTRS_o_ai
3578 vec_float2(vector signed long long __a, vector signed long long __b) {
3579  return (vector float) { __a[0], __a[1], __b[0], __b[1] };
3580 }
3581 
3582 static __inline__ vector float __ATTRS_o_ai
3583 vec_float2(vector unsigned long long __a, vector unsigned long long __b) {
3584  return (vector float) { __a[0], __a[1], __b[0], __b[1] };
3585 }
3586 
3587 static __inline__ vector float __ATTRS_o_ai
3588 vec_float2(vector double __a, vector double __b) {
3589  return (vector float) { __a[0], __a[1], __b[0], __b[1] };
3590 }
3591 
3592 static __inline__ vector float __ATTRS_o_ai
3593 vec_floate(vector signed long long __a) {
3594 #ifdef __LITTLE_ENDIAN__
3595  vector float __ret = __builtin_vsx_xvcvsxdsp(__a);
3596  return vec_sld(__ret, __ret, 12);
3597 #else
3598  return __builtin_vsx_xvcvsxdsp(__a);
3599 #endif
3600 }
3601 
3602 static __inline__ vector float __ATTRS_o_ai
3603 vec_floate(vector unsigned long long __a) {
3604 #ifdef __LITTLE_ENDIAN__
3605  vector float __ret = __builtin_vsx_xvcvuxdsp(__a);
3606  return vec_sld(__ret, __ret, 12);
3607 #else
3608  return __builtin_vsx_xvcvuxdsp(__a);
3609 #endif
3610 }
3611 
3612 static __inline__ vector float __ATTRS_o_ai
3613 vec_floate(vector double __a) {
3614 #ifdef __LITTLE_ENDIAN__
3615  vector float __ret = __builtin_vsx_xvcvdpsp(__a);
3616  return vec_sld(__ret, __ret, 12);
3617 #else
3618  return __builtin_vsx_xvcvdpsp(__a);
3619 #endif
3620 }
3621 
3622 static __inline__ vector float __ATTRS_o_ai
3623 vec_floato(vector signed long long __a) {
3624 #ifdef __LITTLE_ENDIAN__
3625  return __builtin_vsx_xvcvsxdsp(__a);
3626 #else
3627  vector float __ret = __builtin_vsx_xvcvsxdsp(__a);
3628  return vec_sld(__ret, __ret, 12);
3629 #endif
3630 }
3631 
3632 static __inline__ vector float __ATTRS_o_ai
3633 vec_floato(vector unsigned long long __a) {
3634 #ifdef __LITTLE_ENDIAN__
3635  return __builtin_vsx_xvcvuxdsp(__a);
3636 #else
3637  vector float __ret = __builtin_vsx_xvcvuxdsp(__a);
3638  return vec_sld(__ret, __ret, 12);
3639 #endif
3640 }
3641 
3642 static __inline__ vector float __ATTRS_o_ai
3643 vec_floato(vector double __a) {
3644 #ifdef __LITTLE_ENDIAN__
3645  return __builtin_vsx_xvcvdpsp(__a);
3646 #else
3647  vector float __ret = __builtin_vsx_xvcvdpsp(__a);
3648  return vec_sld(__ret, __ret, 12);
3649 #endif
3650 }
3651 #endif
3652 
3653 /* vec_double */
3654 
3655 #ifdef __VSX__
3656 static __inline__ vector double __ATTRS_o_ai
3657 vec_double(vector signed long long __a) {
3658  return __builtin_convertvector(__a, vector double);
3659 }
3660 
3661 static __inline__ vector double __ATTRS_o_ai
3662 vec_double(vector unsigned long long __a) {
3663  return __builtin_convertvector(__a, vector double);
3664 }
3665 
3666 static __inline__ vector double __ATTRS_o_ai
3667 vec_doublee(vector signed int __a) {
3668 #ifdef __LITTLE_ENDIAN__
3669  return __builtin_vsx_xvcvsxwdp(vec_sld(__a, __a, 4));
3670 #else
3671  return __builtin_vsx_xvcvsxwdp(__a);
3672 #endif
3673 }
3674 
3675 static __inline__ vector double __ATTRS_o_ai
3676 vec_doublee(vector unsigned int __a) {
3677 #ifdef __LITTLE_ENDIAN__
3678  return __builtin_vsx_xvcvuxwdp(vec_sld(__a, __a, 4));
3679 #else
3680  return __builtin_vsx_xvcvuxwdp(__a);
3681 #endif
3682 }
3683 
3684 static __inline__ vector double __ATTRS_o_ai
3685 vec_doublee(vector float __a) {
3686 #ifdef __LITTLE_ENDIAN__
3687  return __builtin_vsx_xvcvspdp(vec_sld(__a, __a, 4));
3688 #else
3689  return __builtin_vsx_xvcvspdp(__a);
3690 #endif
3691 }
3692 
3693 static __inline__ vector double __ATTRS_o_ai
3694 vec_doubleh(vector signed int __a) {
3695  vector double __ret = {__a[0], __a[1]};
3696  return __ret;
3697 }
3698 
3699 static __inline__ vector double __ATTRS_o_ai
3700 vec_doubleh(vector unsigned int __a) {
3701  vector double __ret = {__a[0], __a[1]};
3702  return __ret;
3703 }
3704 
3705 static __inline__ vector double __ATTRS_o_ai
3706 vec_doubleh(vector float __a) {
3707  vector double __ret = {__a[0], __a[1]};
3708  return __ret;
3709 }
3710 
3711 static __inline__ vector double __ATTRS_o_ai
3712 vec_doublel(vector signed int __a) {
3713  vector double __ret = {__a[2], __a[3]};
3714  return __ret;
3715 }
3716 
3717 static __inline__ vector double __ATTRS_o_ai
3718 vec_doublel(vector unsigned int __a) {
3719  vector double __ret = {__a[2], __a[3]};
3720  return __ret;
3721 }
3722 
3723 static __inline__ vector double __ATTRS_o_ai
3724 vec_doublel(vector float __a) {
3725  vector double __ret = {__a[2], __a[3]};
3726  return __ret;
3727 }
3728 
3729 static __inline__ vector double __ATTRS_o_ai
3730 vec_doubleo(vector signed int __a) {
3731 #ifdef __LITTLE_ENDIAN__
3732  return __builtin_vsx_xvcvsxwdp(__a);
3733 #else
3734  return __builtin_vsx_xvcvsxwdp(vec_sld(__a, __a, 4));
3735 #endif
3736 }
3737 
3738 static __inline__ vector double __ATTRS_o_ai
3739 vec_doubleo(vector unsigned int __a) {
3740 #ifdef __LITTLE_ENDIAN__
3741  return __builtin_vsx_xvcvuxwdp(__a);
3742 #else
3743  return __builtin_vsx_xvcvuxwdp(vec_sld(__a, __a, 4));
3744 #endif
3745 }
3746 
3747 static __inline__ vector double __ATTRS_o_ai
3748 vec_doubleo(vector float __a) {
3749 #ifdef __LITTLE_ENDIAN__
3750  return __builtin_vsx_xvcvspdp(__a);
3751 #else
3752  return __builtin_vsx_xvcvspdp(vec_sld(__a, __a, 4));
3753 #endif
3754 }
3755 
3756 /* vec_cvf */
3757 static __inline__ vector double __ATTRS_o_ai vec_cvf(vector float __a) {
3758  return vec_doublee(__a);
3759 }
3760 
3761 static __inline__ vector float __ATTRS_o_ai vec_cvf(vector double __a) {
3762  return vec_floate(__a);
3763 }
3764 #endif
3765 
3766 /* vec_div */
3767 
3768 /* Integer vector divides (vectors are scalarized, elements divided
3769  and the vectors reassembled).
3770 */
3771 static __inline__ vector signed char __ATTRS_o_ai
3772 vec_div(vector signed char __a, vector signed char __b) {
3773  return __a / __b;
3774 }
3775 
3776 static __inline__ vector unsigned char __ATTRS_o_ai
3777 vec_div(vector unsigned char __a, vector unsigned char __b) {
3778  return __a / __b;
3779 }
3780 
3781 static __inline__ vector signed short __ATTRS_o_ai
3782 vec_div(vector signed short __a, vector signed short __b) {
3783  return __a / __b;
3784 }
3785 
3786 static __inline__ vector unsigned short __ATTRS_o_ai
3787 vec_div(vector unsigned short __a, vector unsigned short __b) {
3788  return __a / __b;
3789 }
3790 
3791 static __inline__ vector signed int __ATTRS_o_ai
3792 vec_div(vector signed int __a, vector signed int __b) {
3793  return __a / __b;
3794 }
3795 
3796 static __inline__ vector unsigned int __ATTRS_o_ai
3797 vec_div(vector unsigned int __a, vector unsigned int __b) {
3798  return __a / __b;
3799 }
3800 
3801 #ifdef __VSX__
3802 static __inline__ vector signed long long __ATTRS_o_ai
3803 vec_div(vector signed long long __a, vector signed long long __b) {
3804  return __a / __b;
3805 }
3806 
3807 static __inline__ vector unsigned long long __ATTRS_o_ai
3808 vec_div(vector unsigned long long __a, vector unsigned long long __b) {
3809  return __a / __b;
3810 }
3811 
3812 static __inline__ vector float __ATTRS_o_ai vec_div(vector float __a,
3813  vector float __b) {
3814  return __a / __b;
3815 }
3816 
3817 static __inline__ vector double __ATTRS_o_ai vec_div(vector double __a,
3818  vector double __b) {
3819  return __a / __b;
3820 }
3821 #endif
3822 
3823 /* vec_dive */
3824 
3825 #ifdef __POWER10_VECTOR__
3826 static __inline__ vector signed int __ATTRS_o_ai
3827 vec_dive(vector signed int __a, vector signed int __b) {
3828  return __builtin_altivec_vdivesw(__a, __b);
3829 }
3830 
3831 static __inline__ vector unsigned int __ATTRS_o_ai
3832 vec_dive(vector unsigned int __a, vector unsigned int __b) {
3833  return __builtin_altivec_vdiveuw(__a, __b);
3834 }
3835 
3836 static __inline__ vector signed long long __ATTRS_o_ai
3837 vec_dive(vector signed long long __a, vector signed long long __b) {
3838  return __builtin_altivec_vdivesd(__a, __b);
3839 }
3840 
3841 static __inline__ vector unsigned long long __ATTRS_o_ai
3842 vec_dive(vector unsigned long long __a, vector unsigned long long __b) {
3843  return __builtin_altivec_vdiveud(__a, __b);
3844 }
3845 
3846 #ifdef __SIZEOF_INT128__
3847 static __inline__ vector unsigned __int128 __ATTRS_o_ai
3848 vec_dive(vector unsigned __int128 __a, vector unsigned __int128 __b) {
3849  return __builtin_altivec_vdiveuq(__a, __b);
3850 }
3851 
3852 static __inline__ vector signed __int128 __ATTRS_o_ai
3853 vec_dive(vector signed __int128 __a, vector signed __int128 __b) {
3854  return __builtin_altivec_vdivesq(__a, __b);
3855 }
3856 #endif
3857 #endif
3858 
3859 #if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
3860 static __inline__ vector unsigned __int128 __ATTRS_o_ai
3861 vec_div(vector unsigned __int128 __a, vector unsigned __int128 __b) {
3862  return __a / __b;
3863 }
3864 
3865 static __inline__ vector signed __int128 __ATTRS_o_ai
3866 vec_div(vector signed __int128 __a, vector signed __int128 __b) {
3867  return __a / __b;
3868 }
3869 #endif /* __POWER10_VECTOR__ */
3870 
3871 /* vec_xvtdiv */
3872 
3873 #ifdef __VSX__
3874 static __inline__ int __ATTRS_o_ai vec_test_swdiv(vector double __a,
3875  vector double __b) {
3876  return __builtin_vsx_xvtdivdp(__a, __b);
3877 }
3878 
3879 static __inline__ int __ATTRS_o_ai vec_test_swdivs(vector float __a,
3880  vector float __b) {
3881  return __builtin_vsx_xvtdivsp(__a, __b);
3882 }
3883 #endif
3884 
3885 /* vec_dss */
3886 
3887 #define vec_dss __builtin_altivec_dss
3888 
3889 /* vec_dssall */
3890 
3891 static __inline__ void __attribute__((__always_inline__)) vec_dssall(void) {
3892  __builtin_altivec_dssall();
3893 }
3894 
3895 /* vec_dst */
3896 #define vec_dst(__PTR, __CW, __STR) \
3897  __builtin_altivec_dst((const void *)(__PTR), (__CW), (__STR))
3898 
3899 /* vec_dstst */
3900 #define vec_dstst(__PTR, __CW, __STR) \
3901  __builtin_altivec_dstst((const void *)(__PTR), (__CW), (__STR))
3902 
3903 /* vec_dststt */
3904 #define vec_dststt(__PTR, __CW, __STR) \
3905  __builtin_altivec_dststt((const void *)(__PTR), (__CW), (__STR))
3906 
3907 /* vec_dstt */
3908 #define vec_dstt(__PTR, __CW, __STR) \
3909  __builtin_altivec_dstt((const void *)(__PTR), (__CW), (__STR))
3910 
3911 /* vec_eqv */
3912 
3913 #ifdef __POWER8_VECTOR__
3914 static __inline__ vector signed char __ATTRS_o_ai
3915 vec_eqv(vector signed char __a, vector signed char __b) {
3916  return (vector signed char)__builtin_vsx_xxleqv((vector unsigned int)__a,
3917  (vector unsigned int)__b);
3918 }
3919 
3920 static __inline__ vector unsigned char __ATTRS_o_ai
3921 vec_eqv(vector unsigned char __a, vector unsigned char __b) {
3922  return (vector unsigned char)__builtin_vsx_xxleqv((vector unsigned int)__a,
3923  (vector unsigned int)__b);
3924 }
3925 
3926 static __inline__ vector bool char __ATTRS_o_ai vec_eqv(vector bool char __a,
3927  vector bool char __b) {
3928  return (vector bool char)__builtin_vsx_xxleqv((vector unsigned int)__a,
3929  (vector unsigned int)__b);
3930 }
3931 
3932 static __inline__ vector signed short __ATTRS_o_ai
3933 vec_eqv(vector signed short __a, vector signed short __b) {
3934  return (vector signed short)__builtin_vsx_xxleqv((vector unsigned int)__a,
3935  (vector unsigned int)__b);
3936 }
3937 
3938 static __inline__ vector unsigned short __ATTRS_o_ai
3939 vec_eqv(vector unsigned short __a, vector unsigned short __b) {
3940  return (vector unsigned short)__builtin_vsx_xxleqv((vector unsigned int)__a,
3941  (vector unsigned int)__b);
3942 }
3943 
3944 static __inline__ vector bool short __ATTRS_o_ai
3945 vec_eqv(vector bool short __a, vector bool short __b) {
3946  return (vector bool short)__builtin_vsx_xxleqv((vector unsigned int)__a,
3947  (vector unsigned int)__b);
3948 }
3949 
3950 static __inline__ vector signed int __ATTRS_o_ai
3951 vec_eqv(vector signed int __a, vector signed int __b) {
3952  return (vector signed int)__builtin_vsx_xxleqv((vector unsigned int)__a,
3953  (vector unsigned int)__b);
3954 }
3955 
3956 static __inline__ vector unsigned int __ATTRS_o_ai
3957 vec_eqv(vector unsigned int __a, vector unsigned int __b) {
3958  return __builtin_vsx_xxleqv(__a, __b);
3959 }
3960 
3961 static __inline__ vector bool int __ATTRS_o_ai vec_eqv(vector bool int __a,
3962  vector bool int __b) {
3963  return (vector bool int)__builtin_vsx_xxleqv((vector unsigned int)__a,
3964  (vector unsigned int)__b);
3965 }
3966 
3967 static __inline__ vector signed long long __ATTRS_o_ai
3968 vec_eqv(vector signed long long __a, vector signed long long __b) {
3969  return (vector signed long long)__builtin_vsx_xxleqv(
3970  (vector unsigned int)__a, (vector unsigned int)__b);
3971 }
3972 
3973 static __inline__ vector unsigned long long __ATTRS_o_ai
3974 vec_eqv(vector unsigned long long __a, vector unsigned long long __b) {
3975  return (vector unsigned long long)__builtin_vsx_xxleqv(
3976  (vector unsigned int)__a, (vector unsigned int)__b);
3977 }
3978 
3979 static __inline__ vector bool long long __ATTRS_o_ai
3980 vec_eqv(vector bool long long __a, vector bool long long __b) {
3981  return (vector bool long long)__builtin_vsx_xxleqv((vector unsigned int)__a,
3982  (vector unsigned int)__b);
3983 }
3984 
3985 static __inline__ vector float __ATTRS_o_ai vec_eqv(vector float __a,
3986  vector float __b) {
3987  return (vector float)__builtin_vsx_xxleqv((vector unsigned int)__a,
3988  (vector unsigned int)__b);
3989 }
3990 
3991 static __inline__ vector double __ATTRS_o_ai vec_eqv(vector double __a,
3992  vector double __b) {
3993  return (vector double)__builtin_vsx_xxleqv((vector unsigned int)__a,
3994  (vector unsigned int)__b);
3995 }
3996 #endif
3997 
3998 /* vec_expte */
3999 
4000 static __inline__ vector float __attribute__((__always_inline__))
4001 vec_expte(vector float __a) {
4002  return __builtin_altivec_vexptefp(__a);
4003 }
4004 
4005 /* vec_vexptefp */
4006 
4007 static __inline__ vector float __attribute__((__always_inline__))
4008 vec_vexptefp(vector float __a) {
4009  return __builtin_altivec_vexptefp(__a);
4010 }
4011 
4012 /* vec_floor */
4013 
4014 static __inline__ vector float __ATTRS_o_ai vec_floor(vector float __a) {
4015 #ifdef __VSX__
4016  return __builtin_vsx_xvrspim(__a);
4017 #else
4018  return __builtin_altivec_vrfim(__a);
4019 #endif
4020 }
4021 
4022 #ifdef __VSX__
4023 static __inline__ vector double __ATTRS_o_ai vec_floor(vector double __a) {
4024  return __builtin_vsx_xvrdpim(__a);
4025 }
4026 #endif
4027 
4028 /* vec_roundm */
4029 static __inline__ vector float __ATTRS_o_ai vec_roundm(vector float __a) {
4030  return vec_floor(__a);
4031 }
4032 
4033 #ifdef __VSX__
4034 static __inline__ vector double __ATTRS_o_ai vec_roundm(vector double __a) {
4035  return vec_floor(__a);
4036 }
4037 #endif
4038 
4039 /* vec_vrfim */
4040 
4041 static __inline__ vector float __attribute__((__always_inline__))
4042 vec_vrfim(vector float __a) {
4043  return __builtin_altivec_vrfim(__a);
4044 }
4045 
4046 /* vec_ld */
4047 
4048 static __inline__ vector signed char __ATTRS_o_ai
4049 vec_ld(long __a, const vector signed char *__b) {
4050  return (vector signed char)__builtin_altivec_lvx(__a, __b);
4051 }
4052 
4053 static __inline__ vector signed char __ATTRS_o_ai
4054 vec_ld(long __a, const signed char *__b) {
4055  return (vector signed char)__builtin_altivec_lvx(__a, __b);
4056 }
4057 
4058 static __inline__ vector unsigned char __ATTRS_o_ai
4059 vec_ld(long __a, const vector unsigned char *__b) {
4060  return (vector unsigned char)__builtin_altivec_lvx(__a, __b);
4061 }
4062 
4063 static __inline__ vector unsigned char __ATTRS_o_ai
4064 vec_ld(long __a, const unsigned char *__b) {
4065  return (vector unsigned char)__builtin_altivec_lvx(__a, __b);
4066 }
4067 
4068 static __inline__ vector bool char __ATTRS_o_ai
4069 vec_ld(long __a, const vector bool char *__b) {
4070  return (vector bool char)__builtin_altivec_lvx(__a, __b);
4071 }
4072 
4073 static __inline__ vector short __ATTRS_o_ai vec_ld(long __a,
4074  const vector short *__b) {
4075  return (vector short)__builtin_altivec_lvx(__a, __b);
4076 }
4077 
4078 static __inline__ vector short __ATTRS_o_ai vec_ld(long __a, const short *__b) {
4079  return (vector short)__builtin_altivec_lvx(__a, __b);
4080 }
4081 
4082 static __inline__ vector unsigned short __ATTRS_o_ai
4083 vec_ld(long __a, const vector unsigned short *__b) {
4084  return (vector unsigned short)__builtin_altivec_lvx(__a, __b);
4085 }
4086 
4087 static __inline__ vector unsigned short __ATTRS_o_ai
4088 vec_ld(long __a, const unsigned short *__b) {
4089  return (vector unsigned short)__builtin_altivec_lvx(__a, __b);
4090 }
4091 
4092 static __inline__ vector bool short __ATTRS_o_ai
4093 vec_ld(long __a, const vector bool short *__b) {
4094  return (vector bool short)__builtin_altivec_lvx(__a, __b);
4095 }
4096 
4097 static __inline__ vector pixel __ATTRS_o_ai vec_ld(long __a,
4098  const vector pixel *__b) {
4099  return (vector pixel)__builtin_altivec_lvx(__a, __b);
4100 }
4101 
4102 static __inline__ vector int __ATTRS_o_ai vec_ld(long __a,
4103  const vector int *__b) {
4104  return (vector int)__builtin_altivec_lvx(__a, __b);
4105 }
4106 
4107 static __inline__ vector int __ATTRS_o_ai vec_ld(long __a, const int *__b) {
4108  return (vector int)__builtin_altivec_lvx(__a, __b);
4109 }
4110 
4111 static __inline__ vector unsigned int __ATTRS_o_ai
4112 vec_ld(long __a, const vector unsigned int *__b) {
4113  return (vector unsigned int)__builtin_altivec_lvx(__a, __b);
4114 }
4115 
4116 static __inline__ vector unsigned int __ATTRS_o_ai
4117 vec_ld(long __a, const unsigned int *__b) {
4118  return (vector unsigned int)__builtin_altivec_lvx(__a, __b);
4119 }
4120 
4121 static __inline__ vector bool int __ATTRS_o_ai
4122 vec_ld(long __a, const vector bool int *__b) {
4123  return (vector bool int)__builtin_altivec_lvx(__a, __b);
4124 }
4125 
4126 static __inline__ vector float __ATTRS_o_ai vec_ld(long __a,
4127  const vector float *__b) {
4128  return (vector float)__builtin_altivec_lvx(__a, __b);
4129 }
4130 
4131 static __inline__ vector float __ATTRS_o_ai vec_ld(long __a, const float *__b) {
4132  return (vector float)__builtin_altivec_lvx(__a, __b);
4133 }
4134 
4135 /* vec_lvx */
4136 
4137 static __inline__ vector signed char __ATTRS_o_ai
4138 vec_lvx(long __a, const vector signed char *__b) {
4139  return (vector signed char)__builtin_altivec_lvx(__a, __b);
4140 }
4141 
4142 static __inline__ vector signed char __ATTRS_o_ai
4143 vec_lvx(long __a, const signed char *__b) {
4144  return (vector signed char)__builtin_altivec_lvx(__a, __b);
4145 }
4146 
4147 static __inline__ vector unsigned char __ATTRS_o_ai
4148 vec_lvx(long __a, const vector unsigned char *__b) {
4149  return (vector unsigned char)__builtin_altivec_lvx(__a, __b);
4150 }
4151 
4152 static __inline__ vector unsigned char __ATTRS_o_ai
4153 vec_lvx(long __a, const unsigned char *__b) {
4154  return (vector unsigned char)__builtin_altivec_lvx(__a, __b);
4155 }
4156 
4157 static __inline__ vector bool char __ATTRS_o_ai
4158 vec_lvx(long __a, const vector bool char *__b) {
4159  return (vector bool char)__builtin_altivec_lvx(__a, __b);
4160 }
4161 
4162 static __inline__ vector short __ATTRS_o_ai vec_lvx(long __a,
4163  const vector short *__b) {
4164  return (vector short)__builtin_altivec_lvx(__a, __b);
4165 }
4166 
4167 static __inline__ vector short __ATTRS_o_ai vec_lvx(long __a, const short *__b) {
4168  return (vector short)__builtin_altivec_lvx(__a, __b);
4169 }
4170 
4171 static __inline__ vector unsigned short __ATTRS_o_ai
4172 vec_lvx(long __a, const vector unsigned short *__b) {
4173  return (vector unsigned short)__builtin_altivec_lvx(__a, __b);
4174 }
4175 
4176 static __inline__ vector unsigned short __ATTRS_o_ai
4177 vec_lvx(long __a, const unsigned short *__b) {
4178  return (vector unsigned short)__builtin_altivec_lvx(__a, __b);
4179 }
4180 
4181 static __inline__ vector bool short __ATTRS_o_ai
4182 vec_lvx(long __a, const vector bool short *__b) {
4183  return (vector bool short)__builtin_altivec_lvx(__a, __b);
4184 }
4185 
4186 static __inline__ vector pixel __ATTRS_o_ai vec_lvx(long __a,
4187  const vector pixel *__b) {
4188  return (vector pixel)__builtin_altivec_lvx(__a, __b);
4189 }
4190 
4191 static __inline__ vector int __ATTRS_o_ai vec_lvx(long __a,
4192  const vector int *__b) {
4193  return (vector int)__builtin_altivec_lvx(__a, __b);
4194 }
4195 
4196 static __inline__ vector int __ATTRS_o_ai vec_lvx(long __a, const int *__b) {
4197  return (vector int)__builtin_altivec_lvx(__a, __b);
4198 }
4199 
4200 static __inline__ vector unsigned int __ATTRS_o_ai
4201 vec_lvx(long __a, const vector unsigned int *__b) {
4202  return (vector unsigned int)__builtin_altivec_lvx(__a, __b);
4203 }
4204 
4205 static __inline__ vector unsigned int __ATTRS_o_ai
4206 vec_lvx(long __a, const unsigned int *__b) {
4207  return (vector unsigned int)__builtin_altivec_lvx(__a, __b);
4208 }
4209 
4210 static __inline__ vector bool int __ATTRS_o_ai
4211 vec_lvx(long __a, const vector bool int *__b) {
4212  return (vector bool int)__builtin_altivec_lvx(__a, __b);
4213 }
4214 
4215 static __inline__ vector float __ATTRS_o_ai vec_lvx(long __a,
4216  const vector float *__b) {
4217  return (vector float)__builtin_altivec_lvx(__a, __b);
4218 }
4219 
4220 static __inline__ vector float __ATTRS_o_ai vec_lvx(long __a, const float *__b) {
4221  return (vector float)__builtin_altivec_lvx(__a, __b);
4222 }
4223 
4224 /* vec_lde */
4225 
4226 static __inline__ vector signed char __ATTRS_o_ai
4227 vec_lde(long __a, const signed char *__b) {
4228  return (vector signed char)__builtin_altivec_lvebx(__a, __b);
4229 }
4230 
4231 static __inline__ vector unsigned char __ATTRS_o_ai
4232 vec_lde(long __a, const unsigned char *__b) {
4233  return (vector unsigned char)__builtin_altivec_lvebx(__a, __b);
4234 }
4235 
4236 static __inline__ vector short __ATTRS_o_ai vec_lde(long __a, const short *__b) {
4237  return (vector short)__builtin_altivec_lvehx(__a, __b);
4238 }
4239 
4240 static __inline__ vector unsigned short __ATTRS_o_ai
4241 vec_lde(long __a, const unsigned short *__b) {
4242  return (vector unsigned short)__builtin_altivec_lvehx(__a, __b);
4243 }
4244 
4245 static __inline__ vector int __ATTRS_o_ai vec_lde(long __a, const int *__b) {
4246  return (vector int)__builtin_altivec_lvewx(__a, __b);
4247 }
4248 
4249 static __inline__ vector unsigned int __ATTRS_o_ai
4250 vec_lde(long __a, const unsigned int *__b) {
4251  return (vector unsigned int)__builtin_altivec_lvewx(__a, __b);
4252 }
4253 
4254 static __inline__ vector float __ATTRS_o_ai vec_lde(long __a, const float *__b) {
4255  return (vector float)__builtin_altivec_lvewx(__a, __b);
4256 }
4257 
4258 /* vec_lvebx */
4259 
4260 static __inline__ vector signed char __ATTRS_o_ai
4261 vec_lvebx(long __a, const signed char *__b) {
4262  return (vector signed char)__builtin_altivec_lvebx(__a, __b);
4263 }
4264 
4265 static __inline__ vector unsigned char __ATTRS_o_ai
4266 vec_lvebx(long __a, const unsigned char *__b) {
4267  return (vector unsigned char)__builtin_altivec_lvebx(__a, __b);
4268 }
4269 
4270 /* vec_lvehx */
4271 
4272 static __inline__ vector short __ATTRS_o_ai vec_lvehx(long __a,
4273  const short *__b) {
4274  return (vector short)__builtin_altivec_lvehx(__a, __b);
4275 }
4276 
4277 static __inline__ vector unsigned short __ATTRS_o_ai
4278 vec_lvehx(long __a, const unsigned short *__b) {
4279  return (vector unsigned short)__builtin_altivec_lvehx(__a, __b);
4280 }
4281 
4282 /* vec_lvewx */
4283 
4284 static __inline__ vector int __ATTRS_o_ai vec_lvewx(long __a, const int *__b) {
4285  return (vector int)__builtin_altivec_lvewx(__a, __b);
4286 }
4287 
4288 static __inline__ vector unsigned int __ATTRS_o_ai
4289 vec_lvewx(long __a, const unsigned int *__b) {
4290  return (vector unsigned int)__builtin_altivec_lvewx(__a, __b);
4291 }
4292 
4293 static __inline__ vector float __ATTRS_o_ai vec_lvewx(long __a,
4294  const float *__b) {
4295  return (vector float)__builtin_altivec_lvewx(__a, __b);
4296 }
4297 
4298 /* vec_ldl */
4299 
4300 static __inline__ vector signed char __ATTRS_o_ai
4301 vec_ldl(long __a, const vector signed char *__b) {
4302  return (vector signed char)__builtin_altivec_lvxl(__a, __b);
4303 }
4304 
4305 static __inline__ vector signed char __ATTRS_o_ai
4306 vec_ldl(long __a, const signed char *__b) {
4307  return (vector signed char)__builtin_altivec_lvxl(__a, __b);
4308 }
4309 
4310 static __inline__ vector unsigned char __ATTRS_o_ai
4311 vec_ldl(long __a, const vector unsigned char *__b) {
<