1 ; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s
3 ; CHECK: Reduction Type: +
6 ; for (int i = 0; i <= 100; i++)
9 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-n32-S64"
11 define void @f(i32* %sum) {
15 for.cond: ; preds = %for.cond, %entry
16 %i1.0 = phi i32 [ 0, %entry ], [ %inc, %for.cond ]
17 %sum.reload = load i32, i32* %sum
18 %add = add nsw i32 %sum.reload, 3
19 %inc = add nsw i32 %i1.0, 1
20 store i32 %add, i32* %sum
21 %cmp = icmp slt i32 %i1.0, 100
22 br i1 %cmp, label %for.cond, label %for.end
24 for.end: ; preds = %for.cond