1; RUN: llc < %s -march=x86-64 | FileCheck %s 2 3define void @test(i1 %cnd) !prof !{!"function_entry_count", i64 1024} { 4; CHECK-LABEL: @test 5; Using the assembly comments to indicate block order.. 6; CHECK: # %loop 7; CHECK: # %backedge 8; CHECK: # %exit 9; CHECK: # %rare 10; CHECK: # %rare.1 11 12 br i1 undef, label %rare.1, label %preheader, !prof !{!"branch_weights", i32 0, i32 1000} 13rare.1: 14 call void @foo() 15 br label %preheader 16 17preheader: 18 br label %loop 19 20loop: 21 %iv = phi i32 [0, %preheader], [%iv.next, %backedge] 22 call void @foo() 23 br i1 %cnd, label %backedge, label %rare, !prof !{!"branch_weights", i32 1000000, i32 1} 24rare: 25 call void @foo() 26 br label %backedge 27backedge: 28 call void @foo() 29 %iv.next = add i32 %iv, 1 30 %cmp = icmp eq i32 %iv.next, 200 31 br i1 %cmp, label %loop, label %exit, !prof !{!"branch_weights", i32 1000, i32 1} 32 33exit: 34 ret void 35 36} 37 38 39declare void @foo() 40