Skip to content

Commit a058579

Browse files
committed
Add a simple test
1 parent 8f48aa9 commit a058579

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

llvm/test/CodeGen/Generic/MachineBranchProb.ll

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
; RUN: llc < %s -print-after=finalize-isel -o /dev/null 2>&1 | FileCheck %s
2+
; RUN: llc %s -stop-after=finalize-isel -o - | llc -passes='print<machine-branch-prob>' -x mir -filetype=null 2>&1 | FileCheck -check-prefix=NPM %s
23

34
; Hexagon runs passes that renumber the basic blocks, causing this test
45
; to fail.
@@ -27,6 +28,10 @@ entry:
2728
; CHECK: bb.6.entry:
2829
; CHECK: successors: %bb.1(0x2e8ba2d7), %bb.3(0x51745d29)
2930

31+
; NPM: Printing analysis 'Machine Branch Probability Analysis' for machine function 'test2':
32+
; NPM: edge %bb.4 -> %bb.6 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
33+
; NPM: edge %bb.5 -> %bb.6 probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
34+
3035
sw.bb:
3136
; this call will prevent simplifyCFG from optimizing the block away in ARM/AArch64.
3237
tail call void @foo()

0 commit comments

Comments
 (0)