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
86 lines
3.1 KiB
LLVM
86 lines
3.1 KiB
LLVM
; RUN: opt %loadNPMPolly -polly-analyze-read-only-scalars=true '-passes=polly-custom<optree>' -polly-print-optree -disable-output < %s | FileCheck %s -match-full-lines -check-prefixes=STATS,MODEL
|
|
; RUN: opt %loadNPMPolly -polly-analyze-read-only-scalars=false '-passes=polly-custom<optree>' -polly-print-optree -disable-output < %s | FileCheck %s -match-full-lines -check-prefixes=STATS,NOMODEL
|
|
;
|
|
; Move %val to %bodyB, so %bodyA can be removed (by -polly-simplify)
|
|
;
|
|
; for (int j = 0; j < n; j += 1) {
|
|
; bodyA:
|
|
; double val = arg + 21.0;
|
|
;
|
|
; bodyB:
|
|
; A[0] = val;
|
|
; }
|
|
;
|
|
define void @func(i32 %n, ptr noalias nonnull %A, double %arg) {
|
|
entry:
|
|
br label %for
|
|
|
|
for:
|
|
%j = phi i32 [0, %entry], [%j.inc, %inc]
|
|
%j.cmp = icmp slt i32 %j, %n
|
|
br i1 %j.cmp, label %bodyA, label %exit
|
|
|
|
bodyA:
|
|
%val = fadd double %arg, 21.0
|
|
br label %bodyB
|
|
|
|
bodyB:
|
|
store double %val, ptr %A
|
|
br label %inc
|
|
|
|
inc:
|
|
%j.inc = add nuw nsw i32 %j, 1
|
|
br label %for
|
|
|
|
exit:
|
|
br label %return
|
|
|
|
return:
|
|
ret void
|
|
}
|
|
|
|
|
|
; STATS: Statistics {
|
|
; STATS: Instructions copied: 1
|
|
; MODEL: Read-only accesses copied: 1
|
|
; NOMODEL: Read-only accesses copied: 0
|
|
; STATS: Operand trees forwarded: 1
|
|
; STATS: Statements with forwarded operand trees: 1
|
|
; STATS: }
|
|
|
|
; MODEL: After statements {
|
|
; MODEL-NEXT: Stmt_bodyA
|
|
; MODEL-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 1]
|
|
; MODEL-NEXT: [n] -> { Stmt_bodyA[i0] -> MemRef_arg[] };
|
|
; MODEL-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1]
|
|
; MODEL-NEXT: [n] -> { Stmt_bodyA[i0] -> MemRef_val[] };
|
|
; MODEL-NEXT: Instructions {
|
|
; MODEL-NEXT: %val = fadd double %arg, 2.100000e+01
|
|
; MODEL-NEXT: }
|
|
; MODEL-NEXT: Stmt_bodyB
|
|
; MODEL-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
|
|
; MODEL-NEXT: [n] -> { Stmt_bodyB[i0] -> MemRef_A[0] };
|
|
; MODEL-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 1]
|
|
; MODEL-NEXT: [n] -> { Stmt_bodyB[i0] -> MemRef_arg[] };
|
|
; MODEL-NEXT: Instructions {
|
|
; MODEL-NEXT: %val = fadd double %arg, 2.100000e+01
|
|
; MODEL-NEXT: store double %val, ptr %A, align 8
|
|
; MODEL-NEXT: }
|
|
; MODEL-NEXT: }
|
|
|
|
; NOMODEL: After statements {
|
|
; NOMODEL-NEXT: Stmt_bodyA
|
|
; NOMODEL-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1]
|
|
; NOMODEL-NEXT: [n] -> { Stmt_bodyA[i0] -> MemRef_val[] };
|
|
; NOMODEL-NEXT: Instructions {
|
|
; NOMODEL-NEXT: %val = fadd double %arg, 2.100000e+01
|
|
; NOMODEL-NEXT: }
|
|
; NOMODEL-NEXT: Stmt_bodyB
|
|
; NOMODEL-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
|
|
; NOMODEL-NEXT: [n] -> { Stmt_bodyB[i0] -> MemRef_A[0] };
|
|
; NOMODEL-NEXT: Instructions {
|
|
; NOMODEL-NEXT: %val = fadd double %arg, 2.100000e+01
|
|
; NOMODEL-NEXT: store double %val, ptr %A, align 8
|
|
; NOMODEL-NEXT: }
|
|
; NOMODEL-NEXT: }
|