mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-10 06:00:30 +00:00
454f7fa94d
Differential Revision: http://reviews.llvm.org/D19839 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268601 91177308-0d34-0410-b5e6-96231b3b80d8
22 lines
649 B
LLVM
22 lines
649 B
LLVM
; RUN: opt -analyze -branch-prob < %s | FileCheck %s
|
|
; RUN: opt < %s -passes='print<branch-prob>' -disable-output 2>&1 | FileCheck %s
|
|
|
|
declare i32 @llvm.experimental.deoptimize.i32(...)
|
|
|
|
define i32 @test1(i32 %a, i32 %b) {
|
|
; CHECK-LABEL: Printing analysis {{.*}} for function 'test1':
|
|
entry:
|
|
%cond = icmp eq i32 %a, 42
|
|
br i1 %cond, label %exit, label %deopt
|
|
|
|
; CHECK: edge entry -> exit probability is 0x7ffff800 / 0x80000000 = 100.00% [HOT edge]
|
|
; CHECK: edge entry -> deopt probability is 0x00000800 / 0x80000000 = 0.00%
|
|
|
|
deopt:
|
|
%rval = call i32(...) @llvm.experimental.deoptimize.i32() [ "deopt"() ]
|
|
ret i32 %rval
|
|
|
|
exit:
|
|
ret i32 %b
|
|
}
|