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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* PR tree-optimization/22026
2
   VRP used think that ~[0,0] + ~[0,0] = ~[0,0], which is wrong.  The
3
   same applies to subtraction and unsigned multiplication.  */
4
 
5
/* { dg-do compile } */
6
/* { dg-options "-O2 -fdump-tree-vrp1" } */
7
 
8
int
9
plus (int x, int y)
10
{
11
  if (x != 0)
12
    if (y != 0)
13
      {
14
        int z = x + y;
15
        if (z != 0)
16
          return 1;
17
      }
18
  return 0;
19
}
20
 
21
int
22
minus (int x, int y)
23
{
24
  if (x != 0)
25
    if (y != 0)
26
      {
27
        int z = x - y;
28
        if (z != 0)
29
          return 1;
30
      }
31
  return 0;
32
}
33
 
34
int
35
mult (unsigned x, unsigned y)
36
{
37
  if (x != 0)
38
    if (y != 0)
39
      {
40
        unsigned z = x * y;
41
        if (z != 0)
42
          return 1;
43
      }
44
  return 0;
45
}
46
 
47
/* None of the predicates can be folded in these functions.  */
48
/* { dg-final { scan-tree-dump-times "Folding predicate" 0 "vrp1" } } */
49
/* { dg-final { cleanup-tree-dump "vrp1" } } */

powered by: WebSVN 2.1.0

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