Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.target / arm / neon-for-64bits-1.c
bloba2a4103b9a2f2b4a036212f6a3bce0e51d1fd406
1 /* Check that Neon is *not* used by default to handle 64-bits scalar
2 operations. */
4 /* { dg-do compile } */
5 /* { dg-require-effective-target arm_neon_ok } */
6 /* { dg-options "-O2" } */
7 /* { dg-add-options arm_neon } */
9 typedef long long i64;
10 typedef unsigned long long u64;
11 typedef unsigned int u32;
12 typedef int i32;
14 /* Unary operators */
15 #define UNARY_OP(name, op) \
16 void unary_##name(u64 *a, u64 *b) { *a = op (*b + 0x1234567812345678ULL) ; }
18 /* Binary operators */
19 #define BINARY_OP(name, op) \
20 void binary_##name(u64 *a, u64 *b, u64 *c) { *a = *b op *c ; }
22 /* Unsigned shift */
23 #define SHIFT_U(name, op, amount) \
24 void ushift_##name(u64 *a, u64 *b, int c) { *a = *b op amount; }
26 /* Signed shift */
27 #define SHIFT_S(name, op, amount) \
28 void sshift_##name(i64 *a, i64 *b, int c) { *a = *b op amount; }
30 UNARY_OP(not, ~)
32 BINARY_OP(add, +)
33 BINARY_OP(sub, -)
34 BINARY_OP(and, &)
35 BINARY_OP(or, |)
36 BINARY_OP(xor, ^)
38 SHIFT_U(right1, >>, 1)
39 SHIFT_U(right2, >>, 2)
40 SHIFT_U(right5, >>, 5)
41 SHIFT_U(rightn, >>, c)
43 SHIFT_S(right1, >>, 1)
44 SHIFT_S(right2, >>, 2)
45 SHIFT_S(right5, >>, 5)
46 SHIFT_S(rightn, >>, c)
48 /* { dg-final {scan-assembler-times "vmvn" 0} } */
49 /* { dg-final {scan-assembler-times "vadd" 0} } */
50 /* { dg-final {scan-assembler-times "vsub" 0} } */
51 /* { dg-final {scan-assembler-times "vand" 0} } */
52 /* { dg-final {scan-assembler-times "vorr" 0} } */
53 /* { dg-final {scan-assembler-times "veor" 0} } */
54 /* { dg-final {scan-assembler-times "vshr" 0} } */