Rebase.
[official-gcc.git] / gcc / testsuite / gcc.target / aarch64 / simd / ext_f32.x
blobb511e516dab5d02a0eb8720fbb80103f834ad7aa
1 extern void abort (void);
3 float32x2_t
4 test_vext_f32_1 (float32x2_t a, float32x2_t b)
6   return vext_f32 (a, b, 1);
9 int
10 main (int argc, char **argv)
12   int i, off;
13   float32_t arr1[] = {0, 1};
14   float32x2_t in1 = vld1_f32 (arr1);
15   float32_t arr2[] = {2, 3};
16   float32x2_t in2 = vld1_f32 (arr2);
17   float32_t exp[2];
18   float32x2_t expected;
19   float32x2_t actual = test_vext_f32_1 (in1, in2);
21   for (i = 0; i < 2; i++)
22     exp[i] = i + 1;
23   expected = vld1_f32 (exp);
24   for (i = 0; i < 2; i++)
25     if (actual[i] != expected[i])
26       abort ();
28   return 0;