1 ; RUN: opt -S %loadNPMPolly '-passes=print<polly-dependences>' \
2 ; RUN: -disable-output < %s | FileCheck %s
4 ; CHECK: RAW dependences:
5 ; CHECK: { Stmt_bb9[0] -> Stmt_bb10[0] }
6 ; CHECK: WAR dependences:
7 ; CHECK: { Stmt_bb3[0] -> Stmt_bb10[0] }
8 ; CHECK: WAW dependences:
9 ; CHECK: { Stmt_bb3[0] -> Stmt_bb10[0] }
10 ; CHECK: Reduction dependences:
13 ; FUNC: RAW dependences:
14 ; FUNC-NEXT: { Stmt_bb9[0] -> Stmt_bb10[0]; [Stmt_bb9[0] -> Stmt_bb9_Write0[]] -> [Stmt_bb10[0] -> Stmt_bb10_Read0[]] }
15 ; FUNC-NEXT: WAR dependences:
16 ; FUNC-NEXT: { Stmt_bb3[0] -> Stmt_bb10[0]; [Stmt_bb3[0] -> Stmt_bb3_Read0[]] -> [Stmt_bb10[0] -> Stmt_bb10_Write1[]] }
17 ; FUNC-NEXT: WAW dependences:
18 ; FUNC-NEXT: { Stmt_bb3[0] -> Stmt_bb10[0]; [Stmt_bb3[0] -> Stmt_bb3_Write1[]] -> [Stmt_bb10[0] -> Stmt_bb10_Write1[]] }
19 ; FUNC-NEXT: Reduction dependences:
22 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
24 define void @hoge(i32 %arg, ptr %arg1) {
31 bb3: ; preds = %bb10, %bb2
32 %tmp = phi i64 [ 0, %bb10 ], [ 0, %bb2 ]
33 %tmp4 = icmp sgt i32 %arg, 0
34 %tmp6 = load double, ptr %arg1, align 8
35 %tmp7 = fadd double undef, %tmp6
36 store double %tmp7, ptr %arg1, align 8
37 br i1 false, label %bb8, label %bb9
45 bb10: ; preds = %bb9, %bb8
46 %tmp11 = phi double [ undef, %bb8 ], [ undef, %bb9 ]
47 %tmp12 = getelementptr inbounds [1024 x double], ptr %arg1, i64 %tmp, i64 0
48 store double %tmp11, ptr %tmp12, align 8
49 %tmp13 = add nuw nsw i64 0, 1
50 %tmp14 = trunc i64 %tmp13 to i32
51 br i1 false, label %bb3, label %bb15