1; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s 2 3; void f(int a[], int N) { 4; int i; 5; for (i = 0; i < N; ++i) 6; a[i] = i; 7; } 8 9; CHECK: Assumed Context: 10; CHECK-NEXT: [N] -> { : } 11; 12; CHECK: Arrays { 13; CHECK-NEXT: i32 MemRef_a[*]; // Element size 4 14; CHECK-NEXT: } 15; 16; CHECK: Statements { 17; CHECK-NEXT: Stmt_bb 18; CHECK-NEXT: Domain := 19; CHECK-NEXT: [N] -> { Stmt_bb[i0] : 0 <= i0 < N }; 20; CHECK-NEXT: Schedule := 21; CHECK-NEXT: [N] -> { Stmt_bb[i0] -> [i0] }; 22; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0] 23; CHECK-NEXT: [N] -> { Stmt_bb[i0] -> MemRef_a[i0] }; 24; CHECK-NEXT: } 25 26target 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" 27 28define void @f(i32* nocapture %a, i64 %N) nounwind { 29entry: 30 br label %bb 31 32bb: ; preds = %bb, %entry 33 %i = phi i32 [ 0, %entry ], [ %i.inc, %bb ] 34 %scevgep = getelementptr inbounds i32, i32* %a, i32 %i 35 store i32 %i, i32* %scevgep 36 %i.inc = add nsw i32 %i, 1 37 %i.ext = zext i32 %i.inc to i64 38 %exitcond = icmp eq i64 %i.ext, %N 39 br i1 %exitcond, label %return, label %bb 40 41return: ; preds = %bb, %entry 42 ret void 43} 44