1 ; RUN: opt %loadPolly -polly-dependences -analyze < %s | FileCheck %s
3 ; CHECK: RAW dependences:
5 ; CHECK-NEXT: WAR dependences:
7 ; CHECK-NEXT: WAW dependences:
9 ; CHECK-NEXT: Reduction dependences:
10 ; CHECK-NEXT: { Stmt_for_cond[i0] -> Stmt_for_cond[1 + i0] : 0 <= i0 <= 99 }
13 ; for (int i = 0; i <= 100; i++)
16 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-n32-S64"
18 define void @f(i32* %sum) {
20 br label %entry.split1
22 entry.split1: ; preds = %entry
25 entry.split: ; preds = %entry.split1
28 for.cond: ; preds = %for.cond, %entry.split
29 %i1.0 = phi i32 [ 0, %entry.split ], [ %inc, %for.cond ]
30 %sum.reload = load i32, i32* %sum
31 %mul = mul nsw i32 %i1.0, 3
32 %add = add nsw i32 %sum.reload, %mul
33 %inc = add nsw i32 %i1.0, 1
34 store i32 %add, i32* %sum
35 %cmp = icmp slt i32 %i1.0, 100
36 br i1 %cmp, label %for.cond, label %for.end
38 for.end: ; preds = %for.cond