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-3.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
double F[2] = { 0.0, 0.0 }, e;
5
 
6
/* In this case the optimization is interesting.  */
7
float h ()
8
{
9
        int i;
10
        double E, W, P, d;
11
 
12
        W = 1.1;
13
        d = 2.*e;
14
        E = 1. - d;
15
 
16
        for( i=0; i < 2; i++ )
17
                if( d > 0.01 )
18
                {
19
                        P = ( W < E ) ? (W - E)/d : (E - W)/d;
20
                        F[i] += P;
21
                }
22
 
23
        F[0] += E / d;
24
}
25
 
26
/* { dg-final { scan-tree-dump-times " / " 1 "recip" } } */
27
/* { 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.