1 ; RUN: llc < %s -mtriple=x86_64-pc-linux | FileCheck %s 2 3 ; Checks if movl $1 is sinked to critical edge. 4 ; CHECK-NOT: movl $1 5 ; CHECK: jbe 6 ; CHECK: movl $1 7 define i32 @test(i32 %n, i32 %k) nounwind { 8 entry: 9 %cmp = icmp ugt i32 %k, %n 10 br i1 %cmp, label %ifthen, label %ifend, !prof !1 11 12 ifthen: 13 %y = add i32 %k, 2 14 br label %ifend 15 16 ifend: 17 %ret = phi i32 [ 1, %entry ] , [ %y, %ifthen] 18 ret i32 %ret 19 } 20 21 !1 = !{!"branch_weights", i32 100, i32 1} 22