1 /* { dg-do compile { target { le } } } */
2 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
3 /* { dg-require-effective-target powerpc_p8vector_ok } */
4 /* { dg-options "-mdejagnu-cpu=power8 -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.
8 This test duplicates p8-vec-xl-xst.c , except that it allows gimple-folding,
9 which changes the expected codegen. */
14 foo (unsigned char * address
)
16 return __builtin_vec_xl (0, address
);
20 bar (vector
unsigned char x
, unsigned char * address
)
22 __builtin_vec_xst (x
, 0, address
);
26 foot (unsigned short * address
)
28 return __builtin_vec_xl (0, address
);
32 bart (vector
unsigned short x
, unsigned short * address
)
34 __builtin_vec_xst (x
, 0, address
);
38 fool (unsigned char * address
)
40 return vec_xl (0, address
);
44 barl (vector
unsigned char x
, unsigned char * address
)
46 vec_xst (x
, 0, address
);
50 footle (unsigned short * address
)
52 return vec_xl (0, address
);
56 bartle (vector
unsigned short x
, unsigned short * address
)
58 vec_xst (x
, 0, address
);
61 /* { dg-final { scan-assembler-times {\mlxvd2x\M} 4 } } */
62 /* { dg-final { scan-assembler-times {\mstxvd2x\M} 4 } } */