1 ; RUN: opt -S %loadPolly -polly-dependences \
2 ; RUN: -analyze < %s | FileCheck %s
3 ; RUN: opt -S %loadPolly -polly-function-dependences \
4 ; RUN: -analyze < %s | FileCheck %s -check-prefix=FUNC
6 ; CHECK: RAW dependences:
7 ; CHECK: { Stmt_bb9[0] -> Stmt_bb10[0] }
8 ; CHECK: WAR dependences:
9 ; CHECK: { Stmt_bb3[0] -> Stmt_bb10[0] }
10 ; CHECK: WAW dependences:
11 ; CHECK: { Stmt_bb3[0] -> Stmt_bb10[0] }
12 ; CHECK: Reduction dependences:
15 ; FUNC: RAW dependences:
16 ; FUNC-NEXT: { Stmt_bb9[0] -> Stmt_bb10[0]; [Stmt_bb9[0] -> Stmt_bb9_Write0[]] -> [Stmt_bb10[0] -> Stmt_bb10_Read0[]] }
17 ; FUNC-NEXT: WAR dependences:
18 ; FUNC-NEXT: { [Stmt_bb3[0] -> Stmt_bb3_Read0[]] -> [Stmt_bb10[0] -> Stmt_bb10_Write1[]]; Stmt_bb3[0] -> Stmt_bb10[0] }
19 ; FUNC-NEXT: WAW dependences:
20 ; FUNC-NEXT: { Stmt_bb3[0] -> Stmt_bb10[0]; [Stmt_bb3[0] -> Stmt_bb3_Write1[]] -> [Stmt_bb10[0] -> Stmt_bb10_Write1[]] }
21 ; FUNC-NEXT: Reduction dependences:
24 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
26 define void @hoge(i32 %arg, [1024 x double]* %arg1) {
33 bb3: ; preds = %bb10, %bb2
34 %tmp = phi i64 [ 0, %bb10 ], [ 0, %bb2 ]
35 %tmp4 = icmp sgt i32 %arg, 0
36 %tmp5 = getelementptr inbounds [1024 x double], [1024 x double]* %arg1, i64 0, i64 0
37 %tmp6 = load double, double* %tmp5, align 8
38 %tmp7 = fadd double undef, %tmp6
39 store double %tmp7, double* %tmp5, align 8
40 br i1 false, label %bb8, label %bb9
48 bb10: ; preds = %bb9, %bb8
49 %tmp11 = phi double [ undef, %bb8 ], [ undef, %bb9 ]
50 %tmp12 = getelementptr inbounds [1024 x double], [1024 x double]* %arg1, i64 %tmp, i64 0
51 store double %tmp11, double* %tmp12, align 8
52 %tmp13 = add nuw nsw i64 0, 1
53 %tmp14 = trunc i64 %tmp13 to i32
54 br i1 false, label %bb3, label %bb15