From: dehao Date: Wed, 9 May 2012 07:10:45 +0000 (+0000) Subject: gcc/testsuite X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=28a0c749e036d0957d40deb2f50e8a6a67e9f319;p=thirdparty%2Fgcc.git gcc/testsuite * gcc.dg/predict-1.c: Remove the replicated text in this test. * gcc.dg/predict-2.c: Likewise. * gcc.dg/predict-3.c: Likewise. * gcc.dg/predict-4.c: Likewise. * gcc.dg/predict-5.c: Likewise. * gcc.dg/predict-6.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187315 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4d154702361c..77f56a5f6445 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -136,15 +136,15 @@ 2012-05-08 Dehao Chen - * predict.c (find_qualified_ssa_name): New - (find_ssa_name_in_expr): New - (find_ssa_name_in_assign_stmt): New - (is_comparison_with_loop_invariant_p): New - (is_bound_expr_similar): New - (predict_iv_comparison): New + * predict.c (find_qualified_ssa_name): New. + (find_ssa_name_in_expr): New. + (find_ssa_name_in_assign_stmt): New. + (is_comparison_with_loop_invariant_p): New. + (is_bound_expr_similar): New. + (predict_iv_comparison): New. (predict_loops): Add heuristic for loop-nested branches that compare an induction variable to a loop bound variable. - * predict.def (PRED_LOOP_IV_COMPARE): New macro + * predict.def (PRED_LOOP_IV_COMPARE): New macro. 2012-05-08 Uros Bizjak diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 88e4cc887a0c..5a09dc1d6eea 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2012-05-09 Dehao Chen + + * gcc.dg/predict-1.c: Remove the replicated text in this test. + * gcc.dg/predict-2.c: Likewise. + * gcc.dg/predict-3.c: Likewise. + * gcc.dg/predict-4.c: Likewise. + * gcc.dg/predict-5.c: Likewise. + * gcc.dg/predict-6.c: Likewise. + 2012-05-08 Hans-Peter Nilsson PR target/53272 diff --git a/gcc/testsuite/gcc.dg/predict-1.c b/gcc/testsuite/gcc.dg/predict-1.c index e7f4618a0f7b..5c9a5a930a56 100644 --- a/gcc/testsuite/gcc.dg/predict-1.c +++ b/gcc/testsuite/gcc.dg/predict-1.c @@ -25,30 +25,3 @@ void foo (int bound) /* { dg-final { scan-tree-dump-times "loop iv compare heuristics: 0.0%" 5 "profile_estimate"} } */ /* { dg-final { cleanup-tree-dump "profile_estimate" } } */ -/* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-profile_estimate" } */ - -extern int global; - -int bar(int); - -void foo (int bound) -{ - int i, ret = 0; - for (i = 0; i < bound; i++) - { - if (i > bound) - global += bar (i); - if (i >= bound + 2) - global += bar (i); - if (i > bound - 2) - global += bar (i); - if (i + 2 > bound) - global += bar (i); - if (i == 10) - global += bar (i); - } -} - -/* { dg-final { scan-tree-dump-times "loop iv compare heuristics: 0.0%" 5 "profile_estimate"} } */ -/* { dg-final { cleanup-tree-dump "profile_estimate" } } */ diff --git a/gcc/testsuite/gcc.dg/predict-2.c b/gcc/testsuite/gcc.dg/predict-2.c index 44895b7cf642..55ca1d0bc7eb 100644 --- a/gcc/testsuite/gcc.dg/predict-2.c +++ b/gcc/testsuite/gcc.dg/predict-2.c @@ -25,30 +25,3 @@ void foo (int base, int bound) /* { dg-final { scan-tree-dump-not "loop iv compare heuristics" "profile_estimate"} } */ /* { dg-final { cleanup-tree-dump "profile_estimate" } } */ -/* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-profile_estimate" } */ - -extern int global; - -int bar(int); - -void foo (int base, int bound) -{ - int i, ret = 0; - for (i = base; i < bound; i++) - { - if (i > bound * bound) - global += bar (i); - if (i > bound + 10) - global += bar (i); - if (i <= bound + 10) - global += bar (i); - if (i > base + 10) - global += bar (i); - if (i < base - 10) - global += bar (i); - } -} - -/* { dg-final { scan-tree-dump-not "loop iv compare heuristics" "profile_estimate"} } */ -/* { dg-final { cleanup-tree-dump "profile_estimate" } } */ diff --git a/gcc/testsuite/gcc.dg/predict-3.c b/gcc/testsuite/gcc.dg/predict-3.c index afaf5400ffe5..8881bde30b6f 100644 --- a/gcc/testsuite/gcc.dg/predict-3.c +++ b/gcc/testsuite/gcc.dg/predict-3.c @@ -23,28 +23,3 @@ void foo (int bound) /* { dg-final { scan-tree-dump-times "loop iv compare heuristics: 100.0%" 4 "profile_estimate"} } */ /* { dg-final { cleanup-tree-dump "profile_estimate" } } */ -/* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-profile_estimate" } */ - -extern int global; - -int bar(int); - -void foo (int bound) -{ - int i, ret = 0; - for (i = 0; i <= bound; i++) - { - if (i < bound - 2) - global += bar (i); - if (i <= bound) - global += bar (i); - if (i + 1 < bound) - global += bar (i); - if (i != bound) - global += bar (i); - } -} - -/* { dg-final { scan-tree-dump-times "loop iv compare heuristics: 100.0%" 4 "profile_estimate"} } */ -/* { dg-final { cleanup-tree-dump "profile_estimate" } } */ diff --git a/gcc/testsuite/gcc.dg/predict-4.c b/gcc/testsuite/gcc.dg/predict-4.c index f575b98de5f9..17a50b9ead51 100644 --- a/gcc/testsuite/gcc.dg/predict-4.c +++ b/gcc/testsuite/gcc.dg/predict-4.c @@ -17,22 +17,3 @@ void foo (int bound) /* { dg-final { scan-tree-dump "loop iv compare heuristics: 50.0%" "profile_estimate"} } */ /* { dg-final { cleanup-tree-dump "profile_estimate" } } */ -/* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-profile_estimate" } */ - -extern int global; - -int bar(int); - -void foo (int bound) -{ - int i, ret = 0; - for (i = 0; i < 10; i++) - { - if (i < 5) - global += bar (i); - } -} - -/* { dg-final { scan-tree-dump "loop iv compare heuristics: 50.0%" "profile_estimate"} } */ -/* { dg-final { cleanup-tree-dump "profile_estimate" } } */ diff --git a/gcc/testsuite/gcc.dg/predict-5.c b/gcc/testsuite/gcc.dg/predict-5.c index f6e70d325400..f2fe339b6cbc 100644 --- a/gcc/testsuite/gcc.dg/predict-5.c +++ b/gcc/testsuite/gcc.dg/predict-5.c @@ -23,28 +23,3 @@ void foo (int base, int bound) /* { dg-final { scan-tree-dump-times "loop iv compare heuristics: 100.0%" 4 "profile_estimate"} } */ /* { dg-final { cleanup-tree-dump "profile_estimate" } } */ -/* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-profile_estimate" } */ - -extern int global; - -int bar (int); - -void foo (int base, int bound) -{ - int i, ret = 0; - for (i = base; i <= bound; i++) - { - if (i > base) - global += bar (i); - if (i > base + 1) - global += bar (i); - if (i >= base + 3) - global += bar (i); - if (i - 2 >= base) - global += bar (i); - } -} - -/* { dg-final { scan-tree-dump-times "loop iv compare heuristics: 100.0%" 4 "profile_estimate"} } */ -/* { dg-final { cleanup-tree-dump "profile_estimate" } } */ diff --git a/gcc/testsuite/gcc.dg/predict-6.c b/gcc/testsuite/gcc.dg/predict-6.c index 552fd0743f3b..bf769fd2cf8e 100644 --- a/gcc/testsuite/gcc.dg/predict-6.c +++ b/gcc/testsuite/gcc.dg/predict-6.c @@ -23,28 +23,3 @@ void foo (int base, int bound) /* { dg-final { scan-tree-dump-times "loop iv compare heuristics: 0.0%" 4 "profile_estimate"} } */ /* { dg-final { cleanup-tree-dump "profile_estimate" } } */ -/* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-profile_estimate" } */ - -extern int global; - -int bar (int); - -void foo (int base, int bound) -{ - int i, ret = 0; - for (i = base; i <= bound; i++) - { - if (i < base) - global += bar (i); - if (i < base + 1) - global += bar (i); - if (i <= base + 3) - global += bar (i); - if (i - 1 < base) - global += bar (i); - } -} - -/* { dg-final { scan-tree-dump-times "loop iv compare heuristics: 0.0%" 4 "profile_estimate"} } */ -/* { dg-final { cleanup-tree-dump "profile_estimate" } } */