[testsuite] require sqrt_insn effective target where needed
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / pr79799-1.c
bloba8d8d1df28d08e4b78e1785645b2455a8c4ea3b8
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 /* GCC 7.1 did not have a specialized method for inserting 32-bit floating
8 point on ISA 3.0 (power9) systems. */
10 vector float
11 insert_arg_0 (vector float vf, float f)
13 return vec_insert (f, vf, 0);
16 vector float
17 insert_arg_1 (vector float vf, float f)
19 return vec_insert (f, vf, 1);
22 vector float
23 insert_arg_2 (vector float vf, float f)
25 return vec_insert (f, vf, 2);
28 vector float
29 insert_arg_3 (vector float vf, float f)
31 return vec_insert (f, vf, 3);
34 /* { dg-final { scan-assembler {\mxscvdpspn\M} } } */
35 /* { dg-final { scan-assembler {\mxxinsertw\M} } } */
36 /* { dg-final { scan-assembler-not {\mlvewx\M} } } */
37 /* { dg-final { scan-assembler-not {\mlvx\M} } } */
38 /* { dg-final { scan-assembler-not {\mvperm\M} } } */
39 /* { dg-final { scan-assembler-not {\mvpermr\M} } } */
40 /* { dg-final { scan-assembler-not {\mstfs\M} } } */
41 /* { dg-final { scan-assembler-not {\mstxssp\M} } } */
42 /* { dg-final { scan-assembler-not {\mstxsspx\M} } } */