Debian Codegraph @

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

raw
1 /* Test the vmulxs_f32 AArch64 SIMD intrinsic. */
2
3 /* { dg-do run } */
4 /* { dg-options "-save-temps -O3" } */
5
6 #include "arm_neon.h"
7
8 extern void abort (void);
9
10 void __attribute__ ((noinline))
11 test_case (float32_t v1, float32_t v2, float32_t e)
12 {
13 float32_t actual = vmulxs_f32 (v1, v2);
14 if (actual != e)
15 abort ();
16 }
17
18 int
19 main (void)
20 {
21 float32_t v1 = 3.14159265359;
22 float32_t v2 = 1.383894;
23 float32_t v3 = -2.71828;
24 float32_t v4 = -3.4891931;
25
26 test_case (v1, v2, v1 * v2);
27 test_case (0.0, __builtin_huge_valf (), 2.0);
28 test_case (0.0, -__builtin_huge_valf (), -2.0);
29 test_case (-0.0, __builtin_huge_valf (), -2.0);
30 test_case (-0.0, -__builtin_huge_valf (), 2.0);
31
32 return 0;
33 }
34 /* { dg-final { scan-assembler-times "fmulx\[ \t\]+\[sS\]\[0-9\]+, ?\[sS\]\[0-9\]+, ?\[sS\]\[0-9\]+\n" 1 } } */