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

48 lines
1.5 KiB
LLVM

; RUN: opt <%s -p "print<scalar-evolution>" -disable-output 2>&1 | FileCheck %s
; RUN: opt <%s -p "loop(loop-idiom),print<scalar-evolution>" -disable-output 2>&1 | FileCheck %s
; CHECK: backedge-taken count is i64 1
; IR corresponds to the following C test:
; extern char a[];
; void foo() {
; for (long c = 0; c < 6; c += -2078836808675943215)
; for (long d; d < 6; d++)
; a[c + d] = 0;
; }
@a = external global [0 x i8]
define void @foo() {
entry:
br label %outerL
outerL: ; preds = %entry, %outerLatch
%e = phi i64 [ poison, %entry ], [ %lcssa, %outerLatch ]
%c = phi i64 [ 0, %entry ], [ %c.next, %outerLatch ]
%e.cmp = icmp slt i64 %e, 6
br i1 %e.cmp, label %innerL, label %outerLatch
innerL: ; preds = %outerL, %innerL
%d = phi i64 [ %d.next, %innerL ], [ %e, %outerL ]
%add = add nsw i64 %d, %c
%arrayidx = getelementptr inbounds [0 x i8], ptr @a, i64 0, i64 %add
store i8 0, ptr %arrayidx
%d.next = add nsw i64 %d, 1
%d.cmp = icmp slt i64 %d, 5
br i1 %d.cmp, label %innerL, label %outerLatch, !llvm.loop !0
outerLatch: ; preds = %innerL, %outerL
%lcssa = phi i64 [ %e, %outerL ], [ %d.next, %innerL ]
%c.next = add nsw i64 %c, -2078836808675943215
%c.cmp = icmp slt i64 %c, 2078836808675943221
br i1 %c.cmp, label %outerL, label %exit, !llvm.loop !1
exit: ; preds = %outerLatch
ret void
}
!0 = distinct !{!0, !2}
!1 = distinct !{!1, !2}
!2 = !{!"llvm.loop.mustprogress"}