1 /* Verify that overloaded built-ins for vec_and and vec_andc
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_and (vector
bool char x
, vector
signed char y
)
13 vector
signed char *foo
;
14 *foo
+= vec_and (x
, y
);
19 test1_andc (vector
bool char x
, vector
signed char y
)
21 vector
signed char *foo
;
22 *foo
+= vec_andc (x
, y
);
27 test2_and (vector
signed char x
, vector
bool char y
)
29 vector
signed char *foo
;
30 *foo
+= vec_and (x
, y
);
35 test2_andc (vector
signed char x
, vector
bool char y
)
37 vector
signed char *foo
;
38 *foo
+= vec_andc (x
, y
);
43 test3_and (vector
signed char x
, vector
signed char y
)
45 vector
signed char *foo
;
46 *foo
+= vec_and (x
, y
);
51 test3_andc (vector
signed char x
, vector
signed char y
)
53 vector
signed char *foo
;
54 *foo
+= vec_andc (x
, y
);
59 test4_and (vector
bool char x
, vector
unsigned char y
)
61 vector
unsigned char *foo
;
62 *foo
+= vec_and (x
, y
);
67 test4_andc (vector
bool char x
, vector
unsigned char y
)
69 vector
unsigned char *foo
;
70 *foo
+= vec_andc (x
, y
);
75 test5_and (vector
unsigned char x
, vector
bool char y
)
77 vector
unsigned char *foo
;
78 *foo
+= vec_and (x
, y
);
83 test5_andc (vector
unsigned char x
, vector
bool char y
)
85 vector
unsigned char *foo
;
86 *foo
+= vec_andc (x
, y
);
91 test6_and (vector
unsigned char x
, vector
unsigned char y
)
93 vector
unsigned char *foo
;
94 *foo
+= vec_and (x
, y
);
99 test6_andc (vector
unsigned char x
, vector
unsigned char y
)
101 vector
unsigned char *foo
;
102 *foo
+= vec_andc (x
, y
);
106 /* { dg-final { scan-assembler-times {\mxxland\M} 6 } } */
107 /* { dg-final { scan-assembler-times {\mxxlandc\M} 6 } } */