1 ; RUN: opt %loadPolly -polly-print-scops -disable-output < %s | FileCheck %s
3 ; float foo(float sum, float A[]) {
5 ; for (long i = 0; i < 100; i++)
12 ; CHECK-NEXT: Stmt_next
13 ; CHECK-NEXT: Domain :=
14 ; CHECK-NEXT: { Stmt_next[] };
15 ; CHECK-NEXT: Schedule :=
16 ; CHECK-NEXT: { Stmt_next[] -> [0, 0] };
17 ; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 1]
18 ; CHECK-NEXT: { Stmt_next[] -> MemRef_sum[] };
19 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1]
20 ; CHECK-NEXT: { Stmt_next[] -> MemRef_phisum__phi[] };
21 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1]
22 ; CHECK-NEXT: { Stmt_next[] -> MemRef_phisummerge[] };
23 ; CHECK-NEXT: Stmt_bb1
24 ; CHECK-NEXT: Domain :=
25 ; CHECK-NEXT: { Stmt_bb1[i0] : 0 <= i0 <= 100 };
26 ; CHECK-NEXT: Schedule :=
27 ; CHECK-NEXT: { Stmt_bb1[i0] -> [1, i0] };
28 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1]
29 ; CHECK-NEXT: { Stmt_bb1[i0] -> MemRef_phisum__phi[] };
30 ; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 1]
31 ; CHECK-NEXT: { Stmt_bb1[i0] -> MemRef_phisum__phi[] };
32 ; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0]
33 ; CHECK-NEXT: { Stmt_bb1[i0] -> MemRef_A[i0] };
34 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1]
35 ; CHECK-NEXT: { Stmt_bb1[i0] -> MemRef_phisummerge[] };
38 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
40 define float @foo(float %sum, ptr %A) {
45 br i1 true, label %bb1, label %bb7
48 %i = phi i64 [ 0, %next ], [ %i.next, %bb1 ]
49 %phisum = phi float [ %sum, %next ], [ %tmp5, %bb1 ]
50 %tmp = getelementptr inbounds float, ptr %A, i64 %i
51 %tmp4 = load float, ptr %tmp, align 4
52 %tmp5 = fadd float %phisum, %tmp4
53 %i.next = add nuw nsw i64 %i, 1
54 %exitcond = icmp ne i64 %i, 100
55 br i1 %exitcond, label %bb1, label %bb7
58 %phisummerge = phi float [%phisum, %bb1], [0.0, %next]
59 ret float %phisummerge