* gcc.target/powerpc/builtins-1-be.c <vclzb>: Rename duplicate test
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / fold-vec-st-short.c
blobba8397eef263d5a6ded67bc662fde787cb452676
1 /* Verify that overloaded built-ins for vec_st* with short
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 // vector signed short vec_ld (int, const vector signed short *);
10 // void vec_st (vector signed short, int, vector signed short *);
12 void
13 testst_1 (vector signed short vss1, int i1, vector signed short * vssp)
15 return vec_st(vss1, i1, vssp);
17 void
18 testst_2 (vector signed short vss1, int i1, signed short * ssp)
20 return vec_st(vss1, i1, ssp);
22 void
23 testst_3 (vector unsigned short vus1, int i1, vector unsigned short * vusp)
25 return vec_st(vus1, i1, vusp);
27 void
28 testst_4 (vector unsigned short vus1, int i1, unsigned short * usp)
30 return vec_st(vus1, i1, usp);
32 void
33 testst_5 (vector bool short vbs1, int i1, vector bool short * vbsp)
35 return vec_st(vbs1, i1, vbsp);
37 void
38 testst_6 (vector bool short vbs1, int i1, unsigned short * vusp)
40 return vec_st(vbs1, i1, vusp);
42 void
43 testst_7 (vector bool short vbs1, int i1, signed short * vssp)
45 return vec_st(vbs1, i1, vssp);
47 void
48 testst_cst1 (vector signed short vss1, int i1, vector signed short * vssp)
50 return vec_st(vss1, 12, vssp);
52 void
53 testst_cst2 (vector signed short vss1, int i1, signed short * ssp)
55 return vec_st(vss1, 16, ssp);
57 void
58 testst_cst3 (vector unsigned short vus1, int i1, vector unsigned short * vusp)
60 return vec_st(vus1, 20, vusp);
62 void
63 testst_cst4 (vector unsigned short vus1, int i1, unsigned short * usp)
65 return vec_st(vus1, 24, usp);
67 void
68 testst_cst5 (vector bool short vbs1, int i1, vector bool short * vbsp)
70 return vec_st(vbs1, 28, vbsp);
72 void
73 testst_cst6 (vector bool short vbs1, int i1, unsigned short * vusp)
75 return vec_st(vbs1, 32, vusp);
77 void
78 testst_cst7 (vector bool short vbs1, int i1, signed short * vssp)
80 return vec_st(vbs1, 36, vssp);
83 /* { dg-final { scan-assembler-times {\mstvx\M} 14} } */