1 /* { dg-do compile } */
2 /* { dg-options "-O3" } */
3 /* { dg-final { check-function-bodies "**" "" "" } } */
4
5 #include <arm_neon.h>
6
7 /*
8 ** foo:
9 ** ...
10 ** dup v[0-9]+\.8h, w[0-9]+
11 ** dup v[0-9]+\.8h, w[0-9]+
12 ** zip1 v[0-9]+\.8h, v[0-9]+\.8h, v[0-9]+\.8h
13 ** ...
14 ** ret
15 */
16
17 int16x8_t foo(int16_t x, int y)
18 {
19 int16x8_t v = (int16x8_t) {x, y, x, y, x, y, x, y};
20 return v;
21 }
22
23 /*
24 ** foo2:
25 ** ...
26 ** dup v[0-9]+\.8h, w[0-9]+
27 ** movi v[0-9]+\.8h, 0x1
28 ** zip1 v[0-9]+\.8h, v[0-9]+\.8h, v[0-9]+\.8h
29 ** ...
30 ** ret
31 */
32
33 int16x8_t foo2(int16_t x)
34 {
35 int16x8_t v = (int16x8_t) {x, 1, x, 1, x, 1, x, 1};
36 return v;
37 }