1; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s
2;
3;    void f(char *A, char N, char p) {
4;      for (char i = 0; i < N; i++)
5;        A[p-1] = 0;
6;    }
7
8; CHECK:      Function: wrap
9;
10; CHECK:      Context:
11; CHECK-NEXT: [N, p] -> {  : -128 <= N <= 127 and -128 <= p <= 127 }
12;
13; CHECK:      Invalid Context:
14; CHECK-NEXT: [N, p] -> {  : p = -128 and N > 0 }
15
16target datalayout = "e-m:e-i8:64-f80:128-n8:16:32:64-S128"
17
18define void @wrap(i8* %A, i8 %N, i8 %p) {
19bb:
20  br label %bb2
21
22bb2:                                              ; preds = %bb7, %bb
23  %indvars.iv = phi i8 [ %indvars.iv.next, %bb7 ], [ 0, %bb ]
24  %tmp3 = icmp slt i8 %indvars.iv, %N
25  br i1 %tmp3, label %bb4, label %bb8
26
27bb4:                                              ; preds = %bb2
28  %tmp5 = add i8 %p, -1
29  %tmp6 = getelementptr i8, i8* %A, i8 %tmp5
30  store i8 0, i8* %tmp6, align 4
31  br label %bb7
32
33bb7:                                              ; preds = %bb4
34  %indvars.iv.next = add nuw nsw i8 %indvars.iv, 1
35  br label %bb2
36
37bb8:                                              ; preds = %bb2
38  ret void
39}
40