Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/simd/vcaltd_f64.c

raw
1 /* Test the vcaltd_f64 AArch64 SIMD intrinsic. */
2
3 /* { dg-do run } */
4 /* { dg-options "-save-temps -O3" } */
5
6 #include "arm_neon.h"
7
8 #define SIZE 6
9
10 extern void abort (void);
11
12 volatile float64_t in[SIZE] = { -10.4, -3.14, 0.0, 1.5, 5.3, 532.3 };
13
14 int
15 main (void)
16 {
17 volatile uint64_t expected;
18 uint64_t actual;
19
20 int i, j;
21
22 for (i = 0; i < SIZE; ++i)
23 for (j = 0; j < SIZE; ++j)
24 {
25 expected = __builtin_fabs (in[i]) < __builtin_fabs (in[j]) ? -1 : 0;
26 actual = vcaltd_f64 (in[i], in[j]);
27
28 if (actual != expected)
29 abort ();
30 }
31
32 return 0;
33 }
34
35 /* { dg-final { scan-assembler "facgt\[ \t\]+\[dD\]\[0-9\]+, ?\[dD\]\[0-9\]+, ?\[dD\]\[0-9\]+\n" } } */