Files
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

64 lines
2.0 KiB
LLVM

; RUN: opt -S < %s -passes=partial-inliner -partial-inlining-extra-penalty=10 | FileCheck %s
define i32 @outline_region_notlikely(ptr %arg) local_unnamed_addr {
bb:
; ptr != null is predicted to be true
%tmp = icmp ne ptr %arg, null
br i1 %tmp, label %bb8, label %bb1
; bb1 is not likely
bb1: ; preds = %bb
%tmp2 = tail call i32 @foo(ptr nonnull %arg)
%tmp3 = tail call i32 @foo(ptr nonnull %arg)
%tmp4 = tail call i32 @foo(ptr nonnull %arg)
%tmp5 = tail call i32 @foo(ptr nonnull %arg)
%tmp6 = tail call i32 @foo(ptr nonnull %arg)
%tmp7 = tail call i32 @foo(ptr nonnull %arg)
br label %bb8
bb8: ; preds = %bb1, %bb
%tmp9 = phi i32 [ 0, %bb1 ], [ 1, %bb ]
ret i32 %tmp9
}
define i32 @outline_region_likely(ptr %arg) local_unnamed_addr {
bb:
; ptr == null is predicted to be false
%tmp = icmp eq ptr %arg, null
br i1 %tmp, label %bb8, label %bb1
; bb1 is likely
bb1: ; preds = %bb
%tmp2 = tail call i32 @foo(ptr nonnull %arg)
%tmp3 = tail call i32 @foo(ptr nonnull %arg)
%tmp4 = tail call i32 @foo(ptr nonnull %arg)
%tmp5 = tail call i32 @foo(ptr nonnull %arg)
%tmp6 = tail call i32 @foo(ptr nonnull %arg)
%tmp7 = tail call i32 @foo(ptr nonnull %arg)
br label %bb8
bb8: ; preds = %bb1, %bb
%tmp9 = phi i32 [ 0, %bb1 ], [ 1, %bb ]
ret i32 %tmp9
}
declare i32 @foo(ptr %arg)
define i32 @dummy_caller(ptr %arg) local_unnamed_addr {
; CHECK-LABEL: @dummy_caller
%tmp = call i32 @outline_region_notlikely(ptr %arg)
; CHECK: call void @outline_region_notlikely.2.bb1
%tmp2 = tail call i32 @outline_region_likely(ptr %arg)
; CHECK: %tmp2 = tail call i32 @outline_region_likely(ptr %arg)
ret i32 %tmp
}
; CHECK-LABEL: define internal void @outline_region_notlikely.2.bb1(ptr %arg) {
; CHECK-NEXT: newFuncRoot:
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 5.0.0 (trunk 304489)"}