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

46 lines
1.8 KiB
LLVM

; REQUIRES: asserts
; RUN: opt -passes=loop-distribute -enable-loop-distribute \
; RUN: -debug-only=loop-distribute -disable-output 2>&1 %s | FileCheck %s
define void @f(ptr noalias %a, ptr noalias %b, ptr noalias %c, ptr noalias %d, i64 %stride) {
; CHECK-LABEL: LDist: Checking a loop in 'f' from f.c:5:2
entry:
br label %for.body
for.body: ; preds = %for.body, %entry
%ind = phi i64 [ 0, %entry ], [ %add, %for.body ]
%gep.a = getelementptr inbounds i32, ptr %a, i64 %ind
%load.a = load i32, ptr %gep.a, align 4
%gep.b = getelementptr inbounds i32, ptr %b, i64 %ind
%load.b = load i32, ptr %gep.b, align 4
%mul.a = mul i32 %load.b, %load.a
%add = add nuw nsw i64 %ind, 1
%gep.a.plus4 = getelementptr inbounds i32, ptr %a, i64 %add
store i32 %mul.a, ptr %gep.a.plus4, align 4
%gep.d = getelementptr inbounds i32, ptr %d, i64 %ind
%loadD = load i32, ptr %gep.d, align 4
%mul = mul i64 %ind, %stride
%gep.strided.a = getelementptr inbounds i32, ptr %a, i64 %mul
%load.strided.a = load i32, ptr %gep.strided.a, align 4
%mul.c = mul i32 %loadD, %load.strided.a
%gep.c = getelementptr inbounds i32, ptr %c, i64 %ind
store i32 %mul.c, ptr %gep.c, align 4
%exitcond = icmp eq i64 %add, 20
br i1 %exitcond, label %exit, label %for.body, !dbg !2
exit: ; preds = %for.body
ret void
}
!llvm.module.flags = !{!5, !6, !7}
!0 = !DIFile(filename: "f.c", directory: "/")
!1 = distinct !DISubprogram(name: "f", scope: !0, file: !0, type: !8, unit: !4)
!2 = !DILocation(line: 5, column: 2, scope: !1)
!4 = distinct !DICompileUnit(language: DW_LANG_C99, file: !0, producer: "clang")
!5 = !{i32 1, !"Debug Info Version", i32 3}
!6 = !{i32 2, !"Dwarf Version", i32 2}
!7 = !{i32 1, !"PIC Level", i32 2}
!8 = !DISubroutineType(types: !9)
!9 = !{null}