1; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s 2; 3; CHECK: Assumed Context: 4; CHECK-NEXT: [N] -> { : } 5; CHECK-NEXT: Invalid Context: 6; CHECK-NEXT: [N] -> { : N >= 4294967297 } 7; CHECK-NEXT: p0: %N 8; CHECK: Statements { 9; CHECK-NEXT: Stmt_for_body 10; CHECK-NEXT: Domain := 11; CHECK-NEXT: [N] -> { Stmt_for_body[i0] : 0 <= i0 < N }; 12; CHECK-NEXT: Schedule := 13; CHECK-NEXT: [N] -> { Stmt_for_body[i0] -> [i0] }; 14; CHECK-NEXT: ReadAccess := [Reduction Type: +] [Scalar: 0] 15; CHECK-NEXT: [N] -> { Stmt_for_body[i0] -> MemRef_A[i0] }; 16; CHECK-NEXT: MustWriteAccess := [Reduction Type: +] [Scalar: 0] 17; CHECK-NEXT: [N] -> { Stmt_for_body[i0] -> MemRef_A[i0] }; 18; CHECK-NEXT: } 19; 20; void f(long *A, long N) { 21; long K = /* 2^32 */ 4294967296; 22; for (long i = 0; i < N; i++) { 23; A[i % K]++; 24; } 25; } 26; 27target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 28 29define void @f(i64* %A, i64 %N) { 30entry: 31 br label %for.cond 32 33for.cond: ; preds = %for.inc, %entry 34 %i.0 = phi i64 [ 0, %entry ], [ %inc1, %for.inc ] 35 %cmp = icmp slt i64 %i.0, %N 36 br i1 %cmp, label %for.body, label %for.end 37 38for.body: ; preds = %for.cond 39 %i.t = trunc i64 %i.0 to i33 40 %rem = zext i33 %i.t to i64 41 %arrayidx = getelementptr inbounds i64, i64* %A, i64 %rem 42 %tmp = load i64, i64* %arrayidx, align 4 43 %inc = add nsw i64 %tmp, 1 44 store i64 %inc, i64* %arrayidx, align 4 45 br label %for.inc 46 47for.inc: ; preds = %for.body 48 %inc1 = add nuw nsw i64 %i.0, 1 49 br label %for.cond 50 51for.end: ; preds = %for.cond 52 ret void 53} 54