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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [powerpc/] [recip-4.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 691 jeremybenn
/* { dg-do compile { target { powerpc*-*-* } } } */
2
/* { dg-require-effective-target powerpc_fprs } */
3
/* { dg-options "-O3 -ftree-vectorize -mrecip -ffast-math -mcpu=power7 -fno-unroll-loops" } */
4
/* { dg-final { scan-assembler-times "xvrsqrtedp" 1 } } */
5
/* { dg-final { scan-assembler-times "xvmsub.dp" 1 } } */
6
/* { dg-final { scan-assembler-times "xvmuldp" 4 } } */
7
/* { dg-final { scan-assembler-times "xvnmsub.dp" 2 } } */
8
/* { dg-final { scan-assembler-times "xvrsqrtesp" 1 } } */
9
/* { dg-final { scan-assembler-times "xvmsub.sp" 1 } } */
10
/* { dg-final { scan-assembler-times "xvmulsp" 4 } } */
11
/* { dg-final { scan-assembler-times "xvnmsub.sp" 2 } } */
12
 
13
#define SIZE 1024
14
 
15
extern double a_d[SIZE] __attribute__((__aligned__(32)));
16
extern double b_d[SIZE] __attribute__((__aligned__(32)));
17
 
18
void
19
vectorize_rsqrt_d (void)
20
{
21
  int i;
22
 
23
  for (i = 0; i < SIZE; i++)
24
    a_d[i] = 1.0 / __builtin_sqrt (b_d[i]);
25
}
26
 
27
extern float a_f[SIZE] __attribute__((__aligned__(32)));
28
extern float b_f[SIZE] __attribute__((__aligned__(32)));
29
 
30
void
31
vectorize_rsqrt_f (void)
32
{
33
  int i;
34
 
35
  for (i = 0; i < SIZE; i++)
36
    a_f[i] = 1.0f / __builtin_sqrtf (b_f[i]);
37
}

powered by: WebSVN 2.1.0

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