Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / fold-vec-st-int.c
blob4db35f0dd945c2686c4ab3d603499e5aa5bfde50
1 /* Verify that overloaded built-ins for vec_st* with int
2 inputs produce the right code. */
4 /* { dg-do compile } */
5 /* { dg-require-effective-target powerpc_altivec_ok } */
6 /* { dg-options "-maltivec -O2" } */
8 #include <altivec.h>
9 // void vec_st (vector signed int, int, vector signed int *);
11 void
12 testst_1 (vector signed int vsi1, int i1, vector signed int * vsip)
14 return vec_st(vsi1, i1, vsip);
16 void
17 testst_2 (vector signed int vsi1, int i1, signed int * sip)
19 return vec_st(vsi1, i1, sip);
21 void
22 testst_3 (vector unsigned int vui1, int i1, vector unsigned int * vsip)
24 return vec_st(vui1, i1, vsip);
26 void
27 testst_4 (vector unsigned int vui1, int i1, unsigned int * sip)
29 return vec_st(vui1, i1, sip);
31 void
32 testst_5 (vector bool int vbi1, int i1, vector bool int * vbip)
34 return vec_st(vbi1, i1, vbip);
36 void
37 testst_6 (vector bool int vbi1, int i1, unsigned int * vuip)
39 return vec_st(vbi1, i1, vuip);
41 void
42 testst_7 (vector bool int vbi1, int i1, signed int * vsip)
44 return vec_st(vbi1, i1, vsip);
47 void
48 testst_cst1 (vector signed int vsi1, int i1, vector signed int * vsip)
50 return vec_st(vsi1, 12, vsip);
52 void
53 testst_cst2 (vector signed int vsi1, int i1, signed int * sip)
55 return vec_st(vsi1, 16, sip);
57 void
58 testst_cst3 (vector unsigned int vui1, int i1, vector unsigned int * vsip)
60 return vec_st(vui1, 20, vsip);
62 void
63 testst_cst4 (vector unsigned int vui1, int i1, unsigned int * sip)
65 return vec_st(vui1, 24, sip);
67 void
68 testst_cst5 (vector bool int vbi1, int i1, vector bool int * vbip)
70 return vec_st(vbi1, 28, vbip);
72 void
73 testst_cst6 (vector bool int vbi1, int i1, unsigned int * vuip)
75 return vec_st(vbi1, 32, vuip);
77 void
78 testst_cst7 (vector bool int vbi1, int i1, signed int * vsip)
80 return vec_st(vbi1, 36, vsip);
83 /* { dg-final { scan-assembler-times {\mstvx\M} 14 } } */