Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> writes: > diff --git a/gcc/testsuite/gcc.target/aarch64/vec-init-18.c > b/gcc/testsuite/gcc.target/aarch64/vec-init-18.c > new file mode 100644 > index 00000000000..598a51f17c6 > --- /dev/null > +++ b/gcc/testsuite/gcc.target/aarch64/vec-init-18.c > @@ -0,0 +1,20 @@ > +/* { dg-do compile } */ > +/* { dg-options "-O3" } */ > + > +#include <arm_neon.h> > + > +int16x8_t foo(int16_t x, int y) > +{ > + int16x8_t v = (int16x8_t) {x, y, x, y, x, y, x, y}; > + return v; > +} > + > +int16x8_t foo2(int16_t x) > +{ > + int16x8_t v = (int16x8_t) {x, 1, x, 1, x, 1, x, 1}; > + return v; > +} > + > +/* { dg-final { scan-assembler-times {\tdup\tv[0-9]+\.4h, w[0-9]+} 3 } } */ > +/* { dg-final { scan-assembler {\tmovi\tv[0-9]+\.4h, 0x1} } } */ > +/* { dg-final { scan-assembler {\tzip1\tv[0-9]+\.8h, v[0-9]+\.8h, > v[0-9]+\.8h} } } */
Would be good to make this a scan-assembler-times ... 2. OK with that change. Thanks for doing this. Richard