1 /* Check that Neon is *not* used by default to handle 64-bits scalar
4 /* { dg-do compile } */
5 /* { dg-require-effective-target arm_neon_ok } */
6 /* { dg-options "-O2" } */
7 /* { dg-add-options arm_neon } */
10 typedef unsigned long long u64
;
11 typedef unsigned int u32
;
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 ; }
23 #define SHIFT_U(name, op, amount) \
24 void ushift_##name(u64 *a, u64 *b, int c) { *a = *b op amount; }
27 #define SHIFT_S(name, op, amount) \
28 void sshift_##name(i64 *a, i64 *b, int c) { *a = *b op amount; }
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} } */