1 ; RUN: opt %loadPolly -tbaa -polly-scops -polly-ignore-aliasing \
2 ; RUN: -analyze < %s | FileCheck %s
4 ; Note: The order of the invariant accesses is important because A is the
5 ; base pointer of tmp3 and we will generate code in the same order as
6 ; the invariant accesses are listed here.
8 ; CHECK: Invariant Accesses: {
9 ; CHECK: ReadAccess := [Reduction Type: NONE] [Scalar: 0]
11 ; CHECK: ReadAccess := [Reduction Type: NONE] [Scalar: 0]
12 ; CHECK: MemRef_tmp3[32]
16 ; CHECK: i32** MemRef_A[*];
17 ; CHECK: i32* MemRef_tmp3[*]; [BasePtrOrigin: MemRef_A]
18 ; CHECK: i32 MemRef_tmp5[*]; [BasePtrOrigin: MemRef_tmp3]
21 ; CHECK: Arrays (Bounds as pw_affs) {
22 ; CHECK: i32** MemRef_A[*];
23 ; CHECK: i32* MemRef_tmp3[*]; [BasePtrOrigin: MemRef_A]
24 ; CHECK: i32 MemRef_tmp5[*]; [BasePtrOrigin: MemRef_tmp3]
28 ; for (int i = 0; i < 1024; i++)
32 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
34 define void @f(i32*** %A) {
38 bb1: ; preds = %bb7, %bb
39 %indvars.iv = phi i64 [ %indvars.iv.next, %bb7 ], [ 0, %bb ]
40 %exitcond = icmp ne i64 %indvars.iv, 1024
41 br i1 %exitcond, label %bb2, label %bb8
44 %tmp = getelementptr inbounds i32**, i32*** %A, i64 42
45 %tmp3 = load i32**, i32*** %tmp, align 8
46 %tmp4 = getelementptr inbounds i32*, i32** %tmp3, i64 32
47 %tmp5 = load i32*, i32** %tmp4, align 8
48 %tmp6 = getelementptr inbounds i32, i32* %tmp5, i64 %indvars.iv
49 store i32 0, i32* %tmp6, align 4
53 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1