1 /* { dg-do compile { target powerpc*-*-* } } */
2 /* { dg-require-effective-target powerpc_altivec_ok } */
3 /* { dg-options "-maltivec" } */
4 
5 /* Basic test for the new VMX intrinsics.  */
6 #include <altivec.h>
7 
f(vector int a,int b)8 int f(vector int a, int b)
9 {
10   return vec_extract (a, b);
11 }
f1(vector short a,int b)12 short f1(vector short a, int b)
13 {
14   return vec_extract (a, b);
15 }
f2(vector short a,int b)16 vector short f2(vector short a, int b)
17 {
18   return vec_insert (b, a, b);
19 }
f3(vector float a,int b)20 vector float f3(vector float a, int b)
21 {
22   return vec_insert (b, a, b);
23 }
24 
25 float g(void);
26 
f4(float b,int t)27 vector float f4(float b, int t)
28 {
29   return vec_promote (g(), t);
30 }
f5(float b)31 vector float f5(float b)
32 {
33   return vec_splats (g());
34 }
35