aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2011-04-29 21:46:17 -0600
committerJeff Law <law@gcc.gnu.org>2011-04-29 21:46:17 -0600
commita6545a3d943012f72ba5d0ed49471412b0e308e8 (patch)
tree381c4e0ec54f6f626634109347b305ca4b62925b /gcc
parent8dc7645fcbc0eaa1110e47430f65f4a2fcad1d29 (diff)
downloadgcc-a6545a3d943012f72ba5d0ed49471412b0e308e8.zip
gcc-a6545a3d943012f72ba5d0ed49471412b0e308e8.tar.gz
gcc-a6545a3d943012f72ba5d0ed49471412b0e308e8.tar.bz2
tree-ssa-threadedge.c (thread_across_edge): Add missing return.
* tree-ssa-threadedge.c (thread_across_edge): Add missing return. * gcc.dg/tree-ssa/ssa-dom-thread-4.c: New test. From-SVN: r173206
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-4.c63
-rw-r--r--gcc/tree-ssa-threadedge.c1
4 files changed, 72 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index fd62003..dd45a79 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2011-04-29 Jeff Law <law@redhat.com>
+
+ * tree-ssa-threadedge.c (thread_across_edge): Add missing return.
+
2011-04-29 Martin Jambor <mjambor@suse.cz>
* cgraph.h (cgraph_postorder): Remove declaration.
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 873e368..2ef4546 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2011-04-29 Jeff Law <law@redhat.com>
+
+ * gcc.dg/tree-ssa/ssa-dom-thread-4.c: New test.
+
2011-04-29 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/48606
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-4.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-4.c
new file mode 100644
index 0000000..e841429
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-4.c
@@ -0,0 +1,63 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-dom1-details" } */
+struct bitmap_head_def;
+typedef struct bitmap_head_def *bitmap;
+typedef const struct bitmap_head_def *const_bitmap;
+typedef unsigned long BITMAP_WORD;
+typedef struct bitmap_element_def
+{
+ struct bitmap_element_def *next;
+ unsigned int indx;
+} bitmap_element;
+
+
+
+
+
+
+
+
+
+unsigned char
+bitmap_ior_and_compl (bitmap dst, const_bitmap a, const_bitmap b,
+ const_bitmap kill)
+{
+ unsigned char changed = 0;
+
+ bitmap_element *dst_elt;
+ const bitmap_element *a_elt, *b_elt, *kill_elt, *dst_prev;
+
+ while (a_elt || b_elt)
+ {
+ unsigned char new_element = 0;
+
+ if (b_elt)
+ while (kill_elt && kill_elt->indx < b_elt->indx)
+ kill_elt = kill_elt->next;
+
+ if (b_elt && kill_elt && kill_elt->indx == b_elt->indx
+ && (!a_elt || a_elt->indx >= b_elt->indx))
+ {
+ bitmap_element tmp_elt;
+ unsigned ix;
+
+ BITMAP_WORD ior = 0;
+
+ changed = bitmap_elt_ior (dst, dst_elt, dst_prev,
+ a_elt, &tmp_elt, changed);
+
+ }
+
+ }
+
+
+ return changed;
+}
+/* The block starting the second conditional has 3 incoming edges,
+ we should thread all three, but due to a bug in the threading
+ code we missed the edge when the first conditional is false
+ (b_elt is zero, which means the second conditional is always
+ zero. */
+/* { dg-final { scan-tree-dump-times "Threaded" 3 "dom1"} } */
+/* { dg-final { cleanup-tree-dump "dom1" } } */
+
diff --git a/gcc/tree-ssa-threadedge.c b/gcc/tree-ssa-threadedge.c
index 1fee9bf..24e63977c 100644
--- a/gcc/tree-ssa-threadedge.c
+++ b/gcc/tree-ssa-threadedge.c
@@ -771,6 +771,7 @@ thread_across_edge (gimple dummy_cond,
remove_temporary_equivalences (stack);
register_jump_thread (e, taken_edge);
+ return;
}
}