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
160 lines
3.5 KiB
LLVM
160 lines
3.5 KiB
LLVM
; RUN: opt < %s -passes=inline -inline-threshold=1 -S -mtriple=x86_64-unknown-linux-gnu | FileCheck %s
|
|
|
|
define i32 @callee_range(i32 %a, ptr %P) {
|
|
switch i32 %a, label %sw.default [
|
|
i32 0, label %sw.bb0
|
|
i32 1000, label %sw.bb1
|
|
i32 2000, label %sw.bb1
|
|
i32 3000, label %sw.bb1
|
|
i32 4000, label %sw.bb1
|
|
i32 5000, label %sw.bb1
|
|
i32 6000, label %sw.bb1
|
|
i32 7000, label %sw.bb1
|
|
i32 8000, label %sw.bb1
|
|
i32 9000, label %sw.bb1
|
|
]
|
|
|
|
sw.default:
|
|
store volatile i32 %a, ptr %P
|
|
br label %return
|
|
sw.bb0:
|
|
store volatile i32 %a, ptr %P
|
|
br label %return
|
|
sw.bb1:
|
|
store volatile i32 %a, ptr %P
|
|
br label %return
|
|
return:
|
|
ret i32 42
|
|
}
|
|
|
|
define i32 @caller_range(i32 %a, ptr %P) {
|
|
; CHECK-LABEL: @caller_range(
|
|
; CHECK: call i32 @callee_range
|
|
%r = call i32 @callee_range(i32 %a, ptr %P)
|
|
ret i32 %r
|
|
}
|
|
|
|
define i32 @callee_bittest(i32 %a, ptr %P) {
|
|
switch i32 %a, label %sw.default [
|
|
i32 0, label %sw.bb0
|
|
i32 1, label %sw.bb1
|
|
i32 2, label %sw.bb2
|
|
i32 3, label %sw.bb0
|
|
i32 4, label %sw.bb1
|
|
i32 5, label %sw.bb2
|
|
i32 6, label %sw.bb0
|
|
i32 7, label %sw.bb1
|
|
i32 8, label %sw.bb2
|
|
]
|
|
|
|
sw.default:
|
|
store volatile i32 %a, ptr %P
|
|
br label %return
|
|
|
|
sw.bb0:
|
|
store volatile i32 %a, ptr %P
|
|
br label %return
|
|
|
|
sw.bb1:
|
|
store volatile i32 %a, ptr %P
|
|
br label %return
|
|
|
|
sw.bb2:
|
|
br label %return
|
|
|
|
return:
|
|
ret i32 42
|
|
}
|
|
|
|
|
|
define i32 @caller_bittest(i32 %a, ptr %P) {
|
|
; CHECK-LABEL: @caller_bittest(
|
|
; CHECK-NOT: call i32 @callee_bittest
|
|
%r= call i32 @callee_bittest(i32 %a, ptr %P)
|
|
ret i32 %r
|
|
}
|
|
|
|
define i32 @callee_jumptable(i32 %a, ptr %P) {
|
|
switch i32 %a, label %sw.default [
|
|
i32 1001, label %sw.bb101
|
|
i32 1002, label %sw.bb102
|
|
i32 1003, label %sw.bb103
|
|
i32 1004, label %sw.bb104
|
|
i32 1005, label %sw.bb101
|
|
i32 1006, label %sw.bb102
|
|
i32 1007, label %sw.bb103
|
|
i32 1008, label %sw.bb104
|
|
i32 1009, label %sw.bb101
|
|
i32 1010, label %sw.bb102
|
|
i32 1011, label %sw.bb103
|
|
i32 1012, label %sw.bb104
|
|
]
|
|
|
|
sw.default:
|
|
br label %return
|
|
|
|
sw.bb101:
|
|
store volatile i32 %a, ptr %P
|
|
br label %return
|
|
|
|
sw.bb102:
|
|
store volatile i32 %a, ptr %P
|
|
br label %return
|
|
|
|
sw.bb103:
|
|
store volatile i32 %a, ptr %P
|
|
br label %return
|
|
|
|
sw.bb104:
|
|
store volatile i32 %a, ptr %P
|
|
br label %return
|
|
|
|
return:
|
|
ret i32 42
|
|
}
|
|
|
|
define i32 @caller_jumptable(i32 %a, i32 %b, ptr %P) {
|
|
; CHECK-LABEL: @caller_jumptable(
|
|
; CHECK: call i32 @callee_jumptable
|
|
%r = call i32 @callee_jumptable(i32 %b, ptr %P)
|
|
ret i32 %r
|
|
}
|
|
|
|
|
|
define internal i32 @callee_negativeCost(i32 %t) {
|
|
entry:
|
|
switch i32 %t, label %sw.default [
|
|
i32 1, label %sw.bb
|
|
i32 0, label %sw.bb1
|
|
i32 42, label %sw.bb2
|
|
i32 43, label %sw.bb3
|
|
]
|
|
|
|
sw.bb: ; preds = %entry
|
|
br label %cleanup
|
|
|
|
sw.bb1: ; preds = %entry
|
|
br label %cleanup
|
|
|
|
sw.bb2: ; preds = %entry
|
|
br label %cleanup
|
|
|
|
sw.bb3: ; preds = %entry
|
|
br label %cleanup
|
|
|
|
sw.default: ; preds = %entry
|
|
br label %cleanup
|
|
|
|
cleanup: ; preds = %sw.default, %sw.bb3, %sw.bb2, %sw.bb1, %sw.bb
|
|
%retval.0 = phi i32 [ 1, %sw.default ], [ 3, %sw.bb3 ], [ 2, %sw.bb2 ], [ 0, %sw.bb1 ], [ 0, %sw.bb ]
|
|
ret i32 %retval.0
|
|
}
|
|
|
|
define i32 @caller_negativeCost(i32 %t) {
|
|
; CHECK-LABEL: @caller_negativeCost(
|
|
; CHECK-NOT: call i32 @callee_negativeCost
|
|
entry:
|
|
%call = call i32 @callee_negativeCost(i32 %t)
|
|
ret i32 %call
|
|
}
|