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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [i386/] [avx2-vinserti128-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
void static
9
avx2_test (void)
10
{
11
  union256i_q s1, res;
12
  union128i_q s2;
13
  long long int res_ref[4];
14
  int j;
15
 
16
  for (j = 0; j < 4; j++)
17
    s1.a[j] = j * j;
18
 
19
  for (j = 0; j < 2; j++)
20
    s2.a[j] = j * j * j;
21
 
22
  res.x = _mm256_inserti128_si256 (s1.x, s2.x, 0);
23
 
24
  memcpy (res_ref, s1.a, 32);
25
  memcpy (res_ref, s2.a, 16);
26
 
27
  if (check_union256i_q (res, res_ref))
28
    abort ();
29
 
30
  res.x = _mm256_inserti128_si256 (s1.x, s2.x, 1);
31
 
32
  memcpy (res_ref, s1.a, 32);
33
  memcpy (res_ref + 2, s2.a, 16);
34
 
35
  if (check_union256i_q (res, res_ref))
36
    abort ();
37
}

powered by: WebSVN 2.1.0

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