Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / altivec-35.c
blob08365285b092c9bfe404ff0af4b343efed7a8c25
2 /* { dg-do compile } */
3 /* { dg-require-effective-target powerpc_altivec_ok } */
4 /* { dg-options "-maltivec -mno-vsx -mno-power8-vector -O0" } */
6 #include <altivec.h>
8 /* Test Altivec built-ins added for version 1.1 of ELFv2 ABI. */
10 vector signed int vsia, vsib;
11 vector signed short vssa, vssb, vssc;
12 vector unsigned short vusa, vusb, vusc;
14 void foo (vector signed int *vsir,
15 vector signed short *vssr,
16 vector unsigned short *vusr)
18 *vsir++ = vec_addc (vsia, vsib);
19 *vssr++ = vec_madd (vssa, vssb, vssc);
20 *vssr++ = vec_madd (vssa, vusb, vusc);
21 *vssr++ = vec_madd (vusa, vssb, vssc);
22 *vusr++ = vec_madd (vusa, vusb, vusc);
24 *vssr++ = vec_madds (vssa, vssb, vssc);
27 /* { dg-final { scan-assembler-times "vaddcuw" 1 } } */
28 /* { dg-final { scan-assembler-times "vmladduhm" 4 } } */
29 /* { dg-final { scan-assembler-times "vmhaddshs" 1 } } */