1 ; RUN: opt %loadPolly -basicaa -polly-scops -analyze -polly-allow-modref-calls \
2 ; RUN: < %s | FileCheck %s
3 ; RUN: opt %loadPolly -basicaa -polly-codegen -disable-output \
4 ; RUN: -polly-allow-modref-calls < %s
6 ; Check that we assume the call to func has a read on the whole A array.
9 ; CHECK-NEXT: Domain :=
10 ; CHECK-NEXT: { Stmt_for_body[i0] : 0 <= i0 <= 1023 };
11 ; CHECK-NEXT: Schedule :=
12 ; CHECK-NEXT: { Stmt_for_body[i0] -> [i0] };
13 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE]
14 ; CHECK-NEXT: { Stmt_for_body[i0] -> MemRef_A[2 + i0] };
15 ; CHECK-NEXT: ReadAccess := [Reduction Type: NONE]
16 ; CHECK-NEXT: { Stmt_for_body[i0] -> MemRef_A[o0] };
22 ; for (int i = 0; i < 1024; i++)
26 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
28 define void @jd(i32* %A) {
32 for.cond: ; preds = %for.inc, %entry
33 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ]
34 %exitcond = icmp ne i64 %indvars.iv, 1024
35 br i1 %exitcond, label %for.body, label %for.end
37 for.body: ; preds = %for.cond
38 %call = call i32 @func(i32* %A) #2
39 %tmp = add nsw i64 %indvars.iv, 2
40 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %tmp
41 store i32 %call, i32* %arrayidx, align 4
44 for.inc: ; preds = %for.body
45 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
48 for.end: ; preds = %for.cond
52 declare i32 @func(i32*) #1
54 attributes #1 = { nounwind readonly }