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