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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [recip-4.c] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O1 -fno-trapping-math -funsafe-math-optimizations -fdump-tree-recip" } */
3
 
4
/* based on the test case in pr23109 */
5
 
6
double F[2] = { 0., 0. }, e = 0.;
7
 
8
/* Nope, we cannot prove the optimization is worthwhile in this case.  */
9
void f ()
10
{
11
        int i;
12
        double E, W, P, d;
13
 
14
        W = 1.;
15
        d = 2.*e;
16
        E = 1. - d;
17
 
18
        if( d > 0.01 )
19
        {
20
                P = ( W < E ) ? (W - E)/d : (E - W)/d;
21
                F[i] += P;
22
        }
23
}
24
 
25
/* We also cannot prove the optimization is worthwhile in this case.  */
26
float g ()
27
{
28
        int i;
29
        double E, W, P, d;
30
 
31
        W = 1.;
32
        d = 2.*e;
33
        E = 1. - d;
34
 
35
        if( d > 0.01 )
36
        {
37
                P = ( W < E ) ? (W - E)/d : (E - W)/d;
38
                F[i] += P;
39
        }
40
 
41
        return 1.0 / d;
42
}
43
 
44
/* { dg-final { scan-tree-dump-not "reciptmp" "recip" } } */
45
/* { dg-final { cleanup-tree-dump "recip" } } */

powered by: WebSVN 2.1.0

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