1 ; RUN: opt -S %loadPolly -polly-print-dependences -disable-output < %s | FileCheck %s -check-prefix=VALUE
2 ; RUN: opt -S %loadPolly -polly-print-function-dependences -disable-output < %s | FileCheck %s -check-prefix=FUNC-VALUE
3 ; RUN: opt -S %loadPolly -polly-print-dependences -polly-dependences-computeout=1 -disable-output < %s | FileCheck %s -check-prefix=TIMEOUT
4 ; RUN: opt -S %loadPolly -polly-print-function-dependences -polly-dependences-computeout=1 -disable-output < %s | FileCheck %s -check-prefix=TIMEOUT
5 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
7 ; for(i = 0; i < 100; i++ )
10 ; for (i = 0; i < 10; i++ )
13 ; for (i = 0; i < 200; i++ )
16 define void @sequential_writes() {
18 %A = alloca [200 x i32]
22 %indvar.1 = phi i64 [ 0, %entry ], [ %indvar.next.1, %S1 ]
23 %arrayidx.1 = getelementptr [200 x i32], ptr %A, i64 0, i64 %indvar.1
24 store i32 2, ptr %arrayidx.1
25 %indvar.next.1 = add i64 %indvar.1, 1
26 %exitcond.1 = icmp ne i64 %indvar.next.1, 100
27 br i1 %exitcond.1, label %S1, label %exit.1
33 %indvar.2 = phi i64 [ 0, %exit.1 ], [ %indvar.next.2, %S2 ]
34 %arrayidx.2 = getelementptr [200 x i32], ptr %A, i64 0, i64 %indvar.2
35 store i32 5, ptr %arrayidx.2
36 %indvar.next.2 = add i64 %indvar.2, 1
37 %exitcond.2 = icmp ne i64 %indvar.next.2, 10
38 br i1 %exitcond.2, label %S2, label %exit.2
44 %indvar.3 = phi i64 [ 0, %exit.2 ], [ %indvar.next.3, %S3 ]
45 %arrayidx.3 = getelementptr [200 x i32], ptr %A, i64 0, i64 %indvar.3
46 store i32 7, ptr %arrayidx.3
47 %indvar.next.3 = add i64 %indvar.3, 1
48 %exitcond.3 = icmp ne i64 %indvar.next.3, 200
49 br i1 %exitcond.3, label %S3 , label %exit.3
55 ; VALUE: RAW dependences:
57 ; VALUE-NEXT: WAR dependences:
59 ; VALUE-NEXT: WAW dependences:
60 ; VALUE-NEXT: { Stmt_S1[i0] -> Stmt_S3[i0] : 10 <= i0 <= 99; Stmt_S1[i0] -> Stmt_S2[i0] : 0 <= i0 <= 9; Stmt_S2[i0] -> Stmt_S3[i0] : 0 <= i0 <= 9 }
62 ; FUNC-VALUE: RAW dependences:
63 ; FUNC-VALUE-NEXT: { }
64 ; FUNC-VALUE-NEXT: WAR dependences:
65 ; FUNC-VALUE-NEXT: { }
66 ; FUNC-VALUE-NEXT: WAW dependences:
67 ; FUNC-VALUE-NEXT: { Stmt_S1[i0] -> Stmt_S3[i0] : 10 <= i0 <= 99; Stmt_S1[i0] -> Stmt_S2[i0] : 0 <= i0 <= 9; [Stmt_S2[i0] -> Stmt_S2_Write0[]] -> [Stmt_S3[i0] -> Stmt_S3_Write0[]] : 0 <= i0 <= 9; Stmt_S2[i0] -> Stmt_S3[i0] : 0 <= i0 <= 9; [Stmt_S1[i0] -> Stmt_S1_Write0[]] -> [Stmt_S2[i0] -> Stmt_S2_Write0[]] : 0 <= i0 <= 9; [Stmt_S1[i0] -> Stmt_S1_Write0[]] -> [Stmt_S3[i0] -> Stmt_S3_Write0[]] : 10 <= i0 <= 99 }
69 ; TIMEOUT: RAW dependences:
71 ; TIMEOUT-NEXT: WAR dependences:
73 ; TIMEOUT-NEXT: WAW dependences: