aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2011-06-16 15:52:00 -0600
committerJeff Law <law@gcc.gnu.org>2011-06-16 15:52:00 -0600
commit361b51c08030935d78a64228551afaa65106b773 (patch)
tree3d01a6665a2ef3a33f6ed1eb847b76b1948a165d /gcc/testsuite/gcc.dg
parent67a7c837e95e85c607e55d2b72bfd4da43f0dd16 (diff)
downloadgcc-361b51c08030935d78a64228551afaa65106b773.zip
gcc-361b51c08030935d78a64228551afaa65106b773.tar.gz
gcc-361b51c08030935d78a64228551afaa65106b773.tar.bz2
tree-ssa-threadupdate.c (struct redirection_data): New field intermediate_edge.
* tree-ssa-threadupdate.c (struct redirection_data): New field intermediate_edge. (THREAD_TARGET2): Define. (redirection_data_eq): Also check that the intermediate edge is equal. (lookup_redirection_data): Drop useless argument. Extract the outgoing_edge and intermediate edge from E. Callers updated. (copy_phi_args, update_destination_phis): New functions. (fix_duplicate_block_edges): Likewise. (create_edge_and_update_destination_phis): Duplicate all the edges hung off e->aux. Use copy_phi_args. (create_duplicates): Use fix_duplicate_block_edges. (fixup_template_block): Likewise. (redirect_edges): If necessary, redirect the joiner block's incoming edge to the duplicate of the joiner block. (thread_block): Don't muck up loops when threading through a joiner block. (thread_through_loop_header): Handle threading through a joiner block. (mark_threaded_blocks, register_jump_thread): Likewise. * tree-flow.h (register_jump_thread): Add new argument. Callers updated. * tree-ssa-threadedge.c (phi_args_equal_on_edges): New function. (thread_across_edge): Handle threading through a joiner block. * gcc.dg/builtin-object-size-1.c: Update to handle changes from improved jump threading. * gcc.dg/builtin-object-size-2.c: Likewise. * gcc.dg/tree-ssa/20030728-1.c: Likewise. From-SVN: r175114
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r--gcc/testsuite/gcc.dg/builtin-object-size-1.c6
-rw-r--r--gcc/testsuite/gcc.dg/builtin-object-size-2.c6
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/20030728-1.c6
3 files changed, 14 insertions, 4 deletions
diff --git a/gcc/testsuite/gcc.dg/builtin-object-size-1.c b/gcc/testsuite/gcc.dg/builtin-object-size-1.c
index 404b711..13ebeb1 100644
--- a/gcc/testsuite/gcc.dg/builtin-object-size-1.c
+++ b/gcc/testsuite/gcc.dg/builtin-object-size-1.c
@@ -64,7 +64,11 @@ test1 (void *q, int x)
r = malloc (30);
else
r = calloc (2, 16);
- if (__builtin_object_size (r, 0) != 2 * 16)
+ /* We may duplicate this test onto the two exit paths. On one path
+ the size will be 32, the other it will be 30. If we don't duplicate
+ this test, then the size will be 32. */
+ if (__builtin_object_size (r, 0) != 2 * 16
+ && __builtin_object_size (r, 0) != 30)
abort ();
if (x < 20)
r = malloc (30);
diff --git a/gcc/testsuite/gcc.dg/builtin-object-size-2.c b/gcc/testsuite/gcc.dg/builtin-object-size-2.c
index 34f1675..21aff5a 100644
--- a/gcc/testsuite/gcc.dg/builtin-object-size-2.c
+++ b/gcc/testsuite/gcc.dg/builtin-object-size-2.c
@@ -60,7 +60,11 @@ test1 (void *q, int x)
r = malloc (30);
else
r = calloc (2, 16);
- if (__builtin_object_size (r, 1) != 2 * 16)
+ /* We may duplicate this test onto the two exit paths. On one path
+ the size will be 32, the other it will be 30. If we don't duplicate
+ this test, then the size will be 32. */
+ if (__builtin_object_size (r, 1) != 2 * 16
+ && __builtin_object_size (r, 1) != 30)
abort ();
if (x < 20)
r = malloc (30);
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030728-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20030728-1.c
index f884736..93a7979 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/20030728-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/20030728-1.c
@@ -41,7 +41,9 @@ objects_must_conflict_p (t1, t2)
return foo (t2 ? get_alias_set (t2) : 0);
}
-/* There should be two assignments of variables to the value zero. */
-/* { dg-final { scan-rtl-dump-times "PART.. = 0" 2 "expand"} } */
+/* There should be one assignment of variables to the value zero. There
+ used to be two assignments, but improvements in threading allowed the
+ second to be propagated into all its uses and eliminated. */
+/* { dg-final { scan-rtl-dump-times "PART.. = 0" 1 "expand"} } */
/* { dg-final { cleanup-rtl-dump "expand" } } */