[PR81647][AARCH64] Fix handling of Unordered Comparisons in aarch64-simd.md
[official-gcc.git] / gcc / testsuite / gcc.target / aarch64 / vec_init_1.c
blobe245dc18b6381c3ce639fca7063000e305ceead1
1 /* { dg-do run } */
2 /* { dg-options "-O2 -fomit-frame-pointer --save-temps -fno-inline" } */
4 extern void abort (void);
6 typedef float float16x4_t __attribute__ ((vector_size ((16))));
8 float a;
9 float b;
11 float16x4_t
12 make_vector ()
14 return (float16x4_t) { 0, 0, a, b };
17 int
18 main (int argc, char **argv)
20 a = 4.0;
21 b = 3.0;
22 float16x4_t vec = make_vector ();
23 if (vec[0] != 0 || vec[1] != 0 || vec[2] != a || vec[3] != b)
24 abort ();
25 return 0;
28 /* { dg-final { scan-assembler-times "ins\\t" 2 } } */
29 /* What we want to check, is that make_vector does not stp the whole vector
30 to the stack. Unfortunately here we scan the body of main() too, which may
31 be a bit fragile - the test is currently passing only because of the option
32 -fomit-frame-pointer which avoids use of stp in the prologue to main(). */
33 /* { dg-final { scan-assembler-not "stp\\t" } } */