1; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s
2;
3;    void f(int *A, unsigned char N) {
4;      for (unsigned i = 0; i <= N / -128; 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[0] : N >= 0 };
15;
16target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
17
18define void @f(i32* %A, i8 %N) {
19entry:
20  %tmp = udiv i8 %N, -128
21  br label %for.cond
22
23for.cond:                                         ; preds = %for.inc, %entry
24  %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ]
25  %lftr.wideiv = trunc i64 %indvars.iv to i8
26  %exitcond = icmp sle i8 %lftr.wideiv, %tmp
27  br i1 %exitcond, label %for.body, label %for.end
28
29for.body:                                         ; preds = %for.cond
30  %arrayidx = getelementptr inbounds i32, i32* %A, i64 %indvars.iv
31  %tmp2 = load i32, i32* %arrayidx, align 4
32  %inc = add nsw i32 %tmp2, 1
33  store i32 %inc, i32* %arrayidx, align 4
34  br label %for.inc
35
36for.inc:                                          ; preds = %for.body
37  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
38  br label %for.cond
39
40for.end:                                          ; preds = %for.cond
41  ret void
42}
43