OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [i386/] [avx2-vpunpckhqdq-2.c] - Blame information for rev 691

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 691 jeremybenn
/* { dg-do run } */
2
/* { dg-require-effective-target avx2 } */
3
/* { dg-options "-O2 -mavx2" } */
4
 
5
#include <string.h>
6
#include "avx2-check.h"
7
 
8
#define N 0x5
9
 
10
static void
11
compute_punpckhqdq256 (long long int *s1, long long int *s2, long long int *r)
12
{
13
  r[0] = s1[1];
14
  r[1] = s2[1];
15
  r[2] = s1[3];
16
  r[3] = s2[3];
17
}
18
 
19
void static
20
avx2_test (void)
21
{
22
  union256i_q s1, s2, res;
23
  long long int res_ref[4];
24
  int i, j;
25
  int fail = 0;
26
 
27
  for (i = 0; i < 10; i++)
28
    {
29
      for (j = 0; j < 4; j++)
30
        {
31
          s1.a[j] = j * i;
32
          s2.a[j] = j + 20;
33
        }
34
 
35
      res.x = _mm256_unpackhi_epi64 (s1.x, s2.x);
36
 
37
      compute_punpckhqdq256 (s1.a, s2.a, res_ref);
38
 
39
      fail += check_union256i_q (res, res_ref);
40
    }
41
 
42
  if (fail != 0)
43
    abort ();
44
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.