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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [ssa-fre-8.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O -fno-tree-sra -fdump-tree-fre-details" } */
3
#if (__SIZEOF_INT__ == __SIZEOF_FLOAT__)
4
typedef int intflt;
5
#elif (__SIZEOF_LONG__ == __SIZEOF_FLOAT__)
6
typedef long intflt;
7
#else
8
#error Add target support here for type that will union float size
9
#endif
10
union U {
11
  intflt i;
12
  float f;
13
};
14
intflt foo(int i, int b)
15
{
16
  union U u;
17
  if (b)
18
    {
19
      i = i << 2;
20
      u.i = i;
21
      return u.f;
22
    }
23
  else
24
    {
25
      i = i << 2;
26
      u.i = i;
27
      return u.f;
28
    }
29
}
30
 
31
/* { dg-final { scan-tree-dump-times "Replaced u.f with pretmp" 2 "fre" } } */
32
/* { dg-final { scan-tree-dump-times "Inserted pretmp" 2 "fre" } } */
33
/* { dg-final { cleanup-tree-dump "fre" } } */

powered by: WebSVN 2.1.0

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