[testsuite] require sqrt_insn effective target where needed
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / vsx-extract-3.c
blobb3133648c2f79d47d3fd933ce870009b3d0a8018
1 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
2 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
3 /* { dg-require-effective-target powerpc_vsx_ok } */
4 /* { dg-options "-O3 -mdejagnu-cpu=power8 -mvsx" } */
5 /* { dg-final { scan-assembler "mfvsrd" } } */
6 /* { dg-final { scan-assembler-not "stfd" } } */
7 /* { dg-final { scan-assembler-not "stxvd2x" } } */
9 #include <altivec.h>
11 #if __LITTLE_ENDIAN__
12 #define OFFSET 1
13 #else
14 #define OFFSET 0
15 #endif
17 long get_value (vector long v) { return vec_extract (v, OFFSET); }