summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-prof
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2005-08-03 13:34:49 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2005-08-03 13:34:49 +0000
commitfb54ef7ccb98fc1c10a1662869dab0a3ab52a35a (patch)
tree1a926b9bc202452ffb1c89f9db59da5c72ea357e /gcc/testsuite/gcc.dg/tree-prof
parent136305f40bec39c518bec801bcb454cf483005f3 (diff)
downloadgcc-fb54ef7ccb98fc1c10a1662869dab0a3ab52a35a.tar.gz
* cfgloop.h (DLTHE_FLAG_COMPLETTE_PEEL): New flag.
* cfgloopmanip.c (duplicate_loop_to_header_edge): Special case profile updating for complette unrolling. * loop-unroll.c (peel_loop_completely): Use it. * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Likewise. (tree_unroll_loops_completely): Disable code growing unrolling of cold loops. * update-conroll.c: New testcase. * update-conroll-2.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102687 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-prof')
-rw-r--r--gcc/testsuite/gcc.dg/tree-prof/update-cunroll-2.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-prof/update-cunroll-2.c b/gcc/testsuite/gcc.dg/tree-prof/update-cunroll-2.c
new file mode 100644
index 00000000000..d559b924535
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-prof/update-cunroll-2.c
@@ -0,0 +1,21 @@
+
+/* { dg-options "-O2 -fdump-tree-optimized-blocks" } */
+int a[8];
+__attribute__ ((noinline))
+int t()
+{
+ int i;
+ for (i = 0; i < 3; i++)
+ if (a[i])
+ break;
+ return i;
+}
+main ()
+{
+ int i;
+ for (i = 0; i < 1000; i++)
+ t ();
+ return 0;
+}
+/* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized"} } */
+/* { dg-final-use { cleanup-tree-dump "optimized" } } */