Files
TheRock/compiler/amd-llvm/polly/test/ScopInfo/pointer-used-as-base-pointer-and-scalar-read.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

81 lines
3.0 KiB
LLVM

; RUN: opt %loadNPMPolly -polly-stmt-granularity=bb '-passes=polly-custom<scops>' -polly-print-scops -disable-output < %s 2>&1 | FileCheck %s
; In this test case we pass a pointer %A into a PHI node and also use this
; pointer as base pointer of an array store. As a result, we get both scalar
; and array memory accesses to A[] and A[0].
; CHECK: Arrays {
; CHECK-NEXT: float MemRef_A[*]; // Element size 4
; CHECK-NEXT: ptr MemRef_x__phi; // Element size 8
; CHECK-NEXT: ptr MemRef_C[*]; // Element size 8
; CHECK-NEXT: }
; CHECK: Arrays (Bounds as pw_affs) {
; CHECK-NEXT: float MemRef_A[*]; // Element size 4
; CHECK-NEXT: ptr MemRef_x__phi; // Element size 8
; CHECK-NEXT: ptr MemRef_C[*]; // Element size 8
; CHECK-NEXT: }
; CHECK: Alias Groups (0):
; CHECK-NEXT: n/a
; CHECK: Statements {
; CHECK-NEXT: Stmt_then
; CHECK-NEXT: Domain :=
; CHECK-NEXT: [p] -> { Stmt_then[i0] : p = 32 and 0 <= i0 <= 999 };
; CHECK-NEXT: Schedule :=
; CHECK-NEXT: [p] -> { Stmt_then[i0] -> [i0, 1] };
; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
; CHECK-NEXT: [p] -> { Stmt_then[i0] -> MemRef_A[0] };
; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1]
; CHECK-NEXT: [p] -> { Stmt_then[i0] -> MemRef_x__phi[] };
; CHECK-NEXT: Stmt_else
; CHECK-NEXT: Domain :=
; CHECK-NEXT: [p] -> { Stmt_else[i0] : 0 <= i0 <= 999 and (p >= 33 or p <= 31) };
; CHECK-NEXT: Schedule :=
; CHECK-NEXT: [p] -> { Stmt_else[i0] -> [i0, 0] : p >= 33 or p <= 31 };
; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
; CHECK-NEXT: [p] -> { Stmt_else[i0] -> MemRef_A[0] };
; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1]
; CHECK-NEXT: [p] -> { Stmt_else[i0] -> MemRef_x__phi[] };
; CHECK-NEXT: Stmt_bb8
; CHECK-NEXT: Domain :=
; CHECK-NEXT: [p] -> { Stmt_bb8[i0] : 0 <= i0 <= 999 };
; CHECK-NEXT: Schedule :=
; CHECK-NEXT: [p] -> { Stmt_bb8[i0] -> [i0, 2] };
; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 1]
; CHECK-NEXT: [p] -> { Stmt_bb8[i0] -> MemRef_x__phi[] };
; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
; CHECK-NEXT: [p] -> { Stmt_bb8[i0] -> MemRef_C[0] };
; CHECK-NEXT: }
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
define void @foo(ptr noalias %A, ptr noalias %B, ptr noalias %C, i32 %p) {
bb:
br label %bb1
bb1:
%i.0 = phi i64 [ 0, %bb ], [ %tmp9, %bb8 ]
%exitcond = icmp ne i64 %i.0, 1000
br i1 %exitcond, label %bb2, label %bb10
bb2:
%cmp = icmp eq i32 %p, 32
br i1 %cmp, label %then, label %else
then:
store float 3.0, ptr %A
br label %bb8
else:
store float 4.0, ptr %A
br label %bb8
bb8:
%x = phi ptr [%A, %then], [%B, %else]
store ptr %x, ptr %C
%tmp9 = add nuw nsw i64 %i.0, 1
br label %bb1
bb10:
ret void
}