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 a nested loop case when profile data is not available.
21 %call = call zeroext i1 @a()
22 br i1 %call, label %if.then, label %if.else, !prof !2
29 %call1 = call zeroext i1 @a()
30 br i1 %call1, label %if.then2, label %if.else2, !prof !2
42 %call2 = call zeroext i1 @a()
43 br i1 %call2, label %header2, label %if.end
51 %call3 = call zeroext i1 @a()
52 br i1 %call3, label %header, label %end
58 define void @bar() !prof !1 {
59 ; Test a nested loop case when profile data is available.
61 ; CHECK-PROFILE-LABEL: bar:
62 ; CHECK-PROFILE: callq h
63 ; CHECK-PROFILE: callq b
64 ; CHECK-PROFILE: callq g
65 ; CHECK-PROFILE: callq e
66 ; CHECK-PROFILE: callq f
67 ; CHECK-PROFILE: callq c
68 ; CHECK-PROFILE: callq d
75 %call = call zeroext i1 @a()
76 br i1 %call, label %if.then, label %if.else, !prof !2
83 %call1 = call zeroext i1 @a()
84 br i1 %call1, label %if.then2, label %if.else2, !prof !2
96 %call2 = call zeroext i1 @a()
97 br i1 %call2, label %header2, label %if.end
105 %call3 = call zeroext i1 @a()
106 br i1 %call3, label %header, label %end
112 declare zeroext i1 @a()
121 !1 = !{!"function_entry_count", i64 1}
122 !2 = !{!"branch_weights", i32 16, i32 16}