Files
TheRock/compiler/amd-llvm/llvm/test/Transforms/GlobalDCE/complex-constantexpr.ll
T
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

100 lines
2.7 KiB
LLVM

; RUN: opt -O2 -disable-output < %s
; PR15714
%struct.ham = type { i32 }
@global5 = common global i32 0, align 4
@global6 = common global i32 0, align 4
@global7 = common global i32 0, align 4
@global = common global i32 0, align 4
@global8 = common global %struct.ham zeroinitializer, align 4
@global9 = common global i32 0, align 4
@global10 = common global i32 0, align 4
@global11 = common global i32 0, align 4
define void @zot12() {
bb:
store i32 0, ptr @global5, align 4
store i32 0, ptr @global6, align 4
br label %bb2
bb1: ; preds = %bb11
%tmp = load i32, ptr @global5, align 4
br label %bb2
bb2: ; preds = %bb1, %bb
%tmp3 = phi i32 [ %tmp, %bb1 ], [ 0, %bb ]
%cmp = icmp ne i64 ptrtoint (ptr @global5 to i64), 1
%ext = zext i1 %cmp to i32
%tmp4 = xor i32 %tmp3, %ext
store i32 %tmp4, ptr @global5, align 4
%tmp5 = icmp eq i32 %tmp3, %ext
br i1 %tmp5, label %bb8, label %bb6
bb6: ; preds = %bb2
%tmp7 = tail call i32 @quux13()
br label %bb8
bb8: ; preds = %bb6, %bb2
%tmp9 = load i32, ptr @global7, align 4
%tmp10 = icmp eq i32 %tmp9, 0
br i1 %tmp10, label %bb11, label %bb15
bb11: ; preds = %bb8
%tmp12 = load i32, ptr @global6, align 4
%tmp13 = add nsw i32 %tmp12, 1
store i32 %tmp13, ptr @global6, align 4
%tmp14 = icmp slt i32 %tmp13, 42
br i1 %tmp14, label %bb1, label %bb15
bb15: ; preds = %bb11, %bb8
ret void
}
define i32 @quux13() {
bb:
store i32 1, ptr @global5, align 4
ret i32 1
}
define void @wombat() {
bb:
tail call void @zot12()
ret void
}
define void @wombat14() {
bb:
tail call void @blam()
ret void
}
define void @blam() {
bb:
store i32 ptrtoint (ptr @global to i32), ptr @global8, align 4
store i32 0, ptr @global9, align 4
%tmp = load i32, ptr @global8, align 4
br label %bb1
bb1: ; preds = %bb1, %bb
%tmp2 = phi i32 [ 0, %bb ], [ %tmp11, %bb1 ]
%tmp3 = phi i32 [ %tmp, %bb ], [ %tmp10, %bb1 ]
%tmp4 = icmp sgt i32 %tmp3, 0
%tmp5 = zext i1 %tmp4 to i32
%tmp6 = urem i32 %tmp5, 5
%tmp7 = mul i32 %tmp3, -80
%tmp8 = or i32 %tmp7, %tmp6
%tmp9 = icmp eq i32 %tmp8, 0
%tmp10 = zext i1 %tmp9 to i32
%tmp11 = add nsw i32 %tmp2, 1
%tmp12 = icmp eq i32 %tmp11, 20
br i1 %tmp12, label %bb13, label %bb1
bb13: ; preds = %bb1
store i32 %tmp10, ptr @global8, align 4
store i32 0, ptr @global10, align 4
store i32 %tmp6, ptr @global11, align 4
store i32 20, ptr @global9, align 4
ret void
}