Beispiel #1
0
int
main (void)
{
  float64x1_t arg1;
  float64x1_t arg2;
  float64x1_t arg3;

  float64_t expected;
  float64_t actual;

  arg1 = vcreate_f64 (0x3fe730af8db9e6f7ULL);
  arg2 = vcreate_f64 (0x3fe6b78680fa29ceULL);
  arg3 = vcreate_f64 (0x3feea3cbf921fbe0ULL);

  INHIB_OPT (arg1);
  INHIB_OPT (arg2);
  INHIB_OPT (arg3);

  expected = 4.4964705746355915e-2;
  actual = vget_lane_f64 (vfms_f64 (arg1, arg2, arg3), 0);

  if (__builtin_fabs (expected - actual) > EPS)
    abort ();

  return 0;
}
Beispiel #2
0
float64_t test_vget_lane_f64(float64x1_t a1) {
  // CHECK: test_vget_lane_f64
  // why isn't 1 allowed as second argument?
  return vget_lane_f64(a1, 0);
  // CHECK: extractelement {{.*}} i32 0
  // CHECK-NEXT: ret
}
Beispiel #3
0
int
main (void)
{
  volatile float64_t minus_e, pi;
  float64_t expected, actual;

  pi = 3.14159265359;
  minus_e = -2.71828;

  expected = pi * minus_e;

  actual = vget_lane_f64 (vmul_n_f64 ((float64x1_t) { pi },
                                       minus_e), 0);
  if (expected != actual)
    abort ();

  return 0;
}
Beispiel #4
0
// CHECK-LABEL: test_vget_lane_f64:
float64_t test_vget_lane_f64(float64x1_t v) {
  return vget_lane_f64(v, 0);
// CHECK-NEXT: ret
}