1 ; RUN: llc < %s -mtriple=i386-unknown-unknown -jump-is-expensive=0 | FileCheck %s --check-prefix=JUMP2 --check-prefix=CHECK
2 ; RUN: llc < %s -mtriple=i386-unknown-unknown -jump-is-expensive=1 | FileCheck %s --check-prefix=JUMP1 --check-prefix=CHECK
4 define void @foo(i32 %X, i32 %Y, i32 %Z) nounwind {
15 %tmp1 = icmp eq i32 %X, 0
16 %tmp3 = icmp slt i32 %Y, 5
17 %tmp4 = or i1 %tmp3, %tmp1
18 br i1 %tmp4, label %cond_true, label %UnifiedReturnBlock
21 %tmp5 = tail call i32 (...) @bar( )
28 ; If the branch is unpredictable, don't add another branch
29 ; regardless of whether they are expensive or not.
31 define void @unpredictable(i32 %X, i32 %Y, i32 %Z) nounwind {
32 ; CHECK-LABEL: unpredictable:
38 %tmp1 = icmp eq i32 %X, 0
39 %tmp3 = icmp slt i32 %Y, 5
40 %tmp4 = or i1 %tmp3, %tmp1
41 br i1 %tmp4, label %cond_true, label %UnifiedReturnBlock, !unpredictable !0
44 %tmp5 = tail call i32 (...) @bar( )