Rebase.
[official-gcc.git] / gcc / testsuite / gcc.target / aarch64 / simd / vcalts_f32.c
blob88d3eb378ca0220e60fae9b91d4115ebc8d70b10
1 /* Test the vcalts_f32 AArch64 SIMD intrinsic. */
3 /* { dg-do run } */
4 /* { dg-options "-save-temps -O3" } */
6 #include "arm_neon.h"
8 #define SIZE 6
10 extern void abort (void);
12 volatile float32_t in[SIZE] = { -10.4, -3.14, 0.0, 1.5, 5.3, 532.3 };
14 int
15 main (void)
17 volatile uint32_t expected;
18 uint32_t actual;
20 int i, j;
22 for (i = 0; i < SIZE; ++i)
23 for (j = 0; j < SIZE; ++j)
25 expected = __builtin_fabs (in[i]) < __builtin_fabs (in[j]) ? -1 : 0;
26 actual = vcalts_f32 (in[i], in[j]);
28 if (actual != expected)
29 abort ();
32 return 0;
35 /* { dg-final { scan-assembler "facgt\[ \t\]+\[sS\]\[0-9\]+, ?\[sS\]\[0-9\]+, ?\[sS\]\[0-9\]+\n" } } */
36 /* { dg-final { cleanup-saved-temps } } */