Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/vec-set-zero.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
3
4 #include "arm_neon.h"
5
6 #define FOO(type) \
7 type f_##type(type v) \
8 { \
9 v[1] = 0; \
10 return v; \
11 }
12
13 FOO(int8x8_t)
14 FOO(int16x4_t)
15 FOO(int32x2_t)
16
17 FOO(int8x16_t)
18 FOO(int16x8_t)
19 FOO(int32x4_t)
20 FOO(int64x2_t)
21
22 FOO(float16x4_t)
23 FOO(float32x2_t)
24
25 FOO(float16x8_t)
26 FOO(float32x4_t)
27 FOO(float64x2_t)
28
29 /* { dg-final { scan-assembler-times {ins\tv[0-9]+\.b\[1\], wzr} 2 { target aarch64_little_endian } } } */
30 /* { dg-final { scan-assembler-times {ins\tv[0-9]+\.h\[1\], wzr} 4 { target aarch64_little_endian } } } */
31 /* { dg-final { scan-assembler-times {ins\tv[0-9]+\.s\[1\], wzr} 4 { target aarch64_little_endian } } } */
32 /* { dg-final { scan-assembler-times {ins\tv[0-9]+\.d\[1\], xzr} 2 { target aarch64_little_endian } } } */
33
34 /* { dg-final { scan-assembler-times {ins\tv[0-9]+\.b\[6\], wzr} 1 { target aarch64_big_endian } } } */
35 /* { dg-final { scan-assembler-times {ins\tv[0-9]+\.b\[14\], wzr} 1 { target aarch64_big_endian } } } */
36 /* { dg-final { scan-assembler-times {ins\tv[0-9]+\.h\[2\], wzr} 2 { target aarch64_big_endian } } } */
37 /* { dg-final { scan-assembler-times {ins\tv[0-9]+\.h\[6\], wzr} 2 { target aarch64_big_endian } } } */
38 /* { dg-final { scan-assembler-times {ins\tv[0-9]+\.s\[0\], wzr} 2 { target aarch64_big_endian } } } */
39 /* { dg-final { scan-assembler-times {ins\tv[0-9]+\.s\[2\], wzr} 2 { target aarch64_big_endian } } } */
40 /* { dg-final { scan-assembler-times {ins\tv[0-9]+\.d\[0\], xzr} 2 { target aarch64_big_endian } } } */