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 3 4; CHECK-LABEL: Printing analysis {{.*}} for function 'loop_with_invoke': 5; CHECK-NEXT: block-frequency-info: loop_with_invoke 6define void @loop_with_invoke(i32 %n) personality i8 0 { 7; CHECK-NEXT: entry: float = 1.0, int = [[ENTRY:[0-9]+]] 8entry: 9 br label %loop 10 11; CHECK-NEXT: loop: float = 9905.6 12loop: 13 %i = phi i32 [ 0, %entry ], [ %i.next, %invoke.cont ] 14 invoke void @foo() to label %invoke.cont unwind label %lpad 15 16; CHECK-NEXT: invoke.cont: float = 9905.6 17invoke.cont: 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 21 22; CHECK-NEXT: lpad: float = 0.0094467 23lpad: 24 %ll = landingpad { i8*, i32 } 25 cleanup 26 br label %exit 27 28; CHECK-NEXT: exit: float = 1.0, int = [[ENTRY]] 29exit: 30 ret void 31} 32 33declare void @foo() 34 35!0 = !{!"branch_weights", i32 9999, i32 1} 36