1 ; RUN: opt %loadPolly -polly-print-scops -disable-output < %s | FileCheck %s
3 ; Check that PHI nodes only create PHI access and nothing else (e.g. unnecessary
4 ; SCALAR accesses). In this case, for a PHI in the exit node, hence there is no
7 ; CHECK-LABEL: Function: foo
10 ; CHECK-NEXT: Stmt_header
11 ; CHECK-NEXT: Domain :=
12 ; CHECK-NEXT: { Stmt_header[] };
13 ; CHECK-NEXT: Schedule :=
14 ; CHECK-NEXT: { Stmt_header[] -> [0, 0] };
15 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1]
16 ; CHECK-NEXT: { Stmt_header[] -> MemRef_phi[] };
17 ; CHECK-NEXT: Stmt_body
18 ; CHECK-NEXT: Domain :=
19 ; CHECK-NEXT: { Stmt_body[i0] : 0 <= i0 <= 100 };
20 ; CHECK-NEXT: Schedule :=
21 ; CHECK-NEXT: { Stmt_body[i0] -> [1, i0] };
22 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1]
23 ; CHECK-NEXT: { Stmt_body[i0] -> MemRef_phi[] };
26 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
28 define float @foo(float %sum, ptr %A) {
33 br i1 true, label %body, label %exit
36 %i = phi i64 [ 0, %header ], [ %next, %body ]
37 %scalar = fadd float 0.0, 0.0
38 %next = add nuw nsw i64 %i, 1
39 %cond = icmp ne i64 %i, 100
40 br i1 %cond, label %body, label %exit
43 %phi = phi float [%scalar, %body], [0.0, %header]