1 ; RUN: llc -mcpu=corei7 -mtriple=x86_64-linux < %s | FileCheck %s
2 ; RUN: llc -mcpu=corei7 -mtriple=x86_64-linux -precise-rotation-cost < %s | FileCheck %s -check-prefix=CHECK-PROFILE
5 ; Test that not all edges in the loop chain are fall through without profile
19 %call = call zeroext i1 @a()
20 br i1 %call, label %if.then, label %if.else, !prof !2
32 %call2 = call zeroext i1 @a()
33 br i1 %call2, label %header, label %end
39 define void @bar() !prof !1 {
40 ; Test that all edges in the loop chain are fall through with profile data.
42 ; CHECK-PROFILE-LABEL: bar:
43 ; CHECK-PROFILE: callq g
44 ; CHECK-PROFILE: callq h
45 ; CHECK-PROFILE: callq e
46 ; CHECK-PROFILE: callq f
53 %call = call zeroext i1 @a()
54 br i1 %call, label %if.then, label %if.else, !prof !2
66 %call2 = call zeroext i1 @a()
67 br i1 %call2, label %header, label %end
73 declare zeroext i1 @a()
79 !1 = !{!"function_entry_count", i64 1}
80 !2 = !{!"branch_weights", i32 16, i32 16}