| 1 |
/* Test the vmuld_laneq_f64 AArch64 SIMD intrinsic. */ |
| 2 |
|
| 3 |
/* { dg-do run } */ |
| 4 |
/* { dg-options " -O3" } */ |
| 5 |
|
| 6 |
#include "arm_neon.h" |
| 7 |
|
| 8 |
extern void abort (void); |
| 9 |
|
| 10 |
int |
| 11 |
main (void) |
| 12 |
{ |
| 13 |
volatile float64_t minus_e, pi, ln2; |
| 14 |
float64_t expected, actual; |
| 15 |
float64x2_t arg2; |
| 16 |
float64_t arr[2]; |
| 17 |
|
| 18 |
pi = 3.14159265359; |
| 19 |
arr[0] = minus_e = -2.71828; |
| 20 |
arr[1] = ln2 = 0.69314718056; |
| 21 |
|
| 22 |
arg2 = vld1q_f64 (arr); |
| 23 |
actual = vmuld_laneq_f64 (pi, arg2, 0); |
| 24 |
expected = pi * minus_e; |
| 25 |
|
| 26 |
if (expected != actual) |
| 27 |
abort (); |
| 28 |
|
| 29 |
expected = pi * ln2; |
| 30 |
actual = vmuld_laneq_f64 (pi, arg2, 1); |
| 31 |
|
| 32 |
if (expected != actual) |
| 33 |
abort (); |
| 34 |
|
| 35 |
return 0; |
| 36 |
} |