Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/vec-init-18.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O3" } */
3
4 #include <arm_neon.h>
5
6 int16x8_t foo(int16_t x, int y)
7 {
8 int16x8_t v = (int16x8_t) {x, y, x, y, x, y, x, y};
9 return v;
10 }
11
12 int16x8_t foo2(int16_t x)
13 {
14 int16x8_t v = (int16x8_t) {x, 1, x, 1, x, 1, x, 1};
15 return v;
16 }
17
18 /* { dg-final { scan-assembler-times {\tdup\tv[0-9]+\.4h, w[0-9]+} 3 } } */
19 /* { dg-final { scan-assembler {\tmovi\tv[0-9]+\.4h, 0x1} } } */
20 /* { dg-final { scan-assembler-times {\tzip1\tv[0-9]+\.8h, v[0-9]+\.8h, v[0-9]+\.8h} 2 } } */