libstdc++: Fix tests for std::vector range operations
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-prof / val-prof-1.c
blobd2fe21c378a6665f827ab18d82c37a1d47254c9b
1 /* { dg-options "-O2 -fdump-tree-optimized-details-blocks -fdump-ipa-profile-optimized" } */
2 int a[1000];
3 int b = 256;
4 int c = 257;
5 int
6 main ()
8 int i;
9 int n;
10 for (i = 0; i < 1000; i++)
12 if (i % 17)
13 n = c;
14 else n = b;
15 a[i] /= n;
17 return 0;
19 /* autofdo does not do value profiling so far */
20 /* { dg-final-use-not-autofdo { scan-ipa-dump "Transformation done: div.mod by constant 257" "profile"} } */
21 /* { dg-final-use-not-autofdo { scan-tree-dump "if \\(n_\[0-9\]* != 257\\)" "optimized"} } */
22 /* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized"} } */