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++)
11 ; Verify that we do not model the read from %sum. Reads that only happen in
12 ; case control flow reaches the PHI node from outside the SCoP are handled
13 ; implicitly during code generation.
15 ; CHECK: Stmt_bb1[i0] -> MemRef_phisum__ph
16 ; CHECK-NOT: Stmt_bb1[i0] -> MemRef_sum[]
18 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
20 define float @foo(float %sum, ptr %A) {
25 %i = phi i64 [ 0, %bb ], [ %i.next, %bb1 ]
26 %phisum = phi float [ %sum, %bb ], [ %tmp5, %bb1 ]
27 %tmp = getelementptr inbounds float, ptr %A, i64 %i
28 %tmp4 = load float, ptr %tmp, align 4
29 %tmp5 = fadd float %phisum, %tmp4
30 %i.next = add nuw nsw i64 %i, 1
31 %exitcond = icmp ne i64 %i, 100
32 br i1 %exitcond, label %bb1, label %bb7