CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
52 lines
2.1 KiB
LLVM
52 lines
2.1 KiB
LLVM
; RUN: opt < %s -passes='print<branch-prob>' -disable-output 2>&1 | FileCheck %s
|
|
|
|
declare void @g(i32)
|
|
|
|
; Check correctness of reported probabilities in case of multiple edges between
|
|
; basic blocks. In this case sum of probabilities over all edges should be
|
|
; returned by BranchProbabilityInfo::getEdgeProbability.
|
|
|
|
define void @test1(i32 %x) {
|
|
;CHECK: edge %entry -> %return probability is 0x0ccccccd / 0x80000000 = 10.00%
|
|
;CHECK: edge %entry -> %bb0 probability is 0x26666666 / 0x80000000 = 30.00%
|
|
;CHECK: edge %entry -> %bb0 probability is 0x26666666 / 0x80000000 = 30.00%
|
|
;CHECK: edge %entry -> %bb0 probability is 0x26666666 / 0x80000000 = 30.00%
|
|
;CHECK: edge %entry -> %bb1 probability is 0x26666666 / 0x80000000 = 30.00%
|
|
;CHECK: edge %entry -> %bb1 probability is 0x26666666 / 0x80000000 = 30.00%
|
|
;CHECK: edge %entry -> %bb1 probability is 0x26666666 / 0x80000000 = 30.00%
|
|
;CHECK: edge %entry -> %bb2 probability is 0x26666666 / 0x80000000 = 30.00%
|
|
;CHECK: edge %entry -> %bb2 probability is 0x26666666 / 0x80000000 = 30.00%
|
|
;CHECK: edge %entry -> %bb2 probability is 0x26666666 / 0x80000000 = 30.00%
|
|
;CHECK: edge %bb0 -> %return probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
|
|
;CHECK: edge %bb1 -> %return probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
|
|
;CHECK: edge %bb2 -> %return probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge]
|
|
|
|
entry:
|
|
switch i32 %x, label %return [
|
|
i32 0, label %bb0
|
|
i32 3, label %bb0
|
|
i32 6, label %bb0
|
|
i32 1, label %bb1
|
|
i32 4, label %bb1
|
|
i32 7, label %bb1
|
|
i32 2, label %bb2
|
|
i32 5, label %bb2
|
|
i32 8, label %bb2
|
|
]
|
|
|
|
bb0: ; preds = %entry, %entry, %entry
|
|
tail call void @g(i32 0)
|
|
br label %return
|
|
|
|
bb1: ; preds = %entry, %entry, %entry
|
|
tail call void @g(i32 1)
|
|
br label %return
|
|
|
|
bb2: ; preds = %entry, %entry, %entry
|
|
tail call void @g(i32 2)
|
|
br label %return
|
|
|
|
return: ; preds = %bb2, %bb1, %bb0, %entry
|
|
ret void
|
|
}
|