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-ccp-11.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 "-O1 -fdump-tree-optimized" } */
3
 
4
/* Test for CPROP across a DAG. */
5
 
6
int test111 (int param)
7
{
8
  int a, b, c;
9
  if (param) {
10
    a = 3;
11
    b = 2;
12
  }
13
  else {
14
    a = 2;
15
    b = 3;
16
  }
17
  c = a + b;
18
  if (c != 5)
19
    return 2;
20
  return 0;
21
}
22
 
23
int test1111 (int param)
24
{
25
  _Bool a, b, c;
26
  if (param) {
27
    a = 1;
28
    b = 0;
29
  }
30
  else {
31
    a = 0;
32
    b = 1;
33
  }
34
  c = a && b;
35
  if (c)
36
    return 2;
37
  return 0;
38
}
39
 
40
/* All ifs should be eliminated. */
41
/* { dg-final { scan-tree-dump-times "if " 0 "optimized" } } */
42
/* { dg-final { cleanup-tree-dump "optimized" } } */

powered by: WebSVN 2.1.0

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