* gcc.target/powerpc/builtins-1-be.c <vclzb>: Rename duplicate test
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / altivec-7.h
blobff87deb9c5387a210f9b5ab8058f1272ec0ea69f
1 /* Origin: Aldy Hernandez <aldyh@redhat.com> */
3 /* This test code is included into altivec-7-be.c and altivec-7-le.c.
4 The two files have the tests for the number of instructions generated for
5 LE versus BE. */
7 #include <altivec.h>
9 int **intp;
10 int *var_int;
11 unsigned int **uintp;
12 vector pixel *varpixel;
13 vector signed char *vecchar;
14 vector signed int *vecint;
15 vector signed short *vecshort;
16 vector unsigned char *vecuchar;
17 vector unsigned int *vecuint;
18 vector unsigned short *vecushort;
19 vector float *vecfloat;
20 vector double *vecdouble;
22 int main ()
24 *vecfloat++ = vec_andc((vector bool int)vecint[0], vecfloat[1]);
25 *vecfloat++ = vec_andc(vecfloat[0], (vector bool int)vecint[1]);
26 *vecfloat++ = vec_vxor((vector bool int)vecint[0], vecfloat[1]);
27 *vecfloat++ = vec_vxor(vecfloat[0], (vector bool int)vecint[1]);
28 *varpixel++ = vec_packpx(vecuint[0], vecuint[1]);
29 *varpixel++ = vec_vpkpx(vecuint[0], vecuint[1]);
30 *vecshort++ = vec_vmulesb(vecchar[0], vecchar[1]);
31 *vecshort++ = vec_vmulosb(vecchar[0], vecchar[1]);
32 *vecint++ = vec_ld(var_int[0], intp[1]);
33 *vecint++ = vec_lde(var_int[0], intp[1]);
34 *vecint++ = vec_ldl(var_int[0], intp[1]);
35 *vecint++ = vec_lvewx(var_int[0], intp[1]);
36 *vecint++ = vec_unpackh(vecshort[0]);
37 *vecint++ = vec_unpackl(vecshort[0]);
38 *vecushort++ = vec_andc((vector bool short)vecshort[0], vecushort[1]);
39 *vecushort++ = vec_andc(vecushort[0], (vector bool short)vecshort[1]);
40 *vecushort++ = vec_vxor((vector bool short)vecshort[0], vecushort[1]);
41 *vecushort++ = vec_vxor(vecushort[0], (vector bool short)vecshort[1]);
42 *vecuint++ = vec_ld(var_int[0], uintp[1]);
43 *vecuint++ = vec_lvx(var_int[0], uintp[1]);
44 *vecuint++ = vec_vmsumubm(vecuchar[0], vecuchar[1], vecuint[2]);
45 *vecuchar++ = vec_xor(vecuchar[0], (vector unsigned char)vecchar[1]);
46 *vecdouble++ = vec_unpackl(vecfloat[0]);
47 *vecdouble++ = vec_unpackh(vecfloat[0]);
49 return 0;