1; RUN: opt %loadPolly -basic-aa -polly-detect -analyze \ 2; RUN: -polly-allow-modref-calls < %s | FileCheck %s -check-prefix=MODREF 3; RUN: opt %loadPolly -basic-aa -polly-detect -analyze \ 4; RUN: < %s | FileCheck %s 5; 6; CHECK-NOT: Valid Region for Scop: for.body => for.end 7; MODREF: Valid Region for Scop: for.body => for.end 8; 9; #pragma readonly 10; int func(int *A); 11; 12; void jd(int *A) { 13; for (int i = 0; i < 1024; i++) 14; A[i + 2] = func(A); 15; } 16; 17target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 18 19declare i32 @func(i32* %A) #1 20 21define void @jd(i32* %A) { 22entry: 23 br label %for.body 24 25for.body: ; preds = %entry, %for.inc 26 %i = phi i64 [ 0, %entry ], [ %i.next, %for.inc ] 27 %call = call i32 @func(i32* %A) 28 %tmp = add nsw i64 %i, 2 29 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %tmp 30 store i32 %call, i32* %arrayidx, align 4 31 br label %for.inc 32 33for.inc: ; preds = %for.body 34 %i.next = add nuw nsw i64 %i, 1 35 %exitcond = icmp ne i64 %i.next, 1024 36 br i1 %exitcond, label %for.body, label %for.end 37 38for.end: ; preds = %for.inc 39 ret void 40} 41 42attributes #1 = { nounwind readonly } 43