1 ; RUN: opt %loadPolly -polly-codegen < %s
2 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
4 ; CHECK: %polly.access.sext.A = sext i32 %n to i64
5 ; CHECK: %polly.access.mul.A = mul i64 %polly.access.sext.A, %0
6 ; CHECK: %polly.access.add.A = add i64 %polly.access.mul.A, 1
7 ; CHECK: %polly.access.A = getelementptr double, ptr %A, i64 %polly.access.add.A
8 ; CHECK: icmp ule ptr %polly.access.A, %y
11 define void @init_array(i32 %n, ptr %A, ptr %y) {
13 %add3 = add nsw i32 %n, 1
14 %tmp = zext i32 %add3 to i64
18 %i.04 = phi i32 [ %inc39, %for.cond.loopexit ], [ 0, %entry ]
19 store double 1.0, ptr %y
20 %cmp251 = icmp slt i32 %n, 0
21 %inc39 = add nsw i32 %i.04, 1
22 br i1 %cmp251, label %for.cond.loopexit, label %for.body27
25 %idxprom35 = sext i32 %i.04 to i64
26 %tmp1 = mul nsw i64 %idxprom35, %tmp
27 %arrayidx36.sum = add i64 0, %tmp1
28 %arrayidx37 = getelementptr inbounds double, ptr %A, i64 %arrayidx36.sum
29 store double 1.0, ptr %arrayidx37
30 br label %for.cond.loopexit
33 %cmp = icmp slt i32 %i.04, %n
34 br i1 %cmp, label %for.body, label %for.end40