1 /* Verify that overloaded built-ins for vec_or, vec_xor, vec_nor
2 * with char 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 char x
, vector
signed char y
)
13 vector
signed char *foo
;
14 *foo
+= vec_or (x
, y
);
19 test1_xor (vector
bool char x
, vector
signed char y
)
21 vector
signed char *foo
;
22 *foo
+= vec_xor (x
, y
);
27 test2_or (vector
signed char x
, vector
bool char y
)
29 vector
signed char *foo
;
30 *foo
+= vec_or (x
, y
);
35 test2_xor (vector
signed char x
, vector
bool char y
)
37 vector
signed char *foo
;
38 *foo
+= vec_xor (x
, y
);
43 test3_or (vector
signed char x
, vector
signed char y
)
45 vector
signed char *foo
;
46 *foo
+= vec_or (x
, y
);
51 test3_xor (vector
signed char x
, vector
signed char y
)
53 vector
signed char *foo
;
54 *foo
+= vec_xor (x
, y
);
59 test3_nor (vector
signed char x
, vector
signed char y
)
61 vector
signed char *foo
;
62 *foo
+= vec_nor (x
, y
);
68 test4_or (vector
bool char x
, vector
unsigned char y
)
70 vector
unsigned char *foo
;
71 *foo
+= vec_or (x
, y
);
76 test4_xor (vector
bool char x
, vector
unsigned char y
)
78 vector
unsigned char *foo
;
79 *foo
+= vec_xor (x
, y
);
84 test5_or (vector
unsigned char x
, vector
bool char y
)
86 vector
unsigned char *foo
;
87 *foo
+= vec_or (x
, y
);
92 test5_xor (vector
unsigned char x
, vector
bool char y
)
94 vector
unsigned char *foo
;
95 *foo
+= vec_xor (x
, y
);
100 test6_or (vector
unsigned char x
, vector
unsigned char y
)
102 vector
unsigned char *foo
;
103 *foo
+= vec_or (x
, y
);
108 test6_xor (vector
unsigned char x
, vector
unsigned char y
)
110 vector
unsigned char *foo
;
111 *foo
+= vec_xor (x
, y
);
116 test6_nor (vector
unsigned char x
, vector
unsigned char y
)
118 vector
unsigned char *foo
;
119 *foo
+= vec_nor (x
, y
);
123 /* { dg-final { scan-assembler-times {\mxxlor\M} 6 } } */
124 /* { dg-final { scan-assembler-times {\mxxlxor\M} 6 } } */
125 /* { dg-final { scan-assembler-times {\mxxlnor\M} 2 } } */