1; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -analyze < %s | FileCheck %s
2;
3; void f(int *sums) {
4;   int i, j;
5;   for (i = 0; i < 1024; i++) {
6;     for (j = 0; j < 1024; j++) {
7;       sums[i] += 5;
8;       sums[i+10] *= 5;
9;     }
10;   }
11; }
12;
13; CHECK-NOT: Reduction Type: +
14; CHECK-NOT: Reduction Type: *
15target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-n32-S64"
16
17define void @f(i32* %sums) {
18entry:
19  br label %for.cond
20
21for.cond:                                         ; preds = %for.inc6, %entry
22  %i.0 = phi i32 [ 0, %entry ], [ %inc7, %for.inc6 ]
23  %exitcond1 = icmp ne i32 %i.0, 1024
24  br i1 %exitcond1, label %for.body, label %for.end8
25
26for.body:                                         ; preds = %for.cond
27  br label %for.cond1
28
29for.cond1:                                        ; preds = %for.inc, %for.body
30  %j.0 = phi i32 [ 0, %for.body ], [ %inc, %for.inc ]
31  %exitcond = icmp ne i32 %j.0, 1024
32  br i1 %exitcond, label %for.body3, label %for.end
33
34for.body3:                                        ; preds = %for.cond1
35  %arrayidx = getelementptr inbounds i32, i32* %sums, i32 %i.0
36  %tmp = load i32, i32* %arrayidx, align 4
37  %add = add nsw i32 %tmp, 5
38  store i32 %add, i32* %arrayidx, align 4
39  %add4 = add nsw i32 %i.0, 10
40  %arrayidx5 = getelementptr inbounds i32, i32* %sums, i32 %add4
41  %tmp2 = load i32, i32* %arrayidx5, align 4
42  %mul = mul nsw i32 %tmp2, 5
43  store i32 %mul, i32* %arrayidx5, align 4
44  br label %for.inc
45
46for.inc:                                          ; preds = %for.body3
47  %inc = add nsw i32 %j.0, 1
48  br label %for.cond1
49
50for.end:                                          ; preds = %for.cond1
51  br label %for.inc6
52
53for.inc6:                                         ; preds = %for.end
54  %inc7 = add nsw i32 %i.0, 1
55  br label %for.cond
56
57for.end8:                                         ; preds = %for.cond
58  ret void
59}
60