1 /* { dg-do compile { target powerpc*-*-* } } */
2 /* { dg-xfail-if "" { "powerpc-ibm-aix*" } { "-maltivec" } { "" } } */
3 /* { dg-options "-maltivec -O0 -Wall" } */
5 #define vector __attribute__((vector_size(16)))
7 static int vector x
, y
;
9 static vector
signed int i
,j
;
10 static vector
signed short s
,t
;
11 static vector
signed char c
,d
;
12 static vector
float f
,g
;
14 static vector
unsigned char uc
;
16 static vector
signed int *pi
;
18 static int int1
, int2
;
23 __builtin_altivec_vadduwm (x
, y
);
25 /* Make sure the predicates accept correct argument types. */
27 int1
= __builtin_altivec_vcmpbfp_p (0, f
, g
);
28 int1
= __builtin_altivec_vcmpeqfp_p (0, f
, g
);
29 int1
= __builtin_altivec_vcmpequb_p (0, c
, d
);
30 int1
= __builtin_altivec_vcmpequh_p (0, s
, t
);
31 int1
= __builtin_altivec_vcmpequw_p (0, i
, j
);
32 int1
= __builtin_altivec_vcmpgefp_p (0, f
, g
);
33 int1
= __builtin_altivec_vcmpgtfp_p (0, f
, g
);
34 int1
= __builtin_altivec_vcmpgtsb_p (0, c
, d
);
35 int1
= __builtin_altivec_vcmpgtsh_p (0, s
, t
);
36 int1
= __builtin_altivec_vcmpgtsw_p (0, i
, j
);
37 int1
= __builtin_altivec_vcmpgtub_p (0, c
, d
);
38 int1
= __builtin_altivec_vcmpgtuh_p (0, s
, t
);
39 int1
= __builtin_altivec_vcmpgtuw_p (0, i
, j
);
41 __builtin_altivec_mtvscr (i
);
42 __builtin_altivec_dssall ();
43 s
= __builtin_altivec_mfvscr ();
44 __builtin_altivec_dss (3);
46 __builtin_altivec_dst (pi
, int1
+ int2
, 3);
47 __builtin_altivec_dstst (pi
, int1
+ int2
, 3);
48 __builtin_altivec_dststt (pi
, int1
+ int2
, 3);
49 __builtin_altivec_dstt (pi
, int1
+ int2
, 3);
51 uc
= (vector
unsigned char) __builtin_altivec_lvsl (int1
+ 69, pi
);
52 uc
= (vector
unsigned char) __builtin_altivec_lvsr (int1
+ 69, pi
);
54 c
= __builtin_altivec_lvebx (int1
, pi
);
55 s
= __builtin_altivec_lvehx (int1
, pi
);
56 i
= __builtin_altivec_lvewx (int1
, pi
);
57 i
= __builtin_altivec_lvxl (int1
, pi
);
58 i
= __builtin_altivec_lvx (int1
, pi
);
60 __builtin_altivec_stvx (i
, int2
, pi
);
61 __builtin_altivec_stvebx (c
, int2
, pi
);
62 __builtin_altivec_stvehx (s
, int2
, pi
);
63 __builtin_altivec_stvewx (i
, int2
, pi
);
64 __builtin_altivec_stvxl (i
, int2
, pi
);