]> git.lizzy.rs Git - rust.git/blob - tests/run-make-fulldeps/pgo-branch-weights/filecheck-patterns.txt
Auto merge of #106520 - ehuss:update-mdbook, r=Mark-Simulacrum
[rust.git] / tests / run-make-fulldeps / pgo-branch-weights / filecheck-patterns.txt
1
2 # First, establish that certain !prof labels are attached to the expected
3 # functions and branching instructions.
4
5 CHECK: define void @function_called_twice(i32 {{.*}} !prof [[function_called_twice_id:![0-9]+]] {
6 CHECK: br i1 {{.*}}, label {{.*}}, label {{.*}}, !prof [[branch_weights0:![0-9]+]]
7
8 CHECK: define void @function_called_42_times(i32{{.*}} %c) {{.*}} !prof [[function_called_42_times_id:![0-9]+]] {
9 CHECK:      switch i32 %c, label {{.*}} [
10 CHECK-NEXT:     i32 97, label {{.*}}
11 CHECK-NEXT:     i32 98, label {{.*}}
12 CHECK-NEXT: ], !prof [[branch_weights1:![0-9]+]]
13
14 CHECK: define void @function_called_never(i32 {{.*}} !prof [[function_called_never_id:![0-9]+]] {
15
16
17
18 # Now check that those !prof tags hold the expected counts
19
20 CHECK: [[function_called_twice_id]] = !{!"function_entry_count", i64 2}
21 CHECK: [[branch_weights0]] = !{!"branch_weights", i32 2, i32 0}
22 CHECK: [[function_called_42_times_id]] = !{!"function_entry_count", i64 42}
23 CHECK: [[branch_weights1]] = !{!"branch_weights", i32 2, i32 12, i32 28}
24 CHECK: [[function_called_never_id]] = !{!"function_entry_count", i64 0}