1 ; RUN: opt < %s -analyze -block-freq -enable-new-pm=0 | FileCheck %s
2 ; RUN: opt < %s -passes='print<block-freq>' -disable-output 2>&1 | FileCheck %s
4 ; CHECK-LABEL: Printing analysis {{.*}} for function 'loop_with_invoke':
5 ; CHECK-NEXT: block-frequency-info: loop_with_invoke
6 define void @loop_with_invoke(i32 %n) personality i8 0 {
7 ; CHECK-NEXT: entry: float = 1.0, int = [[ENTRY:[0-9]+]]
11 ; CHECK-NEXT: loop: float = 9905.6
13 %i = phi i32 [ 0, %entry ], [ %i.next, %invoke.cont ]
14 invoke void @foo() to label %invoke.cont unwind label %lpad
16 ; CHECK-NEXT: invoke.cont: float = 9905.6
18 %i.next = add i32 %i, 1
19 %cont = icmp ult i32 %i.next, %n
20 br i1 %cont, label %loop, label %exit, !prof !0
22 ; CHECK-NEXT: lpad: float = 0.0094467
24 %ll = landingpad { i8*, i32 }
28 ; CHECK-NEXT: exit: float = 1.0, int = [[ENTRY]]
35 !0 = !{!"branch_weights", i32 9999, i32 1}