1 ; RUN: opt < %s -analyze -branch-prob | FileCheck %s
3 ; This function tests the floating point unorder comparison. The probability
4 ; of NaN should be extremely small.
5 ; CHECK: Printing analysis 'Branch Probability Analysis' for function 'uno'
6 ; CHECK: edge -> a probability is 0x00000800 / 0x80000000 = 0.00%
7 ; CHECK: edge -> b probability is 0x7ffff800 / 0x80000000 = 100.00% [HOT edge]
9 define void @uno(float %val1, float %val2) {
10 %cond = fcmp uno float %val1, %val2
11 br i1 %cond, label %a, label %b
22 ; This function tests the floating point order comparison.
23 ; CHECK: Printing analysis 'Branch Probability Analysis' for function 'ord'
24 ; CHECK: edge -> a probability is 0x7ffff800 / 0x80000000 = 100.00% [HOT edge]
25 ; CHECK: edge -> b probability is 0x00000800 / 0x80000000 = 0.00%
27 define void @ord(float %val1, float %val2) {
28 %cond = fcmp ord float %val1, %val2
29 br i1 %cond, label %a, label %b