Hi. This fixes the test-case. Reason is that switch statement is not yet expanded as decision tree, which also contains a BB with count == 2000.
Ready for trunk? Thanks, Martin
>From 9845016dbcb4cd3160d49280c8d74b4851477496 Mon Sep 17 00:00:00 2001 From: marxin <mli...@suse.cz> Date: Wed, 18 Oct 2017 13:56:44 +0200 Subject: [PATCH] Fix failing test-case gcc/testsuite/ChangeLog: 2017-10-18 Martin Liska <mli...@suse.cz> * gcc.dg/tree-prof/switch-case-2.c: Scan IPA profile dump file instead of expand. Reason is that switch statement is not yet expanded as decision tree, which also contains a BB with count == 2000. --- gcc/testsuite/gcc.dg/tree-prof/switch-case-2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/testsuite/gcc.dg/tree-prof/switch-case-2.c b/gcc/testsuite/gcc.dg/tree-prof/switch-case-2.c index cfedc9c6b76..9b0dfc2dbb5 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/switch-case-2.c +++ b/gcc/testsuite/gcc.dg/tree-prof/switch-case-2.c @@ -1,4 +1,4 @@ -/* { dg-options "-O2 -fdump-rtl-expand-all" } */ +/* { dg-options "-O2 -fdump-ipa-profile-all" } */ int g; __attribute__((noinline)) void foo (int n) @@ -36,5 +36,5 @@ int main () return 0; } /* autofdo cannot do that precise execution numbers: */ -/* { dg-final-use-not-autofdo { scan-rtl-dump-times ";; basic block\[^\\n\]*count 4000" 2 "expand"} } */ -/* { dg-final-use-not-autofdo { scan-rtl-dump-times ";; basic block\[^\\n\]*count 2000" 1 "expand"} } */ +/* { dg-final-use-not-autofdo { scan-ipa-dump-times ";; basic block\[^\\n\]*count 4000" 2 "profile"} } */ +/* { dg-final-use-not-autofdo { scan-ipa-dump-times ";; basic block\[^\\n\]*count 2000" 1 "profile"} } */ -- 2.14.2