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

81 lines
2.4 KiB
LLVM

; This test exercises that we don't corrupt a loop-analysis when running loop
; unrolling in a way that deletes a loop. To do that, we first ensure the
; analysis is cached, then unroll the loop (deleting it) and make sure that the
; next function doesn't get a cache "hit" for this stale analysis result.
;
; RUN: opt -S -passes='require<access-info>,loop-unroll,print<access-info>' -debug-pass-manager < %s 2>&1 | FileCheck %s
;
; CHECK: Running pass: RequireAnalysisPass<{{.*}}LoopAccessAnalysis
; CHECK: Running analysis: LoopAnalysis
; CHECK: Running pass: LoopUnrollPass
; CHECK: Invalidating analysis: LoopAccessAnalysis on test
; CHECK: Running pass: LoopAccessInfoPrinterPass
; CHECK: Running analysis: LoopAccessAnalysis on test
; CHECK: Printing analysis 'Loop Access Analysis' for function 'test':
; CHECK: inner1.header:
; CHECK: inner1.header.1:
target triple = "x86_64-unknown-linux-gnu"
define void @test(i32 %inner1.count) {
; CHECK-LABEL: define void @test(
bb:
br label %outer.ph
outer.ph:
br label %outer.header
outer.header:
%outer.i = phi i32 [ 0, %outer.ph ], [ %outer.i.next, %outer.latch ]
br label %inner1.ph
inner1.ph:
br label %inner1.header
inner1.header:
%inner1.i = phi i32 [ 0, %inner1.ph ], [ %inner1.i.next, %inner1.header ]
%inner1.i.next = add i32 %inner1.i, 1
%inner1.cond = icmp eq i32 %inner1.i, %inner1.count
br i1 %inner1.cond, label %inner1.exit, label %inner1.header
; We should have two unrolled copies of this loop and nothing else.
;
; CHECK-NOT: icmp eq
; CHECK-NOT: br i1
; CHECK: %[[COND1:.*]] = icmp eq i32 %{{.*}}, %inner1.count
; CHECK: br i1 %[[COND1]],
; CHECK-NOT: icmp eq
; CHECK-NOT: br i1
; CHECK: %[[COND2:.*]] = icmp eq i32 %{{.*}}, %inner1.count
; CHECK: br i1 %[[COND2]],
; CHECK-NOT: icmp eq
; CHECK-NOT: br i1
inner1.exit:
br label %inner2.ph
inner2.ph:
br label %inner2.header
inner2.header:
%inner2.i = phi i32 [ 0, %inner2.ph ], [ %inner2.i.next, %inner2.header ]
%inner2.i.next = add i32 %inner2.i, 1
%inner2.cond = icmp eq i32 %inner2.i, 4
br i1 %inner2.cond, label %inner2.exit, label %inner2.header
inner2.exit:
br label %outer.latch
outer.latch:
%outer.i.next = add i32 %outer.i, 1
%outer.cond = icmp eq i32 %outer.i.next, 2
br i1 %outer.cond, label %outer.exit, label %outer.header
outer.exit:
br label %exit
exit:
ret void
}