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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [powerpc/] [ppc-pow.c] - Blame information for rev 691

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 691 jeremybenn
/* { dg-do compile { target { { powerpc*-*-* } && { ! powerpc*-apple-darwin* } } } } */
2
/* Check for VSX here, even though we don't use VSX to eliminate SPE, PAIRED
3
   and other ppc floating point varients.  However, we need to also eliminate
4
   Darwin, since it doesn't like -mcpu=power6.  */
5
/* { dg-require-effective-target powerpc_vsx_ok } */
6
/* { dg-options "-O2 -ffast-math -mcpu=power6 -mno-vsx -mno-altivec" } */
7
/* { dg-final { scan-assembler-times "fsqrt" 3 } } */
8
/* { dg-final { scan-assembler-times "fmul" 1 } } */
9
/* { dg-final { scan-assembler-times "bl? pow" 1 } } */
10
/* { dg-final { scan-assembler-times "bl? sqrt" 1 } } */
11
 
12
double
13
do_pow_0_75_default (double a)
14
{
15
  return __builtin_pow (a, 0.75);       /* should generate 2 fsqrts */
16
}
17
 
18
double
19
do_pow_0_5_default (double a)
20
{
21
  return __builtin_pow (a, 0.5);        /* should generate fsqrt */
22
}
23
 
24
#pragma GCC target "no-powerpc-gpopt,no-powerpc-gfxopt"
25
 
26
double
27
do_pow_0_75_nosqrt (double a)
28
{
29
  return __builtin_pow (a, 0.75);       /* should call pow */
30
}
31
 
32
double
33
do_pow_0_5_nosqrt (double a)
34
{
35
  return __builtin_pow (a, 0.5);        /* should call sqrt */
36
}
37
 
38
#pragma GCC reset_options

powered by: WebSVN 2.1.0

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