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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [i386/] [avx2-vpmovsxbw-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-options "-mavx2 -O2" } */
3
/* { dg-require-effective-target avx2 } */
4
 
5
#include "avx2-check.h"
6
 
7
static void
8
compute_movsxbw (char *s, short *r)
9
{
10
  int i;
11
 
12
  for (i = 0; i < 16; i++)
13
    r[i] = s[i];
14
}
15
 
16
static void
17
avx2_test (void)
18
{
19
  union128i_b s;
20
  union256i_w res;
21
  short res_ref[16];
22
 
23
  s.x = _mm_set_epi8 (1, 2, 3, 4, 20, -50, 6, 8, 1, 2, 3, 4, -20, 5, 6, 8);
24
 
25
  res.x = _mm256_cvtepi8_epi16 (s.x);
26
 
27
  compute_movsxbw (s.a, res_ref);
28
 
29
  if (check_union256i_w (res, res_ref))
30
    abort ();
31
}

powered by: WebSVN 2.1.0

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