Files
TheRock/compiler/amd-llvm/polly/test/ScopInfo/invariant_load_addrec_sum.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

51 lines
2.0 KiB
LLVM

; RUN: opt %loadNPMPolly '-passes=polly-custom<scops>' -polly-print-scops -polly-invariant-load-hoisting=true -polly-ignore-aliasing -polly-process-unprofitable -disable-output < %s 2>&1 | FileCheck %s
;
; CHECK: Region: %entry.split---%if.end
; CHECK: Invariant Accesses: {
; CHECK: ReadAccess := [Reduction Type: NONE] [Scalar: 0]
; CHECK: [y, p_1_loaded_from_j] -> { Stmt_for_body[i0] -> MemRef_j[0] };
; CHECK: Execution Context: [y, p_1_loaded_from_j] -> { : y < 0 or y >= 0 }
; CHECK: }
; CHECK: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
; CHECK: [y, p_1_loaded_from_j] -> { Stmt_for_body5[i0] -> MemRef_p[p_1_loaded_from_j + i0] };
; CHECK: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
; CHECK: [y, p_1_loaded_from_j] -> { Stmt_for_body[i0] -> MemRef_p[p_1_loaded_from_j + i0] };
define void @a(i32 %y, ptr nocapture %p, ptr nocapture readonly %j) local_unnamed_addr #0 {
entry:
br label %entry.split
entry.split:
%tobool = icmp eq i32 %y, 0
br i1 %tobool, label %for.body5, label %for.body
for.body:
%i.024 = phi i32 [ %inc, %for.body ], [ 0, %entry.split ]
%0 = load i32, ptr %j, align 4
%add = add nsw i32 %0, %i.024
%idxprom = sext i32 %add to i64
%arrayidx = getelementptr inbounds i32, ptr %p, i64 %idxprom
store i32 %i.024, ptr %arrayidx, align 4
%inc = add nuw nsw i32 %i.024, 1
%exitcond26 = icmp eq i32 %inc, 10000
br i1 %exitcond26, label %if.end, label %for.body
for.body5:
%i1.023 = phi i32 [ %inc10, %for.body5 ], [ 0, %entry.split ]
%mul = shl nsw i32 %i1.023, 1
%1 = load i32, ptr %j, align 4
%add6 = add nsw i32 %1, %i1.023
%idxprom7 = sext i32 %add6 to i64
%arrayidx8 = getelementptr inbounds i32, ptr %p, i64 %idxprom7
store i32 %mul, ptr %arrayidx8, align 4
%inc10 = add nuw nsw i32 %i1.023, 1
%exitcond = icmp eq i32 %inc10, 10000
br i1 %exitcond, label %if.end, label %for.body5
if.end:
ret void
}