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" } */
9 // vector signed short vec_ld (int, const vector signed short *);
10 // void vec_st (vector signed short, int, vector signed short *);
13 testst_1 (vector
signed short vss1
, int i1
, vector
signed short * vssp
)
15 return vec_st(vss1
, i1
, vssp
);
18 testst_2 (vector
signed short vss1
, int i1
, signed short * ssp
)
20 return vec_st(vss1
, i1
, ssp
);
23 testst_3 (vector
unsigned short vus1
, int i1
, vector
unsigned short * vusp
)
25 return vec_st(vus1
, i1
, vusp
);
28 testst_4 (vector
unsigned short vus1
, int i1
, unsigned short * usp
)
30 return vec_st(vus1
, i1
, usp
);
33 testst_5 (vector
bool short vbs1
, int i1
, vector
bool short * vbsp
)
35 return vec_st(vbs1
, i1
, vbsp
);
38 testst_6 (vector
bool short vbs1
, int i1
, unsigned short * vusp
)
40 return vec_st(vbs1
, i1
, vusp
);
43 testst_7 (vector
bool short vbs1
, int i1
, signed short * vssp
)
45 return vec_st(vbs1
, i1
, vssp
);
48 testst_cst1 (vector
signed short vss1
, int i1
, vector
signed short * vssp
)
50 return vec_st(vss1
, 12, vssp
);
53 testst_cst2 (vector
signed short vss1
, int i1
, signed short * ssp
)
55 return vec_st(vss1
, 16, ssp
);
58 testst_cst3 (vector
unsigned short vus1
, int i1
, vector
unsigned short * vusp
)
60 return vec_st(vus1
, 20, vusp
);
63 testst_cst4 (vector
unsigned short vus1
, int i1
, unsigned short * usp
)
65 return vec_st(vus1
, 24, usp
);
68 testst_cst5 (vector
bool short vbs1
, int i1
, vector
bool short * vbsp
)
70 return vec_st(vbs1
, 28, vbsp
);
73 testst_cst6 (vector
bool short vbs1
, int i1
, unsigned short * vusp
)
75 return vec_st(vbs1
, 32, vusp
);
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 {\m(?:stvx|stxv|stxvx)\M} 14} } */