1 /* { dg-do compile } */
2 /* { dg-options "-O -mcpu=ultrasparc -mvis" } */
3 typedef char vec8
__attribute__((vector_size(8)));
4 typedef short vec16
__attribute__((vector_size(8)));
5 typedef int vec32
__attribute__((vector_size(8)));
7 extern vec8
foo1_8(void);
8 extern vec8
foo2_8(void);
12 return ~foo1_8 () & foo2_8 ();
16 /* Test the 32-bit splitter. */
17 vec8
fun8_2(vec8 a
, vec8 b
)
23 extern vec16
foo1_16(void);
24 extern vec16
foo2_16(void);
28 return ~foo1_16 () & foo2_16 ();
32 /* Test the 32-bit splitter. */
33 vec16
fun16_2(vec16 a
, vec16 b
)
39 extern vec32
foo1_32(void);
40 extern vec32
foo2_32(void);
44 return ~foo1_32 () & foo2_32 ();
48 /* Test the 32-bit splitter. */
49 vec32
fun32_2(vec32 a
, vec32 b
)
56 /* This should be transformed into ~b & a. */
59 return foo1_8 () & ~foo2_8 ();
63 /* Test the 32-bit splitter. */
64 vec8
fun8_2b(vec8 a
, vec8 b
)
72 return foo1_16 () & ~foo2_16 ();
76 /* Test the 32-bit splitter. */
77 vec16
fun16_2b(vec16 a
, vec16 b
)
85 return foo1_32 () & ~foo2_32 ();
89 /* Test the 32-bit splitter. */
90 vec32
fun32_2b(vec32 a
, vec32 b
)
96 /* { dg-final { scan-assembler-times "fandnot1\t%" 6 } } */