gcc/testsuite/g++.dg/predict-2.C
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -fdump-tree-profile_estimate -std=c++11" } */ |
| 3 | |
| 4 | int a, b, c; |
| 5 | |
| 6 | void |
| 7 | bar() |
| 8 | { |
| 9 | if (a == 123) |
| 10 | [[likely]] c = 5; |
| 11 | else |
| 12 | c = 5; |
| 13 | } |
| 14 | |
| 15 | /* { dg-final { scan-tree-dump "first match heuristics: 90.00%" "profile_estimate"} } */ |
| 16 | /* { dg-final { scan-tree-dump "hot label heuristics of edge .*->.*: 90.00%" "profile_estimate"} } */ |