summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-1.c17
1 files changed, 17 insertions, 0 deletions
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
new file mode 100644
index 00000000000..e4ae8ea0b92
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-dom1-details" } */
+void t(void);
+void q(void);
+void q1(void);
+void
+threading(int a,int b)
+{
+ if (a>b)
+ t();
+ else
+ q();
+ if (a<=b)
+ q1();
+}
+/* We should thread the jump twice and elliminate it. */
+/* { dg-final { scan-tree-dump-times "Threaded" 2 "dom1"} } */