1; RUN: opt %loadPolly -polly-scops -analyze \ 2; RUN: -S < %s | FileCheck %s 3 4; CHECK: Statements { 5; CHECK-NEXT: Stmt_loop__TO__backedge 6; CHECK-NEXT: Domain := 7; CHECK-NEXT: { Stmt_loop__TO__backedge[i0] : 0 <= i0 <= 100 }; 8; CHECK-NEXT: Schedule := 9; CHECK-NEXT: { Stmt_loop__TO__backedge[i0] -> [i0, 0] }; 10; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1] 11; CHECK-NEXT: { Stmt_loop__TO__backedge[i0] -> MemRef_merge__phi[] }; 12; CHECK-NEXT: Stmt_backedge 13; CHECK-NEXT: Domain := 14; CHECK-NEXT: { Stmt_backedge[i0] : 0 <= i0 <= 100 }; 15; CHECK-NEXT: Schedule := 16; CHECK-NEXT: { Stmt_backedge[i0] -> [i0, 1] }; 17; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 1] 18; CHECK-NEXT: { Stmt_backedge[i0] -> MemRef_merge__phi[] }; 19; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0] 20; CHECK-NEXT: { Stmt_backedge[i0] -> MemRef_A[0] }; 21; CHECK-NEXT: } 22 23define void @foo(float* %A, i1 %cond0, i1 %cond1) { 24entry: 25 br label %loop 26 27loop: 28 %indvar = phi i64 [0, %entry], [%indvar.next, %backedge] 29 %val0 = fadd float 1.0, 2.0 30 %val1 = fadd float 1.0, 2.0 31 br i1 %cond0, label %branch1, label %backedge 32 33branch1: 34 %val2 = fadd float 1.0, 2.0 35 br i1 %cond1, label %branch2, label %backedge 36 37branch2: 38 br label %backedge 39 40backedge: 41 %merge = phi float [%val0, %loop], [%val1, %branch1], [%val2, %branch2] 42 %indvar.next = add i64 %indvar, 1 43 store float %merge, float* %A 44 %cmp = icmp sle i64 %indvar.next, 100 45 br i1 %cmp, label %loop, label %exit 46 47exit: 48 ret void 49} 50