From: Andi Kleen Date: Thu, 14 Jul 2016 02:14:56 +0000 (+0000) Subject: Some fixes for profile test cases for autofdo X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f63ba78ce6d50bf627dd18018179eb03bf89716f;p=gcc.git Some fixes for profile test cases for autofdo This fixes some basic issues with the profile test cases with autofdo. - Disable checking for value transformations that autofdo does not support. - Disable checking for fixed hit counts which autofdo does not support - Enable dumping of afdo log file and check right log file. - Increase run time of test cases to 1M iterations because autofdo needs a few samples to make sense of a program. The test case don't run noticeable slower with that. There are still failures unfortunately, especially the indirect call transformations do not trigger because autofdo thinks they are not hot. This can be addressed later. gcc/testsuite/: 2016-07-13 Andi Kleen * g++.dg/tree-prof/indir-call-prof.C: Basic fixes for autofdo. * g++.dg/tree-prof/morefunc.C: Dito. * g++.dg/tree-prof/pr35545.C: Dito. * g++.dg/tree-prof/reorder.C: Dito. * gcc.dg/tree-prof/20050826-2.c: Dito. * gcc.dg/tree-prof/cmpsf-1.c: Dito. * gcc.dg/tree-prof/cold_partition_label.c: Dito. * gcc.dg/tree-prof/ic-misattribution-1.c: Dito. * gcc.dg/tree-prof/indir-call-prof.c: Dito. * gcc.dg/tree-prof/inliner-1.c: Dito. * gcc.dg/tree-prof/merge_block.c: Dito. * gcc.dg/tree-prof/stringop-1.c: Dito. * gcc.dg/tree-prof/stringop-2.c: Dito. * gcc.dg/tree-prof/switch-case-1.c: Dito. * gcc.dg/tree-prof/switch-case-2.c: Dito. * gcc.dg/tree-prof/time-profiler-1.c: Dito. * gcc.dg/tree-prof/time-profiler-2.c: Dito. * gcc.dg/tree-prof/update-loopch.c: Dito. * gcc.dg/tree-prof/val-prof-1.c: Dito. * gcc.dg/tree-prof/val-prof-2.c: Dito. * gcc.dg/tree-prof/val-prof-3.c: Dito. * gcc.dg/tree-prof/val-prof-4.c: Dito. * gcc.dg/tree-prof/val-prof-5.c: Dito. * gcc.dg/tree-prof/val-prof-6.c: Dito. * gcc.dg/tree-prof/val-prof-7.c: Dito. From-SVN: r238325 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 60c7a9d442f..6119421f7b4 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,31 @@ +2016-07-13 Andi Kleen + + * g++.dg/tree-prof/indir-call-prof.C: Basic fixes for autofdo. + * g++.dg/tree-prof/morefunc.C: Dito. + * g++.dg/tree-prof/pr35545.C: Dito. + * g++.dg/tree-prof/reorder.C: Dito. + * gcc.dg/tree-prof/20050826-2.c: Dito. + * gcc.dg/tree-prof/cmpsf-1.c: Dito. + * gcc.dg/tree-prof/cold_partition_label.c: Dito. + * gcc.dg/tree-prof/ic-misattribution-1.c: Dito. + * gcc.dg/tree-prof/indir-call-prof.c: Dito. + * gcc.dg/tree-prof/inliner-1.c: Dito. + * gcc.dg/tree-prof/merge_block.c: Dito. + * gcc.dg/tree-prof/stringop-1.c: Dito. + * gcc.dg/tree-prof/stringop-2.c: Dito. + * gcc.dg/tree-prof/switch-case-1.c: Dito. + * gcc.dg/tree-prof/switch-case-2.c: Dito. + * gcc.dg/tree-prof/time-profiler-1.c: Dito. + * gcc.dg/tree-prof/time-profiler-2.c: Dito. + * gcc.dg/tree-prof/update-loopch.c: Dito. + * gcc.dg/tree-prof/val-prof-1.c: Dito. + * gcc.dg/tree-prof/val-prof-2.c: Dito. + * gcc.dg/tree-prof/val-prof-3.c: Dito. + * gcc.dg/tree-prof/val-prof-4.c: Dito. + * gcc.dg/tree-prof/val-prof-5.c: Dito. + * gcc.dg/tree-prof/val-prof-6.c: Dito. + * gcc.dg/tree-prof/val-prof-7.c: Dito. + 2016-07-13 Andi Kleen * lib/profopt.exp (profopt-execute): Remove .imports files. diff --git a/gcc/testsuite/g++.dg/tree-prof/indir-call-prof.C b/gcc/testsuite/g++.dg/tree-prof/indir-call-prof.C index a03edc273c7..3134c3c0643 100644 --- a/gcc/testsuite/g++.dg/tree-prof/indir-call-prof.C +++ b/gcc/testsuite/g++.dg/tree-prof/indir-call-prof.C @@ -1,4 +1,4 @@ -/* { dg-options "-O2 -fdump-tree-optimized -fdump-ipa-profile" } */ +/* { dg-options "-O2 -fdump-tree-optimized -fdump-ipa-profile -fdump-ipa-afdo" } */ struct A { A () {} @@ -24,14 +24,20 @@ main (void) A* p; - p = (A *)wrap ((void *)&a); - p->AA (); + int i; - p = (B *)wrap ((void *)&b); - p->AA (); + for (i = 0; i < 1000000; i++) + { + p = (A *)wrap ((void *)&a); + p->AA (); + + p = (B *)wrap ((void *)&b); + p->AA (); + } return 0; } -/* { dg-final-use { scan-ipa-dump "Indirect call -> direct call.* AA transformation on insn" "profile" } } */ -/* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized" } } */ +/* { dg-final-use-not-autofdo { scan-ipa-dump "Indirect call -> direct call.* AA transformation on insn" "profile" } } */ +/* { dg-final-use-autofdo { scan-ipa-dump "Indirect call -> direct call.* AA transformation on insn" "afdo" } } */ +/* { dg-final-use-not-autofdo { scan-tree-dump-not "Invalid sum" "optimized" } } */ diff --git a/gcc/testsuite/g++.dg/tree-prof/morefunc.C b/gcc/testsuite/g++.dg/tree-prof/morefunc.C index b7ff5e90bd3..2e3fc114758 100644 --- a/gcc/testsuite/g++.dg/tree-prof/morefunc.C +++ b/gcc/testsuite/g++.dg/tree-prof/morefunc.C @@ -1,4 +1,4 @@ -/* { dg-options "-O2 -fno-devirtualize --param=profile-func-internal-id=0 -fdump-ipa-profile -Wno-attributes -Wno-coverage-mismatch" } */ +/* { dg-options "-O2 -fno-devirtualize --param=profile-func-internal-id=0 -fdump-ipa-profile -fdump-ipa-afdo -Wno-attributes -Wno-coverage-mismatch" } */ #include "reorder_class1.h" #include "reorder_class2.h" @@ -28,7 +28,7 @@ static __attribute__((always_inline)) void test2 (B *tc) { int i; - for (i = 0; i < 1000; i++) + for (i = 0; i < 1000000; i++) g += tc->foo(); } @@ -51,4 +51,5 @@ int main() } -/* { dg-final-use { scan-ipa-dump-times "Indirect call -> direct call" 2 "profile" } } */ +/* { dg-final-use-not-autofdo { scan-ipa-dump-times "Indirect call -> direct call" 2 "profile" } } */ +/* { dg-final-use-autofdo { scan-ipa-dump-times "Indirect call -> direct call" 2 "afdo" } } */ diff --git a/gcc/testsuite/g++.dg/tree-prof/pr35545.C b/gcc/testsuite/g++.dg/tree-prof/pr35545.C index 7d24e716866..e1bd047c832 100644 --- a/gcc/testsuite/g++.dg/tree-prof/pr35545.C +++ b/gcc/testsuite/g++.dg/tree-prof/pr35545.C @@ -27,7 +27,7 @@ int main() A* ap = 0; - for (i = 0; i < 10000; i++) + for (i = 0; i < 1000000; i++) { if (i%7==0) diff --git a/gcc/testsuite/g++.dg/tree-prof/reorder.C b/gcc/testsuite/g++.dg/tree-prof/reorder.C index f582b2d32a4..6b3bad1f54d 100644 --- a/gcc/testsuite/g++.dg/tree-prof/reorder.C +++ b/gcc/testsuite/g++.dg/tree-prof/reorder.C @@ -1,4 +1,4 @@ -/* { dg-options "-O2 -fno-devirtualize --param=profile-func-internal-id=0 -fdump-ipa-profile -Wno-coverage-mismatch -Wno-attributes" } */ +/* { dg-options "-O2 -fno-devirtualize --param=profile-func-internal-id=0 -fdump-ipa-profile -fdump-ipa-afdo -Wno-coverage-mismatch -Wno-attributes" } */ #ifdef _PROFILE_USE #include "reorder_class1.h" @@ -13,7 +13,7 @@ static __attribute__((always_inline)) void test1 (A *tc) { int i; - for (i = 0; i < 1000; i++) + for (i = 0; i < 1000000; i++) g += tc->foo(); if (g<100) g++; } @@ -22,7 +22,7 @@ static __attribute__((always_inline)) void test2 (B *tc) { int i; - for (i = 0; i < 1000; i++) + for (i = 0; i < 1000000; i++) g += tc->foo(); } @@ -44,4 +44,5 @@ int main() test_b(bp); } -/* { dg-final-use { scan-ipa-dump-times "Indirect call -> direct call" 2 "profile" } } */ +/* { dg-final-use-not-autofdo { scan-ipa-dump-times "Indirect call -> direct call" 2 "profile" } } */ +/* { dg-final-use-autofdo { scan-ipa-dump-times "Indirect call -> direct call" 2 "afdo" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-prof/20050826-2.c b/gcc/testsuite/gcc.dg/tree-prof/20050826-2.c index bdaef3d5bf5..f0febbdffa2 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/20050826-2.c +++ b/gcc/testsuite/gcc.dg/tree-prof/20050826-2.c @@ -72,4 +72,4 @@ main (void) return 0; } -/* { dg-final-use { scan-tree-dump-not "Invalid sum" "dom2"} } */ +/* { dg-final-use-not-autofdo { scan-tree-dump-not "Invalid sum" "dom2"} } */ diff --git a/gcc/testsuite/gcc.dg/tree-prof/cmpsf-1.c b/gcc/testsuite/gcc.dg/tree-prof/cmpsf-1.c index 49102df3e61..16adb92e1ca 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/cmpsf-1.c +++ b/gcc/testsuite/gcc.dg/tree-prof/cmpsf-1.c @@ -181,4 +181,4 @@ main (void) exit (0); } -/* { dg-final-use { scan-tree-dump-not "Invalid sum" "dom2"} } */ +/* { dg-final-use-not-autofdo { scan-tree-dump-not "Invalid sum" "dom2"} } */ diff --git a/gcc/testsuite/gcc.dg/tree-prof/cold_partition_label.c b/gcc/testsuite/gcc.dg/tree-prof/cold_partition_label.c index 910ac046bcc..6214e3629f2 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/cold_partition_label.c +++ b/gcc/testsuite/gcc.dg/tree-prof/cold_partition_label.c @@ -29,9 +29,11 @@ foo (int path) int main (int argc, char *argv[]) { + int i; buf_hot = "hello"; buf_cold = "world"; - foo (argc); + for (i = 0; i < 1000000; i++) + foo (argc); return 0; } diff --git a/gcc/testsuite/gcc.dg/tree-prof/ic-misattribution-1.c b/gcc/testsuite/gcc.dg/tree-prof/ic-misattribution-1.c index e36ba269148..3979b17b156 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/ic-misattribution-1.c +++ b/gcc/testsuite/gcc.dg/tree-prof/ic-misattribution-1.c @@ -15,4 +15,4 @@ caller(void (*func) (void)) func (); } -/* { dg-final-use { scan-ipa-dump "hist->count 1 hist->all 1" "profile" } } */ +/* { dg-final-use-not-autofdo { scan-ipa-dump "hist->count 1 hist->all 1" "profile" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-prof/indir-call-prof.c b/gcc/testsuite/gcc.dg/tree-prof/indir-call-prof.c index bed40a594c3..53063c3e7fa 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/indir-call-prof.c +++ b/gcc/testsuite/gcc.dg/tree-prof/indir-call-prof.c @@ -1,4 +1,4 @@ -/* { dg-options "-O2 -fdump-tree-optimized -fdump-ipa-profile" } */ +/* { dg-options "-O2 -fdump-tree-optimized -fdump-ipa-profile -fdump-ipa-afdo" } */ static int a1 (void) { @@ -28,7 +28,7 @@ main (void) int (*p) (void); int i; - for (i = 0; i < 10; i ++) + for (i = 0; i < 10000000; i ++) { setp (&p, i); p (); @@ -37,5 +37,6 @@ main (void) return 0; } -/* { dg-final-use { scan-ipa-dump "Indirect call -> direct call.* a1 transformation on insn" "profile"} } */ +/* { dg-final-use-not-autofdo { scan-ipa-dump "Indirect call -> direct call.* a1 transformation on insn" "profile"} } */ +/* { dg-final-use-autofdo { scan-ipa-dump "Indirect call -> direct call.* a1 transformation on insn" "afdo"} } */ /* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized"} } */ diff --git a/gcc/testsuite/gcc.dg/tree-prof/inliner-1.c b/gcc/testsuite/gcc.dg/tree-prof/inliner-1.c index f0cdf879c83..8d1481bfeb7 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/inliner-1.c +++ b/gcc/testsuite/gcc.dg/tree-prof/inliner-1.c @@ -25,7 +25,7 @@ int main () { int i; - for (i = 0; i < 100; i++) + for (i = 0; i < 1000000; i++) { if (a) cold_function (); diff --git a/gcc/testsuite/gcc.dg/tree-prof/merge_block.c b/gcc/testsuite/gcc.dg/tree-prof/merge_block.c index da4ec5a8676..5da5ddff6a0 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/merge_block.c +++ b/gcc/testsuite/gcc.dg/tree-prof/merge_block.c @@ -14,7 +14,7 @@ main () { int i; /* The loop will be optimized away after ipa-inline. */ - for (i = 0; i < 1000; i++) + for (i = 0; i < 1000000; i++) t (); return 0; } diff --git a/gcc/testsuite/gcc.dg/tree-prof/stringop-1.c b/gcc/testsuite/gcc.dg/tree-prof/stringop-1.c index e1e06348aea..6f8908a3431 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/stringop-1.c +++ b/gcc/testsuite/gcc.dg/tree-prof/stringop-1.c @@ -14,8 +14,9 @@ main() } return 0; } -/* { dg-final-use { scan-ipa-dump "Single value 4 stringop" "profile"} } */ +/* autofdo doesn't support value profiling for now: */ +/* { dg-final-use-not-autofdo { scan-ipa-dump "Single value 4 stringop" "profile"} } */ /* Really this ought to simplify into assignment, but we are not there yet. */ /* a[0] = b[0] is what we fold the resulting memcpy into. */ -/* { dg-final-use { scan-tree-dump " = MEM.*&b" "optimized"} } */ -/* { dg-final-use { scan-tree-dump "MEM.*&a\\\] = " "optimized"} } */ +/* { dg-final-use-not-autofdo { scan-tree-dump " = MEM.*&b" "optimized"} } */ +/* { dg-final-use-not-autofdo { scan-tree-dump "MEM.*&a\\\] = " "optimized"} } */ diff --git a/gcc/testsuite/gcc.dg/tree-prof/stringop-2.c b/gcc/testsuite/gcc.dg/tree-prof/stringop-2.c index 66f8d292e19..330b159b7fc 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/stringop-2.c +++ b/gcc/testsuite/gcc.dg/tree-prof/stringop-2.c @@ -19,6 +19,7 @@ main() } return 0; } -/* { dg-final-use { scan-ipa-dump "Single value 4 stringop" "profile"} } */ +/* autofdo doesn't support value profiling for now: */ +/* { dg-final-use-not-autofdo { scan-ipa-dump "Single value 4 stringop" "profile"} } */ /* The versioned memset of size 4 should be optimized to an assignment. */ -/* { dg-final-use { scan-tree-dump "MEM\\\[\\(void .\\)&a\\\] = 168430090" "optimized"} } */ +/* { dg-final-use-not-autofdo { scan-tree-dump "MEM\\\[\\(void .\\)&a\\\] = 168430090" "optimized"} } */ diff --git a/gcc/testsuite/gcc.dg/tree-prof/switch-case-1.c b/gcc/testsuite/gcc.dg/tree-prof/switch-case-1.c index 89e76cc59d5..6a9af083a9a 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/switch-case-1.c +++ b/gcc/testsuite/gcc.dg/tree-prof/switch-case-1.c @@ -35,5 +35,6 @@ int main () foo ((i * i) % 5); return 0; } -/* { dg-final-use { scan-rtl-dump-times ";; basic block\[^\\n\]*count 4000" 2 "expand"} } */ -/* { dg-final-use { scan-rtl-dump-times ";; basic block\[^\\n\]*count 2000" 1 "expand"} } */ +/* 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"} } */ 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 71612821174..cfedc9c6b76 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/switch-case-2.c +++ b/gcc/testsuite/gcc.dg/tree-prof/switch-case-2.c @@ -35,5 +35,6 @@ int main () foo ((i * i) % 5); return 0; } -/* { dg-final-use { scan-rtl-dump-times ";; basic block\[^\\n\]*count 4000" 2 "expand"} } */ -/* { dg-final-use { scan-rtl-dump-times ";; basic block\[^\\n\]*count 2000" 1 "expand"} } */ +/* 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"} } */ diff --git a/gcc/testsuite/gcc.dg/tree-prof/time-profiler-1.c b/gcc/testsuite/gcc.dg/tree-prof/time-profiler-1.c index ee8a9d805cf..455f923f3f4 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/time-profiler-1.c +++ b/gcc/testsuite/gcc.dg/tree-prof/time-profiler-1.c @@ -16,6 +16,6 @@ int main () { return foo (); } -/* { dg-final-use { scan-ipa-dump-times "Read tp_first_run: 0" 1 "profile"} } */ -/* { dg-final-use { scan-ipa-dump-times "Read tp_first_run: 1" 1 "profile"} } */ -/* { dg-final-use { scan-ipa-dump-times "Read tp_first_run: 2" 1 "profile"} } */ +/* { dg-final-use-not-autofdo { scan-ipa-dump-times "Read tp_first_run: 0" 1 "profile"} } */ +/* { dg-final-use-not-autofdo { scan-ipa-dump-times "Read tp_first_run: 1" 1 "profile"} } */ +/* { dg-final-use-not-autofdo { scan-ipa-dump-times "Read tp_first_run: 2" 1 "profile"} } */ diff --git a/gcc/testsuite/gcc.dg/tree-prof/time-profiler-2.c b/gcc/testsuite/gcc.dg/tree-prof/time-profiler-2.c index 29c0d191afe..e6eaeb99810 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/time-profiler-2.c +++ b/gcc/testsuite/gcc.dg/tree-prof/time-profiler-2.c @@ -43,7 +43,7 @@ int main () return r; } -/* { dg-final-use { scan-ipa-dump-times "Read tp_first_run: 0" 2 "profile"} } */ -/* { dg-final-use { scan-ipa-dump-times "Read tp_first_run: 1" 1 "profile"} } */ -/* { dg-final-use { scan-ipa-dump-times "Read tp_first_run: 2" 1 "profile"} } */ -/* { dg-final-use { scan-ipa-dump-times "Read tp_first_run: 3" 1 "profile"} } */ +/* { dg-final-use-not-autofdo { scan-ipa-dump-times "Read tp_first_run: 0" 2 "profile"} } */ +/* { dg-final-use-not-autofdo { scan-ipa-dump-times "Read tp_first_run: 1" 1 "profile"} } */ +/* { dg-final-use-not-autofdo { scan-ipa-dump-times "Read tp_first_run: 2" 1 "profile"} } */ +/* { dg-final-use-not-autofdo { scan-ipa-dump-times "Read tp_first_run: 3" 1 "profile"} } */ diff --git a/gcc/testsuite/gcc.dg/tree-prof/update-loopch.c b/gcc/testsuite/gcc.dg/tree-prof/update-loopch.c index 4dd51af6aeb..242fa524ee6 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/update-loopch.c +++ b/gcc/testsuite/gcc.dg/tree-prof/update-loopch.c @@ -14,8 +14,9 @@ main () /* Loop header copying will peel away the initial conditional, so the loop body is once reached directly from entry point of function, rest via loopback edge. */ -/* { dg-final-use { scan-ipa-dump "loop depth 1, count 33334" "profile"} } */ -/* { dg-final-use { scan-tree-dump "loop depth 1, count 33333" "optimized"} } */ -/* { dg-final-use { scan-tree-dump-not "loop depth 1, count 33332" "optimized"} } */ -/* { dg-final-use { scan-tree-dump "Removing basic block" "optimized"} } */ +/* autofdo cannot do that precise counts */ +/* { dg-final-use-not-autofdo { scan-ipa-dump "loop depth 1, count 33334" "profile"} } */ +/* { dg-final-use-not-autofdo { scan-tree-dump "loop depth 1, count 33333" "optimized"} } */ +/* { dg-final-use-not-autofdo { scan-tree-dump-not "loop depth 1, count 33332" "optimized"} } */ +/* { dg-final-use-not-autofdo { scan-tree-dump "Removing basic block" "optimized"} } */ /* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized"} } */ diff --git a/gcc/testsuite/gcc.dg/tree-prof/val-prof-1.c b/gcc/testsuite/gcc.dg/tree-prof/val-prof-1.c index 97dd311f4df..35e0f908f24 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/val-prof-1.c +++ b/gcc/testsuite/gcc.dg/tree-prof/val-prof-1.c @@ -16,6 +16,7 @@ main () } return 0; } -/* { dg-final-use { scan-ipa-dump "Div.mod by constant n_\[0-9\]*=257 transformation on insn" "profile"} } */ -/* { dg-final-use { scan-tree-dump "if \\(n_\[0-9\]* != 257\\)" "optimized"} } */ +/* autofdo does not do value profiling so far */ +/* { dg-final-use-not-autofdo { scan-ipa-dump "Div.mod by constant n_\[0-9\]*=257 transformation on insn" "profile"} } */ +/* { dg-final-use-not-autofdo { scan-tree-dump "if \\(n_\[0-9\]* != 257\\)" "optimized"} } */ /* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized"} } */ diff --git a/gcc/testsuite/gcc.dg/tree-prof/val-prof-2.c b/gcc/testsuite/gcc.dg/tree-prof/val-prof-2.c index 2e85a86f513..ad78043ddd6 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/val-prof-2.c +++ b/gcc/testsuite/gcc.dg/tree-prof/val-prof-2.c @@ -24,8 +24,9 @@ main () } return 0; } -/* { dg-final-use { scan-ipa-dump "Mod power of 2 transformation on insn" "profile" } } */ +/* autofdo does not do value profiling so far */ +/* { dg-final-use-not-autofdo { scan-ipa-dump "Mod power of 2 transformation on insn" "profile" } } */ /* This is part of code checking that n is power of 2, so we are sure that the transformation didn't get optimized out. */ -/* { dg-final-use { scan-tree-dump "n_\[0-9\]* \\+ (4294967295|0x0*ffffffff)" "optimized"} } */ +/* { dg-final-use-not-autofdo { scan-tree-dump "n_\[0-9\]* \\+ (4294967295|0x0*ffffffff)" "optimized"} } */ /* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized"} } */ diff --git a/gcc/testsuite/gcc.dg/tree-prof/val-prof-3.c b/gcc/testsuite/gcc.dg/tree-prof/val-prof-3.c index 9a600c334ee..366ada1fa22 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/val-prof-3.c +++ b/gcc/testsuite/gcc.dg/tree-prof/val-prof-3.c @@ -24,8 +24,9 @@ main () } return 0; } -/* { dg-final-use { scan-ipa-dump "Mod subtract transformation on insn" "profile" } } */ +/* autofdo does not do value profiling so far */ +/* { dg-final-use-not-autofdo { scan-ipa-dump "Mod subtract transformation on insn" "profile" } } */ /* This is part of code checking that n is greater than the divisor so we are sure that it didn't get optimized out. */ -/* { dg-final-use { scan-tree-dump "if \\(_\[0-9\]* \\< n_\[0-9\]*" "optimized"} } */ +/* { dg-final-use-not-autofdo { scan-tree-dump "if \\(_\[0-9\]* \\< n_\[0-9\]*" "optimized"} } */ /* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized"} } */ diff --git a/gcc/testsuite/gcc.dg/tree-prof/val-prof-4.c b/gcc/testsuite/gcc.dg/tree-prof/val-prof-4.c index 5d151580f1f..374428e720e 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/val-prof-4.c +++ b/gcc/testsuite/gcc.dg/tree-prof/val-prof-4.c @@ -24,8 +24,9 @@ main () } return 0; } -/* { dg-final-use { scan-ipa-dump "Mod subtract transformation on insn" "profile" } } */ +/* autofdo does not do value profiling so far */ +/* { dg-final-use-not-autofdo { scan-ipa-dump "Mod subtract transformation on insn" "profile" } } */ /* This is part of code checking that n is greater than the divisor so we are sure that it didn't get optimized out. */ -/* { dg-final-use { scan-tree-dump "if \\(n_\[0-9\]* \\>" "optimized"} } */ +/* { dg-final-use-not-autofdo { scan-tree-dump "if \\(n_\[0-9\]* \\>" "optimized"} } */ /* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized"} } */ diff --git a/gcc/testsuite/gcc.dg/tree-prof/val-prof-5.c b/gcc/testsuite/gcc.dg/tree-prof/val-prof-5.c index 7e88ac47dc6..caf97ce4f87 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/val-prof-5.c +++ b/gcc/testsuite/gcc.dg/tree-prof/val-prof-5.c @@ -12,5 +12,6 @@ main() a[i]/=b; return 0; } -/* { dg-final-use { scan-ipa-dump "Div.mod by constant b.*=997 transformation on insn" "profile" } } */ +/* autofdo does not do value profiling so far */ +/* { dg-final-use-not-autofdo { scan-ipa-dump "Div.mod by constant b.*=997 transformation on insn" "profile" } } */ /* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized"} } */ diff --git a/gcc/testsuite/gcc.dg/tree-prof/val-prof-6.c b/gcc/testsuite/gcc.dg/tree-prof/val-prof-6.c index fd24ee33bda..597efa6ad70 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/val-prof-6.c +++ b/gcc/testsuite/gcc.dg/tree-prof/val-prof-6.c @@ -15,5 +15,6 @@ main() t(i); return 0; } -/* { dg-final-use { scan-tree-dump "Average value sum:499500" "optimized"} } */ -/* { dg-final-use { scan-tree-dump "IOR value" "optimized"} } */ +/* autofdo does not do value profiling so far */ +/* { dg-final-use-not-autofdo { scan-tree-dump "Average value sum:499500" "optimized"} } */ +/* { dg-final-use-not-autofdo { scan-tree-dump "IOR value" "optimized"} } */ diff --git a/gcc/testsuite/gcc.dg/tree-prof/val-prof-7.c b/gcc/testsuite/gcc.dg/tree-prof/val-prof-7.c index 3d85714d14b..9765b997eff 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/val-prof-7.c +++ b/gcc/testsuite/gcc.dg/tree-prof/val-prof-7.c @@ -22,4 +22,4 @@ int main() { return 0; } -/* { dg-final-use { scan-ipa-dump "Single value 8 stringop transformation on bzero" "profile" } } */ +/* { dg-final-use-not-autofdo { scan-ipa-dump "Single value 8 stringop transformation on bzero" "profile" } } */