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