1 /* { dg-do compile { target { powerpc64*-*-* && lp64 } } } */
2 /* { dg-require-effective-target powerpc_p9vector_ok } */
3 /* { dg-options "-mdejagnu-cpu=power9 -O2" } */
4
5 #include <altivec.h>
6
7 /* GCC 7.1 did not have a specialized method for inserting 32-bit floating
8 point on ISA 3.0 (power9) systems. */
9
10 vector float
insert_arg_0(vector float vf,float f)11 insert_arg_0 (vector float vf, float f)
12 {
13 return vec_insert (f, vf, 0);
14 }
15
16 vector float
insert_arg_1(vector float vf,float f)17 insert_arg_1 (vector float vf, float f)
18 {
19 return vec_insert (f, vf, 1);
20 }
21
22 vector float
insert_arg_2(vector float vf,float f)23 insert_arg_2 (vector float vf, float f)
24 {
25 return vec_insert (f, vf, 2);
26 }
27
28 vector float
insert_arg_3(vector float vf,float f)29 insert_arg_3 (vector float vf, float f)
30 {
31 return vec_insert (f, vf, 3);
32 }
33
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} } } */
43