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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [fast-math-vect-reduc-8.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-do compile } */
2
/* { dg-require-effective-target vect_float } */
3
 
4
#include "tree-vect.h"
5
 
6
extern float x[128] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
7
extern float y[128] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
8
extern float z[128] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
9
 
10
float f (unsigned n)
11
{
12
  float ret = 0.0;
13
  unsigned i;
14
  for (i = 0; i < n; i++)
15
    {
16
      float diff = x[i] - y[i];
17
      ret -= diff * diff * z[i];
18
    }
19
  return ret;
20
}
21
 
22
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
23
/* { 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.