1 /* Verify that overloaded built-ins for vec_orc and vec_nand with short
2 * inputs produce the right results. These intrinsics (vec_orc,
3 * vec_nand) were added as part of ISA 2.07 (P8). */
5 /* { dg-do compile } */
6 /* { dg-require-effective-target powerpc_p8vector_ok } */
7 /* { dg-options "-mpower8-vector -O1" } */
12 test1_orc (vector
bool short x
, vector
signed short y
)
14 vector
signed short *foo
;
15 *foo
+= vec_orc (x
, y
);
20 test1_nand (vector
bool short x
, vector
signed short y
)
22 vector
signed short *foo
;
23 *foo
+= vec_nand (x
, y
);
28 test2_orc (vector
signed short x
, vector
bool short y
)
30 vector
signed short *foo
;
31 *foo
+= vec_orc (x
, y
);
36 test2_nand (vector
signed short x
, vector
bool short y
)
38 vector
signed short *foo
;
39 *foo
+= vec_nand (x
, y
);
44 test3_orc (vector
signed short x
, vector
signed short y
)
46 vector
signed short *foo
;
47 *foo
+= vec_orc (x
, y
);
52 test3_nand (vector
signed short x
, vector
signed short y
)
54 vector
signed short *foo
;
55 *foo
+= vec_nand (x
, y
);
60 test4_orc (vector
bool short x
, vector
unsigned short y
)
62 vector
unsigned short *foo
;
63 *foo
+= vec_orc (x
, y
);
68 test4_nand (vector
bool short x
, vector
unsigned short y
)
70 vector
unsigned short *foo
;
71 *foo
+= vec_nand (x
, y
);
76 test5_orc (vector
unsigned short x
, vector
bool short y
)
78 vector
unsigned short *foo
;
79 *foo
+= vec_orc (x
, y
);
84 test5_nand (vector
unsigned short x
, vector
bool short y
)
86 vector
unsigned short *foo
;
87 *foo
+= vec_nand (x
, y
);
92 test6_orc (vector
unsigned short x
, vector
unsigned short y
)
94 vector
unsigned short *foo
;
95 *foo
+= vec_orc (x
, y
);
100 test6_nand (vector
unsigned short x
, vector
unsigned short y
)
102 vector
unsigned short *foo
;
103 *foo
+= vec_nand (x
, y
);
107 /* { dg-final { scan-assembler-times {\mxxlnand\M} 3 } } */
108 /* { dg-final { scan-assembler-times {\mxxlorc\M} 6 } } */