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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [i386/] [avx256-unaligned-load-6.c] - Blame information for rev 704

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

Line No. Rev Author Line
1 691 jeremybenn
/* { dg-do run } */
2
/* { dg-require-effective-target avx } */
3
/* { dg-options "-O3 -dp -mavx -mavx256-split-unaligned-load" } */
4
 
5
#include "avx-check.h"
6
 
7
#define N 4
8
 
9
double a[N+3] = { -1, -1, -1, 24.43, 68.346, 43.35, 546.46 };
10
double b[N];
11
double c[N];
12
 
13
void
14
foo (void)
15
{
16
  int i;
17
 
18
  for (i = 0; i < N; i++)
19
    b[i] = a[i+3] * 2;
20
}
21
 
22
__attribute__ ((noinline))
23
double
24
bar (double x)
25
{
26
  return x * 2;
27
}
28
 
29
void
30
avx_test (void)
31
{
32
  int i;
33
 
34
  foo ();
35
 
36
  for (i = 0; i < N; i++)
37
    c[i] = bar (a[i+3]);
38
 
39
  for (i = 0; i < N; i++)
40
    if (b[i] != c[i])
41
      abort ();
42
}

powered by: WebSVN 2.1.0

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