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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [recip-3.c] - Diff between revs 298 and 338

Only display areas with differences | Details | Blame | View Log

Rev 298 Rev 338
/* { dg-do compile } */
/* { dg-do compile } */
/* { dg-options "-O1 -fno-trapping-math -funsafe-math-optimizations -fdump-tree-recip" } */
/* { dg-options "-O1 -fno-trapping-math -funsafe-math-optimizations -fdump-tree-recip" } */
 
 
double F[2] = { 0.0, 0.0 }, e;
double F[2] = { 0.0, 0.0 }, e;
 
 
/* In this case the optimization is interesting.  */
/* In this case the optimization is interesting.  */
float h ()
float h ()
{
{
        int i;
        int i;
        double E, W, P, d;
        double E, W, P, d;
 
 
        W = 1.1;
        W = 1.1;
        d = 2.*e;
        d = 2.*e;
        E = 1. - d;
        E = 1. - d;
 
 
        for( i=0; i < 2; i++ )
        for( i=0; i < 2; i++ )
                if( d > 0.01 )
                if( d > 0.01 )
                {
                {
                        P = ( W < E ) ? (W - E)/d : (E - W)/d;
                        P = ( W < E ) ? (W - E)/d : (E - W)/d;
                        F[i] += P;
                        F[i] += P;
                }
                }
 
 
        F[0] += E / d;
        F[0] += E / d;
}
}
 
 
/* { dg-final { scan-tree-dump-times " / " 1 "recip" } } */
/* { dg-final { scan-tree-dump-times " / " 1 "recip" } } */
/* { dg-final { cleanup-tree-dump "recip" } } */
/* { 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.