diff options
author | Richard Guenther <rguenther@suse.de> | 2008-08-20 08:28:17 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2008-08-20 08:28:17 +0000 |
commit | c4ab2baad2c3e42f8afdeccd96b4bccdefbcb19e (patch) | |
tree | 5cee07e65003f9de125569866be3eeaa6a05ea79 /gcc/testsuite | |
parent | 6c7c31a6a2d638d431c5fa5556896c75c4c80534 (diff) | |
download | gcc-c4ab2baad2c3e42f8afdeccd96b4bccdefbcb19e.tar.gz |
tree-vrp.c (found_in_subgraph): Remove.
2008-08-20 Richard Guenther <rguenther@suse.de>
* tree-vrp.c (found_in_subgraph): Remove.
(live): New global static.
(live_on_edge): New function.
(blocks_visited): Remove.
(register_edge_assert_for_2): Use live_on_edge.
(find_conditional_asserts): Remove code dealing with
found_in_subgraph. Do not walk the CFG.
(find_switch_asserts): Likewise.
(find_assert_locations_1): Renamed from find_assert_locations.
Move finding assert locations for conditional and switch
statements first. Update live bitmap. Do not walk the CFG.
(find_assert_locations): New function.
(insert_range_assertions): Remove entry of CFG walk.
Adjust call to find_assert_locations.
* tree-ssa-pre.c (do_regular_insertion): Ignore critical edges
that only can appear because of fake exit edges but assert we
never try to insert on those.
(fini_pre): Do not remove fake exit edges here...
(execute_pre): ...but here, before committing edge inserts.
* gcc.dg/tree-ssa/pr20701.c: Scan vrp1 dump.
* gcc.dg/tree-ssa/ssa-dom-thread-1.c: Pass -fno-tree-vrp.
* gcc.dg/tree-ssa/ssa-pre-20.c: New testcase.
From-SVN: r139263
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/pr20701.c | 8 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-1.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-20.c | 35 |
4 files changed, 46 insertions, 5 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8c0322aec56..791d51bc7ee 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2008-08-20 Richard Guenther <rguenther@suse.de> + + * gcc.dg/tree-ssa/pr20701.c: Scan vrp1 dump. + * gcc.dg/tree-ssa/ssa-dom-thread-1.c: Pass -fno-tree-vrp. + * gcc.dg/tree-ssa/ssa-pre-20.c: New testcase. + 2008-08-19 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> * gcc.dg/torture/fp-int-convert-float.c: Reenable test on SPU. diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr20701.c b/gcc/testsuite/gcc.dg/tree-ssa/pr20701.c index d20b1022f0b..3ddf48e6f00 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr20701.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr20701.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-vrp2 -fno-early-inlining" } */ +/* { dg-options "-O2 -fdump-tree-vrp1 -fno-early-inlining" } */ typedef struct { int code; @@ -36,6 +36,6 @@ can_combine_p (rtx insn, rtx elt) } /* Target with fno-delete-null-pointer-checks should not fold checks */ -/* { dg-final { scan-tree-dump-times "Folding predicate.*to 0" 1 "vrp2" { target { ! keeps_null_pointer_checks } } } } */ -/* { dg-final { scan-tree-dump-times "Folding predicate.*to 0" 0 "vrp2" { target { keeps_null_pointer_checks } } } } */ -/* { dg-final { cleanup-tree-dump "vrp2" } } */ +/* { dg-final { scan-tree-dump-times "Folding predicate.*to 0" 1 "vrp1" { target { ! keeps_null_pointer_checks } } } } */ +/* { dg-final { scan-tree-dump-times "Folding predicate.*to 0" 0 "vrp1" { target { keeps_null_pointer_checks } } } } */ +/* { dg-final { cleanup-tree-dump "vrp1" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-1.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-1.c index d89394a2698..7671e93ad10 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-1.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-dom1-details" } */ +/* { dg-options "-O2 -fno-tree-vrp -fdump-tree-dom1-details" } */ void t(void); void q(void); void q1(void); diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-20.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-20.c new file mode 100644 index 00000000000..6361b679c44 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-20.c @@ -0,0 +1,35 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-pre-stats" } */ + +double pcheck; + +void foo(int n, int m, int b) +{ + int i, j; + + goto bb18; + +start: + i = 1; + do { + j = 1; + do { + double x = pcheck; + x = x + 1; + pcheck = x; + j = j + 1; + } while (j != m); + i = i + 1; + } while (i != n); + +bb18: + pcheck = 0.0; + goto start; +} + +/* We should have inserted two PHI nodes and the one in the i-loop + should have 0.0 in the argument coming from the bb18 block. */ + +/* { dg-final { scan-tree-dump "New PHIs: 2" "pre" } } */ +/* { dg-final { scan-tree-dump "PHI <.*0\\\.0" "pre" } } */ +/* { dg-final { cleanup-tree-dump "pre" } } */ |