1 ; RUN: opt %loadPolly -analyze -polly-scops %s | FileCheck %s
3 ; CHECK-LABEL: Function: foo
6 ; CHECK-NEXT: Stmt_body
7 ; CHECK-NEXT: Domain :=
8 ; CHECK-NEXT: { Stmt_body[i0] : 0 <= i0 <= 100 };
9 ; CHECK-NEXT: Schedule :=
10 ; CHECK-NEXT: { Stmt_body[i0] -> [i0] };
11 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1]
12 ; CHECK-NEXT: { Stmt_body[i0] -> MemRef_sum__phi[] };
13 ; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 1]
14 ; CHECK-NEXT: { Stmt_body[i0] -> MemRef_sum__phi[] };
15 ; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0]
16 ; CHECK-NEXT: { Stmt_body[i0] -> MemRef_A[i0] };
17 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1]
18 ; CHECK-NEXT: { Stmt_body[i0] -> MemRef_sum_next[] };
21 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
23 define float @foo(float* %A) {
29 br i1 true, label %body, label %exit
32 %i = phi i64 [ 0, %header ], [ %next, %body ]
33 %sum = phi float [ 0.0, %header ], [ %sum.next, %body ]
34 %arrayidx = getelementptr float, float* %A, i64 %i
35 %scalar = fadd float 0.0, 0.0
36 %next = add nuw nsw i64 %i, 1
37 %val = load float, float* %arrayidx
38 %sum.next = fadd float %sum, %val
39 %cond = icmp ne i64 %i, 100
40 br i1 %cond, label %body, label %after
46 %phi = phi float [%sum.next, %after], [0.0, %header]