1 /* { dg-do compile { target powerpc*-*-* } } */
2 /* { dg-require-effective-target powerpc_altivec_ok } */
3 /* { dg-options "-maltivec" } */
5 /* Basic test for the new VMX intrinsics. */
8 int f(vector int a, int b)
10 return vec_extract (a, b);
12 short f1(vector short a, int b)
14 return vec_extract (a, b);
16 vector short f2(vector short a, int b)
18 return vec_insert (b, a, b);
20 vector float f3(vector float a, int b)
22 return vec_insert (b, a, b);
27 vector float f4(float b, int t)
29 return vec_promote (g(), t);
31 vector float f5(float b)
33 return vec_splats (g());
40 int tf(vector int a, int b)
42 return vec_extract (a, b);
45 short tf1(vector short a, int b)
47 return vec_extract (a, b);
50 vector short tf2(vector short a, int b)
52 return vec_insert (b, a, b);
55 vector float tf3(vector float a, int b)
57 return vec_insert (b, a, b);
61 vector float tf4(float b, int t)
63 return vec_promote (g(), t);
66 vector float tf5(float b)
68 return vec_splats (g());
71 int t(vector int a, int b)
75 short t1(vector short a, int b)
79 vector short t2(vector short a, int b)
83 vector float t3(vector float a, int b)
87 vector float t4(float b, int t)
91 vector float t5(float b)