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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [no-fast-math-vect16.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-require-effective-target vect_float } */
2
 
3
#include <stdarg.h>
4
#include "tree-vect.h"
5
 
6
#define N 16
7
#define DIFF 240
8
 
9
__attribute__ ((noinline))
10
int main1 ()
11
{
12
  int i;
13
  float b[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
14
  float c[N] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
15
  float diff;
16
 
17
  diff = 0;
18
  for (i = 0; i < N; i++) {
19
    diff += (b[i] - c[i]);
20
  }
21
 
22
  /* check results:  */
23
  if (diff != DIFF)
24
    abort ();
25
 
26
  return 0;
27
}
28
 
29
int main (void)
30
{
31
  check_vect ();
32
 
33
  return main1 ();
34
}
35
 
36
/* Requires fast-math.  */
37
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail *-*-* } } } */
38
/* { dg-final { cleanup-tree-dump "vect" } } */

powered by: WebSVN 2.1.0

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