Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/eon_1.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
3
4 /* { dg-final { scan-assembler-not "\tf?mov\t" } } */
5
6 typedef long long int64_t;
7 typedef int64_t int64x1_t __attribute__ ((__vector_size__ (8)));
8
9 /* { dg-final { scan-assembler-times "\\teon\\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+" 1 } } */
10
11 int64_t
12 test_eon (int64_t a, int64_t b)
13 {
14 return a ^ ~b;
15 }
16
17 /* { dg-final { scan-assembler-times "\\tmvn\\tx\[0-9\]+, x\[0-9\]+" 1 } } */
18 int64_t
19 test_not (int64_t a)
20 {
21 return ~a;
22 }
23
24 /* There is no eon for SIMD regs; we prefer eor+mvn to mov+mov+eon+mov. */
25
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)
30 {
31 return a ^ ~b;
32 }
33
34 int64x1_t
35 test_vec_not (int64x1_t a)
36 {
37 return ~a;
38 }
39