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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [i386/] [avx-set-v4df-4.c] - Blame information for rev 328

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 318 jeremybenn
/* { dg-do run } */
2
/* { dg-require-effective-target avx } */
3
/* { dg-options "-O2 -mavx" } */
4
 
5
#include "avx-check.h"
6
 
7
static __m256d
8
__attribute__((noinline))
9
foo (double x, int i)
10
{
11
  switch (i)
12
    {
13
    case 3:
14
      return _mm256_set_pd (x, 0, 0, 0);
15
    case 2:
16
      return _mm256_set_pd (0, x, 0, 0);
17
    case 1:
18
      return _mm256_set_pd (0, 0, x, 0);
19
    case 0:
20
      return _mm256_set_pd (0, 0, 0, x);
21
    default:
22
      abort ();
23
    }
24
}
25
 
26
static void
27
avx_test (void)
28
{
29
  double e = -3.234;
30
  double v[4];
31
  union256d u;
32
  int i, j;
33
 
34
  for (i = 0; i < ARRAY_SIZE (v); i++)
35
    {
36
      for (j = 0; j < ARRAY_SIZE (v); j++)
37
        v[j] = 0;
38
      v[i] = e;
39
      u.x = foo (e, i);
40
      if (check_union256d (u, v))
41
        abort ();
42
    }
43
}

powered by: WebSVN 2.1.0

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