1; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s
2;
3; TODO: We do not allow unbounded loops at the moment.
4;
5; CHECK-NOT: Stmt_for_body
6;
7;   void f(int *A, int N, int M) {
8;     for (int i = M; i > N; i++)
9;       A[i] = i;
10;   }
11;
12target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
13
14define void @f(i32* %A, i32 %N, i32 %M) {
15entry:
16  br label %entry.split
17
18entry.split:
19  %cmp.1 = icmp sgt i32 %M, %N
20  br i1 %cmp.1, label %for.body, label %for.end
21
22for.body:
23  %indvars.iv = phi i32 [ %indvars.iv.next, %for.body ], [ %M, %entry.split ]
24  %arrayidx = getelementptr inbounds i32, i32* %A, i32 %indvars.iv
25  store i32 %indvars.iv, i32* %arrayidx, align 4
26  %cmp = icmp slt i32 %M, %N
27  %indvars.iv.next = add i32 %indvars.iv, 1
28  br i1 %cmp, label %for.cond.for.end_crit_edge, label %for.body
29
30for.cond.for.end_crit_edge:
31  br label %for.end
32
33for.end:
34  ret void
35}
36