1 /* { dg-do compile } */
2 /* { dg-options "-O -mcpu=ultrasparc -mvis" } */
3 typedef char vec8 __attribute__((vector_size(4)));
4 typedef short vec16 __attribute__((vector_size(4)));
5 
6 extern vec8 foo1_8(void);
7 extern vec8 foo2_8(void);
8 
fun8(void)9 vec8 fun8(void)
10 {
11   return ~(foo1_8 () ^ foo2_8 ());
12 }
13 
14 extern vec16 foo1_16(void);
15 extern vec16 foo2_16(void);
16 
fun16(void)17 vec16 fun16(void)
18 {
19   return ~(foo1_16 () ^ foo1_16 ());
20 }
21 
22 
23 /* This should be transformed into ~(b ^ a).  */
fun8b(void)24 vec8 fun8b(void)
25 {
26   return foo1_8 () ^ ~foo2_8 ();
27 }
28 
fun16b(void)29 vec16 fun16b(void)
30 {
31   return foo1_16 () ^ ~foo1_16 ();
32 }
33 
34 /* { dg-final { scan-assembler-times "fxnors\t%" 4 } } */
35