1 ; RUN: opt %loadPolly -basic-aa -polly-print-scops -disable-output < %s | FileCheck %s
4 ; int i, sum = 0, sth = 0;
5 ; for (i = 0; i < 1024; i++) {
7 ; sth = sth + sth * sth + sth;
13 ; CHECK-NOT: Reduction Type: +
14 ; CHECK-NOT: Reduction Type: *
15 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-n32-S64"
23 entry.split: ; preds = %entry
24 store i32 0, ptr %sum.0
25 store i32 0, ptr %sth.0
28 for.cond: ; preds = %for.cond, %entry.split
29 %i.0 = phi i32 [ 0, %entry.split ], [ %inc, %for.cond ]
30 %sth.0.reload = load i32, ptr %sth.0
31 %sum.0.reload = load i32, ptr %sum.0
32 %exitcond = icmp ne i32 %i.0, 1024
33 %mul = mul nsw i32 %sth.0.reload, %sth.0.reload
34 %add1 = add nsw i32 %sth.0.reload, %mul
35 %tmp = mul i32 %sum.0.reload, 5
36 store i32 %tmp, ptr %sum.0
37 %sum.1.reload = load i32, ptr %sum.0
38 %mul3 = add i32 %sum.1.reload, 25
39 %add2 = add nsw i32 %add1, %sth.0.reload
40 %inc = add nsw i32 %i.0, 1
41 store i32 %mul3, ptr %sum.0
42 store i32 %add2, ptr %sth.0
43 br i1 %exitcond, label %for.cond, label %for.end
45 for.end: ; preds = %for.cond
46 %sum.0.reload.2 = load i32, ptr %sum.0
47 %sth.0.reload.2 = load i32, ptr %sth.0
48 %add4 = add nsw i32 %sum.0.reload.2, %sth.0.reload.2