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/] [vrp23.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2 -fdump-tree-vrp1-details" } */
3
 
4
blah (int code1, int code2)
5
{
6
  int i;
7
  int n_sets;
8
 
9
  n_sets = (int) (code1 == 32);
10
  if (code2 == 64) goto L2; else goto L3;
11
 
12
L2:
13
  aa ();
14
 
15
L3:
16
  if (n_sets > 1) goto L4; else goto L10;
17
 
18
L4:
19
  aos ();
20
  i = 0;
21
  goto L24;
22
 
23
L10:
24
  if (n_sets > 0) goto L25; else goto L8;
25
 
26
L25:
27
  i = 0;
28
 
29
L24:
30
  aob ();
31
  i = i + 1;
32
  if (i < n_sets) goto L24; else goto L8;
33
 
34
L8:
35
  return;
36
}
37
 
38
 
39
 
40
/* The n_sets > 0 test can be simplified into n_sets == 1 since the
41
   only way to reach the test is when n_sets <= 1, and the only value
42
   which satisfies both conditions is n_sets == 1.  */
43
/* { dg-final { scan-tree-dump-times "Simplified relational" 1 "vrp1" } } */
44
/* { dg-final { cleanup-tree-dump "vrp1" } } */
45
 

powered by: WebSVN 2.1.0

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