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
78 lines
3.3 KiB
LLVM
78 lines
3.3 KiB
LLVM
; RUN: opt %loadNPMPolly '-passes=polly-custom<mse>' -polly-print-mse -disable-output < %s | FileCheck %s
|
|
; RUN: opt %loadNPMPolly '-passes=polly-custom<mse>' -polly-print-mse -pass-remarks-analysis=polly-mse -disable-output < %s 2>&1 | FileCheck %s --check-prefix=MSE
|
|
;
|
|
; Verify that the accesses are correctly expanded for MemoryKind::PHI
|
|
; tmp_04 is not expanded because it need copy-in.
|
|
;
|
|
; Original source code :
|
|
;
|
|
; #define Ni 10000
|
|
; #define Nj 10000
|
|
;
|
|
; void mse(double A[Ni], double B[Nj]) {
|
|
; int i,j;
|
|
; double tmp = 6;
|
|
; for (i = 0; i < Ni; i++) {
|
|
; for (int j = 0; j<Nj; j++) {
|
|
; tmp = tmp + 2;
|
|
; }
|
|
; B[i] = tmp;
|
|
; }
|
|
;
|
|
; Check that the pass detects that tmp_04 reads from original value.
|
|
;
|
|
; MSE: MemRef_tmp_04__phi read from its original value.
|
|
;
|
|
; Check that the SAI are created except the expanded SAI of tmp_04.
|
|
;
|
|
; CHECK-NOT: double MemRef_tmp_04__phi_Stmt_for_body_expanded[10000]; // Element size 8
|
|
; CHECK: double MemRef_tmp_11__phi_Stmt_for_inc_expanded[10000][10000]; // Element size
|
|
; CHECK: double MemRef_add_lcssa__phi_Stmt_for_end_expanded[10000]; // Element size 8
|
|
; CHECK: double MemRef_B_Stmt_for_end_expanded[10000]; // Element size 8
|
|
;
|
|
; Check that the memory accesses are modified except those related to tmp_04.
|
|
;
|
|
; CHECK-NOT: new: { Stmt_for_body[i0] -> MemRef_tmp_04__phi_Stmt_for_body_expanded[i0] };
|
|
; CHECK: new: { Stmt_for_body[i0] -> MemRef_tmp_11__phi_Stmt_for_inc_expanded[i0, 0] };
|
|
; CHECK: new: { Stmt_for_inc[i0, i1] -> MemRef_tmp_11__phi_Stmt_for_inc_expanded[i0, 1 + i1] : i1 <= 9998 };
|
|
; CHECK: new: { Stmt_for_inc[i0, i1] -> MemRef_tmp_11__phi_Stmt_for_inc_expanded[i0, i1] };
|
|
; CHECK: new: { Stmt_for_inc[i0, 9999] -> MemRef_add_lcssa__phi_Stmt_for_end_expanded[i0] };
|
|
; CHECK-NOT: new: { Stmt_for_end[i0] -> MemRef_tmp_04__phi_Stmt_for_body_expanded[1 + i0] : i0 <= 9998 };
|
|
; CHECK: new: { Stmt_for_end[i0] -> MemRef_add_lcssa__phi_Stmt_for_end_expanded[i0] };
|
|
; CHECK: new: { Stmt_for_end[i0] -> MemRef_B_Stmt_for_end_expanded[i0] };
|
|
;
|
|
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
|
target triple = "x86_64-unknown-linux-gnu"
|
|
|
|
define void @tmp(ptr %A, ptr %B) {
|
|
entry:
|
|
br label %entry.split
|
|
|
|
entry.split: ; preds = %entry
|
|
br label %for.body
|
|
|
|
for.body: ; preds = %entry.split, %for.end
|
|
%indvars.iv = phi i64 [ 0, %entry.split ], [ %indvars.iv.next, %for.end ]
|
|
%tmp.04 = phi double [ 6.000000e+00, %entry.split ], [ %add.lcssa, %for.end ]
|
|
br label %for.inc
|
|
|
|
for.inc: ; preds = %for.body, %for.inc
|
|
%j1.02 = phi i32 [ 0, %for.body ], [ %inc, %for.inc ]
|
|
%tmp.11 = phi double [ %tmp.04, %for.body ], [ %add, %for.inc ]
|
|
%add = fadd double %tmp.11, 2.000000e+00
|
|
%inc = add nuw nsw i32 %j1.02, 1
|
|
%exitcond = icmp ne i32 %inc, 10000
|
|
br i1 %exitcond, label %for.inc, label %for.end
|
|
|
|
for.end: ; preds = %for.inc
|
|
%add.lcssa = phi double [ %add, %for.inc ]
|
|
%arrayidx = getelementptr inbounds double, ptr %B, i64 %indvars.iv
|
|
store double %add.lcssa, ptr %arrayidx, align 8
|
|
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
|
|
%exitcond5 = icmp ne i64 %indvars.iv.next, 10000
|
|
br i1 %exitcond5, label %for.body, label %for.end7
|
|
|
|
for.end7: ; preds = %for.end
|
|
ret void
|
|
}
|