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
111 lines
2.9 KiB
LLVM
111 lines
2.9 KiB
LLVM
; RUN: opt %loadNPMPolly '-passes=polly-custom<detect;scops>' -polly-print-detect -polly-print-scops -polly-invariant-load-hoisting=true -disable-output < %s 2>&1 | FileCheck %s
|
|
|
|
; CHECK-NOT: Function: foo_undereferanceable
|
|
|
|
; CHECK: Function: foo_dereferanceable
|
|
|
|
; CHECK: Invariant Accesses: {
|
|
; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0]
|
|
; CHECK-NEXT: [sizeA] -> { Stmt_for_body_j__TO__for_latch_j[i0, i1] -> MemRef_sizeA_ptr[0] };
|
|
; CHECK-NEXT: Execution Context: [sizeA] -> { : }
|
|
; CHECK-NEXT: }
|
|
|
|
; CHECK: MayWriteAccess := [Reduction Type: NONE] [Scalar: 0]
|
|
; CHECK-NEXT: [sizeA] -> { Stmt_for_body_j__TO__for_latch_j[i0, i1] -> MemRef_A[i1, i0] };
|
|
|
|
; CHECK-NOT: Function: foo_undereferanceable
|
|
|
|
define void @foo_dereferanceable(ptr %A, ptr %B, ptr dereferenceable(8) align 8 %sizeA_ptr,
|
|
i32 %lb.i, i32 %lb.j, i32 %ub.i, i32 %ub.j) {
|
|
entry:
|
|
br label %for.i
|
|
|
|
for.i:
|
|
%indvar.i = phi i32 [0, %entry], [%indvar.next.i, %for.latch.i]
|
|
%indvar.next.i = add i32 %indvar.i, 1
|
|
%cmp.i = icmp sle i32 %indvar.i, 1024
|
|
br i1 %cmp.i, label %for.body.i, label %exit
|
|
|
|
for.body.i:
|
|
br label %for.j
|
|
|
|
for.j:
|
|
%indvar.j = phi i32 [0, %for.body.i], [%indvar.next.j, %for.latch.j]
|
|
%indvar.next.j = add i32 %indvar.j, 1
|
|
%cmp.j = icmp sle i32 %indvar.j, 1024
|
|
br i1 %cmp.j, label %for.body.j, label %for.latch.i
|
|
|
|
for.body.j:
|
|
%prod = mul i32 %indvar.j, %indvar.j
|
|
%cmp = icmp sle i32 %prod, 1024
|
|
br i1 %cmp, label %stmt, label %for.latch.j
|
|
|
|
stmt:
|
|
%sext.i = sext i32 %indvar.i to i64
|
|
%sext.j = sext i32 %indvar.j to i64
|
|
|
|
%sizeA = load i64, ptr %sizeA_ptr
|
|
%prodA = mul i64 %sext.j, %sizeA
|
|
%offsetA = add i64 %sext.i, %prodA
|
|
%ptrA = getelementptr double, ptr %A, i64 %offsetA
|
|
store double 42.0, ptr %ptrA
|
|
|
|
br label %for.latch.j
|
|
|
|
for.latch.j:
|
|
br label %for.j
|
|
|
|
for.latch.i:
|
|
br label %for.i
|
|
|
|
exit:
|
|
ret void
|
|
}
|
|
|
|
define void @foo_undereferanceable(ptr %A, ptr %B, ptr %sizeA_ptr) {
|
|
entry:
|
|
br label %for.i
|
|
|
|
for.i:
|
|
%indvar.i = phi i32 [0, %entry], [%indvar.next.i, %for.latch.i]
|
|
%indvar.next.i = add i32 %indvar.i, 1
|
|
%cmp.i = icmp sle i32 %indvar.i, 1024
|
|
br i1 %cmp.i, label %for.body.i, label %exit
|
|
|
|
for.body.i:
|
|
br label %for.j
|
|
|
|
for.j:
|
|
%indvar.j = phi i32 [0, %for.body.i], [%indvar.next.j, %for.latch.j]
|
|
%indvar.next.j = add i32 %indvar.j, 1
|
|
%cmp.j = icmp sle i32 %indvar.j, 1024
|
|
br i1 %cmp.j, label %for.body.j, label %for.latch.i
|
|
|
|
for.body.j:
|
|
%prod = mul i32 %indvar.j, %indvar.j
|
|
%cmp = icmp sle i32 %prod, 1024
|
|
br i1 %cmp, label %stmt, label %for.latch.j
|
|
|
|
stmt:
|
|
%sext.i = sext i32 %indvar.i to i64
|
|
%sext.j = sext i32 %indvar.j to i64
|
|
|
|
%sizeA = load i64, ptr %sizeA_ptr
|
|
%prodA = mul i64 %sext.j, %sizeA
|
|
%offsetA = add i64 %sext.i, %prodA
|
|
%ptrA = getelementptr double, ptr %A, i64 %offsetA
|
|
store double 42.0, ptr %ptrA
|
|
|
|
br label %for.latch.j
|
|
|
|
for.latch.j:
|
|
br label %for.j
|
|
|
|
for.latch.i:
|
|
br label %for.i
|
|
|
|
exit:
|
|
ret void
|
|
}
|
|
|