1 /* Verify that overloaded built-ins for vec_or, vec_xor, vec_nor with short
2 inputs produce the right results. */
4 /* { dg-do compile } */
5 /* { dg-require-effective-target powerpc_vsx_ok } */
6 /* { dg-options "-mvsx -O1" } */
11 test1_or (vector
bool short x
, vector
signed short y
)
13 vector
signed short *foo
;
14 *foo
+= vec_or (x
, y
);
19 test1_xor (vector
bool short x
, vector
signed short y
)
21 vector
signed short *foo
;
22 *foo
+= vec_xor (x
, y
);
27 test2_or (vector
signed short x
, vector
bool short y
)
29 vector
signed short *foo
;
30 *foo
+= vec_or (x
, y
);
35 test2_xor (vector
signed short x
, vector
bool short y
)
37 vector
signed short *foo
;
38 *foo
+= vec_xor (x
, y
);
43 test3_or (vector
signed short x
, vector
signed short y
)
45 vector
signed short *foo
;
46 *foo
+= vec_or (x
, y
);
51 test3_xor (vector
signed short x
, vector
signed short y
)
53 vector
signed short *foo
;
54 *foo
+= vec_xor (x
, y
);
59 test3_nor (vector
signed short x
, vector
signed short y
)
61 vector
signed short *foo
;
62 *foo
+= vec_nor (x
, y
);
67 test4_or (vector
bool short x
, vector
unsigned short y
)
69 vector
unsigned short *foo
;
70 *foo
+= vec_or (x
, y
);
75 test4_xor (vector
bool short x
, vector
unsigned short y
)
77 vector
unsigned short *foo
;
78 *foo
+= vec_xor (x
, y
);
83 test5_or (vector
unsigned short x
, vector
bool short y
)
85 vector
unsigned short *foo
;
86 *foo
+= vec_or (x
, y
);
91 test5_xor (vector
unsigned short x
, vector
bool short y
)
93 vector
unsigned short *foo
;
94 *foo
+= vec_xor (x
, y
);
99 test6_or (vector
unsigned short x
, vector
unsigned short y
)
101 vector
unsigned short *foo
;
102 *foo
+= vec_or (x
, y
);
106 vector
unsigned short
107 test6_xor (vector
unsigned short x
, vector
unsigned short y
)
109 vector
unsigned short *foo
;
110 *foo
+= vec_xor (x
, y
);
114 vector
unsigned short
115 test6_nor (vector
unsigned short x
, vector
unsigned short y
)
117 vector
unsigned short *foo
;
118 *foo
+= vec_nor (x
, y
);
122 /* { dg-final { scan-assembler-times {\mxxlor\M} 6 } } */
123 /* { dg-final { scan-assembler-times {\mxxlxor\M} 6 } } */
124 /* { dg-final { scan-assembler-times {\mxxlnor\M} 2 } } */