1 /* Verify that overloaded built-ins for vec_extract() with
2 double inputs produce the right code. */
4 /* { dg-do compile } */
5 /* { dg-require-effective-target powerpc_altivec_ok } */
6 /* { dg-options "-mdejagnu-cpu=power7 -O2" } */
7 /* { dg-additional-options "-mbig-endian" { target powerpc*-*-linux* } } */
9 // targeting P7 (BE), 2 tests.
10 // P7 constants: xxpermdi
11 // P7 variables: li, addi, rldic, addi, stxvd2x, lfdx
13 /* { dg-final { scan-assembler-times {\mxxpermdi\M} 1 } } */
14 /* { dg-final { scan-assembler-times {\mli\M} 1 } } */
15 /* -m32 target has an 'add' in place of one of the 'addi'. */
16 /* { dg-final { scan-assembler-times {\maddi\M|\madd\M} 2 { target lp64 } } } */
17 /* { dg-final { scan-assembler-times {\maddi\M|\madd\M} 3 { target ilp32 } } } */
18 /* -m32 target has a rlwinm in place of a rldic . */
19 /* { dg-final { scan-assembler-times {\mrldic\M|\mrlwinm\M} 1 } } */
20 /* { dg-final { scan-assembler-times {\mstxvd2x\M} 1 } } */
21 /* { dg-final { scan-assembler-times {\mlfdx\M|\mlfd\M} 1 } } */
26 testd_var (vector
double vd2
, signed int si
)
28 return vec_extract (vd2
, si
);
32 testd_cst (vector
double vd2
)
34 return vec_extract (vd2
, 1);