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
113 lines
3.1 KiB
LLVM
113 lines
3.1 KiB
LLVM
; RUN: opt < %s -passes=inline -S | FileCheck %s
|
|
; RUN: opt < %s -passes='module-inline' -S | FileCheck %s
|
|
; Test that bar and bar2 are both inlined throughout and removed.
|
|
@A = weak global i32 0 ; <ptr> [#uses=1]
|
|
@B = weak global i32 0 ; <ptr> [#uses=1]
|
|
@C = weak global i32 0 ; <ptr> [#uses=1]
|
|
|
|
define fastcc void @foo(i32 %X) {
|
|
entry:
|
|
; CHECK-LABEL: @foo(
|
|
%ALL = alloca i32, align 4 ; <ptr> [#uses=1]
|
|
%tmp1 = and i32 %X, 1 ; <i32> [#uses=1]
|
|
%tmp1.upgrd.1 = icmp eq i32 %tmp1, 0 ; <i1> [#uses=1]
|
|
br i1 %tmp1.upgrd.1, label %cond_next, label %cond_true
|
|
|
|
cond_true: ; preds = %entry
|
|
store i32 1, ptr @A
|
|
br label %cond_next
|
|
|
|
cond_next: ; preds = %cond_true, %entry
|
|
%tmp4 = and i32 %X, 2 ; <i32> [#uses=1]
|
|
%tmp4.upgrd.2 = icmp eq i32 %tmp4, 0 ; <i1> [#uses=1]
|
|
br i1 %tmp4.upgrd.2, label %cond_next7, label %cond_true5
|
|
|
|
cond_true5: ; preds = %cond_next
|
|
store i32 1, ptr @B
|
|
br label %cond_next7
|
|
|
|
cond_next7: ; preds = %cond_true5, %cond_next
|
|
%tmp10 = and i32 %X, 4 ; <i32> [#uses=1]
|
|
%tmp10.upgrd.3 = icmp eq i32 %tmp10, 0 ; <i1> [#uses=1]
|
|
br i1 %tmp10.upgrd.3, label %cond_next13, label %cond_true11
|
|
|
|
cond_true11: ; preds = %cond_next7
|
|
store i32 1, ptr @C
|
|
br label %cond_next13
|
|
|
|
cond_next13: ; preds = %cond_true11, %cond_next7
|
|
%tmp16 = and i32 %X, 8 ; <i32> [#uses=1]
|
|
%tmp16.upgrd.4 = icmp eq i32 %tmp16, 0 ; <i1> [#uses=1]
|
|
br i1 %tmp16.upgrd.4, label %UnifiedReturnBlock, label %cond_true17
|
|
|
|
cond_true17: ; preds = %cond_next13
|
|
call void @ext( ptr %ALL )
|
|
ret void
|
|
|
|
UnifiedReturnBlock: ; preds = %cond_next13
|
|
ret void
|
|
}
|
|
|
|
; CHECK-NOT: @bar(
|
|
define internal fastcc void @bar(i32 %X) {
|
|
entry:
|
|
%ALL = alloca i32, align 4 ; <ptr> [#uses=1]
|
|
%tmp1 = and i32 %X, 1 ; <i32> [#uses=1]
|
|
%tmp1.upgrd.1 = icmp eq i32 %tmp1, 0 ; <i1> [#uses=1]
|
|
br i1 %tmp1.upgrd.1, label %cond_next, label %cond_true
|
|
|
|
cond_true: ; preds = %entry
|
|
store i32 1, ptr @A
|
|
br label %cond_next
|
|
|
|
cond_next: ; preds = %cond_true, %entry
|
|
%tmp4 = and i32 %X, 2 ; <i32> [#uses=1]
|
|
%tmp4.upgrd.2 = icmp eq i32 %tmp4, 0 ; <i1> [#uses=1]
|
|
br i1 %tmp4.upgrd.2, label %cond_next7, label %cond_true5
|
|
|
|
cond_true5: ; preds = %cond_next
|
|
store i32 1, ptr @B
|
|
br label %cond_next7
|
|
|
|
cond_next7: ; preds = %cond_true5, %cond_next
|
|
%tmp10 = and i32 %X, 4 ; <i32> [#uses=1]
|
|
%tmp10.upgrd.3 = icmp eq i32 %tmp10, 0 ; <i1> [#uses=1]
|
|
br i1 %tmp10.upgrd.3, label %cond_next13, label %cond_true11
|
|
|
|
cond_true11: ; preds = %cond_next7
|
|
store i32 1, ptr @C
|
|
br label %cond_next13
|
|
|
|
cond_next13: ; preds = %cond_true11, %cond_next7
|
|
%tmp16 = and i32 %X, 8 ; <i32> [#uses=1]
|
|
%tmp16.upgrd.4 = icmp eq i32 %tmp16, 0 ; <i1> [#uses=1]
|
|
br i1 %tmp16.upgrd.4, label %UnifiedReturnBlock, label %cond_true17
|
|
|
|
cond_true17: ; preds = %cond_next13
|
|
call void @foo( i32 %X )
|
|
ret void
|
|
|
|
UnifiedReturnBlock: ; preds = %cond_next13
|
|
ret void
|
|
}
|
|
|
|
define internal fastcc void @bar2(i32 %X) {
|
|
entry:
|
|
call void @foo( i32 %X )
|
|
ret void
|
|
}
|
|
|
|
declare void @ext(ptr)
|
|
|
|
define void @test(i32 %X) {
|
|
entry:
|
|
; CHECK: test
|
|
; CHECK-NOT: @bar(
|
|
tail call fastcc void @bar( i32 %X )
|
|
tail call fastcc void @bar( i32 %X )
|
|
tail call fastcc void @bar2( i32 %X )
|
|
tail call fastcc void @bar2( i32 %X )
|
|
ret void
|
|
; CHECK: ret
|
|
}
|