1 ; RUN: llc -mtriple=x86_64-linux-gnu %s -stop-after=finalize-isel -o - | \
2 ; RUN: llc -mtriple=x86_64-linux-gnu -passes='print<machine-branch-prob>' -x mir -filetype=null 2>&1 | \
7 define i32 @test2(i32 %x) nounwind uwtable readnone ssp {
9 %conv = sext i32 %x to i64
10 switch i64 %conv, label %return [
19 ; this call will prevent simplifyCFG from optimizing the block away in ARM/AArch64.
27 %retval.0 = phi i32 [ 5, %sw.bb1 ], [ 1, %sw.bb ], [ 0, %entry ]
31 !0 = !{!"branch_weights", i32 7, i32 6, i32 4, i32 4, i32 64, i21 1000}
33 ; CHECK: Printing analysis 'Machine Branch Probability Analysis' for machine function 'test2':
34 ; CHECK: edge %bb.4 -> %bb.6 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
35 ; CHECK: edge %bb.5 -> %bb.6 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]