1; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s
2;
3;    void f(int *A, unsigned N) {
4;      for (unsigned i = 0; i < N / 2 + 3; i++)
5;        A[i]++;
6;    }
7;
8; CHECK:          Assumed Context:
9; CHECK-NEXT:     [N] -> {  :  }
10; CHECK-NEXT:     Invalid Context:
11; CHECK-NEXT:     [N] -> {  : N < 0 }
12;
13; CHECK:          Domain :=
14; CHECK-NEXT:     [N] -> { Stmt_for_body[i0] : i0 >= 0 and 2i0 <= 4 + N };
15;
16target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
17
18define void @f(i32* %A, i32 %N) {
19entry:
20  %tmp = lshr i32 %N, 1
21  %tmp1 = add i32 %tmp, 3
22  br label %for.cond
23
24for.cond:                                         ; preds = %for.inc, %entry
25  %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ]
26  %lftr.wideiv = trunc i64 %indvars.iv to i32
27  %exitcond = icmp ult i32 %lftr.wideiv, %tmp1
28  br i1 %exitcond, label %for.body, label %for.end
29
30for.body:                                         ; preds = %for.cond
31  %arrayidx = getelementptr inbounds i32, i32* %A, i64 %indvars.iv
32  %tmp2 = load i32, i32* %arrayidx, align 4
33  %inc = add nsw i32 %tmp2, 1
34  store i32 %inc, i32* %arrayidx, align 4
35  br label %for.inc
36
37for.inc:                                          ; preds = %for.body
38  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
39  br label %for.cond
40
41for.end:                                          ; preds = %for.cond
42  ret void
43}
44