1 ; RUN: opt < %s -analyze -branch-prob -enable-new-pm=0 | FileCheck %s
2 ; RUN: opt < %s -passes='print<branch-prob>' -disable-output 2>&1 | FileCheck %s
4 ; This function tests the floating point unorder comparison. The probability
5 ; of NaN should be extremely small.
6 ; CHECK: Printing analysis {{.*}} for function 'uno'
7 ; CHECK: edge -> a probability is 0x00000800 / 0x80000000 = 0.00%
8 ; CHECK: edge -> b probability is 0x7ffff800 / 0x80000000 = 100.00% [HOT edge]
10 define void @uno(float %val1, float %val2) {
11 %cond = fcmp uno float %val1, %val2
12 br i1 %cond, label %a, label %b
23 ; This function tests the floating point order comparison.
24 ; CHECK: Printing analysis {{.*}} for function 'ord'
25 ; CHECK: edge -> a probability is 0x7ffff800 / 0x80000000 = 100.00% [HOT edge]
26 ; CHECK: edge -> b probability is 0x00000800 / 0x80000000 = 0.00%
28 define void @ord(float %val1, float %val2) {
29 %cond = fcmp ord float %val1, %val2
30 br i1 %cond, label %a, label %b