[testsuite] require sqrt_insn effective target where needed
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / pr79799-2.c
blobfe27e5c0da2addc422dbceac32ccbb6c68499175
1 /* { dg-do compile { target { powerpc64*-*-* && lp64 } } } */
2 /* { dg-require-effective-target powerpc_vsx_ok } */
3 /* { dg-options "-mdejagnu-cpu=power9 -mvsx -O2" } */
5 #include <altivec.h>
7 /* Optimize x = vec_insert (vec_extract (v2, N), v1, M) for SFmode if N is the default
8 scalar position. */
10 #if __LITTLE_ENDIAN__
11 #define ELE 2
12 #else
13 #define ELE 1
14 #endif
16 vector float
17 foo (vector float v1, vector float v2)
19 return vec_insert (vec_extract (v2, ELE), v1, 0);
22 /* { dg-final { scan-assembler {\mxxinsertw\M} } } */
23 /* { dg-final { scan-assembler-not {\mxxextractuw\M} } } */
24 /* { dg-final { scan-assembler-not {\mlvewx\M} } } */
25 /* { dg-final { scan-assembler-not {\mlvx\M} } } */
26 /* { dg-final { scan-assembler-not {\mvperm\M} } } */
27 /* { dg-final { scan-assembler-not {\mvpermr\M} } } */
28 /* { dg-final { scan-assembler-not {\mstfs\M} } } */
29 /* { dg-final { scan-assembler-not {\mstxssp\M} } } */
30 /* { dg-final { scan-assembler-not {\mstxsspx\M} } } */