[ARM] Fix test armv8_2-fp16-move-1.c
[official-gcc.git] / gcc / testsuite / gcc.target / arm / pr48183.c
blobf021825b108484dffa5a65bc5d7507d6dd2c0007
1 /* testsuite/gcc.target/arm/pr48183.c */
3 /* { dg-do compile } */
4 /* { dg-require-effective-target arm_neon_ok } */
5 /* { dg-options "-O -g" } */
6 /* { dg-add-options arm_neon } */
8 #include <arm_neon.h>
10 void move_16bit_to_32bit (int32_t *dst, const short *src, unsigned n)
12 unsigned i;
13 int16x4x2_t input;
14 int32x4x2_t mid;
15 int32x4x2_t output;
17 for (i = 0; i < n/2; i += 8) {
18 input = vld2_s16(src + i);
19 mid.val[0] = vmovl_s16(input.val[0]);
20 mid.val[1] = vmovl_s16(input.val[1]);
21 output.val[0] = vshlq_n_s32(mid.val[0], 8);
22 output.val[1] = vshlq_n_s32(mid.val[1], 8);
23 vst2q_s32((int32_t *)dst + i, output);