1 ; RUN: llc -mcpu=corei7 -mtriple=x86_64-linux -force-precise-rotation-cost < %s | FileCheck %s -check-prefix=CHECK 2 3 define void @bar() { 4 ; Test that all edges in the loop chain are fall through with profile data. 5 ; 6 ; CHECK-LABEL: bar: 7 ; CHECK: latch 8 ; CHECK: header 9 ; CHECK: if.then 10 ; CHECK: end 11 12 entry: 13 br label %header 14 15 header: 16 call void @e() 17 %call = call zeroext i1 @a() 18 br i1 %call, label %if.then, label %latch, !prof !1 19 20 if.then: 21 call void @f() 22 %call3 = call zeroext i1 @a() 23 br i1 %call3, label %latch, label %end, !prof !2 24 25 latch: 26 call void @h() 27 %call2 = call zeroext i1 @a() 28 br i1 %call2, label %header, label %end, !prof !3 29 30 end: 31 ret void 32 } 33 34 declare zeroext i1 @a() 35 declare void @e() 36 declare void @f() 37 declare void @g() 38 declare void @h() 39 40 !1 = !{!"branch_weights", i32 16, i32 16} 41 !2 = !{!"branch_weights", i32 97, i32 3} 42 !3 = !{!"branch_weights", i32 97, i32 3} 43