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
74 lines
2.4 KiB
LLVM
74 lines
2.4 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals all --version 6
|
|
; RUN: opt -passes=prof-inject -profcheck-weights-for-test %s -S -o - | FileCheck %s --check-prefixes=TEST,CHECK
|
|
; RUN: opt -passes=prof-inject %s -S -o - | FileCheck %s --check-prefixes=NORMAL,CHECK
|
|
|
|
define void @foo(i32 %cond) {
|
|
; TEST-LABEL: define void @foo(
|
|
; TEST-SAME: i32 [[COND:%.*]]) !prof [[PROF0:![0-9]+]] {
|
|
; TEST-NEXT: [[I:%.*]] = icmp eq i32 [[COND]], 0
|
|
; TEST-NEXT: br i1 [[I]], label %[[A:.*]], label %[[B:.*]], !prof [[PROF1:![0-9]+]]
|
|
; TEST: [[A]]:
|
|
; TEST-NEXT: switch i32 [[COND]], label %[[DEFAULT:.*]] [
|
|
; TEST-NEXT: i32 10, label %[[C:.*]]
|
|
; TEST-NEXT: i32 20, label %[[D:.*]]
|
|
; TEST-NEXT: ], !prof [[PROF2:![0-9]+]]
|
|
; TEST: [[BB1:.*:]]
|
|
; TEST-NEXT: br label %[[B]]
|
|
; TEST: [[B]]:
|
|
; TEST-NEXT: ret void
|
|
; TEST: [[DEFAULT]]:
|
|
; TEST-NEXT: ret void
|
|
; TEST: [[C]]:
|
|
; TEST-NEXT: ret void
|
|
; TEST: [[D]]:
|
|
; TEST-NEXT: ret void
|
|
;
|
|
; NORMAL-LABEL: define void @foo(
|
|
; NORMAL-SAME: i32 [[COND:%.*]]) !prof [[PROF0:![0-9]+]] {
|
|
; NORMAL-NEXT: [[I:%.*]] = icmp eq i32 [[COND]], 0
|
|
; NORMAL-NEXT: br i1 [[I]], label %[[A:.*]], label %[[B:.*]], !prof [[PROF1:![0-9]+]]
|
|
; NORMAL: [[A]]:
|
|
; NORMAL-NEXT: switch i32 [[COND]], label %[[DEFAULT:.*]] [
|
|
; NORMAL-NEXT: i32 10, label %[[C:.*]]
|
|
; NORMAL-NEXT: i32 20, label %[[D:.*]]
|
|
; NORMAL-NEXT: ], !prof [[PROF2:![0-9]+]]
|
|
; NORMAL: [[BB1:.*:]]
|
|
; NORMAL-NEXT: br label %[[B]]
|
|
; NORMAL: [[B]]:
|
|
; NORMAL-NEXT: ret void
|
|
; NORMAL: [[DEFAULT]]:
|
|
; NORMAL-NEXT: ret void
|
|
; NORMAL: [[C]]:
|
|
; NORMAL-NEXT: ret void
|
|
; NORMAL: [[D]]:
|
|
; NORMAL-NEXT: ret void
|
|
;
|
|
%i = icmp eq i32 %cond, 0
|
|
br i1 %i, label %a, label %b
|
|
a:
|
|
switch i32 %cond, label %default [
|
|
i32 10, label %c
|
|
i32 20, label %d
|
|
]
|
|
br label %b
|
|
b:
|
|
ret void
|
|
default:
|
|
ret void
|
|
c:
|
|
ret void
|
|
d:
|
|
ret void
|
|
}
|
|
;.
|
|
; TEST: [[PROF0]] = !{!"function_entry_count", i64 1000}
|
|
; TEST: [[PROF1]] = !{!"branch_weights", i32 3, i32 5}
|
|
; TEST: [[PROF2]] = !{!"branch_weights", i32 5, i32 7, i32 11}
|
|
;.
|
|
; NORMAL: [[PROF0]] = !{!"function_entry_count", i64 1000}
|
|
; NORMAL: [[PROF1]] = !{!"branch_weights", i32 3, i32 5}
|
|
; NORMAL: [[PROF2]] = !{!"branch_weights", i32 1, i32 1, i32 1}
|
|
;.
|
|
;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
|
|
; CHECK: {{.*}}
|