1 ; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s
4 ; CHECK-NEXT: [N] -> { : -2147483648 <= N <= 2147483647 }
5 ; CHECK-NEXT: Assumed Context:
6 ; CHECK-NEXT: [N] -> { : }
7 ; CHECK-NEXT: Invalid Context:
8 ; CHECK-NEXT: [N] -> { : N >= 514 }
11 ; CHECK-NEXT: Stmt_if_end
12 ; CHECK-NEXT: Domain :=
13 ; CHECK-NEXT: [N] -> { Stmt_if_end[i0] : 0 <= i0 < N };
14 ; CHECK-NEXT: Schedule :=
15 ; CHECK-NEXT: [N] -> { Stmt_if_end[i0] -> [i0] };
16 ; CHECK-NEXT: ReadAccess := [Reduction Type: +] [Scalar: 0]
17 ; CHECK-NEXT: [N] -> { Stmt_if_end[i0] -> MemRef_A[i0] };
18 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: +] [Scalar: 0]
19 ; CHECK-NEXT: [N] -> { Stmt_if_end[i0] -> MemRef_A[i0] };
23 ; void g(int *A, int N) {
24 ; for (int i = 0; i < N; i++) {
33 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
35 define void @g(i32* %A, i32 %N) {
37 %tmp = sext i32 %N to i64
40 for.cond: ; preds = %for.inc, %entry
41 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ]
42 %cmp = icmp slt i64 %indvars.iv, %tmp
43 br i1 %cmp, label %for.body, label %for.end
45 for.body: ; preds = %for.cond
46 %cmp1 = icmp sgt i64 %indvars.iv, 512
47 br i1 %cmp1, label %if.then, label %if.end
49 if.then: ; preds = %for.body
50 call void (...) @f() #2
51 %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv
52 %tmp12 = load i32, i32* %arrayidx2, align 4
53 %inc2 = add nsw i32 %tmp12, 1
54 store i32 %inc2, i32* %arrayidx2, align 4
57 if.end: ; preds = %if.then, %for.body
58 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %indvars.iv
59 %tmp1 = load i32, i32* %arrayidx, align 4
60 %inc = add nsw i32 %tmp1, 1
61 store i32 %inc, i32* %arrayidx, align 4
64 for.inc: ; preds = %if.end
65 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
68 for.end: ; preds = %for.cond