40 lines · plain
1; RUN: llc < %s -mtriple=x86_64-- | FileCheck %s2 3define void @test(i1 %cnd) !prof !{!"function_entry_count", i64 1024} {4; CHECK-LABEL: @test5; Using the assembly comments to indicate block order..6; CHECK: # %loop7; CHECK: # %backedge8; CHECK: # %exit9; CHECK: # %rare10; CHECK: # %rare.111 12 br i1 %cnd, label %rare.1, label %preheader, !prof !{!"branch_weights", i32 0, i32 1000}13rare.1:14 call void @foo()15 br label %preheader16 17preheader:18 br label %loop19 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 %backedge27backedge:28 call void @foo()29 %iv.next = add i32 %iv, 130 %cmp = icmp eq i32 %iv.next, 20031 br i1 %cmp, label %loop, label %exit, !prof !{!"branch_weights", i32 1000, i32 1}32 33exit:34 ret void35 36}37 38 39declare void @foo()40