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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [vect-120.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
/* { dg-require-effective-target vect_shift } */
4
/* { dg-require-effective-target vect_floatint_cvt } */
5
 
6
static inline float
7
i2f(int x)
8
{
9
  union { float f; int i; } tmp;
10
  tmp.i=x;
11
  return tmp.f;
12
}
13
static inline float
14
vect_ldexpf(float x, int n)
15
{
16
  n = (n+0x7f)<<23;
17
  return x * i2f(n);
18
}
19
 
20
float __attribute__ ((aligned(16))) a[1024];
21
float __attribute__ ((aligned(16))) b[1024];
22
float __attribute__ ((aligned(16))) c[1024];
23
 
24
void
25
tV()
26
{
27
  int i;
28
  for (i=0; i!=1024; ++i)
29
    {
30
      float z = a[i];
31
      int n = b[i];
32
      c[i] = vect_ldexpf(z,n);
33
    }
34
}
35
 
36
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
37
/* { 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.