1; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s 2; RUN: opt %loadPolly -polly-function-scops -analyze < %s | FileCheck %s 3target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" 4 5; Derived from the following code: 6; 7; void foo(long n, double A[n][n]) { 8; for (long i = 0; i < n; i++) 9; A[i][i] = 1.0; 10; } 11 12 13; CHECK: Assumed Context: 14; CHECK: [n] -> { : } 15 16; CHECK: p0: %n 17; CHECK-NOT: p1 18 19; CHECK: Schedule := 20; CHECK: [n] -> { Stmt_for_i[i0] -> [i0] }; 21; CHECK: MustWriteAccess := 22; CHECK: [n] -> { Stmt_for_i[i0] -> MemRef_A[i0, i0] }; 23 24 25define void @foo(i64 %n, double* %A) { 26entry: 27 br label %for.i 28 29for.i: 30 %i = phi i64 [ 0, %entry ], [ %i.inc, %for.i ] 31 %tmp = mul nsw i64 %i, %n 32 %vlaarrayidx.sum = add i64 %i, %tmp 33 %arrayidx = getelementptr inbounds double, double* %A, i64 %vlaarrayidx.sum 34 store double 1.0, double* %arrayidx 35 %i.inc = add nsw i64 %i, 1 36 %i.exitcond = icmp eq i64 %i.inc, %n 37 br i1 %i.exitcond, label %end, label %for.i 38 39end: 40 ret void 41} 42