1 ; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s
3 ; void f(int *A, int N) {
4 ; for (int i = 0; i < N; i++)
10 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
12 define void @f(i32* %A, i32 %N) {
16 for.cond: ; preds = %for.inc, %entry
17 %i.0 = phi i32 [ 0, %entry ], [ %inc1, %for.inc ]
18 %cmp = icmp slt i32 %i.0, %N
19 br i1 %cmp, label %for.body, label %for.end
21 for.body: ; preds = %for.cond
22 %div = sdiv i32 %i.0, 0
23 %idxprom = sext i32 %div to i64
24 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %idxprom
25 %tmp = load i32, i32* %arrayidx, align 4
26 %inc = add nsw i32 %tmp, 1
27 store i32 %inc, i32* %arrayidx, align 4
30 for.inc: ; preds = %for.body
31 %inc1 = add nuw nsw i32 %i.0, 1
34 for.end: ; preds = %for.cond