2014-10-24 Christophe Lyon <christophe.lyon@linaro.org>
[official-gcc.git] / gcc / testsuite / gcc.target / sparc / combined-1.c
blob5f19db3b0b4915bdf3b0c25205773363cba26cdb
1 /* { dg-do compile } */
2 /* { dg-options "-O -mcpu=ultrasparc -mvis" } */
3 typedef short vec16 __attribute__((vector_size(8)));
4 typedef int vec32 __attribute__((vector_size(8)));
6 vec16 fun16(vec16 a, vec16 b)
8 return (~a & b) + (b | a) - (a ^ b);
11 vec32 fun32(vec32 a, vec32 b)
13 return (~a & b) + (b | a) - (a ^ b);
16 /* This should be transformed into ~b & a. */
17 vec16 fun16b(vec16 a, vec16 b)
19 return (a & ~b) + (b | a) - (a ^ b);
22 vec32 fun32b(vec32 a, vec32 b)
24 return (a & ~b) + (b | a) - (a ^ b);
27 /* { dg-final { scan-assembler-times "fandnot1\t%" 4 } } */
28 /* { dg-final { scan-assembler-times "for\t%" 4 } } */
29 /* { dg-final { scan-assembler-times "fpadd" 4 } } */
30 /* { dg-final { scan-assembler-times "fxor\t%" 4 } } */
31 /* { dg-final { scan-assembler-times "fpsub" 4 } } */