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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [fold-div-1.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-funsafe-math-optimizations -fdump-tree-gimple" } */
3
 
4
float f(float x)
5
{
6
  return x/2 + x/3;
7
}
8
 
9
float g(float x)
10
{
11
  return 2/x + 3/x;
12
}
13
 
14
float h(float x)
15
{
16
  return x/2 - x/3;
17
}
18
 
19
float i(float x)
20
{
21
  return 2/x - 3/x;
22
}
23
 
24
/* f and h should be turned into multiplications,
25
   the divisions in g and i should be grouped together.  */
26
 
27
/* { dg-final { scan-tree-dump-times " \\* " 2 "gimple" } } */
28
/* { dg-final { scan-tree-dump-times " / " 2 "gimple" } } */
29
/* { dg-final { cleanup-tree-dump "gimple" } } */
30
 

powered by: WebSVN 2.1.0

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