1 /* { dg-do compile { target { le } } } */
2 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
3 /* { dg-require-effective-target powerpc_vsx_ok } */
4 /* { dg-options "-mdejagnu-cpu=power8 -mvsx -O2" } */
6 /* Verify fix for problem where vec_xl and vec_xst are not recognized
7 for the vector char and vector short cases on P8 only. */
12 foo (unsigned char * address
)
14 return __builtin_vec_xl (0, address
);
18 bar (vector
unsigned char x
, unsigned char * address
)
20 __builtin_vec_xst (x
, 0, address
);
24 foot (unsigned short * address
)
26 return __builtin_vec_xl (0, address
);
30 bart (vector
unsigned short x
, unsigned short * address
)
32 __builtin_vec_xst (x
, 0, address
);
36 fool (unsigned char * address
)
38 return vec_xl (0, address
);
42 barl (vector
unsigned char x
, unsigned char * address
)
44 vec_xst (x
, 0, address
);
48 footle (unsigned short * address
)
50 return vec_xl (0, address
);
54 bartle (vector
unsigned short x
, unsigned short * address
)
56 vec_xst (x
, 0, address
);
59 /* { dg-final { scan-assembler-times "lxvd2x" 4 } } */
60 /* { dg-final { scan-assembler-times "stxvd2x" 4 } } */
61 /* { dg-final { scan-assembler-times "xxpermdi" 8 } } */