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 ();
15 vec8
fun8_2(vec8 a
, vec8 b
)
20 extern vec16
foo1_16(void);
21 extern vec16
foo2_16(void);
25 return ~foo1_16 () & foo2_16 ();
28 vec16
fun16_2(vec16 a
, vec16 b
)
33 extern vec32
foo1_32(void);
34 extern vec32
foo2_32(void);
38 return ~foo1_32 () & foo2_32 ();
41 vec32
fun32_2(vec32 a
, vec32 b
)
47 /* This should be transformed into ~b & a. */
50 return foo1_8 () & ~foo2_8 ();
53 vec8
fun8_2b(vec8 a
, vec8 b
)
60 return foo1_16 () & ~foo2_16 ();
63 vec16
fun16_2b(vec16 a
, vec16 b
)
70 return foo1_32 () & ~foo2_32 ();
73 vec32
fun32_2b(vec32 a
, vec32 b
)
78 /* { dg-final { scan-assembler-times "fandnot1\t%" 12 } } */