1 ; RUN: opt -analyze -branch-prob < %s | FileCheck %s
2 ; RUN: opt < %s -passes='print<branch-prob>' -disable-output 2>&1 | FileCheck %s
4 declare i32 @llvm.experimental.deoptimize.i32(...)
6 define i32 @test1(i32 %a, i32 %b) {
7 ; CHECK-LABEL: Printing analysis {{.*}} for function 'test1':
9 %cond = icmp eq i32 %a, 42
10 br i1 %cond, label %exit, label %deopt
12 ; CHECK: edge entry -> exit probability is 0x7fffffff / 0x80000000 = 100.00% [HOT edge]
13 ; CHECK: edge entry -> deopt probability is 0x00000001 / 0x80000000 = 0.00%
16 %rval = call i32(...) @llvm.experimental.deoptimize.i32() [ "deopt"() ]