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
103 lines
3.2 KiB
LLVM
103 lines
3.2 KiB
LLVM
; RUN: opt %loadNPMPolly -aa-pipeline=basic-aa -polly-invariant-load-hoisting=true '-passes=polly-custom<scops>' -polly-print-scops -disable-output < %s 2>&1 | FileCheck %s
|
|
|
|
; void f(long A[], int N, int *init_ptr) {
|
|
; long i, j;
|
|
;
|
|
; for (i = 0; i < N; ++i) {
|
|
; init = *init_ptr;
|
|
; for (i = 0; i < N; ++i) {
|
|
; A[i] = init + 2;
|
|
; }
|
|
; }
|
|
; }
|
|
|
|
; CHECK-LABEL: Function: f
|
|
;
|
|
; CHECK: Statements {
|
|
; CHECK-NEXT: Stmt_for_j
|
|
; CHECK-NEXT: Domain :=
|
|
; CHECK-NEXT: [N] -> { Stmt_for_j[i0, i1] : 0 <= i0 < N and 0 <= i1 < N };
|
|
; CHECK-NEXT: Schedule :=
|
|
; CHECK-NEXT: [N] -> { Stmt_for_j[i0, i1] -> [i0, i1] };
|
|
; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 1]
|
|
; CHECK-NEXT: [N] -> { Stmt_for_j[i0, i1] -> MemRef_init[] };
|
|
; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
|
|
; CHECK-NEXT: [N] -> { Stmt_for_j[i0, i1] -> MemRef_A[i1] };
|
|
; CHECK-NEXT: }
|
|
;
|
|
; CHECK-LABEL: Function: g
|
|
;
|
|
; CHECK: Statements {
|
|
; CHECK-NEXT: Stmt_for_j
|
|
; CHECK-NEXT: Domain :=
|
|
; CHECK-NEXT: [N] -> { Stmt_for_j[i0, i1] : 0 <= i0 < N and 0 <= i1 < N };
|
|
; CHECK-NEXT: Schedule :=
|
|
; CHECK-NEXT: [N] -> { Stmt_for_j[i0, i1] -> [i0, i1] };
|
|
; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
|
|
; CHECK-NEXT: [N] -> { Stmt_for_j[i0, i1] -> MemRef_A[i1] };
|
|
; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 1]
|
|
; CHECK-NEXT: [N] -> { Stmt_for_j[i0, i1] -> MemRef_init[] };
|
|
; CHECK-NEXT: }
|
|
|
|
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
|
|
|
|
|
|
define void @f(ptr noalias %A, i64 %N, ptr noalias %init_ptr) nounwind {
|
|
entry:
|
|
br label %for.i
|
|
|
|
for.i:
|
|
%indvar.i = phi i64 [ 0, %entry ], [ %indvar.i.next, %for.i.end ]
|
|
%indvar.i.next = add nsw i64 %indvar.i, 1
|
|
br label %entry.next
|
|
|
|
entry.next:
|
|
%init = load i64, ptr %init_ptr
|
|
br label %for.j
|
|
|
|
for.j:
|
|
%indvar.j = phi i64 [ 0, %entry.next ], [ %indvar.j.next, %for.j ]
|
|
%init_plus_two = add i64 %init, 2
|
|
%scevgep = getelementptr i64, ptr %A, i64 %indvar.j
|
|
store i64 %init_plus_two, ptr %scevgep
|
|
%indvar.j.next = add nsw i64 %indvar.j, 1
|
|
%exitcond.j = icmp eq i64 %indvar.j.next, %N
|
|
br i1 %exitcond.j, label %for.i.end, label %for.j
|
|
|
|
for.i.end:
|
|
%exitcond.i = icmp eq i64 %indvar.i.next, %N
|
|
br i1 %exitcond.i, label %return, label %for.i
|
|
|
|
return:
|
|
ret void
|
|
}
|
|
|
|
define void @g(ptr noalias %A, i64 %N, ptr noalias %init_ptr) nounwind {
|
|
entry:
|
|
br label %for.i
|
|
|
|
for.i:
|
|
%indvar.i = phi i64 [ 0, %entry ], [ %indvar.i.next, %for.i.end ]
|
|
%indvar.i.next = add nsw i64 %indvar.i, 1
|
|
br label %entry.next
|
|
|
|
entry.next:
|
|
%init = load i64, ptr %init_ptr
|
|
br label %for.j
|
|
|
|
for.j:
|
|
%indvar.j = phi i64 [ 0, %entry.next ], [ %indvar.j.next, %for.j ]
|
|
%scevgep = getelementptr i64, ptr %A, i64 %indvar.j
|
|
store i64 %init, ptr %scevgep
|
|
%indvar.j.next = add nsw i64 %indvar.j, 1
|
|
%exitcond.j = icmp eq i64 %indvar.j.next, %N
|
|
br i1 %exitcond.j, label %for.i.end, label %for.j
|
|
|
|
for.i.end:
|
|
%exitcond.i = icmp eq i64 %indvar.i.next, %N
|
|
br i1 %exitcond.i, label %return, label %for.i
|
|
|
|
return:
|
|
ret void
|
|
}
|