1 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
2 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
3 /* { dg-require-effective-target powerpc_p8vector_ok } */
4 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
5 /* { dg-options "-O2 -mcpu=power8" } */
7 /* { dg-final { scan-assembler-times "vspltw" 6 } } */
8 /* { dg-final { scan-assembler-times "xvcvsxwdp" 4 } } */
9 /* { dg-final { scan-assembler-times "xvcvuxwdp" 4 } } */
10 /* { dg-final { scan-assembler-times "frsp\|xsrsp" 8 } } */
11 /* { dg-final { scan-assembler-not "mtvsrd" } } */
12 /* { dg-final { scan-assembler-not "mtvsrwa" } } */
13 /* { dg-final { scan-assembler-not "mtvsrwz" } } */
14 /* { dg-final { scan-assembler-not "mfvsrd" } } */
15 /* { dg-final { scan-assembler-not "mfvsrwz" } } */
26 int i
= vec_extract (v
, 0);
33 int i
= vec_extract (v
, 1);
40 int i
= vec_extract (v
, 2);
47 int i
= vec_extract (v
, 3);
52 foo_0u (vector
unsigned int v
)
54 unsigned int u
= vec_extract (v
, 0);
59 foo_1u (vector
unsigned int v
)
61 unsigned int u
= vec_extract (v
, 1);
66 foo_2u (vector
unsigned int v
)
68 unsigned int u
= vec_extract (v
, 2);
73 foo_3u (vector
unsigned int v
)
75 unsigned int u
= vec_extract (v
, 3);