Use conditional internal functions in if-conversion
[official-gcc.git] / gcc / testsuite / gcc.target / aarch64 / eon_1.c
blobdcdf3b4d052e034e0475028b238bdff0105d4c44
1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
4 /* { dg-final { scan-assembler-not "\tf?mov\t" } } */
6 typedef long long int64_t;
7 typedef int64_t int64x1_t __attribute__ ((__vector_size__ (8)));
9 /* { dg-final { scan-assembler-times "\\teon\\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+" 1 } } */
11 int64_t
12 test_eon (int64_t a, int64_t b)
14 return a ^ ~b;
17 /* { dg-final { scan-assembler-times "\\tmvn\\tx\[0-9\]+, x\[0-9\]+" 1 } } */
18 int64_t
19 test_not (int64_t a)
21 return ~a;
24 /* There is no eon for SIMD regs; we prefer eor+mvn to mov+mov+eon+mov. */
26 /* { dg-final { scan-assembler-times "\\teor\\tv\[0-9\]+\.8b, v\[0-9\]+\.8b, v\[0-9\]+\.8b" 1 } } */
27 /* { dg-final { scan-assembler-times "\\tmvn\\tv\[0-9\]+\.8b, v\[0-9\]+\.8b" 2 } } */
28 int64x1_t
29 test_vec_eon (int64x1_t a, int64x1_t b)
31 return a ^ ~b;
34 int64x1_t
35 test_vec_not (int64x1_t a)
37 return ~a;