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