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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [vrp19.c] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-fwrapv -O1 -ftree-vrp -fdump-tree-vrp1" } */
3
 
4
#include <limits.h>
5
extern void abort ();
6
extern void exit (int);
7
 
8
int f (int a) {
9
        if (a != INT_MIN) {
10
                a = a > 0 ? a : -a;
11
                if (a < 0)
12
                  return 1;
13
        }
14
        return 0;
15
}
16
 
17
int g (int b) {
18
        if (b != INT_MIN) {
19
                b = b > 0 ? b : -b;
20
                if (b >= 0)
21
                  return 0;
22
        }
23
        return 1;
24
}
25
/* { dg-final { scan-tree-dump "Folding predicate a_. < 0 to 0" "vrp1" } } */
26
/* { dg-final { scan-tree-dump "Folding predicate b_. >= 0 to 1" "vrp1" } } */
27
/* { 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.