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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [pr23109.c] - Blame information for rev 867

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

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2 -funsafe-math-optimizations -fdump-tree-recip -fdump-tree-lim" } */
3
 
4
double F[2] = { 0., 0. }, e = 0.;
5
 
6
int main()
7
{
8
        int i;
9
        double E, W, P, d;
10
 
11
        /* make sure the program crashes on FP exception */
12
        unsigned short int Mask;
13
 
14
        W = 1.;
15
        d = 2.*e;
16
        E = 1. - d;
17
 
18
        for( i=0; i < 2; i++ )
19
                if( d > 0.01 )
20
                {
21
                        P = ( W < E ) ? (W - E)/d : (E - W)/d;
22
                        F[i] += P;
23
                }
24
 
25
        return 0;
26
}
27
 
28
/* LIM only performs the transformation in the no-trapping-math case.  In
29
   the future we will do it for trapping-math as well in recip, check that
30
   this is not wrongly optimized.  */
31
/* { dg-final { scan-tree-dump-not "reciptmp" "lim" } } */
32
/* { dg-final { scan-tree-dump-not "reciptmp" "recip" } } */
33
/* { dg-final { cleanup-tree-dump "recip" } } */
34
/* { dg-final { cleanup-tree-dump "lim" } } */
35
 

powered by: WebSVN 2.1.0

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