• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt < %s -analyze -block-freq | FileCheck %s
2
3define void @double_backedge(i1 %x) {
4; CHECK-LABEL: Printing analysis {{.*}} for function 'double_backedge':
5; CHECK-NEXT: block-frequency-info: double_backedge
6entry:
7; CHECK-NEXT: entry: float = 1.0, int = [[ENTRY:[0-9]+]]
8  br label %loop
9
10loop:
11; CHECK-NEXT: loop: float = 10.0,
12  br i1 %x, label %exit, label %loop.1, !prof !0
13
14loop.1:
15; CHECK-NEXT: loop.1: float = 9.0,
16  br i1 %x, label %loop, label %loop.2, !prof !1
17
18loop.2:
19; CHECK-NEXT: loop.2: float = 5.0,
20  br label %loop
21
22exit:
23; CHECK-NEXT: exit: float = 1.0, int = [[ENTRY]]
24  ret void
25}
26!0 = metadata !{metadata !"branch_weights", i32 1, i32 9}
27!1 = metadata !{metadata !"branch_weights", i32 4, i32 5}
28