Files
TheRock/compiler/amd-llvm/llvm/test/Analysis/MemorySSA/pr43438.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

94 lines
2.9 KiB
LLVM

; RUN: opt -disable-output -aa-pipeline=basic-aa -passes='loop-mssa(licm),print<memoryssa>' < %s 2>&1 | FileCheck %s
target triple = "x86_64-unknown-linux-gnu"
; CHECK-LABEL: @main(i1 %arg)
; CHECK: 5 = MemoryPhi(
; CHECK-NOT: 7 = MemoryPhi(
@v_67 = external dso_local global i32, align 1
@v_76 = external dso_local global i16, align 1
@v_86 = external dso_local global ptr, align 1
define dso_local void @main(i1 %arg) {
entry:
%v_59 = alloca i16, align 2
br label %for.cond
for.cond: ; preds = %for.body, %entry
br i1 %arg, label %for.body, label %for.end
for.body: ; preds = %for.cond
store i16 undef, ptr %v_59, align 2
br label %for.cond
for.end: ; preds = %for.cond
br i1 %arg, label %if.else568, label %cond.end82
cond.false69: ; No predecessors!
br label %cond.end82
cond.end82: ; preds = %cond.false69, %cond.true55
br i1 %arg, label %if.else568, label %land.lhs.true87
land.lhs.true87: ; preds = %cond.end82
br i1 %arg, label %if.then88, label %if.else568
if.then88: ; preds = %land.lhs.true87
store ptr @v_76, ptr @v_86, align 1
br label %if.end569
if.else568: ; preds = %land.lhs.true87, %cond.end82, %for.end
store volatile i32 undef, ptr @v_67, align 1
br label %if.end569
if.end569: ; preds = %if.else568, %if.then88
ret void
}
; CHECK-LABEL: @f(i1 %arg)
; CHECK: 4 = MemoryPhi(
define void @f(i1 %arg) {
entry:
%e = alloca i16, align 1
br label %lbl1
lbl1: ; preds = %if.else, %for.end5, %entry
store i16 undef, ptr %e, align 1
%0 = load i16, ptr %e, align 1
%call = call i16 @g(i16 %0)
br i1 %arg, label %for.end, label %if.else
for.end: ; preds = %if.then
br i1 true, label %for.cond2, label %lbl2
lbl2: ; preds = %for.body4, %if.end
br label %for.cond2
for.cond2: ; preds = %lbl3
br i1 %arg, label %for.body4, label %for.end5
for.body4: ; preds = %for.cond2
br label %lbl2
for.end5: ; preds = %for.cond2
switch i32 undef, label %unreachable [
i32 0, label %if.end12
i32 2, label %lbl1
]
if.else: ; preds = %lbl1
switch i32 undef, label %unreachable [
i32 0, label %if.end12
i32 2, label %lbl1
]
if.end12: ; preds = %cleanup.cont11s, %cleanup.cont
call i16 @g(i16 1)
ret void
unreachable: ; preds = %if.else, %for.end5
unreachable
}
declare i16 @g(i16)