aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/i386/avx512er-vrcp28ss-2.c
blob: 3280879107e9e4a3c97af589b094cb23c323e0a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* { dg-do run } */
/* { dg-require-effective-target avx512er } */
/* { dg-options "-O2 -mavx512er" } */

#include "avx512er-check.h"
#include "avx512f-mask-type.h"
#include "avx512f-helper.h"
#include <math.h>

void static
avx512er_test (void)
{
  union128 src1, src2, res;
  float res_ref[4];
  int i;
  
  for (i = 0; i < 4; i++)
    {
      src1.a[i] = 179.345 - 6.5645 * i;
      src2.a[i] = 179345.006 + 6.5645 * i;
      res_ref[i] = src1.a[i];
    }

  res_ref[0] = 1.0 / src2.a[0];

  res.x = _mm_rcp28_round_ss (src1.x, src2.x, _MM_FROUND_NO_EXC);

  if (checkVf (res.a, res_ref, 4))
    abort ();
}