1 ; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s
2 ; RUN: opt %loadPolly -polly-function-scops -analyze < %s | FileCheck %s
3 target 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"
5 ; Derived from the following code:
7 ; void foo(long n, double A[n][n]) {
8 ; for (long i = 0; i < n; i++)
13 ; CHECK: Assumed Context:
20 ; CHECK: [n] -> { Stmt_for_i[i0] -> [i0] };
21 ; CHECK: MustWriteAccess :=
22 ; CHECK: [n] -> { Stmt_for_i[i0] -> MemRef_A[i0, i0] };
25 define void @foo(i64 %n, double* %A) {
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