1 /* Verify that overloaded built-ins for vec_orc and vec_nand with int
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-options "-mvsx -O1" } */
7 /* { dg-additional-options "-mdejagnu-cpu=power8" { target { ! has_arch_pwr8 } } } */
8 /* { dg-require-effective-target powerpc_vsx } */
13 test1_orc (vector
bool int x
, vector
signed int y
)
15 vector
signed int *foo
;
16 *foo
+= vec_orc (x
, y
);
21 test1_nand (vector
bool int x
, vector
signed int y
)
23 vector
signed int *foo
;
24 *foo
+= vec_nand (x
, y
);
29 test2_orc (vector
signed int x
, vector
bool int y
)
31 vector
signed int *foo
;
32 *foo
+= vec_orc (x
, y
);
37 test2_nand (vector
signed int x
, vector
bool int y
)
39 vector
signed int *foo
;
40 *foo
+= vec_nand (x
, y
);
45 test3_orc (vector
signed int x
, vector
signed int y
)
47 vector
signed int *foo
;
48 *foo
+= vec_orc (x
, y
);
53 test3_nand (vector
signed int x
, vector
signed int y
)
55 vector
signed int *foo
;
56 *foo
+= vec_nand (x
, y
);
61 test4_orc (vector
bool int x
, vector
unsigned int y
)
63 vector
unsigned int *foo
;
64 *foo
+= vec_orc (x
, y
);
69 test4_nand (vector
bool int x
, vector
unsigned int y
)
71 vector
unsigned int *foo
;
72 *foo
+= vec_nand (x
, y
);
77 test5_orc (vector
unsigned int x
, vector
bool int y
)
79 vector
unsigned int *foo
;
80 *foo
+= vec_orc (x
, y
);
85 test5_nand (vector
unsigned int x
, vector
bool int y
)
87 vector
unsigned int *foo
;
88 *foo
+= vec_nand (x
, y
);
93 test6_orc (vector
unsigned int x
, vector
unsigned int y
)
95 vector
unsigned int *foo
;
96 *foo
+= vec_orc (x
, y
);
101 test6_nand (vector
unsigned int x
, vector
unsigned int y
)
103 vector
unsigned int *foo
;
104 *foo
+= vec_nand (x
, y
);
108 /* { dg-final { scan-assembler-times {\mxxlnand\M} 6 } } */
109 /* { dg-final { scan-assembler-times {\mxxlorc\M} 6 } } */